[wp-trac] [WordPress Trac] #33249: Hardcoded styles in preview should be filterable
WordPress Trac
noreply at wordpress.org
Wed Aug 5 06:57:11 UTC 2015
#33249: Hardcoded styles in preview should be filterable
-------------------------------+------------------------------
Reporter: programmin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: TinyMCE | Version:
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses: javascript
-------------------------------+------------------------------
Comment (by programmin):
Ah, I didn't see that, setIframes() function in mce-views.js adds in some
stylesheet links. Unfortunately in the cases I need to customize this I'm
using TinyMCE in inline mode, not iframe mode. In my case
{{{
jQuery('[data-wpview-text]')
}}}
is empty when that runs, hence the callback to getNodes isn't called.
Looking a few lines down in setIframes(), I see it wouldn't be much good
even if that were working - it still is hardcoding just a couple css files
that won't show in the previews - 'skins/lightgray/content.min.css' and
'skins/wordpress/wp-content.css' - which are not filtered in JS either. If
those files mess up the preview-inner-iframe, how do you know other styles
added in with the editor styles filter won't break it? If I have an inline
MCE editor on a page I wouldn't want all styles, margin, padding, applied
to the outer document.body to also be applied to the iframe within the
TinyMCE's wp-view-iframe.
I liked how it was before when you could set the proper styles with
wp.media.views.sandboxStyles
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33249#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list