8
0
Просмотр исходного кода

Use assert method to prevent of editor initialization in textarea.

Mateusz Samsel 6 лет назад
Родитель
Сommit
545a169b21
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      packages/ckeditor5-editor-inline/src/inlineeditor.js

+ 2 - 0
packages/ckeditor5-editor-inline/src/inlineeditor.js

@@ -189,6 +189,8 @@ export default class InlineEditor extends Editor {
 	 */
 	 */
 	static create( sourceElementOrData, config = {} ) {
 	static create( sourceElementOrData, config = {} ) {
 		return new Promise( resolve => {
 		return new Promise( resolve => {
+			Editor._assertAllowedSourceElement( sourceElementOrData );
+
 			const editor = new this( sourceElementOrData, config );
 			const editor = new this( sourceElementOrData, config );
 
 
 			resolve(
 			resolve(