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

Add mark in loop at absolute position in text #3006

Closed
boehm-e opened this issue Sep 7, 2019 · 1 comment
Closed

Add mark in loop at absolute position in text #3006

boehm-e opened this issue Sep 7, 2019 · 1 comment

Comments

@boehm-e
Copy link

boehm-e commented Sep 7, 2019

Hi,
I can add mark :

this.editor
.focus()
.moveToRangeOfDocument()
.moveTo(10)
.moveFocusForward(4)
.addMark('bold')

but I can't add more than one mark :
this is not working

this.editor
.focus()
.moveToRangeOfDocument()
.moveTo(10)
.moveFocusForward(4)
.addMark('bold')
.moveTo(20)
.moveFocusForward(5)
.addMark('bold')

and this is not working too:

data.forEach(word => {
  this.editor
  .focus()
  .moveAnchorTo(word.begin)
  .moveFocusTo(word.end)
  .addMark('bold')
})

So is there a way to add multiple marks at the same time, or one by one by looping over some data ?
What I would like to do is to add mark at Absolute position in the document.
Thank you :)

@boehm-e boehm-e changed the title Add mark in loop Add mark in loop at absolute position in text Sep 7, 2019
@ianstormtaylor ianstormtaylor mentioned this issue Nov 6, 2019
@ianstormtaylor
Copy link
Owner

As of #3093 (which was just merged), I believe this issue is no longer applicable, because a lot has changed. I'm going through and closing out any potential issues that are not out of date with the overhaul. Thanks for understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants