- From: Johannes Wilm <johannes@fiduswriter.org>
- Date: Mon, 26 Oct 2020 15:08:11 +0100
- To: Malte Timmermann <malte_timmermann@gmx.com>
- Cc: public-editing-tf@w3.org
- Message-ID: <CABkgm-QY00WbygdjsvoWxTBZ3vH-3-wu=4GWbQhd3y5=7Yyy2A@mail.gmail.com>
Hey Malte, The thing I think you are looking for is the beforeinput event (Input Events spec). By canceling that event, you can stop the browser from manipulating the DOM. Unfortunately, due to various factors outside of our control, with the exception of Safari, the browsers have so far not been able to implement it fully, so you probably won't get around needing a mechanism to listen for dom changes and then roll them back once the browser is done. Johannes On Fri, Oct 23, 2020 at 11:15 PM Malte Timmermann <malte_timmermann@gmx.com> wrote: > Hi, > > I am new here. I stumbled over the draft for ContentEditableDisabled > while again searching for a solution to hinder extensions writing in the > DOM of our editing web application. > > We use ContentEditable only to get key/IME events and cursor traveling. > We (try to) hinder the browser to make any changes to the DOM on it's own. > > The reason is that we use the concept of "operations", and if somebody > else but our own code manipulates the DOM, the positions from operations > become invalid. > > https://www.slideshare.net/Malte.Timmermann/ox-documents-explained > > ContentEditableDisabled could be THE solution for our problem. > > Unfortunately, simple text manipulations seem to be out of scope of the > ContentEditableDisabled API. > > I am pretty sure there are many Apps out there who could benefit of > disabling all unwanted DOM manipulations including simple key input. > CKEditor must have the same problem, not sure how Jira implements the > collaborative editing. In the end, every app that manipulates rich > content in a collaborative way could benefit. > > Do you think it would be reasonable to add insertCharacter(s) and > deleteCharacter(s) (or "text" instead of "character" ) to the > DOMCommandTokenList? > > Might look strange for people on first glance, but in certain scenarios > this is a critical thing. > > Best regards, > Malte. > > > -- Johannes Wilm Fidus Writer http://www.fiduswriter.org
Received on Monday, 26 October 2020 14:08:35 UTC