Hi, for now the marksAcross() returns the array of all marks appeared in a range. a common situation in everyday using is, when you select a range of text, the menubar should display the shared or common state of that selection.
for example, helloworld , this selection have two marks in it, if you use marksAcross(), it will return both strong and em. But the more practical usage is to get the common marks, in this example, there’s none, so the strong and em button shouldn’t show as active state.
if the selection content is hello world now there’s one shared mark: strong.
what do you meanthis selection has no shared mark, because every word has it’s own mark ( or has no mark at all )
I think there could be a method like marksShared() or something, instead of returning all marks it returns the common marks.