0

Hi all,

I am not getting the tinymce edit textarea in an html page that is generated by ajax. I am calling the ajax using jquery. I have kept the tiny_mce.js file on the page that is generated via ajax. The path is correct but am not getting the page displayed.
There is no problem for the source hence i am getting the tinymce editor without using ajax.
Expecting a solution from ur side.

Thanks in advance.
Jino

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by jino
0

I had a similar issue and resolved it by manually calling the mceAddControl function after adding the textarea:

if (!tinyMCE.get('elementid')){
		tinyMCE.execCommand('mceAddControl', false, "elementid");
	}

Where elementid is the id of the textarea. Not sure if this is what you need. I wasn't using jquery or even AJAX, just generating the textarea dynamically and it wasn't showing up. That fixed it for me.

0

I had a similar issue and resolved it by manually calling the mceAddControl function after adding the textarea:

if (!tinyMCE.get('elementid')){
		tinyMCE.execCommand('mceAddControl', false, "elementid");
	}

Where elementid is the id of the textarea. Not sure if this is what you need. I wasn't using jquery or even AJAX, just generating the textarea dynamically and it wasn't showing up. That fixed it for me.

Thanks for ur reply, but it is still not working.

0

My mistake was that i had place the tiny_mcs.js file and the tinymce initialization in the page where the textarea reside. I had take that to the page where the click event happens.

Also i have place the tinyMCE.execCommand('mceAddControl', false, "textarea_id"); after the success of the ajax call in jquery.

Thanks for all.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.