TinyMCE: where to change the iframe src of the “visual” editor?

I’m trying to add a (commercial) fonts.com font to the “visual” html wysiwyg editor. This does not work, because the “visual” editor iframe has src='javascript:""' which make requests from within the iframe missing the referrer header. However fonts.com (and other webfont provider) need a referrer to validate the request.

The solution is rather simple: use a (preferable blank) html page as source. Something like blank.html. I just don’t find the corresponding code line.

Read More

Where do I change the iframe src? (I’m using TinyMCE inside of WP).

Thanks!

Related posts

Leave a Reply

1 comment

  1. You may use this

    $('#'+tinymce.editors[0].id+'_ifr').attr('src', 'blank.html');
    

    or in case you know your editor id

    $('#'+tinymce.get('your_editor_id')+'_ifr').attr('src', 'blank.html');