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

hydra extension API [WIP] #205

Open
ojack opened this issue Aug 22, 2022 · 0 comments
Open

hydra extension API [WIP] #205

ojack opened this issue Aug 22, 2022 · 0 comments

Comments

@ojack
Copy link
Member

ojack commented Aug 22, 2022

Talking wih @jamiefaye about adding InAct as an extension to the hydra editor. I would like to use this as an example project to help define and extension 'API' for adding things to hydra editor. Also tagging @ritchse to weigh in on this.

Some basic thoughts:

  1. extension is only activated when user selects it from a menu
  2. registry of extensions in a separate hydra repo, can be called from editor
  3. main editor is very lightweight, but extensions can add complex functions and UI elements

Basic specs

UI elements:

  • extensions receive a dom element from the toolbar, and can add an icon to the toolbar
  • recieve a dom element "panel" to attach additional ui elements when activated

Events:

  • Extensions can listen to events from the editor, such as 'eval'
  • Extensions have access to editor view state
  • Extensions have access to calling certain functions from hydra editor, such as setting editor text and calling "eval"

Questions:

  • a lot of this is similar in goals to CodeMirror6 extension API....since hydra will transition to CM6, to what extent should we just use the CM6 extension API vs. inventing a new one?
  • how to dynamically load from the browser? similar to 'loadScript' function but more complex
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

1 participant