I think you should first enable i tags.Then you should enable class id or span whatever you like.To do so add this code.
function add_mce_markup( $initArray ) {
$ext="i[id|name|class|style]";
if ( isset( $initArray['extended_valid_elements'] ) ) {
$initArray['extended_valid_elements'] .= ',' . $ext;
} else {
$initArray['extended_valid_elements'] = $ext;
}
return $initArray;
}
add_filter( 'tiny_mce_before_init', 'add_mce_markup' );
Related Posts:
- Creating a wp_editor instance with custom tinyMCE buttons
- How to add custom CSS (theme option) to TinyMCE?
- Add popup window to TinyMCE buttons
- How to customize TinyMCE4 in WP 3.9 – the old way for styles and formats doesn’t work anymore
- TinyMCE editor is breaking my beautiful HTML
- How to get the input of a TinyMCE editor when using on the front-end?
- Load wp_editor via ajax [duplicate]
- Why did multiple line breaks stop working in text editor?
- TinyMCE 4.x : How to customize toolbar on wp_editor()
- Replace Taxomony Description Field with Visual/WYSIWYG Editor
- How to replace the content of tinyMCE editor in both text and visual mode using jQuery?
- Unable to add “code” button to TinyMCE toolbar
- TinyMCE format dropdown no longer showing style previews
- Visual Tab Missing From Editor
- How to use the new Dashicons for custom TinyMCE buttons?
- Cite-Tag for blockquotes
- Wait for Gutenberg or built something in ACF?
- Replicating the_editor (Media Bar, TinyMCE, Visual/HTML Tabs) functionality without a huge rewrite
- “wp_editor” not displaying TinyMCE correctly when square brackets used in name
- Using a dashicon for a custom button in TinyMCE?
- Pasting code into pre-formatted text in Visual Editor not working in 3.3.1
- How to add TinyMCE keyboard shortcut
- Integrating inline tinymce editor in a component for a gutenberg block
- data-accordion removed in Visual Editor
- Remove empty lines ( ) when author updates their post
- Easy way to inject js in tinymce iframe?
- WP 3.3 my rich text category editor toolbar is gone!
- WordPress visual editor broke due to non standard port?
- Deprecated TinyMCE API call: windowManager.createInstance(..)
- wordpress 3.5 tinymce height
- TinyMCE is broken
- Adding image to visual editor popup for shortcode with wp.media and wp.mce: changing image duplicates shortcode
- Change TinyMCE Block Format Labels
- Adding Custom Styles to the MCE dropdown toolbar
- TinyMCE – Add button that changes direction of selected text
- How to stop editor removing space ( ) in the beginning of the paragraph
- Is there a way to remove the default css from TinyMCE?
- Preserving tabs and line breaks in when switching from HTML to Visual Editor
- Add Wrapper with Class to WYSIWYG Editor
- Make Textarea a TinyMCE (editor box)
- How to remove the statusbar from the default wordpress editor?
- TinyMCE Visual Blocks plugin set Show blocks option for all users
- Stop WordPress Visual Editor converting backticks into code blocks
- Insert dynamic listbox options in Tinymce popup editor
- Selectively remove empty line after line change
- Editor stripping out data attribute when saving
- TinyMCE Advanced list type drop-down
- wordpress qtranslate editor text is not working [closed]
- create a front end post page template withTinyMCE,
- How does WordPress remember which editor is being used?
- Add buttons to the new TinyMCE WP Editor. Javascript API
- Open Insert/edit link popup
- How to dynamically generate wordpress editor on frontend?
- More than one TinyMCE (wp_editor) with different $settings[‘drag_drop_upload’] values breaks
- tinyMCE 4.0 custom button onclick no longer working
- How to add Listbox / Select dropdown for shortcodes in WP 3.9 beta2 using TinyMCE?
- Using spellchecker plugin in TinyMCE
- wp_editor not modify html tags of initial content
- Stop TinyMCE from deleting empty HTML tags
- Custom TinyMCE Editor Formats in Dropdown
- Why is the media upload button not in the main toolbar & can it be placed there instead?
- Can I disable `wp-tinymce.php` load as script?
- wp_editor – Media uploader button to tinymce
- Editor html formatting is different from view source
- WordPress no longer holding post formatting
- HTML formatting issues when switching between editor tabs
- Stop editor from adding “amp;” after every “&”
- Visual composer causing conflict with TinyMCE [closed]
- Overriding TinyMCE buttons – Justify button shortcodes not working
- WP Editor: Keep Bold, Underline, etc. but ignore color
- TinyMCE 4 & wp_editor multiple editor issue
- TinyMCE Advances is removing blanks (” “)
- How to remove buttons from tinyMCE in wp_editor added via AJAX
- enable TinyMCE for comment forms
- TinyMCE – Insert media at the beginning of post
- TinyMCE invalid nested list markup
- Unable to save Theme Options when TinyMCE is enabled for the text area
- Adding a Media Button to the WordPress Content Editor
- Error in backend: Failed to load plugin: tabfocus from url
- How can I change TinyMCE’s default block format?
- Adding a class to custom TinyMCE button using WPLinks dialog box
- Remove MS Word comments from pasted text
- How do I externalize JQuery from my Tinymce Modal Dialog’s html and Enqueue the JS File to see JQuery
- How to force wp excerpt to use br tag?
- How to have html in TinyMce “Text” tab properly indented and highlighted
- TinyMCE adds a after a HR
- How to remove “justifyfull” in TinyMCE
- Tinymce doesnt appear
- TinyMCE errors after 3.7.1 to 3.9.1 upgrade
- tinymce modal and I18n strings methods
- Localize tinymce in WordPress 3.9?
- Get the More QuickTag button back
- Make videos output as iframes not links
- Preventing tinyMCE from auto formatting selected blocks of content
- How to insert image from link in TinyMCE
- Tinymce broken after update
- Problem with Line spacing in wysiwyg editor in WP 3.5.1
- get backend to front end
- Why did my get mangled, and how can I keep from happening again?
- How to create custom toggle button in tinymce?