HasContentEditable
API reference › HTML Attribute › Global › HasContentEditable
Used by 1 type
Provides an immutable API for the contenteditable attribute.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
contentEditable() | Sets the contenteditable attribute. | HasContentEditable |
Method details
Section titled “Method details”contentEditable()
Section titled “contentEditable() ”public function contentEditable(bool|string|UnitEnum|null $value): staticSets the contenteditable attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | bool|UnitEnum| | Content editability value. Use true, false, or ‘plaintext-only’, or null to remove the attribute. |
Returns
static: New instance with the updated contenteditable attribute. ContentEditable for predefined enum values.
Throws
InvalidArgumentException: If the value is not valid.