> > In matters of b), OpUpdateParagraphStyle has a payload "removedProperties"While I agree for what the user expects by his input via the UI, I was more
> > which stores the names of all attributes that should be removed. That was
> > done like that instead of listing the attribute with value >null<,
> > >undefined< or "" in the "setProperties" to express that is should be
> > removed, because >null< and >undefined< might not exist in other
> > languages and "" could be an actual valid value.
> >
> > Q: does it make sense to add something similar like "removedProperties" to
> > OpApplyStyle? I guess it does.
>
> This concept doesn't really make any sense for direct formatting.
>
> For example:
>
> <p style="font-weight: bold"><span>hi</span> there!</p>
>
> I might accidentally think that to make the "hi" text non-bold, I should
> OpApplyStyle with removedProperties =[font-weight]. This doesn't make any
> real sense though, as the element I'm formatting (the styling of the span)
> doesn't have a property to remove.
>
> If I remove it off the paragraph element, I'll incorrectly unbold " there!"
> as well.
>
> The end user intent is never to remove formatting (with the exception of a
> specific OpRemoveDirectFormatting option or similar). Rather, when they say
> "unbold this", they really mean "make this range font-weight=normal".
thinking in op spec terms and of people doing some manipulations of the DOM
based on algorithms, where they might want to be able to also remove
properties, not just add/change.
> > For c) I wonder what the plans are for paragraph styling. There is no TODOOkay, so would be possible to have also paragraph properties in the same way
> > or anything else mentioned. And I am only thinking of the op spec, not of
> > the actual implementation how to execute this op.
> >
> > Q: Should the same op be used for direct paragraph styling? So should
> > there
> > be, like in OpUpdateParagraphStyle, another section "paragraphProperties",
> > next to "textProperties"?
>
> I wrote OpApplyStyle to allow the possibility of that taking care of
> paragraph and text properties if desired. But, I'm not particularly
> attached to that approach.
like in OpUpgradeParagraphStyle in theory. Just needs someone in practise to
write the proper code :)
> I like OpApplyStyle's range-based operation. It makes translation from theAgreed. Same fate as OpRemoveText possibly...
> cursor easier, and the operation is still quite straightforward. But… I am
> worried about whether inverse operations (i.e., proper undo) can be created
> for range-based operations .