To change styles in iframe from WordPress plugin?

- The contents of an iframe from the same domain
- The iframe is in the layout plugin WordPress
- The content of the iframe is that it is not other, as the editor WordPress That is, I do publish posts from frontend and I need to adjust the styles in the main edit window and it is displayed via an iframe and nothing else
The iframe has an id: #contentarea-post_ifr

There is for example a solution:
$( "#contentarea-post_ifr" ).contents().find( "img" ).css( "min-width", "530px" );


but this code not roll somehow

There is the solutionthat is most suitable, direct styles an iframe to a file with template styles

but also it does not work for me, because doing something wrong clearly, but what I do not know

here is the path to the iframe:
59d30b0e9e289757457512.png

and detailed head in an iframe (can it is necessary dig?)
59d30b41b5339304517541.png

Please help to do it right
Thank you for your attention!
June 14th 19 at 20:22
1 answer
June 14th 19 at 20:24
It is impossible to affect inside an iframe directly via css.
And so:

var head = jQuery("#frame1").contents().find("head");
var css = '<link rel="stylesheet" href="http://htmlbook.ru/mysite.css">';
$(head).append(css);


As I understand it, the type of guide styles ifram in your template
Don't understand particularly what's happening, maybe not )) - estefania32 commented on June 14th 19 at 20:27
,
The content of the iframe is that it is not other, as the editor WordPress That is, I do publish posts from frontend


Not much easier to modelco for creating, editing and hung it timymce for quick editing? And on another occasion, in module display just the admin panel through an iframe. - solon_Herman commented on June 14th 19 at 20:30
as time in modelica deduce using the plugin VP of Recall (I really liked it.needed, and it just makes frothing post) That's about timymce didn't Look, thanks
And on another occasion, in module display just the admin panel through an iframe.
why? What is the case? - estefania32 commented on June 14th 19 at 20:33
a look of realization edit from the front, such as the Bitrix to modx revo or there's a plugin for working with Saito from the front, the Demo - solon_Herman commented on June 14th 19 at 20:36
this TinyMCE, it completely replaces the standard form? - estefania32 commented on June 14th 19 at 20:39
not All of it good, but this plugin has everything, and to use additional plug-ins there is no sense of less is better Should be podkorrektirovatj standard form of publication, and everyone will be happy - estefania32 commented on June 14th 19 at 20:42

Find more questions by tags JavaScriptjQueryiframeCSSWordPress