59
rated 0 times
[
63]
[
4]
/ answers: 1 / hits: 89209
/ 14 Years ago, wed, december 29, 2010, 12:00:00
i have an array of content then how we get content of Tinymce textarea in javascript
More From » tinymce
i have an array of content then how we get content of Tinymce textarea in javascript
lets say your mce textarea instance is:
<textarea id=editor1 ....></textarea>
then you get the content as follows:
var content = tinyMCE.getContent('editor1');
if you mean you have multiple instances of mce editor on one page and you want to get content then try this approach:
var inst, contents = new Object();
for (inst in tinyMCE.editors) {
if (tinyMCE.editors[inst].getContent)
contents[inst] = tinyMCE.editors[inst].getContent();
}
the above code adds each editor content into an array