Forums

[resolved] add a css stylesheet to of the_editor iframe (4 posts)

  1. significance
    Member
    Posted 2 years ago #

    hi,

    i am using wordpress as a cms for a charity i am currently setting up.

    i would like to alter the css of the wysiwyg editor in the wordpress admin panel to better reflect the front page styling.

    what is the best way to add a stylesheet in to the wysiwg's editor's iframe?

    please help!

    many thanks,

    dan

  2. apljdi
    Member
    Posted 2 years ago #

    Add/edit the css for div#editorcontainer textarea#content but you are going to find this project frustrating. There are too many things different about the editor's environment and the front end display. This page will tell you how to do it.

  3. significance
    Member
    Posted 2 years ago #

    thanks, will have a look at that when i get a moment!

  4. significance
    Member
    Posted 2 years ago #

    that didn't seem to work as i needed a way to get the stylesheet into tiny MCE using a plugin.

    i found out how to do it though:

    add this to your plugin:

    $initArray = add_filter('tiny_mce_before_init', 'tiny_mce_config');
    function tiny_mce_config($initArray){
    	$initArray['content_css'] = '/wp-content/plugins/pvc/assets/css/oneup_forms.css?version='.time();
    	return $initArray;
    }

    and then edit your referenced css file:

    #tinymce p{
    font-family:helvetica,verdana;
    font-size:2em;
    }

    etc.

Topic Closed

This topic has been closed to new replies.

About this Topic