RE: attribute or CSS property?

On Tue, Dec 9, 2014 at 1:29 AM, Johannes Wilm <johannes@fiduswriter.org> wrote:
>> I'm a bit back and forth on the original topic; whether these should
>> be attribute or CSS property. Right now, I'm a bit leaning towards to
>> attributes for both, since these look content-layer thing to me, and
>> in your copy-paste scenario, editability/selectability being copied
>> looks more natural to me.
>
>
> From the perspective of an editor it seems somewhat less so for me. 
>
> Lets imagine a webbased editor A (for example TinyMCE on a Wordpress blog
> with some plugins) and webbased editor B (for example CKeditor on a Drupal
> site with some other plugins) and for the sake of the argument we take the
> cleanup of the HTML away that editor B currently will have.
>
> We copy some text in editor A of which some pats are marked as non-editable
> such as a citation, as we have a special citation plugin in editor A:
>
> <p>"Hello there, stranger!", the king said <span class="citation"
> contenteditable=false>(Adam 1991: 23)</span></p>
>
> We copy this and paste it into editor B, which does not have a citation
> plugin. The citation is still handled as one single character. Now the user
> wants to change the page number in the citation in editor B. After looking
> through all buttons  in the editor UI, the user will figure out that there
> is nothing he can do. What are his possible ways out of this?

This seems like a rabbit hole to me. Editor B is not made to edit citations. You can fix this situation by simply deleting the non-editable citation and typing your own. Or if Editor A is more robust, it could change from its specialized citation class to something editable when you copy out of it. I don't think we need to be in the business of solving this in the browser.

It's important to have these conversations! At this point I still think a DOM attribute is the way to go.

Received on Tuesday, 9 December 2014 17:11:42 UTC