I found this: p I did a javascript demo here: https://jsfiddle.net/x14vdkk0/1/
If you cannot set the value, then the root cause is in multiple lines. In fact, you are doing something like this:
$(document).ready(function() { $('#txtEditor').Editor(); $('#txtEditor').Editor('setText', 'My text with <strong>LineControl</strong> :) second line !');
You can see (console.log) that the second line part is in error because javascript does not recognize this.

Solution: avoid carriage return
From the database
You have a beautiful json_encode function that will protect you from all problems of this type and javascriptize your variable.
$(document).ready(function() { $('#txtEditor').Editor(); $('#txtEditor').Editor('setText', <?php echo json_encode($description); ?>); });
I did not forget the quotes around the php function. What for? Because the json_encode function will add a quote to your text. If you do json_encode('toto') output will be "toto" ; If you do Exit json_encode([key' => 'toto']) will be {"key":"toto"}
What all:)
Another solution:
Use htmlspecialchars($description) for the text box
<textarea id="txtEditor"> My text with: <strong>LineControl !</strong> </textarea>
and
$(document).ready(function() { $el = '#txtEditor'; $($el).Editor(); $($el).Editor('setText', $($el).val()); });
source share