WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Meta Box] WYSIWYG meta box (2 posts)

  1. Bev
    Member
    Posted 3 years ago #

    I updated my version of wysiwyg.php (under inc/fields) to provide more customization for the wp_editor box.

    This adds 3 new fields to the wysiwyg setup - media, rows, tinymce. Their usage is show below:

    array(
    	'name'	=> 'my_field_name',
    	'id'	=> "{$prefix}my_field_id",
    	'type'	=> 'wysiwyg',
    	'std'	=> 'Default text',
    	'desc'	=> 'This is my field',
    	// true to enable media upload, default is true
    	'media'	=> false,
    	// Number of rows, default is 'default_post_edit_rows' option
    	'rows'	=> "10",
    	// tinymce options, default is same as post editor
    	'tinymce'	=> array(
    			'theme_advanced_buttons1' => 'bold,italic,underline,bullist,numlist,link,unlink',
    			'theme_advanced_buttons2' => '',
    			'theme_advanced_buttons3' => '',
    			),
    ),

    Grab the code here if you are interested: http://pastebin.com/6zDyZ5Fd - this replaces static function html in wysiwyg.php

  2. Tran Ngoc Tuan Anh
    Member
    Posted 3 years ago #

    Nice, thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags