-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Any plans to support the newest VUE 3.0 ? #1226
Comments
@swatchion You seem to be using the Vue wrapper (
|
This does not work @seonim-ryu because of differences in vue internals, I think. Some warnings I get with Vue 3.0 as dependency:
I have not worked with the editor ever, so it is possible that some of those warnings/errors are on my behalf. My setup was: <template>
<Editor></Editor>
</template>
<script>
import "codemirror/lib/codemirror.css";
import "@toast-ui/editor/dist/toastui-editor.css";
import { Editor } from "@toast-ui/vue-editor";
export default {
components: { Editor }
}
</script> |
After playing around a little bit I got it working without the wrapper component for anyone interested: <script>
import { onMounted, ref, h } from "vue";
import Editor from "@toast-ui/editor";
import codeSyntaxHighlight from "@toast-ui/editor-plugin-code-syntax-highlight";
import hljs from "highlight.js";
import "codemirror/lib/codemirror.css";
import "@toast-ui/editor/dist/toastui-editor.css";
import "highlight.js/styles/github.css";
export default {
props: {
modelValue: {
type: String,
required: false,
default: ""
}
},
setup(_, { emit }) {
const editor = ref();
onMounted(() => {
const e = new Editor({
el: editor.value,
height: "500px",
initialEditType: "markdown",
previewStyle: "tab",
plugins: [[codeSyntaxHighlight, { hljs }]],
events: {
change: () => emit("update:modelValue", e.getMarkdown())
}
});
});
return () =>
h("div", {
ref: editor
});
}
};
</script> You can use it by importing the component and using |
Are you saying you get an error when you run this code using Vue 3.0? I'll check it out. |
@seonim-ryu No, I get an error running the following code:
My second comment was a working example |
Now that the |
Since it has been quiet around this, i wanted to ping @js87zz and @seonim-ryu to know if there are ongoing plans for an official Vue3 wrapper, i would also be interested and would highly appreciate support for this 🙏 |
Thanks for this great work, any further plan for vue 3.0?
The text was updated successfully, but these errors were encountered: