[Support request] Change WP Text Editor Font Family or Size

Home Forums Support [Support request] Change WP Text Editor Font Family or Size

Home Forums Support Change WP Text Editor Font Family or Size

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1472041
    Rohan Verma

    Hi, guys. I’m using the classic editor and want to change the default font family and font size.

    WordPress support isn’t that communicative or fast enough. Kindly do something for this particular thing.

    I’ve contacted Fonts Plugin | Google Fonts Typography developer for plugin support for the same and he said:

    Theme Developers can control the output of the editor by adding an editor-style.css stylesheet to their theme folder – https://developer.wordpress.org/reference/functions/add_editor_style/

    Please help. I have gone through plenty of same requests on this forum. Tom you should do something on it. Literally, get fade up with the tiny 12px font size and that Apple System/Georgia font family.

    #1472134
    Elvin
    Staff
    Customer Support

    Hi,

    I’ve contacted Fonts Plugin | Google Fonts Typography developer for plugin support for the same and he said:

    Theme Developers can control the output of the editor by adding an editor-style.css stylesheet to their theme folder – https://developer.wordpress.org/reference/functions/add_editor_style/

    Yes this is the way to go. If we want something to work on the editor, we must enqueue it for editor style’s use.

    You can refer to this answer: https://generatepress.com/forums/topic/how-to-show-custom-fonts-in-block-editor-gutenberg/

    or this one for a more detailed answer: https://generatepress.com/forums/topic/uploading-a-nongoogle-font-to-gp-child-theme/page/2/#post-1464406

    #1474290
    Rohan Verma

    I’m asking for the classic editor. I don’t use block editor or child theme.

    #1474433
    David
    Staff
    Customer Support

    Hi there,

    try this plugin:

    https://wordpress.org/plugins/tinymce-advanced/

    You can change the editor styles from Settings > TinyMCE advanced

    #1475037
    Rohan Verma

    Already using this plugin. But changing font family or font size here also changes the front end look.

    I don’t want to change the font family and size every time I open text editor.

    #1475440
    Tom
    Lead Developer
    Lead Developer
    #1476369
    Rohan Verma

    Sorry. I didn’t understand. And after putting the PHP to Snippets plugin, I can’t see any changes. Do I need to set anything else?

    I’m not using the child theme so put this add_editor_style( 'editor-style.css' )

    #1476969
    Tom
    Lead Developer
    Lead Developer

    You will need to use a child theme to do this: https://docs.generatepress.com/article/using-child-theme/

    You will need to create an editor-style.css file with your necessary CSS, and add it to your child theme.

    Then in your child theme functions.php file, you need to add this:

    add_action( 'after_setup_theme', function() {
        add_editor_style( 'editor-style.css' );
    } );

    This tells WordPress to load your editor-style.css file in the editor.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.