place widget dom inside decoration mark


I’m implementing a widget similar to the checkbox. for proper positioning, it would be easier to have the widget inside the span of a decoration mark. I would have expected that to be possible by first adding the widgets and then the decorations with inclusive set to true.

this is an example with the checkbox widget and an additional decoration mark for boolean literals.

as a result, I would have expected the widgetBuffer img and cm-boolean-toggle to be placed inside the decoration, but they are rendered as siblings.

is there a way to move the widget inside the decoration?


You will need to give the widget a negative side for it to be part of the marks that end at its location. But even then the editor would draw a separate mark span around it, which was a bug fixed by this patch.

awesome, thx, works like a charm!