Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger marker refresh #4471

Closed
pjasiun opened this issue Jan 28, 2019 · 0 comments · Fixed by ckeditor/ckeditor5-engine#1694
Closed

Trigger marker refresh #4471

pjasiun opened this issue Jan 28, 2019 · 0 comments · Fixed by ckeditor/ckeditor5-engine#1694
Assignees
Labels
package:engine type:improvement This issue reports a possible enhancement of an existing feature.
Milestone

Comments

@pjasiun
Copy link

pjasiun commented Jan 28, 2019

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.

scofalik referenced this issue in ckeditor/ckeditor5-engine Mar 12, 2019
Feature: Added possibility to refresh the marker with no changes through `Writer#updateMarker()` method. Closes #1649.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-engine Oct 9, 2019
@mlewand mlewand added this to the iteration 23 milestone Oct 9, 2019
@mlewand mlewand added module:model type:improvement This issue reports a possible enhancement of an existing feature. package:engine labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:engine type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants