placeholder
Documentation / editor/modules/placeholder
placeholder()​
function placeholder(placeholder: string | Function, options?: PlaceholderOptions): (editor: Editor) => object;
Defined in: editor/modules/placeholder.ts:25
Set placeholder text in the editable area when there is no content. Then add the css:
.placeholder {
position: relative;
}
.placeholder::before {
content: attr(data-placeholder);
position: absolute;
left: 0;
right: 0;
opacity: 0.5;
}
Parameters​
Parameter | Type |
---|---|
|
|
|
|
Returns​
(editor: Editor): object;
Parameters​
Parameter | Type |
---|---|
|
Returns​
object
Name | Type | Defined in |
---|---|---|
| () => | editor/modules/placeholder.ts:57 |