mirror of
https://github.com/docmost/docmost.git
synced 2026-06-10 10:13:01 +08:00
eefe63d1cd
* fix comments on the frontend * move jwt token service to its own module * other fixes and updates
12 lines
384 B
TypeScript
12 lines
384 B
TypeScript
import { Editor } from "@tiptap/react";
|
|
import TiptapLink from "@tiptap/extension-link";
|
|
import { CodeBlock } from "@tiptap/extension-code-block";
|
|
|
|
export const isCustomNodeSelected = (editor: Editor, node: HTMLElement) => {
|
|
const customNodes = [CodeBlock.name, TiptapLink.name];
|
|
|
|
return customNodes.some((type) => editor.isActive(type));
|
|
};
|
|
|
|
export default isCustomNodeSelected;
|