- From: Johannes Wilm <notifications@github.com>
- Date: Tue, 16 Aug 2016 15:04:01 -0700
- To: w3c/editing <editing@noreply.github.com>
- Message-ID: <w3c/editing/issues/144/240254086@github.com>
One example: I create an editor where I added a lot of custom tags and attributes to my content that are there only for internal purposes. Also, I have a datamodel that holds the content of the document I am working on. The user cuts, and I want to make sure that: * The part that was selected is being removed both from the DOM and from the datamodel. The order will need to be: remove from datamodel -> rerender document in the DOM. * For the case that the user pastes the cut content somewhere else on the web, I want the global clipboard to contain HTML similar to what was selected, but I want my custom attributes and tags removed from the version that goes into the global clipboard. * For the case that the user pastes the cut content back into my webapp, I need to copy the selected text as it is represented in my datamodel internally so that I can use this internal copy which holds additional data beyond what is available in the DOM. Does that make sense? I guess I can simply use the cut event for all of that. But what is then the point of the beforeinput event? Or I could use the beforeinput event, but if we choose your model A or C, then I will have a ahrd time getting content into the global clipboard, right? -- 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/144#issuecomment-240254086
Received on Tuesday, 16 August 2016 22:04:57 UTC