javascript - problem with inserting HTML with insertHTML -


I am trying to create wysiwyg editor with content editable devices and I want to document.exec ('insert html' , False, html); But the problem is, when I add a link, and after that I want to write that link after writing in.

Example:

How does this happen now:

  Hello, & lt; A & gt; Stackoverflow.com MyTextAfterLink & lt; / A & gt;  

How should it be:

  Hello, & lt; A & gt; Stackoverflow.com & lt; / A & gt; MyTextAfterLink  

How can I fix this? Thank you.

Instead of specifying the internal HTML property of a DOM node, try specifying.


Comments