Add this code in your theme’s functions.php file
//wp-content/themes/my-theme/functions.php
function bootstrap_classes_tinymce($settings)
{
$styles = array(
array(
'title' => 'None',
'value' => ''
),
array(
'title' => 'Table',
'value' => 'table',
),
array(
'title' => 'Striped',
'value' => 'table table-striped table-hover',
),
array(
'title' => 'Bordered',
'value' => 'table table-bordered table-hover',
),
);
$settings['table_class_list'] = json_encode($styles);
return $settings;
}
add_filter('tiny_mce_before_init', 'bootstrap_classes_tinymce');
Feel free to remove table-hover class if you don’t need it.
If you need more information use this link.
Related Posts:
- How to add a shortcode button to the TinyMCE editor?
- How to load wp_editor via AJAX
- How to Add WYSIWYG Editor (tinyMCE) to plugin options page compatible with WordPress 3.0 and up?
- TinyMCE Advanced newline problem
- Disable text tab on WordPress text-editor
- Issues creating a tinyMCE plugin that creates a custom link
- Adding rich text editor to my plugin
- How to Add TinyMCE’s plugin in wordpress?
- White text on white background in TinyMCE when wp_editor is called in WP 3.9
- How can I get the post content displayed in a text field that allows to edit posts?
- How to add custom JS to tinymce in wordpress
- how to load tinymce external plugin
- Set WordPress TinyMCE Editor To Readonly
- Getting selected (highlighted) html from the Visual Editor on Edit Post page?
- How to edit content before post update
- How to replace wordpress default text editor (TinyMCE) with a custom one.
- accessing wp.media api from a tinymce plugin
- How to load wp_editor via AJAX
- jquery tinymce and bundled wp plugins
- Trouble adding tiny mce to textarea in custom plugin
- Using TinyMCE in plugin?
- TinyMCE Styles Dropdown not adding html tags other than span
- Hook into existing tinyMCE button
- Is there a good way to load tiny_mce_popup.js through editor.windowManager.open?
- Generate Own Custom CSS Button with icon
- How do I add multiple buttons to Tiny MCE in a single plugin?
- “switchEditors is not defined” with wp_editor() in jQuery UI tabs
- Example for use tinymce in wordpress 3.5.1?
- Custom characters of tinymce editor are saved as question mark
- “After file loaded” action
- How to disable tinyMCE button added by a plugin?
- How to apply to hide TinyMCE (wp_editor) on button click
- How to hide the cell properties and row properties in TinyMCE WordPress?
- How to use wp_editor and save its data in wp_posts table
- How to disable/enable PHP plugin functionality based on a TinyMCE toggle-button
- Sanitize AROUND shortcode
- TinyMCE how to add css when inputing a text
- can’t use span or icon tags on when editing visual composer element
- Extending the “Add Media”-Dialog … how do I finally insert something to the Post?
- how to enable tinymce custom buttons in meta box?
- Better code/text editing for posts and pages?
- Filter html of WordPress editor in visual mode only
- Using Iris Colorpicker on TinyMCE shortcodes page [duplicate]
- How can I replace the built in WordPress editor?
- How can I reduce the amount of files loaded/included per plugin?
- How to create custom LOGIN and REGISTRATION forms?
- wamp server wordprocess whole from begining up on filezilla
- How to add product images using script?
- Retrieve categories of a WooCommerce product in hierachical order
- How do I make a wordpress plugin with menu item etc
- How to use get_categories() with Event Organiser plugin
- Dashboard Disappears after Upgrade
- The website has resulted in too many redirects (redirect plugin)?
- Make specific products accessible only to a user role in WooCommerce
- Namespaces declared by a theme/plugin should start with the theme/plugin prefix. Found: “eustatos\test_plugin”
- WooCommerce – How can I list the same product as a variation and also as a simple product [closed]
- Memberpress functions/documentation
- scrolltop always 0, can’t trigger script
- Add column to plugins table screen
- Auto activate plugin with unique user settings
- Pagination Broken on Static Pages but Works on Blog Articles
- add_shortcode is not working in plugin where others are working
- WordPress plugin admin html being shown in Customizer iframe
- Using window.onload with Ubermenu
- Plugin Options not being output
- Is there a way to embed a Google Docs form in a page without using plugins?
- Advanced Custom Fields – Disable Users to Edit Custom Fields
- REST route from a plugin not working if WordPress is installed in a subdirectory
- WordPress Editor completely blank [closed]
- Assign all Post in Wp to a specific Category
- Cross Sells are not being shown in Cart Page. Please Help!
- How to display registered customer list as dropdown in WooCommerce checkout?
- Regarding plugin security
- Custom Post Type, Custom Columns List
- StackExchange-like flag system for WordPress
- How to add styles to a submenu page?
- How to add a PW Gift Card to a Woocommerce Order request API?
- In a plugin, How to update a json file using ajax
- On my WordPress 5.4 website, how to remove all feeds? Including Category and Tags
- How do I make my site multi language? [closed]
- Found wp_deregister_script WARNING in redux framework plugin
- Update a previous version of plugin when the new plugin is built from the scratch
- Plugin json page
- search into subcategories plugin subcategory value not come
- How Can the_post Be Hooked Like the_content and the_excerpt?
- using href when creating wordpress plugin calls empty page instead of php file
- How to `remove_action` from plugin
- New User Approval
- How to add php stylesheet to admin section instead of admin_head hook
- How to create custom content on custom page from plugin?
- functions.php conditional output for a single plugin
- Do you know a video plugin that allows embedding in the home.php file?
- What is the recommended way to be notified of security updates to my plugins? [closed]
- How to provide access to specific plugin to all the user roles except subscriber in wordpress
- WordPress Cumulus
- WordPress create permalink structure for custom post type with userid
- how to remove a rel=”nofollow” using call to action plugin
- Private plugin updating – GitHub zip file changes the plugin directory (with release or branch name)
- WordPress custom block: Link saved in database not retrieved when editing post
- Accessing Correct Database to Create REST API Endpoint