How can I make a silent mode for TinyMCE editor
Question
I want to create TinyMCE editor on the page, but it should boot and render only after focus on
action. How can I do that, please, can you give advice to me.
Recession
Page may have include scores TinyMCE elements, and page will hang. Therefore, the field should be converted into TinyMCE as needed, initially it's just textarea.
Solution
The first example in the documentation shows how you can toggle the editor on and off in Javascript. Just attach an onclick
handler to your <textarea>
that turns the editor on. Here's some jQuery-based code that I haven't tested, but should work...
$("textarea").click(function() {
if (!tinyMCE.get(this.id)) {
tinyMCE.execCommand('mceAddControl', false, this.id);
}
});
OTHER TIPS
At the manufacturer's site is all there, thanks for the tip-off Dean Harding.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow