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 to append TinyMCE editor in TinyMCE editor’s popup
- How to tell if a plugin is multisite compatible?
- How to force WordPress to temporarily switch locale (using qTranslate)? [closed]
- Create page when plugin is activated
- Article source link for posts
- WordPress media upload limit?
- How to get custom field image url of specific size
- Getting “Fatal error: Call to undefined function wp_cache_get() in option.php” after updating a cache plugin [closed]
- Get total number of comment of the posts written by an author
- How to Dequeue All WordPress Assets
- Output HTML only on individual post view
- Why plugin ajax response is -1?
- Pass info from functions.php to plugin
- Elementor\Scheme_Typography’ not found [closed]
- How do I add a custom sub menu menu under Woo-commerce marketing?
- Uncode theme content block header ignoring saved changes/not updating?
- Unique 4 digit number
- One of my plugins broke when I tried to update it, how do I safely uninstall it?
- WooCommerce Checkout Error [closed]
- Pre booking doesn’t work with custom bootstrap modul in woocommerce [closed]
- WordPress change Language not working
- Advanced AJAX Page Loader ignores other JS code
- wp_enqueue_script registers script but does not create html tag
- Multiple domains issue
- WordPress 4.8.1 php getting commented
- What is a rock solid development and deployment workflow? [closed]
- Yoast SEO settings unavailable in an archive page from wordpress plugin
- How to change the post form from plugin?
- Override plugin class which has namespace
- How to include a custom field in the woocommerce email?
- Limit WP code scope into plugin
- WordPress custom plugin that uses woocommerce enabled payment gateway for payment [closed]
- Execute a function when the entire page is displayed
- Is there any way to inject text onto pages?
- Plugin that lets visitors Like a post (not facebook) and stores likes in custom meta?
- Cannot read properties of undefined (reading ‘firstChild’) using photoswipe in product page
- Creating an admin button that when clicked shows a popup form
- How to list datas from database in a topic?
- Downloading a file
- Profiling the initial PHP file, anyone, that get like 10 seconds to load
- How use wp_insert_post and add og:custom tags?
- How to change “Read More” text?
- WordPress database problem wp_posts, primary key
- Auto trigger of popup
- WordPress Plugin PHP Not Calling Function
- how to show the tables of my plugin in the export tab of WordPress?
- Do_shortcode before send email content
- Get plugin to background of page
- What is a good way to test that plugin upgrades have completed properly?
- Remove the ‘Press This’ Tool
- Looking for a related post plugin which slides-in like the one at inc.com does [closed]
- which is this plugin ? [closed]
- Sync roles across several plugins
- How to write a specific url for only single page in wordpress?
- Can’t save formdata in DB
- Event Made Easy – Block registration to two or more events that have the same category