tiff / wysihtml5

Open source rich text editor based on HTML5 and the progressive-enhancement approach. Uses a sophisticated security concept and aims to generate fully valid HTML5 markup by preventing unmaintainable tag soups and inline styles.
http://xing.github.com/wysihtml5/
MIT License
6.49k stars 995 forks source link

How to add multiple rich text editors? #557

Open rosaliechan opened 7 years ago

rosaliechan commented 7 years ago

Hi! I was wondering, how do you add multiple rich text editors on one page? I have the problem where if I have multiple rich text editors, the same text appears in both of the same boxes when I refresh the page, even if I typed different things. I'm trying to create a rich text editor for a text section and a caption section. Is there something I'm doing wrong in the code below?

$('iframe.wysihtml5-sandbox').contents().find('body').html(data.text.text); $('iframe.wysihtml5-sandbox').contents().find('body').html(data.media.caption);