This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Callback function to insert 'styleselect' into the $buttons array | |
function my_mce_buttons_2( $buttons ) { | |
array_unshift( $buttons, 'styleselect' ); | |
return $buttons; | |
} | |
// Register our callback to the appropriate filter | |
add_filter('mce_buttons_2', 'my_mce_buttons_2'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Callback function to filter the MCE settings | |
function my_mce_before_init_insert_formats( $init_array ) { | |
// Define the style_formats array | |
$style_formats = array( | |
// Each array child is a format with it's own settings | |
array( | |
'title' => '.translation', | |
'block' => 'blockquote', | |
'classes' => 'translation', | |
'wrapper' => true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php add_editor_style( $stylesheet ); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_theme_add_editor_styles() { | |
add_editor_style( 'custom-editor-style.css' ); | |
} | |
add_action( 'after_setup_theme', 'my_theme_add_editor_styles' ); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body#tinymce.wp-editor { | |
font-family: Arial, Helvetica, sans-serif; | |
margin: 10px; | |
} | |
body#tinymce.wp-editor a { | |
color: #4CA6CF; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_theme_add_editor_styles() { | |
$font_url = str_replace( ',', '%2C', '//fonts.googleapis.com/css?family=Lato:300,400,700' ); | |
add_editor_style( $font_url ); | |
} | |
add_action( 'after_setup_theme', 'my_theme_add_editor_styles' ); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import url( 'style.css' ); | |
/* Add overwrites as needed so that the content of the editor field is attractive and not broken */ | |
body { padding: 0; background: #fff; } |
OlderNewer