使用TinyMCE,我不能让前景和背景色选择器显示任何颜色。

我尝试过手动添加一个textcolor_map,如这里所描述的:https://www.tiny.cloud/docs/plugins/textcolor/,但它仍然没有显示任何颜色。
如果我添加ColorPicker插件,那么我会得到一个“自定义”选项,但仍然没有实际的颜色。
tinymce.init({
selector: '.editor',
theme: 'modern',
plugins: [
'link image lists charmap hr anchor pagebreak spellchecker textcolor',
'visualblocks visualchars code fullscreen media nonbreaking',
'table contextmenu directionality template paste fullpage inlinepopups'
],
toolbar1: 'undo redo | bold italic underline strikethrough | forecolor backcolor emoticons| bullist numlist table | link unlink',
toolbar2: 'fontselect fontsizeselect | alignleft aligncenter alignright alignjustify | outdent indent | code fullscreen',
inline: true,
removed_menuitems: 'newdocument',
});发布于 2019-01-15 21:32:01
我复制了你的配置并创建了一个小提琴:http://fiddle.tinymce.com/B9gaab
看起来在干净的环境下一切都很好,所以这个问题可能与你的网站上的一些造型有关。
因为微小的mce是在您的网页上下文中呈现的,所以您可以使用一些通用的样式,这可能会覆盖一些tinyMCE UI元素。
对于textColor,它使用表内显示所有颜色元素。我将建议检查是否有任何样式被您的样式覆盖。图像呈现结构由TinyMce为文本颜色工具提示内容呈现。

当然,您没有使用类名覆盖,因为它们是tinymce特定的,但是您可能对td元素或table/tbody有一些重写。
https://stackoverflow.com/questions/54206638
复制相似问题