#37599 closed enhancement (fixed)
Editor (WP_Editor or TinyMCE) page template body class
Reported by: | webmandesign | Owned by: | azaozz |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | TinyMCE | Keywords: | has-patch |
Focuses: | Cc: |
Description
Hi,
Currently the post editor (TinyMCE) applies several classes on the editor's HTML body#tinymce
:
- Post type class
- Post status class
- If supported, post format class
However, it would be good idea to support a page template classes here too.
Usecase:
Theme author may target different content widths within editor stylesheet depending on the page template set. Such as for fullwidth page template or page with sidebar template.
Thanks for consideration!
Regards,
Oliver
Attachments (1)
Change History (8)
#1
follow-up:
↓ 2
@
8 years ago
- Focuses ui template removed
- Milestone changed from Awaiting Review to Future Release
- Version 4.5.3 deleted
#2
in reply to:
↑ 1
@
8 years ago
Replying to azaozz:
Assuming that class will have to change "dynamically" when selecting another template from the drop-down, the same way post type classes work. This is fairly easy to do from a plugin or theme, but maybe it should happen by default.
Hi. Yes, I am doing this in the theme already (just not applying all the page template related classes as there is too many of them ;)) but I really think this should be part of the core.
#3
@
8 years ago
- Keywords has-patch added
I've made a patch for this. And judging by how the WordPress creates additional page template classes when applying them on HTML body on front-end, I think using simple page-template-{filename}
class would be enough. Let me know if this is OK with you, guys.
Assuming that class will have to change "dynamically" when selecting another template from the drop-down, the same way post type classes work. This is fairly easy to do from a plugin or theme, but maybe it should happen by default.