Open
Description
Hi, I'm just getting started with code-input and I have a question, how can I select a specific language when the autodetect plugin is registered?
<script src="https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js"></script>
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/styles/default.min.css">
</link>
<script src="https://cdn.jsdelivr.net/gh/WebCoder49/[email protected]/code-input.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/WebCoder49/[email protected]/code-input.min.css">
<script src="https://cdn.jsdelivr.net/gh/WebCoder49/[email protected]/plugins/autodetect.min.js"></script>
<script>
codeInput.registerTemplate("syntax-highlighted",
codeInput.templates.hljs(
hljs,
[
new codeInput.plugins.Autodetect(),
]
)
);
</script>
I've tried adding the tag language="HTML" to the code-input block, but it automatically changes to the language the plugin has defined. Thanks in advance for the answer!