WP Editor

Configuration

You will either need to use dist/css/sui-wp-editor.min.css or compile scss/sui-wp-editor.scss to use the SUI WP Editor styles within your plugin.

The following code snippet is a sample on how to call the file on wp_editor.

<?php
ob_start();

require self::$plugin_path . 'assets/css/sui-editor.min.css';
$editor_css = ob_get_clean();
$editor_css = '<style>' . $editor_css. '</style>';
?>

<!-- Email body -->
<div class="sui-form-field">

	<label class="sui-label sui-label-editor" for="emailmessage"><?php esc_html_e( 'Email body', Plugin::DOMAIN ); ?></label>

	<?php wp_editor(
		$email['email_body'],
		'emailmessage',
		array(
			'media_buttons'    => false,
			'textarea_name'    => 'email_message',
			'editor_css'       => $editor_css,
			'tinymce'          => array(
				'content_css' => self::$plugin_url . 'assets/css/sui-editor.min.css'
			),
			'editor_height'    => 192,
			'drag_drop_upload' => false,
		)
	); ?>

	<span class="sui-description"><?php esc_html_e( 'Use the placeholder {hustle_unsubscribe_link} to insert the unsubscription link.', Plugin::DOMAIN ); ?></span>

</div>

Documentation