This should be what you’re looking for – put this code into your theme’s functions.php
file:
add_filter( 'tiny_mce_before_init', 'yourprefix_tiny_mce_before_init' );
function yourprefix_tiny_mce_before_init( $init_array ) {
// filter styles:
$init_array['theme_advanced_styles'] = "your_style=your_class";
// filter formats:
$init_array['theme_advanced_blockformats'] = "p,h3,h4,h5";
return $init_array;
}
This way the only style that will be displayed is your_style
.
The 3rd line is taking care of tinymce formats – might be useful too.
See Plugin_API/Filter_Reference/tiny_mce_before_init for more informations and examples.
Related Posts:
- Extra TinyMCE editor strips and tags?
- in network setup super admin has the tinyMCE buttons and the regular admin has not
- Can Rich Text features be configured per user?
- Change the Theme in Jupyter Notebook?
- Disable Visual editor for all users
- Initialize TinyMCE editor / visual editor after AJAX insert
- No filter of code on switch from html to visual editor, how?
- Why is the visual editor in WordPress limiting the width by wrapping the content?
- Editor removes tags
- How to include own css on wordpress tinymce editor?
- How to force TinyMCE in WordPress to replace newlines with tags and not with
- Disable WYSIWYG editor only when creating a page
- How can i add some static text above the editor?
- Add quicktag buttons to the HTML editor
- WordPress 4.6 link edit dialog is too rudimentary
- When switching from html to visual editor the tag gets corrupted
- Markup of oEmbed codes in the editor?
- Re Order Editor to be after meta box [duplicate]
- How can I stop TinyMCE from converting my HTML entities to characters?
- Disable escaping html
- Gutenberg block editor – list of form components for custom blocks
- Completely disable editor
- Disable text tab on WordPress text-editor
- How can I insert HTML attributes with an existing TinyMCE button?
- Add Shortcode inline inside Gutenberg block
- Change padding to text indent in “Increase indent” TinyMCE
- What’s the Best Way to Edit WordPress Files?
- TinyMCE Autoresize
- TinyMCE editor – new lines not rendered on front end
- two tinyMCE editors in the same page
- Open posts in editor in the ‘Text’ mode by default
- line break are not working when editing a post [closed]
- Making the Post/Page Content Editor Box Bigger?
- Showing only certain buttons on tinymice content editor
- Set default text for the editor in new posts
- Add option for editors through `register_setting`
- 2nd button row from WP Super Edit or TinyMCE Advanced doesn’t show to 2nd admin
- TinyMCE Plugin Parameter
- WYSIWYG editor in WP 3.2 plugin
- How do I fix my ‘Path’ field when editing pages via the Dashboard?
- Define multiple Gutenberg editor widths
- How can I get the post content displayed in a text field that allows to edit posts?
- Add WYSIWYG to Image Description field
- edit posts through front-end
- Our shortcode dropdown box in Tinymce is not working in WordPress 3.9?
- Restrict other Admins from using Editor in Admin Panel
- Editor doesn’t load properly on my self-hosted WordPress 3.3
- How to add notice text above Post Editor?
- Tiny MCE-modifications (plugins) stopped working in WordPress 5.6
- How to disable YouTube (and any other oembed) embeding in the editor
- Custom TinyMCE style formats disabled
- Bulk edit contents of pages
- How to display full width block without toolbar?
- Change syntax styling of TinyMCE HTML Text Editor
- Trouble adding tiny mce to textarea in custom plugin
- How to customize the “Insert/edit link” popup box?
- Making the Content Editor Box Bigger in 2013
- WordPress editor removes all the linefeed characters with WP-Markdown and Syntax Highlighter evolved
- WP is not allowing me to post Macintosh .pages documents to my blog
- Adding CSS to admin TinyMCE editor for custom button
- Visual Editor: Paragraph styles appear to one admin but not to others
- Post editor is 89953px tall. How to fix?
- Page/post editor with syntax highlighting [closed]
- Unable to edit and see content of pages
- How can a TinyMCE modal return formatted/visual text?
- WordPress wraps span tags into p tags
- How to add custom ‘layout’ buttons to wordpress editor?
- Why WordPress not using WP_Filesystem
- Disabled visual editor and WordPress keeps adding line-breaks to my code
- Send data to Editor before saving the post
- Why Editor reformats my code
- Insert attachments from custom uploader into post (regular uploader style)
- Problem with -> in pre tags
- Why does a certain attribute disappear after a while from a page?
- Wordpres Tinymce custom button (Gavick guide)
- Is WordPress classical and block editor(s) too inefficient to handle large data?
- How to add text editor field in user edit profile?
- Edit Post with a parameter in URL
- Missing Edit button
- Elementor Text Editor Widget Not Working
- editor option not available in dashboard
- Gutenberg work with Bootstrap Shortcodes plugin
- Classic Editor text font color is white after installing the latest version of wordpress
- How to hide a field of the editor by default
- Visual editor on front-end call not working properly
- Preserve indentation, HTML5 shorthand in editor
- What’s the best way to trim content from WYSIWYG editor?
- Image Post creates unusual extra HTML
- Why are carriage returns deleted in the editor?
- how to see P and BR tags in tinymce?
- How can show my images style from editor
- Custom shortcode editor [BackboneJS & TinyMCE)
- Directly open page in text editor
- Where Can I Find the Video Player In The Edit Media Screen
- Limit post view and management to custom user meta information
- How do I separate my theme’s styles from editor styles?
- Only ONE of my blog posts aren’t loading when I click “edit”…really bizarre?
- How i can customize WordPress front page in WP dashboard editor?
- Foliopress WYSIWYG editor does not display images [closed]
- How can I edit global styles?