You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
i just wanna know how to set options for the katex-plugin within the md-editor-v3 config. I followed the docs with configurating the markdownItPlugins section in the README. But i can't figure out, how to change options for the katex plugin, because the katex options is a vue reactive katexRef which is not available on configuration start.
I want to set e.g. the strict mode of the plugin to get rid of warnings. They are inside p.options.katexRef.value.SETTINGS_SCHEMA
config({
markdownItPlugins(plugins) {
return plugins.map((p) => {
if (p.type === 'katex') {
//not available on startup
//stores a ref
console.log(p.options.katexRef)
//undefined
console.log(p.options.katexRef.value)
//available, but of course, not settable after configuration is already initiated
setTimeout(() => {
//filled with SETTINGS_SCHEMA
console.log(p.options.katexRef.value)
}, 2000)
}
})
}
});
If not an issue, can be moved to discussion. But thanks for the help!
Procedure version
4.18..0
Reproduction link
No response
The text was updated successfully, but these errors were encountered:
When using CDN, we cannot obtain an instance of katex here, and it's currently not possible to get it here either. I will try to enhance it later.
Currently, installing via dependencies works:
npm i katex
import{config}from'md-editor-v3';importkatexfrom'katex';config({markdownItPlugins(plugins,{ editorId }){returnplugins.map((item)=>{if(item.type==='katex'){// will not be undefinedconsole.log('katexRef',item.options.katexRef.value);}returnitem;});},editorExtensions: {katex: {instance: katex}}})
Describe the issue
Hi,
i just wanna know how to set options for the katex-plugin within the md-editor-v3 config. I followed the docs with configurating the markdownItPlugins section in the README. But i can't figure out, how to change options for the katex plugin, because the katex options is a vue reactive
katexRef
which is not available on configuration start.I want to set e.g. the strict mode of the plugin to get rid of warnings. They are inside
p.options.katexRef.value.SETTINGS_SCHEMA
If not an issue, can be moved to discussion. But thanks for the help!
Procedure version
4.18..0
Reproduction link
No response
The text was updated successfully, but these errors were encountered: