-
Notifications
You must be signed in to change notification settings - Fork 168
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
New version released that works perfectly with Vue 3 #469
Comments
Thank you very much for your action, but I would like to use the official extensions provided by Tiptap. The error 'element tip vue3 fixed. es. js: 4327 Uncaught (in promise) RangeError: Adding different instances of a keyed plugin (plugin $)' will appear. If you are using the official nodes or custom nodes, there will be no problem. Since I am not very good at using TS, I cannot solve it |
Can u show me your code. |
import { const extensions = [ Omitted other code and I would also like to know how to customize the buttons on the toolbar. Thank you very much and look forward to your reply |
About custom button icon, i will think about this, how to do better (if it's about use your custom icon on buttons). About error i understand what problem i will show u correct code (during this week and extend lib documentation) |
import CodeBlockLowlight from '@tiptap/extension-code-block-lowlight';
import {
Editor
} from '@tiptap/core';
import { CommandButton } from 'element-tiptap-vue3-fixed'; // wait new version i add button and extend documentain
export default CodeBlockLowlight.extend({
addOptions() {
return {
...this.parent?.(),
button({ editor, t }: { editor: Editor; t: (...args: any[]) => string }) {
return {
component: CommandButton,
componentProps: {
command: () => {
editor.commands.toggleCodeBlock();
},
isActive: editor.isActive('codeBlock'),
icon: 'code',
tooltip: t('editor.extensions.CodeBlock.tooltip'),
},
};
},
};
},
}); import commandButton will be added in new version about custom icon i will think about this and add it |
Okay, thank you very much. We look forward to the new version very much |
v 1.1.6. |
Secondly, If the initial content of the editor has a value, pressing the "Enter" to key Using the editor to wrap lines will result in an error. The prerequisite for the problem is the use of CodeBlockLowlight |
https://codesandbox.io/s/element-tiptapt-vue3-element-plus-forked-839n32?file=/src/App.vue |
This version fixes all the issues: https://github.com/okijhhyu/element-tiptap-vue3 :)
The text was updated successfully, but these errors were encountered: