ソースを参照

Merge pull request #1518 from ckeditor/t/1517

Docs: Editor placeholder should be created from the "placeholder" attribute only when the source element is `<textarea>`. Closes #1517.
Piotrek Koszuliński 7 年 前
コミット
c47d8357f6
1 ファイル変更5 行追加6 行削除
  1. 5 6
      docs/features/placeholder.md

+ 5 - 6
docs/features/placeholder.md

@@ -14,14 +14,12 @@ See the demo of the placeholder feature:
 
 There are two different ways of configuring the editor placeholder text:
 
-### Using the DOM attribute
+### Using the `placeholder` attribute of a textarea
 
-Set the `placeholder` attribute on an element passed to the `Editor.create()` method (for instance {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`}) to configure the placeholder:
+Set the `placeholder` attribute on a `<textarea>` element passed to the `Editor.create()` method (for instance {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`}) to configure the placeholder:
 
 ```html
-<div id="editor" placeholder="Type the content here!">
-	<p>Editor content</p>
-</div>
+<textarea id="editor" placeholder="Type the content here!"></textarea>
 ```
 
 ```js
@@ -40,7 +38,8 @@ ClassicEditor
 You can use the {@link module:core/editor/editorconfig~EditorConfig#placeholder `editor.config.placeholder`} configuration option:
 
 * when no element was passed into `Editor.create()` method,
-* to override the `placeholder` attribute value, for instance, if an element was passed into `Editor.create()` but the placeholder text should be different.
+* when the element passed into `Editor.create()` was not a `<textarea>` (for instance, a `<div>` element),
+* to override the `placeholder` text of a `<textarea>`, if one was passed into `Editor.create()` but the placeholder text should be different.
 
 ```js
 ClassicEditor