Created
March 18, 2020 10:12
-
-
Save lasida/b2332bb1c704335706bfc4ddf45a2b5c to your computer and use it in GitHub Desktop.
WP Editor API Javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Init Value Editor | |
var editorID = 'editor-1'; | |
// Init TextArea to WP Editor | |
wp.editor.initialize( | |
editorID , { | |
'tinymce': true, | |
'quicktags': true, | |
'mediaButtons' : true, | |
}); | |
// Removing WP Editor by ID | |
wp.editor.remove( editorID ); | |
// Getting Content WP Editor | |
var editorVal = wp.editor.getContent( editorID ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment