Opened 5 years ago

Last modified 5 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:

  1. Create editor

CKEDITOR.replace( 'editor1', {
allowedContent: true
});

  1. 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 &quot;Buzz&quot; E. Aldrin, Jr.</td>
</tr>
</tbody>
</table>

  1. Click a cell having contenteditable set to false
  2. Run commands from the toolbar such as create new list, align text center or block quote
  3. 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.

Change History (1)

comment:1 Changed 5 years ago by Piotrek Koszuliński

Status: newconfirmed
Version: 4.4.14.0

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.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy