Skip to:
Content
Pages
Categories
Search
Top
Bottom

Font in Tinymce visual editor


  • DeepBlue
    Participant

    @deepblue5

    Hi

    I enabled visual editor for new topic / reply in bbp style pack

    How can i define the font used in visual editor ?

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)

  • Robin W
    Moderator

    @robin-w

    bbpress just uses the .body font from the wp-content.css file.

    You could style it using

    .mce-content-body p {
    	font-size: 25px;
    }

    but this will not save to the post, it will just be what is shown in the form


    DeepBlue
    Participant

    @deepblue5

    tx and how can i edit this body font (the one i can see when typing in the visual editor) ? is it possible to change it using the child theme ?

    Thank you


    Robin W
    Moderator

    @robin-w

    sorry, don’t understand the question 🙂


    DeepBlue
    Participant

    @deepblue5

    I can see a lot of spam on this forum since a few days, there is no “pre moderation” for new comers ?

    About the font : i would like to see a custom font when i type in the visual editor (when creating a new topic or replying to a topic), how can i set this custom font ? using child theme

    Thank you !


    Robin W
    Moderator

    @robin-w

    sorry, I thought I had answered that above, you play with these settings

    .mce-content-body p {
    	font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
    	font-size: 16px;
    	color: #333;
    	overflow-wrap: break-word;
    	word-wrap: break-word;
    }

    Robin W
    Moderator

    @robin-w

    I can see a lot of spam on this forum since a few days, there is no “pre moderation” for new comers ?

    It takes an equal amount of work to pre-moderate as mark then as spam. Given that many people only ever ask one question, it’s not worth the effort


    DeepBlue
    Participant

    @deepblue5

    Ok actually i found the solution, for those who are looking for this :

    create a /css/ folder in your child theme with a tinymce-custom-editor.css with :

    body#tinymce.wp-editor {
        font-family: Sans-serif,Arial!important;
    }

    then add in your functions.php :

    // EDITOR TINYMCE CHANGE POLICE
    add_filter( 'mce_css', 'add_custom_editor_style' );
    function add_custom_editor_style() {
        return get_stylesheet_directory_uri() . '/css/tinymce-custom-editor.css';
    }
Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar