1

Steps to reproduce:

  1. Use jHtmlArea editor.
  2. Goto Html Edit mode.
  3. Add <script>...</script> section, for example yandex map widget.
  4. Goto Visual Edit mode.
  5. Goto Html Edit mode.

Section <script>...</script> will be broken.

How to fix this issue to insert <script>...</script> section to jHtmlArea editor correctly? May be there is a plugin for this?

The editor is the following (xinha): http://xinha.webfactional.com/browser/trunk?rev=631

Thanks a lot for the help!

Dmitry
  • 14,306
  • 23
  • 105
  • 189
  • This typically does not work. While there are workarounds, what you are trying to do sounds like poor practice (having scripts commingled with the content). – random_user_name Oct 18 '12 at 22:08
  • I just need to add a script and then to edit a page. There is no other way to add it. – Dmitry Oct 18 '12 at 22:10

1 Answers1

0

I don't know much about HtmlArea editor. However most editors would do the same - some manually added tags (eg script) will be treated different as they suppost to be.

What I used to do is to go to database and insert the script directly after content has been typed in in the editor. Of course, given that you have access to the database.

Aaron Chen
  • 130
  • 1
  • 2
  • 8