Opened 11 years ago
Last modified 11 years ago
#12028 confirmed Bug
Attribute contenteditable="false" in table cell does not fully disable content modification
Reported by: | nikos | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.0 |
Keywords: | Cc: |
Description
I found out that attribute contenteditable="false" in table cell does not fully disable cell content modification. I was able to modify cell content with following setup:
- Create editor
CKEDITOR.replace( 'editor1', {
allowedContent: true
});
- Copy-paste table
<table>
<tbody>
<tr>
<td contenteditable="false">Commander</td>
<td>Neil A. Armstrong</td>
</tr>
<tr>
<td contenteditable="false">Command Module Pilot</td>
<td>Michael Collins</td>
</tr>
<tr>
<td contenteditable="false">Lunar Module Pilot</td>
<td>Edwin "Buzz" E. Aldrin, Jr.</td>
</tr>
</tbody>
</table>
- Click a cell having contenteditable set to false
- Run commands from the toolbar such as create new list, align text center or block quote
- Content in the cell is edited and new elements inserted (such as p-tag) to the cell. When align text was clicked repeatedly, p-tags were inserted before the table which came visible after toggling between source and WYSIWYG
I would assume that when setting table cell attribute contenteditable as false that no operation / command could be run after user has clicked the cell / has focus on the cell.
A solution would be to disable all buttons on toolbar when user puts focus to element having contenteditable false. Then it would be more evident for the user that the content can not be edited.
Confirmed. Note that there's no official support for "raw" non-editable content. We implemented the widget system which uses contenteditable=false, but you cannot select part of a widget and therefore you cannot apply style inside it.
I confirm this ticket because from logical point of view style should not be applicable to a non-editable content. But we're not willing to work on this issue now for the reasons I explained above.
I can confirm this behaviour from at least CKEditor 4.0.