Ckeditor5: Rename virtual selection to highlight

Created on 18 Aug 2017  路  4Comments  路  Source: ckeditor/ckeditor5

I was explaining @scofalik what virtual selection is and it takes a while to get that virtual selection and fake selection are different mechanisms. In fact, the selection has 2 meanings:

  • the place where the user is editing and
  • visual marker over some text/content.

While the fake selection is focused mostly on the first mechanism, the virtual selection is only about the second. And I think it's wrong. We used to associate selection with the document selection, with the first meaning. Virtual selection is misleading since it has nothing in common with the selection as the place where the user is editing.

So, since virtual selection is not a selection we should find a better name.

Maybe just 'marker'? It describes very well what it really is and model markers will be mostly converted to it. What I don't like in calling it "marker", is the "mostly" part. We can convert model markers to elements and it might be strange that model markers do not need to be a view marker.

But it's Friday, 17:40 and I have no better ideas.

engine

Most helpful comment

I like "highlight". I think it describes very well what it is in the view: it makes part of the content to stand out by applying some visual effect.

.fromMarker( 'search' ).toHighlight( { class: 'search-highlight' } );

It looks beautiful, isn't it? :D

All 4 comments

Probably it's important to avoid confusion with markers.

"Highlight" or "Custom Highlight"?

I like "highlight". I think it describes very well what it is in the view: it makes part of the content to stand out by applying some visual effect.

.fromMarker( 'search' ).toHighlight( { class: 'search-highlight' } );

It looks beautiful, isn't it? :D

I love highlight.

Let's go with "highlight"!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MCMicS picture MCMicS  路  3Comments

wwalc picture wwalc  路  3Comments

pjasiun picture pjasiun  路  3Comments

devaptas picture devaptas  路  3Comments

metalelf0 picture metalelf0  路  3Comments