Insert indented text in TextArea with CodeMirror

2

I'm doing a HTML editor in the browser, where the user can write his script to the database, I recorded all the lines of user code in a single string and recorded it in the DB, but how do I bring it back as user created?

Currently it looks like this:

Does anyone know if CodeMirror has some function that reads this, or another idea?!

    
asked by anonymous 09.01.2017 / 22:47

1 answer

2

You can use HtmlHelper that Supports rendering of HTML controls in a view. In your View use it like this:

 @Html.Raw(Model.StringDoBanco)
    
14.02.2017 / 01:16