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

Missing documentation for manual setup #30

Open
CWBudde opened this issue May 27, 2022 · 1 comment
Open

Missing documentation for manual setup #30

CWBudde opened this issue May 27, 2022 · 1 comment

Comments

@CWBudde
Copy link

CWBudde commented May 27, 2022

I want to add the feature of source code highlighting dynamically. Thus, I was looking for information about how to instantiate the plugin by code.

I achieved this with something like:

let textareaControl = document.getElementById("inspector-textarea-control-0"); 
let prismEditor = new Prism.Live(textareaControl);

However, I need to specify the language I want to highlight and don't know the best way to do so. Maybe this could be added to the README, so that I (and others) know how to use it properly

@LeaVerou
Copy link
Member

Does a language-xxx class on the textarea not work?

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