SCEditor为空时如何强制以 Arial 作为其默认字体?默认似乎是 Serif 字体 - 也许是 Times。
问问题
33 次
1 回答
1
WYSIWYG 内容的默认样式是浏览器的默认样式。
可以通过在构造函数中设置style
选项来更改它。建议使用(或基于您的样式)该content/default.min.css
样式,因为它包含一些其他重要的 CSS。就像是:
sceditor.create(textarea, {
// other options here
// ...
// Set the style for the content of the editor
style: 'https://cdn.jsdelivr.net/npm/sceditor@3/minified/themes/content/default.min.css'
});
或者可以通过css() 方法设置,例如:
instance.css('body { font-family: Arial, sans-serif; }');
于 2021-10-10T23:49:11.343 回答