Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/tiptap.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ export default Base.extend({
(await import("@tiptap/extension-hard-break")).default.configure(),
// Gapcursor for images, tables etc to be able to add content below/above.
(await import("@tiptap/extension-gapcursor")).Gapcursor.configure(),
// Always include basic link extension.
(await import("./extensions/link")).factory().configure({
HTMLAttributes: { target: null, rel: null }, // don't set these attributes.
openOnClick: false, // don't open documents while editing.
linkOnPaste: true,
}),
];
const placeholder = this.el.getAttribute("placeholder");
if (placeholder) {
Expand Down
10 changes: 0 additions & 10 deletions src/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,6 @@ export async function init_extensions({ app }) {
extensions.push((await import("@tiptap/extension-history")).History);
}

if (tb.link) {
extensions.push(
(await import("./extensions/link")).factory().configure({
HTMLAttributes: { target: null, rel: null }, // don't set these attributes.
openOnClick: false, // don't open documents while editing.
linkOnPaste: true,
})
);
}

if (tb.image) {
extensions.push((await import("./extensions/image-inline")).factory());
extensions.push((await import("./extensions/image-figure")).factory());
Expand Down