Wysiwyg::get_html()
Get HTML of editor.
Return
(string) HTML of editor
Source
File: src/Tribe/Admin/Wysiwyg.php
public function get_html() {
// Add button filters.
add_filter( 'teeny_mce_buttons', [ $this, 'filter_buttons' ] );
add_filter( 'tiny_mce_buttons', [ $this, 'filter_buttons' ] );
add_filter( 'mce_buttons', [ $this, 'filter_buttons' ] );
add_filter( 'mce_buttons_2', [ $this, 'maybe_filter_buttons_2' ] );
// Get HTML of editor.
ob_start();
wp_editor( html_entity_decode( ( $this->value ) ), $this->name, $this->args );
$html = ob_get_clean();
// Remove button filters.
remove_filter( 'teeny_mce_buttons', [ $this, 'filter_buttons' ] );
remove_filter( 'tiny_mce_buttons', [ $this, 'filter_buttons' ] );
remove_filter( 'mce_buttons', [ $this, 'filter_buttons' ] );
remove_filter( 'mce_buttons_2', [ $this, 'maybe_filter_buttons_2' ] );
return $html;
}
Changelog
| Version | Description |
|---|---|
| 5.0.12 | Introduced. |