change font editor in wordpress

[Solved] Change The Default Font Size in WP Editor

If the font size in wordpress editor is small enough for you, perhaps it is time to enlarge the font sizeFor an author and blogger, convenience when writing is the important thing. And perhaps, inspirationwill come when convenient to write.

Moreover, if and write using a mini laptop, 10 inch screen and low resolution. Of course this is not comfortable for the eyes.

Today I tried various ways to enlarge the font size in the wordpress editor. There is an offer by using a plugin, but I guess it’s not the solution, because the plugin will slow down website loading speed. And there are also offering by way of change directly on the style sheet of tinyMCE file. This is also the solution that is less good, because if a wordpress update, the code that we write will be lost. How is the solution?

WordPress has an API, we can change anything. Ok, we immediately begin to change the font size.
  1. Create a file custom_editor. css and place it in the folder of your template.
  2. Edit and fill with CSS code below. Then, you can change according to the taste.
body#tinymce.wp-editor { 
    margin: 10px; 
	font-size:20px;
	line-height:5px;
}

body#tinymce.wp-editor a {
    color: #4CA6CF;
}

then switch to the functions.php file and create a function, as the following code

function my_theme_add_editor_styles() {
    add_editor_style( 'custom_editor.css' );
}
add_action( 'after_setup_theme', 'my_theme_add_editor_styles' );
These Tips will not work until you reactive your template. Go to the template page, and enable the other template, and having it turn on your template (again). After that, look at the results.
Good luck.

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.