简体   繁体   中英

SCEditor - make the default font Arial

How can SCEditor be forced to start with Arial as its default font when it is empty? The default appears to be a Serif font - perhaps Times.

The default style of WYSIWYG content is the browsers default style.

It can be changed by setting the style option in the constructor. It's recommended to use (or base your style on) the content/default.min.css style as it contains some other important CSS. Something like:

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'
});

or it can be set via the css() method , eg:

instance.css('body { font-family: Arial, sans-serif; }');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM