Fetching the html / Text content of an tinymce editor in iframe using JQuery
Today I confronted a situation when I needed to get the value of a specific control like “tinyMCE”. Initially I struggled to fetch value however later succeeded to get value.
and this is how I get the value and made it easy for further execution.
This is how TinyMCE looks like in MVC as depicted below on a MVC page.
The declaration of tinyMce on .cshtml page is defined as :
@Html.EditorFor(“textTiny”, “tinymce_full_compressed”);
There are two ways to get the desired information:
$('#txtTest_ifr').contents().find('#tinymce').html();
$('#txtTest_ifr').contents().find('#tinymce').Text();
However this is very concise in manner but will be fruitful in use.
Thanks
0 comments :
Post a Comment