Support » Themes and Templates » How to preserve editor style css?

  • Resolved roiabrazaldo

    (@roiabrazaldo)


    I am using reset.css on my style.css, thus this also affects the editor.
    it affects the editor in a way that, what you format while “editing”/”writing” a content, would not show exactly as that on the actual page.

    is there a way to preserve the css for editor?

Viewing 10 replies - 1 through 10 (of 10 total)
  • or do you guys use reset.css?

    Moderator stephencottontail

    (@stephencottontail)

    You can use editor styling to affect how the post edit screen appears. All you need to do is call add_editor_style with the path to a stylesheet as the only argument. Usually you would call it in functions.php.

    so i really need to call the editor.css again?

    Moderator stephencottontail

    (@stephencottontail)

    Probably. I’m having a bit of trouble envisioning what’s going on. Do you call reset.css from your style.css using something like @import?

    its not working..

    I added this lines:

    function preserve_editor() {
        add_editor_style( home_url( '/' ) + '/wp-includes/css/editor.css' );
    }
    add_action( 'init', 'preserve_editor' );

    still not working.

    Moderator stephencottontail

    (@stephencottontail)

    You don’t need the / in home_url, and also use . to concatenate strings instead of +.

    Yes..

    my style.css :

    @import reset
    @import transition
    @import hover
    
    so on..

    btw.. im not trying to edit the looks of “post edit screen”.
    im trying to preserve what is was and what its content looks like, even after applying reset.css

    example
    the default css for blockqoute shown by editor is, it has padding..
    what I see in the actual page is also has padding..

    the problem comes when I apply reset.css

    the blockqoute on editor has padding, but in the actual page, its unformated. it has blockqoute tags, but no padding, because the reset.css overrides it.

    so is there a way to preserve what the editors showing me to the actual page?

    or the editor is the one that needs to adjust?

    nvm.. i give this one up..

    Im gonna use

    http://html5reset.org/

    ok, solution to this is use normalize instead.

    the tinymce content.css is initiated before the reset.css thats why it is initialized back to 0. everything.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to preserve editor style css?’ is closed to new replies.