Editor style file enqueue and styles.
if ( ! function_exists( 'prefix_add_editor_style' ) ) :
/**
* Add editor style
*/
function prefix_add_editor_style() {
add_editor_style( get_template_directory_uri() . '/css/editor-style.css' );
}
add_action( 'admin_init', 'prefix_add_editor_style' );
endif;/* Note: add your own google fonts url you want to use for the editor text. Font weights would be needed 300,400,500,700 */
/*
* ThemeName - Editor Styles
*/
@import url(https://fonts.googleapis.com/css?family=Rubik:300,400,500,700);
body#tinymce.wp-editor {
font-family: "Rubik", sans-serif;
font-size: 16px;
line-height: 1.875;
color: #4b4b4b;
}
body#tinymce.wp-editor h1,
body#tinymce.wp-editor h2,
body#tinymce.wp-editor h3,
body#tinymce.wp-editor h4,
body#tinymce.wp-editor h5,
body#tinymce.wp-editor h6 {
font-family: "Rubik", sans-serif;
margin-top: 0;
margin-bottom: 20px;
line-height: 1.3125;
color: #000;
}
body#tinymce.wp-editor h1 a,
body#tinymce.wp-editor h2 a,
body#tinymce.wp-editor h3 a,
body#tinymce.wp-editor h4 a,
body#tinymce.wp-editor h5 a,
body#tinymce.wp-editor h6 a {
color: inherit;
}
body#tinymce.wp-editor h1 {
font-size: 32px;
}
body#tinymce.wp-editor h2 {
font-size: 28px;
}
body#tinymce.wp-editor h3 {
font-size: 24px;
}
body#tinymce.wp-editor h4 {
font-size: 18px;
}
body#tinymce.wp-editor h5 {
font-size: 16px;
}
body#tinymce.wp-editor h6 {
font-size: 14px;
}
body#tinymce.wp-editor a {
color: #000;
text-decoration: none;
}
body#tinymce.wp-editor a:hover,
body#tinymce.wp-editor a:focus {
color: #4b4b4b;
text-decoration: none;
}
body#tinymce.wp-editor p {
margin-top: 0;
margin-bottom: 10px;
}
body#tinymce.wp-editor dl,
body#tinymce.wp-editor ul,
body#tinymce.wp-editor ol {
margin-bottom: 20px;
}
body#tinymce.wp-editor ul ul,
body#tinymce.wp-editor ol ul,
body#tinymce.wp-editor ul ol,
body#tinymce.wp-editor ol ol {
margin-bottom: 0;
}
body#tinymce.wp-editor dt {
font-weight: bold;
}
body#tinymce.wp-editor dd {
margin-left: 15px;
}
body#tinymce.wp-editor table {
width: 100%;
max-width: 100%;
margin-bottom: 25px;
}
body#tinymce.wp-editor td,
body#tinymce.wp-editor th {
padding: 5px 8px;
border: 1px solid #e1e1e1;
}
body#tinymce.wp-editor iframe {
display: block;
width: 100%;
}
body#tinymce.wp-editor blockquote {
font-size: 26px;
font-style: italic;
line-height: 1.5;
margin: 0 0 30px;
padding: 15px 0 15px 30px;
border-left: 5px solid #eeeeee;
}
body#tinymce.wp-editor blockquote cite {
display: block;
margin-top: 10px;
font-weight: 500;
color: #AFAFAF;
}
body#tinymce.wp-editor blockquote p {
margin-bottom: 0;
}
body#tinymce.wp-editor pre {
display: block;
padding: 14.5px;
margin: 0 0 15px;
font-size: 15px;
line-height: 1.875;
word-break: break-all;
word-wrap: break-word;
white-space: pre-wrap;
color: #333333;
background-color: #f5f5f5;
border: 1px solid #ccc;
border-radius: 4px;
}
body#tinymce.wp-editor code {
padding: 2px 4px;
font-size: 90%;
color: #c7254e;
background-color: #f9f2f4;
border-radius: 4px;
}
body#tinymce.wp-editor cite {
font-size: 12px;
font-style: normal;
font-weight: 700;
}
body#tinymce.wp-editor kbd {
padding: 2px 4px;
font-size: 90%;
color: #fff;
background-color: #333;
border-radius: 3px;
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}