Pass post type as a class to TinyMCE init
|Reported by:||markjaquith||Owned by:||azaozz|
If we pass the post type as a class to TinyMCE, editor-styles.css can target rules to specific post types which may be displayed differently.
<?php wp_editor($post->post_content, 'content', array('dfw' => true, 'tabindex' => 1, 'tinymce' => array( 'body_class' => 'post-type-' . $post_type ) ) ); ?>
Change History (18)
- Component changed from General to Editor
- Milestone changed from Awaiting Review to Future Release
- Type changed from defect (bug) to enhancement
- Component changed from Editor to TinyMCE
- Keywords needs-patch removed
- Milestone changed from Future Release to 3.4
- Owner set to azaozz
- Resolution set to fixed
- Status changed from new to closed
comment:15 in reply to: ↑ 14 azaozz — 20 months ago
Note: See TracTickets for help on using tickets.