Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
555 views
in Technique[技术] by (71.8m points)

javascript - 在TinyMCE 5背景/前景颜色中使用十六进制代替RGB(Use hex instead of RGB in TinyMCE 5 background/foreground color)

I'm playing around with TinyMCE and I was wondering if there's a way to set colors with hexadecimals instead of RGB.

(我在玩TinyMCE,想知道是否有一种方法可以用十六进制而不是RGB设置颜色。)

Looking around the documentation I found that in version 4 there's a configuration, force_hex_style_colors , that it does that but it seems it disappeared on version 5 that's the one I'm using.

(环顾文档,我发现在版本4中有一个配置force_hex_style_colors ,它可以执行此操作,但似乎它在我正在使用的版本5中消失了。)

For a better explanation, right now the style is done this way:

(为了得到更好的解释,现在以这种方式完成样式:)

<div><p style="background-color: rgb(255,255,255)">foobar</p></div>

and I need to be set this way

(我需要这样设置)

<div><p style="background-color: #ffffff">foobar</p></div>

Thanks in advance!

(提前致谢!)

  ask by jijigogo translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...