I have a Nuxt3 app with TinyMCE for which I already created a standalone plugin for inserting LaTeX that works (latex.min.js).
Is it possible to create a TinyMCE plugin that interacts with my web app instead of being a standalone package in the public folder? Specifically, I want to create a glossary plugin that inserts words from a list in my app.
I am trying to insert my latex plugin through Vue as a test by following this blog post (outdated?) but it doesn't work. I used window.tinymce.PluginManager.add()
but nothing shows up and I don't get any warning or error.
I need interactivity between my web app and the plugin
Here is my code:
<template>
[...]
<tinymce-editor
api-key="someKey"
v-model="tinycontent"
:init="tinyconfig"
/>
[...]
</template>
<script>
import Editor from "@tinymce/tinymce-vue";
export default {
components: {
"tinymce-editor": Editor,
},
data() {
return {
tinycontent: '',
tinyconfig: {
toolbar: "bold italic underline code | latex",
plugins: "lists link image table code help wordcount",
selector: "textarea",
content_css:
"https://cdn.jsdelivr.net/npm/katex@0.16.6/dist/katex.min.css",
setup: () => {
window.tinymce.PluginManager.add("latex", latex);
},
},
};
},
computed: {},
methods: {},
mounted() {},
};
</script>