Skip to content

Commit 05d8a4f

Browse files
committed
chore(tiptap): fix names and comments
1 parent 737a6b0 commit 05d8a4f

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

confiture-web-app/src/components/tiptap/AraTiptapExtension.ts renamed to confiture-web-app/src/components/tiptap/AraTiptapRenderedExtension.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Extension, Node } from "@tiptap/core";
22
import { Plugin, PluginKey, Transaction } from "@tiptap/pm/state";
33
import { Decoration, DecorationSet } from "prosemirror-view";
44

5-
export interface AraTiptapExtensionOptions {
5+
export interface AraTiptapRenderedExtensionOptions {
66
uniqueId: string;
77
}
88

@@ -63,14 +63,15 @@ const accessibleLinkPlugin = new Plugin({
6363
});
6464

6565
/**
66-
* Extension AraTiptapExtension
66+
* Extension AraTiptapRenderedExtension
6767
*
68-
* Tiptap extension for Ara specificities when editor is editable:
68+
* Tiptap extension for Ara specificities when editor is not editable:
6969
* - make links openning in a new window accessible
7070
*/
71-
export const AraTiptapExtension = Extension.create<AraTiptapExtensionOptions>({
72-
name: "ara",
73-
addProseMirrorPlugins() {
74-
return [accessibleLinkPlugin];
75-
}
76-
});
71+
export const AraTiptapRenderedExtension =
72+
Extension.create<AraTiptapRenderedExtensionOptions>({
73+
name: "ara",
74+
addProseMirrorPlugins() {
75+
return [accessibleLinkPlugin];
76+
}
77+
});

confiture-web-app/src/components/tiptap/tiptap-extensions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import ts from "highlight.js/lib/languages/typescript";
1212
import html from "highlight.js/lib/languages/xml";
1313
import { common, createLowlight } from "lowlight";
1414
import { Markdown } from "tiptap-markdown";
15-
import { AraTiptapExtension } from "./AraTiptapExtension";
15+
import { AraTiptapRenderedExtension } from "./AraTiptapRenderedExtension";
1616

1717
// Define needed heading levels
1818
export const displayedHeadings = [4, 5, 6] as Array<Level>;
@@ -123,5 +123,5 @@ export const tiptapRenderedExtensions: Extensions = [
123123
target: "_blank"
124124
}
125125
}),
126-
...[AraTiptapExtension]
126+
...[AraTiptapRenderedExtension]
127127
];

0 commit comments

Comments
 (0)