diff --git a/packages/ckeditor5-editor-balloon/src/ballooneditorui.ts b/packages/ckeditor5-editor-balloon/src/ballooneditorui.ts index 07d1c9887df..b83609aa51a 100644 --- a/packages/ckeditor5-editor-balloon/src/ballooneditorui.ts +++ b/packages/ckeditor5-editor-balloon/src/ballooneditorui.ts @@ -103,7 +103,7 @@ export default class BalloonEditorUI extends EditorUI { } /** - * Enable the placeholder text on the editing root, if any was configured. + * Enable the placeholder text on the editing root. */ private _initPlaceholder(): void { const editor = this.editor; diff --git a/packages/ckeditor5-editor-classic/src/classiceditorui.ts b/packages/ckeditor5-editor-classic/src/classiceditorui.ts index b5655b5adef..a7066a6bd2b 100644 --- a/packages/ckeditor5-editor-classic/src/classiceditorui.ts +++ b/packages/ckeditor5-editor-classic/src/classiceditorui.ts @@ -142,7 +142,7 @@ export default class ClassicEditorUI extends EditorUI { } /** - * Enable the placeholder text on the editing root, if any was configured. + * Enable the placeholder text on the editing root. */ private _initPlaceholder(): void { const editor = this.editor; diff --git a/packages/ckeditor5-editor-decoupled/src/decouplededitorui.ts b/packages/ckeditor5-editor-decoupled/src/decouplededitorui.ts index f2ce48219c1..20fe5ae520c 100644 --- a/packages/ckeditor5-editor-decoupled/src/decouplededitorui.ts +++ b/packages/ckeditor5-editor-decoupled/src/decouplededitorui.ts @@ -111,22 +111,20 @@ export default class DecoupledEditorUI extends EditorUI { } /** - * Enable the placeholder text on the editing root, if any was configured. + * Enable the placeholder text on the editing root. */ private _initPlaceholder(): void { const editor = this.editor; const editingView = editor.editing.view; const editingRoot = editingView.document.getRoot()!; - const placeholder = editor.config.get( 'placeholder' ); - let placeholderText; if ( placeholder ) { - placeholderText = typeof placeholder === 'string' ? placeholder : placeholder[ editingRoot.rootName ]; - } + const placeholderText = typeof placeholder === 'string' ? placeholder : placeholder[ editingRoot.rootName ]; - if ( placeholderText ) { - editingRoot.placeholder = placeholderText; + if ( placeholderText ) { + editingRoot.placeholder = placeholderText; + } } enablePlaceholder( {