• Resolved significance

    (@significance)


    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

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.

    Thread Starter significance

    (@significance)

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

    Thread Starter significance

    (@significance)

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘add a css stylesheet to of the_editor iframe’ is closed to new replies.