I figured this out! I ended up running across this page today searching for something else and thought, THIS IS IT.
I needed this property 'selector'
, because it seems like that guides what the selection should be targeting so I changed 'block' => ol
to 'selector' => 'ol'
.
function bb_mce_before_init_insert_formats( $init_array ) {
$style_formats = array(
array(
'title' => 'Bold Numbers',
'selector' => 'ol',
'classes' => 'bold-numbers',
'wrapper' => true,
)
);
$init_array['style_formats'] = json_encode( $style_formats );
return $init_array;
}
add_filter( 'tiny_mce_before_init', 'bb_mce_before_init_insert_formats' );
Related Posts:
- How do I include a TinyMCE editor in the frontend?
- Remove HTML editor and visual/HTML tabs from TinyMCE
- How to use tinyMCE for user “biographical info”?
- Stop editor from removing tags and replacing them with nbsp
- Possible to stop WordPress from adding p1, p2… classes to p tags in TinyMCE?
- Custom Tiny MCE button to bring up a custom php popup
- When switching from html to visual editor the tag gets corrupted
- Add unique class or ID information to tinyMCE
- How can I stop TinyMCE from converting my HTML entities to characters?
- TinyMCE Anchor Button not showing
- How to keep non-breaking spaces in the visual editor?
- Is there a way to prevent the Editor from modifying my HTML
- Remove “Are You Sure” dialogue when leaving editor
- Creating a custom MCE view for your shortcodes [closed]
- Apply custom style to single word in WordPress
- How to customize the symbols that appear in the Visual Editor insert custom character
- How to keep a textarea and stop tinymce?
- Add Shortcode inline inside Gutenberg block
- TinyMCE Editor Set Default Tab
- TinyMCE – Show Advanced Options (2nd Row) By Default
- How to make WordPress and TinyMCE accept tags wrapping block-level elements as allowed in HTML5?
- Disable TinyMCE autoformatting
- Visual Editor freezing on text highlight since 4.3
- Remove ‘Visual’ tab from TinyMCE editor
- Count Words using tinymce in the front-end
- What is this: data-wplink-url-error=”true” and why is it added to my links?
- tinyMCE.activeEditor = null WP editor loaded in ‘Text’ mode?
- Keep pasted pre formatted code as it is -with tabs- in visual editor
- How do i disable/disallow and tags in TinyMCE?
- Text cut off after the character 𪇆 in TinyMCE
- Insert text a cursor position in to TinyMCE text editor
- Using main style.css with add_editor_style
- How can I control the HTML output of my post?
- TinyMCE Plugin Parameter
- Access tinymce from thickbox
- How can I troubleshoot why TinyMCE won’t load custom plugins in the visual editor?
- TinyMCE Editor as component in Gutenberg Block
- wp_editor on input changes content
- Set tinymce direction to rtl
- Add a select a class dropdown in tinymce
- WordPress & TinyMCE: Failed to load
- How do I add a TinyMCE row that all users can see, instead of just admins?
- How to disable formatting
- Our shortcode dropdown box in Tinymce is not working in WordPress 3.9?
- How to get line breaks to translate to paragraphs?
- wp.editor.initialize does not show the same default toolbar
- Can’t remove generated by editor from database
- Custom TinyMCE style formats disabled
- Localize variables with TinyMCE script
- Shift-Enter in tinyMCE (wp 3.3.1) not working
- TInyMCE object Tag stripped
- WordPress Tinymce editor broken and nothing seems to fix it :(
- Visual editor not showing all table rows
- Use schema.org HTML in TinyMCE Editor
- Adding custom styles to elements, without creating new elements
- Customer Support: TinyMCE stopped working (on some computers)
- customize tiny MCE blockqute
- allowing all HTML tags in tinymce editor
- tiny_mce_before_init is not trigger
- Save WYSIWYG editor plugin settings, only works after second save
- Front-end image upload from TinyME [closed]
- Embed iFrame in WordPress 3.0.1
- Why exactly does WordPress use p tags, not divs?
- Blank spaces show as a question mark
- Can i set css class for table via TinyMCE [closed]
- Where’s the explanation of the TinyMCE’s vars in the WP core?
- WordPress (TinyMCE) not removing script tags
- TinyMCE: Move buttons from 2nd row to top row
- Change the background of the TinyMCE editor with available WP arguments
- Why Editor reformats my code
- When I write posts I usually have to use non breaking space element in order to keep margins in between the sentences. why?
- TinyMCE doesn’t work correctly in the Media Modal Window
- How can I remove using built in wordpress filters
- Add custom value for link_class_list for the classic editor
- How to apply padding to TinyMCE editor?
- Wordpres Tinymce custom button (Gavick guide)
- Loading a self-hosted custom @font-face into TinyMCE dropdowns (Classic Editor) via ‘tiny_mce_before_init’ filter
- WordPress, tinymce, how get the link text from dialog?
- tinymce and responsive line-breaks (short words after a period)
- Load WordPress Editor .css on Front End
- Client on iPad accidentally adding tag to posts while writing
- Add custom TinyMCE 4 Button: Is it mandatory to have one JS per button?
- “Formats” Select Menu in WP Editor doesn’t show up with correct colour
- Nested ordered list in tinymce
- Visual Editor not working properly
- wp_editor Too Tall when Content is Loaded
- TinyMCE HTML Encode Backslash
- Revealing ‘code’ hidden button in TinyMCE4 and WordPress 3.9.x
- TinyMCE 4.0: specifying buttons to display [duplicate]
- What is zinging my HTML commands? I don’t think I can blame TinyMCE this time…
- regEx wp core file
- Adding New Row of Custom TinyMCE
- Using TinyMCE fiddle for node filter to add id attribute to anchors
- WYSIWYG with HTML source?
- How do I separate my theme’s styles from editor styles?
- Adding to he format dropdown menu tinyMCE in WordPress
- WordPress and TinyMCE Advanced: Failed to load javascript
- Add new MCE button for toggle specific cell background color
- add button to tinymce
- install tinymce plugin [closed]