-
Notifications
You must be signed in to change notification settings - Fork 15
Cleaned up Editor classes #114
Conversation
…tor and create main root at default.
src/editor/editor.js
Outdated
* | ||
* Besides it creates main {@link module:engine/model/rootelement~RootElement} using | ||
* {@link module:engine/model/document~Document#createRoot createRoot} method what automatically creates | ||
* corresponding {@link module:engine/view/rooteditableelement~RootEditableElement view root} element. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Class representing the base of the editor. It is the API all plugins can expect to get when using
editor
property. Editors implementation (like Classic Editor or Inline Editor) should extend this class. They can add their own methods and properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to explain what the architecture is here (we need an article for it) and I don't think we should list properties (they will be listed anyway). Instead, I focused more what this subset of properties means.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also add "see StandardEditor".
src/editor/standardeditor.js
Outdated
import isFunction from '@ckeditor/ckeditor5-utils/src/lib/lodash/isFunction'; | ||
|
||
import getDataFromElement from '@ckeditor/ckeditor5-utils/src/dom/getdatafromelement'; | ||
import setDataInElement from '@ckeditor/ckeditor5-utils/src/dom/setdatainelement'; | ||
|
||
/** | ||
* Class representing a typical browser-based editor. It handles a single source element and | ||
* uses {@link module:engine/controller/editingcontroller~EditingController}. | ||
* Class provides API methods for getting and setting data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The standard editor class, extending base editor by adding methods needed in the typical editor implementations: editor with a single editable area created based on the DOM element. It provides base API to manage data and to integrate the editor with the form when it is initialized on the textarea element.
Suggested merge commit message (convention)
Fix: Moved
EditingController
,DataController
andEditingKeystrokeHandler
fromStandardEditor
toEditor
class. Closes ckeditor/ckeditor5#2928.Constelation: https://github.com/ckeditor/ckeditor5/tree/t/ckeditor5-core/110
Requires: