Skip to content

Commit

Permalink
fix: load extension only once
Browse files Browse the repository at this point in the history
  • Loading branch information
gbicou committed Apr 12, 2023
1 parent d8528d4 commit 51ede66
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/tiptap-editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -481,16 +481,14 @@ const emit = defineEmits<{
(e: "input", value: ValueType): void;
}>();
extensions.push(
Placeholder.configure({
placeholder: props.placeholder,
})
);
const placeholder = Placeholder.configure({
placeholder: props.placeholder,
});
const editor = new Editor({
editable: !props.disabled,
content: props.value,
extensions,
extensions: [...extensions, placeholder],
onUpdate: () => {
switch (props.type) {
case "json":
Expand Down

0 comments on commit 51ede66

Please sign in to comment.