I can see that the text editor of DWQA doesn’t have a button for changing text color, like WordPress’ editor.
Is there anyway I can add one?
Hi Do An Duy,
You can add the code blow to wp-content/themes/your-theme-folder/functions.php
;
add_filter('dwqa_tinymce_toolbar1','dwqa_theme_add_more_button_to_tinymce'); function dwqa_theme_add_more_button_to_tinymce() { return 'bold,italic,underline,forecolor,|,' . 'bullist,numlist,blockquote,|,' . 'link,unlink,|,' . 'image,code,|,'. 'spellchecker,fullscreen,dwqaCodeEmbed,|,'; }
Thank you very much for your reply, Kevin.
I tried it and it worked.
However, I use the plugin TinyMCE Color Picker, which helps you save custom colors to the color palette for later use. When I activate this plugin, the color button doesn’t work for DWQA any more (it still works for the editor in the WordPress Add New Post page).
Can please you help me with this?
Hi Do An Duy,
You can add the function below to wp-content/themes/your-theme-folder/functions.php
add_action( 'wp_footer', 'dwqa_theme_enqueue_colorpicker' ); function dwqa_theme_enqueue_colorpicker() { wp_enqueue_script( 'tinymce-colorpicker-script', admin_url( '/js/color-picker.min.js' ), array(), false, 1 ); }
Thank you, Kevin.
I tried it. Unfortunately, it doesn’t work. The color paletter won’t show up and there is a popup on the screen.
Screenshots:
http://i.imgur.com/1DzRiNW.png
http://i.imgur.com/nXPHwZc.png
Hi Do An Duy,
I have checked and this issue came from your theme. The theme style is not compatible with TinyMCE Color Picker plugin.
OK. Thanks a lot for you help, Kevin.
Please login or Register to submit your answer