Skip to content
Advertisement

Can’t retrieve in correct form data from SQL in TinyMCE

I want to create an editor with TinyMCE and I have an error when I want to add content from SQL.

The function inside tinymce.init is:

JavaScript

It needs to load the content. Instead, it gives this error in the console:

Uncaught SyntaxError: ” string literal contains an unescaped line break

This is the result from the error:

JavaScript

Any advice on how I should fix it?

Advertisement

Answer

You can remove the line breaks, I don’t think you really need them

JavaScript

more info and example you can find in

PHP preg_replace replacing line break

preg_replace() and n in a string

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement