A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.

To request an account, ask an autoconfirmed user on IRC (such as one of these permanent autoconfirmed members).

Editing use-cases

From WHATWG Wiki
Jump to: navigation, search

This is a page to document use-cases for editing that are not well served by the current contenteditable feature as specced or implemented.

Interesting link: http://www.mediawiki.org/wiki/Special:VisualEditorSandbox

Initial version of this page is thanks to feedback from Roan Kattouw and Trevor Parscal of Wikimedia.

An atomic chunk of HTML

Use-case: A Wikipedia page has embedded templates or other data with special meaning, such as a reference or a "[citation needed]" link. It must not be possible for the user to place the cursor inside the chunk of HTML, or to modify it internally in any way. If the user attempts to move, copy, or delete the chunk of HTML, the author must be allowed to decide what happens.

Solution: The chunk of HTML should be marked contenteditable=false. Per spec, this will not allow it to be modified or deleted, but will let it be moved. But more features are needed for authors to be able to control moving, copying, and deleting. For instance, it might be desirable to let it be deleted if the author backspaces over it. It might also be desirable to specify special behavior if it's copied.