Reputation: 43
I am using redactor editor in one of my websites. It is getting all the stuff like images, videos etc. But when I am trying to get textarea value and show it on console, it only shows texts there not the embedded code of video or etc. The html code to apply redactor editor to textarea is
<textarea name="redactor" id="redactor" cols="30" rows="10" class="form-control" ></textarea>
The jquery code I am using to get the textarea value which has redactor enabled is
var redactor = $('#redactor').redactor('get');
I have initialized redactor in my jquery file. How can I get the whole html inserted in textarea which has redactor enabled whether it is a text, images, video etc ?
Upvotes: 1
Views: 967
Reputation: 11
You can use the following jquery code to get the textarea
$('#redactor').redactor('code.get')
Upvotes: 1