Nov 13, 2012

Fullscreen really WYSIWYG in WordPress

Filled under:

Fullscreen really WYSIWYG in WordPress

I think we can agree that the full screen view without distractions is editor of the best things about WordPress . For anyone who writes often is an absolute joy to use an editor where you have ahead is a blank canvas, without any distraction.


But while he tries WordPress even endeavors, the truth is that the full screen editor does not show us a vision of how faithful really look after our article on the web , once published.

If we will see how we have to save as a draft and do a preview to see if the images are going to be well framed in the text, if we have made ​​good use of formats and if we have employed with excellence paragraph styles.

But this is easily solved, as there is a nice trick that will turn our full screen editor without distractions in a true WYSIWYG , or " what you see is what you get ".

So open and the file functions.php of your current theme and add this code using action after_setup_theme :


/ / Fullscreen WYSIWYG
add_action (  'after_setup_theme' ,  'editor_wysiwyg'  ) ;
function  editor_wysiwyg ( )
set_user_setting (  'dfw_width' ,  950 ) ;
/ / We assume that the road is estil0s / wp-content/themes/theme-name/css/otro-style.css
add_editor_style (  array  (  'style.css' ,  'css / other-style.css'  )  ) ;

You only have to change a few things:


  1. In line 4 set the width in pixels of the box contents of your theme, in the example "950".
  2. In line 5 to modify the / s path / sa tu / s sheet / s of styles.

From that moment the entire screen without distractions WordPress editor opens with the text block to the defined width and applying the content of the CSS styles of your theme .

This chulada found in wptuts + .

0 comments:

Post a Comment