Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

jsarnowski / jsarnowski/jet-engine   php

Repository URL to install this package:

Version: 2.7.7 

/ forms / fields / wysiwyg.php

<?php
/**
 * WYSIWIG field template
 */
if ( empty( $args['default'] ) ) {
	$args['default'] = '';
}

$editor_id = 'wp_editor_' . $this->get_field_id( $args['name'] );
$editor    = array(
	'textarea_name' => $this->get_field_name( $args['name'] ),
	'media_buttons' => false,
	'textarea_rows' => 8,
	'quicktags'     => false,
	'tinymce'       => array(
		'plugins'                       => 'lists,paste,tabfocus,link,wordpress',
		'paste_as_text'                 => true,
		'paste_auto_cleanup_on_paste'   => true,
		'paste_remove_spans'            => true,
		'paste_remove_styles'           => true,
		'paste_remove_styles_if_webkit' => true,
		'paste_strip_class_attributes'  => true,
		'toolbar1'                      => 'bold,italic,|,bullist,numlist,|,link,unlink,|,undo,redo',
		'toolbar2'                      => '',
		'toolbar3'                      => '',
		'toolbar4'                      => ''
	),
);

?>
<div class="jet-form__field" data-editor="<?php echo htmlspecialchars( json_encode( $editor ) ); ?>"><?php
	wp_editor( $args['default'], $editor_id, $editor );
?></div>