|
@@ -19,7 +19,6 @@ import {
|
|
|
RichUtils,
|
|
|
SelectionState,
|
|
|
} from 'draft-js';
|
|
|
-import type { DraftEditorLeaf } from 'draft-js/lib/DraftEditorLeaf.react';
|
|
|
import { filterInlineStyles } from 'draftjs-filters';
|
|
|
import React, {
|
|
|
MutableRefObject,
|
|
@@ -37,6 +36,9 @@ import { gettext } from '../../../utils/gettext';
|
|
|
|
|
|
import Icon from '../../Icon/Icon';
|
|
|
|
|
|
+// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
|
+const DraftEditorLeaf = require('draft-js/lib/DraftEditorLeaf.react');
|
|
|
+
|
|
|
const { isOptionKeyCommand } = KeyBindingUtil;
|
|
|
|
|
|
const COMMENT_STYLE_IDENTIFIER = 'COMMENT-';
|
|
@@ -452,7 +454,7 @@ export function findLeastCommonCommentId(block: ContentBlock, offset: number) {
|
|
|
|
|
|
interface DecoratorProps {
|
|
|
contentState: ContentState;
|
|
|
- children?: Array<DraftEditorLeaf>;
|
|
|
+ children?: Array<typeof DraftEditorLeaf>;
|
|
|
}
|
|
|
|
|
|
function getCommentDecorator(commentApp: CommentApp) {
|