Skip to content
PHP Ecosystem
Explore

HasContentEditable

API reference › HTML Attribute › Global › HasContentEditable

traitUIAwesome\Html\Attribute\Global\HasContentEditable
Sourcesrc/Global/HasContentEditable.php
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.

MethodDescriptionDefined by
contentEditable()Sets the contenteditable attribute.HasContentEditable
public function contentEditable(bool|string|UnitEnum|null $value): static

Sets the contenteditable attribute.

Parameters

ParameterTypeDescription
$valuebool|string|UnitEnum|nullContent 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