D
D
dkrylov2017-05-02 19:47:02
PHP
dkrylov, 2017-05-02 19:47:02

How to save JS code through WYSIWYG editor?

Hello!
Help with advice or deed) How can I save JavaScript code through a WYSIWYG editor?
Those. we have the nicEdit editor. In theory, you need to enter it there - this script is saved not as just text, but as a script. And when editing, you need it to be displayed as text) The $_POST['content'] array is transmitted to the server and saved using PHP in MYSQL I hope I explained it clearly) <script>alert(123);</script>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Peter, 2017-05-02
@dkrylov

A piece of text becomes an executable script when it is inside < script > tags, and in your editor it is between < div > tags.
I hope I answered clearly)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question