[英]using javascript with buttons to change the colour of text (list)
[英]Change the colour of the buttons of the toolbar when using Quill?
上面我链接了工具栏当前外观的图像。 我正在尝试将按钮的颜色和下拉列表中的文本设为白色。
var toolbarOptions = [
[{ 'header': [1, 2, 3, false] }],
['bold', 'italic', 'underline', 'strike'],
['blockquote'],
[{ 'align': ['', 'center', 'justify'] }],
[{ 'list': 'ordered'}, { 'list': 'bullet' }],
[{ 'script': 'sub'}, { 'script': 'super' }]
];
var quill = new Quill('#editor', {
modules: { toolbar: toolbarOptions },
theme: 'snow'
});
也许按钮和下拉样式可以用 js 自定义,但在文档中找不到。 但是,css 仍然是一种选择——如果这对你有用:
.ql-toolbar .ql-stroke {
fill: none;
stroke: #fff;
}
.ql-toolbar .ql-fill {
fill: #fff;
stroke: none;
}
.ql-toolbar .ql-picker {
color: #fff;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.