Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #173 from ckeditor/t/ckeditor5/1591
Browse files Browse the repository at this point in the history
Other: Introduce editor-wrong-element error thrown when editor is created over wrong element. Closes ckeditor/ckeditor5#1591.
  • Loading branch information
jodator authored Jun 12, 2019
2 parents 30949f5 + b80e923 commit 9945fc6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,22 @@ mix( Editor, ObservableMixin );
* @event destroy
*/

/**
* This error is thrown when a user tries to use a `<textarea>` element to create a non-classic editor in it.
*
* Textarea element represents a plain-text and cannot be used as a editable root element with included CKEditor5.
* Content of an editor should be nicely present to the user and show him how it's going to looks like. Textarea element
* doesn't support such behavior.
*
* Only {@glink builds/guides/overview#classic-editor Classic Editor} has implemented a special system, which
* **replace** DOM element and load data from it
* ({@link module:editor-classic/classiceditor~ClassicEditor.create more information}). All other editors
* use an existing element, load data from it and make this element editable. Details about behaviour of each editor
* might be found in an associated description of a `create` method of each editor.
*
* @error editor-wrong-element
*/

/**
* An array of plugins built into this editor class.
* It is used in CKEditor 5 builds to provide a list of plugins which are later automatically initialized
Expand Down

0 comments on commit 9945fc6

Please sign in to comment.