Skip to content

Instantly share code, notes, and snippets.

@danielpataki
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielpataki/19ce422ddcd5e5036b9c to your computer and use it in GitHub Desktop.
Save danielpataki/19ce422ddcd5e5036b9c to your computer and use it in GitHub Desktop.
Editor Style Examples
function my_editor_styles() {
add_editor_style( 'admin/editor.css' );
}
add_action( 'after_setup_theme', 'my_editor_styles' );
function my_editor_styles() {
$font_url = str_replace( ',', '%2C', '//fonts.googleapis.com/css?family=Droid+Sans:400,700|Raleway' );
add_editor_style( $font_url );
add_editor_style( 'admin/editor.css' );
}
add_action( 'after_setup_theme', 'my_editor_styles' );
@import url( 'style.css' );
/* Overwrite styles as appropriate for the editor */
body {
padding:0px;
border:0px;
}
.p {
margin-left:0px;
margin-right:0px;
}
function my_editor_styles() {
add_editor_style();
}
add_action( 'after_setup_theme', 'my_editor_styles' );
body {
font-family:Helvetica Neue;
font-size:16px;
line-height: 1.5em;
}
h1,h2,h3,h4,h5,h6 {
font-family:Georgia;
line-height:1.2em;
}
p {
margin-bottom:24px;
}
a {
color: #ff9900;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment