diff --git a/packages/super-editor/src/core/InputRule.js b/packages/super-editor/src/core/InputRule.js index 124832b7d6..93f1cf6cf8 100644 --- a/packages/super-editor/src/core/InputRule.js +++ b/packages/super-editor/src/core/InputRule.js @@ -293,7 +293,7 @@ export function handleHtmlPaste(html, editor) { * converting em units to pt and removing unnecessary tags. * @param {String} html The HTML string to be processed. * @param {Editor} editor The editor instance. - * @returns {String} The processed HTML string. + * @returns {DocumentFragment} The processed HTML string. */ export function htmlHandler(html, editor) { const flatHtml = flattenListsInHtml(html, editor); diff --git a/packages/super-editor/src/extensions/structured-content/document-section.js b/packages/super-editor/src/extensions/structured-content/document-section.js index f2063f2130..adc602d80c 100644 --- a/packages/super-editor/src/extensions/structured-content/document-section.js +++ b/packages/super-editor/src/extensions/structured-content/document-section.js @@ -31,15 +31,11 @@ * @property {Partial} [attrs] - Attributes to update */ -// @ts-ignore import { Node, Attribute } from '@core/index.js'; import { DocumentSectionView } from './document-section/DocumentSectionView.js'; -// @ts-ignore import { htmlHandler } from '@core/InputRule.js'; -// @ts-ignore import { Selection } from 'prosemirror-state'; import { DOMParser as PMDOMParser } from 'prosemirror-model'; -// @ts-ignore import { findParentNode, SectionHelpers } from '@helpers/index.js'; /** diff --git a/packages/super-editor/tsconfig.json b/packages/super-editor/tsconfig.json index 60e2cb8b4f..1bf61cc21f 100644 --- a/packages/super-editor/tsconfig.json +++ b/packages/super-editor/tsconfig.json @@ -8,7 +8,19 @@ "skipLibCheck": true, "declaration": true, "emitDeclarationOnly": true, - "outDir": "dist" + "outDir": "dist", + "baseUrl": ".", + "paths": { + "@": ["./src/*"], + "@core/*": ["./src/core/*"], + "@extensions/*": ["./src/extensions/*"], + "@features/*": ["./src/features/*"], + "@components/*": ["./src/components/*"], + "@helpers/*": ["./src/core/helpers/*"], + "@packages/*": ["../*"], + "@converter/*": ["./src/core/super-converter/*"], + "@tests/*": ["./src/tests/*"] + } }, "exclude": ["node_modules", "dist", "**/*.test.js"] }