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

Entry point for custom actions module #24

Open
scarroll32 opened this issue Apr 24, 2018 · 2 comments
Open

Entry point for custom actions module #24

scarroll32 opened this issue Apr 24, 2018 · 2 comments

Comments

@scarroll32
Copy link
Contributor

Provide a simple way to extend Typewriter based on selections, applications could be

  • pop up styling menu (aka Medium)
  • additional context for sections of text (word lookups, audio etc)
@jacwright
Copy link
Member

jacwright commented Apr 25, 2018

Edit: updates for API changes

This is a documentation task. To do this you would:

  • listen to the change event
  • check if the selection is not null and not collapsed (isCollapsed = selection[0] === selection[1])
  • get the selected bounding rect rect = editor.getBounds(selection)

@jacwright
Copy link
Member

We could also add an example for a custom use-case.

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

No branches or pull requests

2 participants