Reputation: 1295
I am using TinyMCE jquery plugin in my project. It works fine. I am trying to use exec command to view the preview. It is not working.
<a href="javascript:;"onclick="$('textarea.tinymce').tinymce().execCommand('Preview');">Preview</a>
But the same command for bold works fine.
I appreciate any help.
Thanks.
Upvotes: 2
Views: 3657
Reputation: 50832
You are not using the right command. Try
$('textarea.tinymce').tinymce().execCommand('mcePreview');
Upvotes: 4