[w3c/editing] contenteditable-disable (#176)

Hey, as of TPAC 2017, we have a resolution to create a contenteditable-disable attribute [1] to be able to keyboard shortcuts and associated menu items from various context menus. It should work like this:
```
<div contenteditable="true" contenteditable-disabled="orderedList formatBold formatFontName">
  ...
</div> 
```
After consulting with developers of Substance.io, CKEditor and ProseMirror, I would like to propose this list:

```
history // makes the element not be part of any browser-provided undo stack. 
inserHorizontalRule
orderedList
unorderedList
insertLink
insertLineBreak
insertParagraph
formatBold
formatItalic
formatUnderline
formatStrikeThrough
formatSuperscript
formatSubscript
formatJustify
formatDent // indent and outdent
formatSetBlockTextDirection
formatSetInlineTextDirection
formatBackColor
formatFontColor
formatFontName
```

There are some challenges with this:

1. Clipboard actions - one cannot really avoid needing to offer these and accessing the clipboard programmatically is a security issue. So that means one will continue to have the native menu, which can be challenging when combining with an app-provided menu [2]. The solution there seems to be adding the ability to add custom actions to the native menus, but that will need to be dealt with in a separate issue. This was also briefly discussed at TPAC 2017.

2. IE/Firefox by default add controls for tables, positioned items, images, and possibly more. It sounds like Firefox is working on removing these [3]. Should they need be removed, we would need to mention these here as well. 

3. It would be good to have a way to be able to disable all of these in one go. For example `contenteditable-disabled="all"`


[1] https://www.w3.org/2017/11/07-editing-minutes.html#resolution01

[2] https://github.com/ckeditor/ckeditor5/issues/1107 and https://github.com/ProseMirror/prosemirror/issues/7

[3] https://github.com/w3c/editing/issues/171#issuecomment-379143053

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/issues/176

Received on Tuesday, 26 June 2018 19:52:00 UTC