Skip to content

Trigger marker refresh #4471

Closed
ckeditor/ckeditor5-engine
#1694
@pjasiun

Description

@pjasiun

It is a common case that we want to change the color of the marker whenever the selection is inside it. The problem is that we have no easy way to tell marker to re-render. We can do direct changes in the view, but it caused already a number of issues.

This is why, I propose to have:

writer.updateMarker( 'name', { refresh: true } );

Or make sure that simple

writer.updateMarker( 'name' ); // with no options or with any option

causes marker rerender.


Originally, this ticket had to be called markers attributes. However, we realized that the state of the marker should not be sent to other collaboration clients and it would be strange to keep it in the marker which is synchronized. Also, the visual state of the marker is not the data model, it is more like a view state. This is why the information if the marker is active or not should be stored in the plugin which handles it, not in the model. All we need to tell writer that the marker should be refreshed.

Metadata

Metadata

Assignees

Labels

package:enginetype:improvementThis issue reports a possible enhancement of an existing feature.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions