Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
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

 Answers
8

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


[#94456] Monday, December 27, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bradenc

Total Points: 75
Total Questions: 96
Total Answers: 129

Location: Burundi
Member since Thu, Feb 10, 2022
2 Years ago
;