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

How can I have the cursor in an empty Editor be pre-marked? #1652

Closed
tashburn opened this issue Feb 20, 2018 · 1 comment
Closed

How can I have the cursor in an empty Editor be pre-marked? #1652

tashburn opened this issue Feb 20, 2018 · 1 comment
Labels

Comments

@tashburn
Copy link
Contributor

When my users click a button to change the current block type to a "block-quote", I want their cursor to be in the new block-quote and marked italic. The user can click a toolbar button to un-italicize it if they want.

I've tried change.setBlock(json) and passed the JSON for a text node with the italic mark. Doesn't work. The mark gets removed by Slate.

I've tried change.setBlock('block-quote').addMark('italic'). Doesn't work either. The user-entered text is not italic.

How can I do this?

@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
Projects
None yet
Development

No branches or pull requests

3 participants