This tutorial goes through the process of adding CKEditor4 as an editor that can be used by the WYSIWYG UI component.
Download and install your editor’s library into your module’s view/base/web/js directory to have Magento publish it under pub/static.
In your module’s etc/adminhtml/di.xml file, add your editor to the list of adapterOptions to include it to the list of available WYSIWYG editors in the Admin.
Provide unique values for the name parameter and the value and label entries for your editor to avoid naming collisions.
If you are also extending or overriding the configuration for Variable, Widget, or Gallery, you must use the same string as the value entry.
getBookmark( type:Number, normalized:Boolean ):Object - returns a bookmark object that has the location for the current selection. This is used to restore the selection after content modification in the document.
moveToBookmark( bookmark:Object ):Boolean - restores the selection of the specified bookmark.
getNode():Element - returns the currently selected element or common ancestor element for both start and end of the selection.
select( targetElement ) - selects the specified element. This places the start and end of the selection range around the element.
collapse( to_start:Boolean ):void - collapse the selection to start or end of range.
* Insert content to active editor.
* Retrieve directives URL with substituted directive value.
After loading, modifying, and merging all configurations, Magento serializes the result into a JSON object and passes it to the UI component.
In your module’s view/base/requirejs-config.php file, add a shim configuration entry for your editor in order to have RequireJS load it correctly.