Перевод не завершен. Пожалуйста, помогите перевести эту статью с английского.
Свойство HTMLElement.contentEditable
элемента - признак, указывающий можно или нет редактировать содержимое элемента. Своство может принимать следующие значения:
true или пустая строка - содержимое элемента доступно для редактирования
.false
- содержимое элемента не доступно для редактирования.inherit
- наследуется значение занного свойства от родительского элемента.
Вы можете использовать свойство HTMLElement.isContentEditable
, чтобы проверить Boolean
значение этого свойства.
Синтаксис
editable = element.contentEditable element.contentEditable = "true"
Спецификации
Specification | Status | Comment |
---|---|---|
WHATWG HTML Living Standard Определение 'contenteditable' в этой спецификации. |
Живой стандарт |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 11 | 3.0 (1.9) | 6 | 10.6 | 3.2 |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | 3 | 1.0 (1.9) | 6 | Нет | 5 |
Bugs
- IE bug 796187: IE10 crashes in some cases when editing lists
- IE bug 858749: IE11+ uses invalid positioning for caret when an element is floated
- IE bug 809254: IE9-10 window freezes when using mousewheel while dragging
- IE bug 794285: IE10-11 does not fire the
input
event - IE bug 801770: IE10 crashes after selecting "Cut" from the context menu
- IE bug 807199: IE11+ does not allow placing the caret in an empty table cell
- IE bug 774350: IE10 does not fire
contextmenu
event when right-clicking on misspelled words - IE bug 864804: IE11 appends
<br>
elements to<body>
when showing/hiding an<iframe>
with contenteditable document inside - IE bug 907422: IE11 does not allow disabling resize handles for images/inputs