Reputation: 43
I'm currently using TinyMCE as my primary text editior in my website, but now I'm facing a quite tricky problem that I embeded TinyMCE in a html file A, and I used JQuery to load file A into another html file B's div element, and everything worked fine except the TinyMCE in file A was not loaded.
Anyone here encountered similar problem b4?
Upvotes: 0
Views: 222
Reputation: 50832
You need to call eighter the tinymce init function like JScoobyCed already stated or you just call this
tinymce.execCommand('mceAddControl', true, 'id_of_your_textarea');
Upvotes: 0
Reputation: 337560
You may need to initialise your TinyMCE editor after it has been added to page A, by adding the following code after your load('fileB.html')
:
tinyMCE.init({
mode: 'textareas',
theme: 'simple',
language: 'en'
});
You can obviously amend those settings as required. Full reference
Upvotes: 1
Reputation: 10413
In your jQuery code, after loading the file, you might want to call the
tinyMCE.init({
// ...
});
You would place this part from file 'A' in a function and call that function after loading the file.
Upvotes: 0