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

Links embedded in code #151

Open
calebwin opened this issue Mar 13, 2021 · 3 comments
Open

Links embedded in code #151

calebwin opened this issue Mar 13, 2021 · 3 comments
Labels

Comments

@calebwin
Copy link

Is there a way to have a part of code have a link so that when clicked, a user may be redirected to documentation, for example? If not, is there some other JS library that would provide this?

Thank you.

@AndiDittrich
Copy link
Member

not at the moment - in the past there were a few feature requests but it's difficult to implement:

  1. a unique markup is required to "mark" the links within the code without affecting language rules (<a> tags won't work)
  2. the links/references have to be stored in some kind of metadata "container" outside the coceblock or within the markup
  3. all editor plugins must be able to add these kind of references+metadata
  4. the tokenizer needs to be modified to allow "immutable tokens" to process the links
  5. adding a link to specific element would removed the highlighting (easy solution) or just adding a <a> tag to the rendered content (complicated).

proposals are welcome

@calebwin
Copy link
Author

I see, thanks for clarifying. Are you aware of any other approaches for code highlighting with a link embedded?

@AndiDittrich
Copy link
Member

not really

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

2 participants