From 4657165008a561cf99f1633127ace4cbeded4520 Mon Sep 17 00:00:00 2001 From: Bo Cupp Date: Fri, 13 Mar 2020 07:46:45 -0700 Subject: [PATCH 01/18] update scope of spec --- Active Documents/contentEditableDisabled.html | 131 +++++++++--------- 1 file changed, 69 insertions(+), 62 deletions(-) diff --git a/Active Documents/contentEditableDisabled.html b/Active Documents/contentEditableDisabled.html index 21cbe447..4b48b977 100644 --- a/Active Documents/contentEditableDisabled.html +++ b/Active Documents/contentEditableDisabled.html @@ -3,16 +3,23 @@ - ContentEditableDisabled + Editing UI Directives - +
-

Abstract

- This specification defines an API that indicates to user agents which editing-related commands are applicable to contenteditable regions of a document. User agents SHOULD take this information into account when presenting any editing-related UI to ensure its applicability. + This specification defines an API that indicates to user agents which editing-related commands are applicable to contenteditable regions of a document. User agents can take this information into account when presenting any editing-related UI to ensure it is applicable to a given contenteditable region.

- This specification purposefully does not prescribe the means by which a user agent will indicate to the user that some commands are not applicable in a given contenteditable region. + This specification purposefully does not prescribe the means by which a user agent will indicate to the user the applicability of any editing command. The user agent could, for example, omit editing UI, disable it, or choose some other appropriate UI treatment.

-

+

This is a work in progress and subject to change without warning.

-
-

Introduction

- In contenteditable regions of documents, some user agents provide contextual user interface (UI) elements to help accelerate common editing operations. The UI is meant to enhance the editing experience, but when authors create customized editors that aren’t compatible with user agent UI, it leads to confused users. + In contenteditable regions of documents, some user agents provide contextual user interface (UI) elements to help accelerate common editing operations. The UI is meant to enhance the editing experience, but when authors create customized editors that aren't compatible with user agent UI, it leads to confused users.

- WYSIWYG markdown editors provide a canonical example. While markdown editors typically support bold or italicized text, they often don't support font color or font family customization. System or browser UI elements like those shown for iOS or the Mac Touch Bar below don't have any indication as to which formatting commands are applicable to a particular contenteditable element and should be displayed, and which ones should be disabled or omitted. + To address the issue, a new `contenteditabledisabled` attribute can be applied as shown in the example below.

-
- Mac Touch Bar showing editing buttons -
- Mac Touch Bar showing editing buttons -
-
-
- iOS selection menu showing editing buttons -
- iOS selection menu showing editing buttons -
-
-

- To address the issue, a new contenteditable-disabled attribute can be applied as shown in the example below. -

-
-            <div contenteditable="true" contenteditable-disabled="
+        
+            <div contenteditable="true" contenteditabledisabled="
                 formatbackcolor
                 formatdent
                 formatfont
@@ -107,23 +90,21 @@ 

Introduction

</div>
-
+

- contenteditable-disabled DOM Content Attribute. + contenteditabledisabled DOM Content Attribute.

- The contenteditable-disabled attribute indicates which user agent-supplied editing UI SHOULD be disabled. If specified, the attribute must have a value that is an unordered - set of unique space-separated tokens [[HTML]] which - are ASCII case-insensitive [[INFRA]]. + The contenteditabledisabled attribute indicates which user agent-supplied editing UI SHOULD be disabled. When specified, the attribute can contain an [=unordered set of unique space-separated tokens=] that are treated as [=ASCII case-insensitive=].

- The allowed set of tokens are listed below. Each token matches the name of an Input Type [[input-events-1]], or is a shortcut that is equivalent to specifying a set tokens. + The allowed set of tokens are listed below. Each token matches the name of an Input Type, or is a shortcut that is equivalent to specifying a set tokens.

When a token is specified, any user agent-supplied editing UI, that when invoked, would result in a beforeinput event having and inputType that matches one of the tokens in the attribute's value, or matches a token that is represented by a shortcut that is included in the attribute's value, SHOULD be disabled, omitted, or otherwise indicated by the user agent to be not applicable. The exact mechanism for that indication is beyond the scope of this specification.

- contenteditable-disabled Allowed Tokens. + contenteditabledisabled Allowed Tokens.

    @@ -155,10 +136,10 @@

    Issue 249

    - contenteditable-disabled Allowed Token Shortcuts. + contenteditabledisabled Allowed Token Shortcuts.

    - The following tokens are also supported by the contenteditable-disabled attribute and serve as shorthands for specifying a set of tokens from contenteditable-disabled Allowed Tokens: + The following tokens are also supported by the contenteditabledisabled attribute and serve as shorthands for specifying a set of tokens from contenteditabledisabled Allowed Tokens:

      @@ -182,11 +163,12 @@

      Extensions to the ElementContentEditable mixin

      };

      - The contentEditableDisabled WebIDL property reflects the contenteditable-disabled DOM content attribute. + The contentEditableDisabled WebIDL property reflects the contenteditabledisabled DOM content attribute.

+
From ac5ba6a60b024d56b4ed528128bff3abb6805f45 Mon Sep 17 00:00:00 2001 From: Grisha Lyukshin Date: Wed, 20 May 2020 00:11:47 -0700 Subject: [PATCH 15/18] undoing title change --- Active Documents/contentEditableDisabled.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Active Documents/contentEditableDisabled.html b/Active Documents/contentEditableDisabled.html index cd45faff..5774b787 100644 --- a/Active Documents/contentEditableDisabled.html +++ b/Active Documents/contentEditableDisabled.html @@ -3,7 +3,7 @@ - contenteditabledisabled + ContentEditableDisabled - + From cbd89f8b30911065620395e634039decc77ee92d Mon Sep 17 00:00:00 2001 From: Grisha Lyukshin Date: Tue, 11 Aug 2020 07:07:31 -0700 Subject: [PATCH 17/18] Update Active Documents/contentEditableDisabled.html Co-authored-by: Kagami Sascha Rosylight --- Active Documents/contentEditableDisabled.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Active Documents/contentEditableDisabled.html b/Active Documents/contentEditableDisabled.html index 541ae067..3ff50730 100644 --- a/Active Documents/contentEditableDisabled.html +++ b/Active Documents/contentEditableDisabled.html @@ -157,8 +157,7 @@

Extensions to the ElementContentEditable mixin

-            [Exposed=Window]
-            interface ElementContentEditable {
+            partial interface mixin ElementContentEditable {
                 [SameObject, PutForwards=value] readonly attribute DOMTokenList contentEditableDisabled;
             };
         
From a53b2b41674176e763e9aee5e256e614cfd28dc3 Mon Sep 17 00:00:00 2001 From: Grisha Lyukshin Date: Tue, 11 Aug 2020 07:10:25 -0700 Subject: [PATCH 18/18] Update Active Documents/contentEditableDisabled.html Co-authored-by: Kagami Sascha Rosylight --- Active Documents/contentEditableDisabled.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Active Documents/contentEditableDisabled.html b/Active Documents/contentEditableDisabled.html index 3ff50730..0c7beb46 100644 --- a/Active Documents/contentEditableDisabled.html +++ b/Active Documents/contentEditableDisabled.html @@ -155,7 +155,7 @@

-

Extensions to the ElementContentEditable mixin

+

Extensions to the {{ElementContentEditable}} mixin

             partial interface mixin ElementContentEditable {
                 [SameObject, PutForwards=value] readonly attribute DOMTokenList contentEditableDisabled;