Search code examples
jqueryjquery-pluginseditorwysiwygjwysiwyg

jwysiwyg setting the iframe's id


I'm fairly certain this is very easy but for the life of me I can't find a way to set the id of the iframe that gets created by the jquery plugin jwysiwyg.

I looked thru all the documentation and countless google searches but turned up nothing. Any ideas? As it is it creates and Iframe with no ID and no Class to grab hold of.

(function($) {
    $(document).ready(function() {
        $('#jwysiwyg').wysiwyg();
    });
})(jQuery);

https://github.com/akzhan/jwysiwyg/wiki/


Solution

  • There is no way as the plugin stands however it would be easy to fork the plugin and add this functionality.

    If you just need a quick way to grab the iframe then since it gets inserted before the target element you can use prev then find.

    $('#wysiwyg').prev().find('iframe')