Skip to main content

placeholder

ai-research-agent / editor/modules/placeholder

Functions

placeholder()

function placeholder(placeholder, options?): (editor) => object

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

ParameterType

placeholder

string | Function

options?

PlaceholderOptions

Returns

Function

Parameters
ParameterType

editor

Editor

Returns

object

NameType
destroy()