Closed. This question is off-topic. It is not currently accepting answers.admin管理员组文章数量:1130349
Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 6 years ago.
Improve this questionIf you want to add a class for tables created using tinyMCE advanced wordpress plugin. Please see my answer.
Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 6 years ago.
Improve this questionIf you want to add a class for tables created using tinyMCE advanced wordpress plugin. Please see my answer.
Share Improve this question asked Nov 16, 2018 at 10:28 DushanDushan 1217 bronze badges1 Answer
Reset to default 1Add 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.
Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 6 years ago.
Improve this questionIf you want to add a class for tables created using tinyMCE advanced wordpress plugin. Please see my answer.
Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 6 years ago.
Improve this questionIf you want to add a class for tables created using tinyMCE advanced wordpress plugin. Please see my answer.
Share Improve this question asked Nov 16, 2018 at 10:28 DushanDushan 1217 bronze badges1 Answer
Reset to default 1Add 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.
本文标签: How to add table class for tables of TinyMCE advanced wordpress plugin
版权声明:本文标题:How to add table class for tables of TinyMCE advanced wordpress plugin? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749175336a2327699.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论