Control the editor programmatically using execCommand, getHTML, and setHTML from external buttons.
// Get the editor instance
var editor = document.getElementById("apiEditor").editor;
// Get HTML content
var html = editor.getHTML();
// Set HTML content
editor.setHTML("<p>New content</p>");
// Execute a formatting command
editor.execCommand("bold");
// Focus the editor
editor.focus();