diff --git a/packages/core/src/api/exporters/html/__snapshots__/fontSize/basic/external.html b/packages/core/src/api/exporters/html/__snapshots__/fontSize/basic/external.html index 4c7e8f174d..49b9ce6858 100644 --- a/packages/core/src/api/exporters/html/__snapshots__/fontSize/basic/external.html +++ b/packages/core/src/api/exporters/html/__snapshots__/fontSize/basic/external.html @@ -1 +1 @@ -

This is text with a custom fontSize

\ No newline at end of file +

This is text with a custom fontSize

\ No newline at end of file diff --git a/packages/core/src/api/exporters/html/__snapshots__/fontSize/basic/internal.html b/packages/core/src/api/exporters/html/__snapshots__/fontSize/basic/internal.html index 3e2beaedd6..3fe864246c 100644 --- a/packages/core/src/api/exporters/html/__snapshots__/fontSize/basic/internal.html +++ b/packages/core/src/api/exporters/html/__snapshots__/fontSize/basic/internal.html @@ -1 +1 @@ -

This is text with a custom fontSize

\ No newline at end of file +

This is text with a custom fontSize

\ No newline at end of file diff --git a/packages/core/src/api/exporters/html/__snapshots__/mention/basic/external.html b/packages/core/src/api/exporters/html/__snapshots__/mention/basic/external.html index e1513fed2d..2e6f533ca1 100644 --- a/packages/core/src/api/exporters/html/__snapshots__/mention/basic/external.html +++ b/packages/core/src/api/exporters/html/__snapshots__/mention/basic/external.html @@ -1 +1 @@ -

I enjoy working with@Matthew

\ No newline at end of file +

I enjoy working with@Matthew

\ No newline at end of file diff --git a/packages/core/src/api/exporters/html/__snapshots__/mention/basic/internal.html b/packages/core/src/api/exporters/html/__snapshots__/mention/basic/internal.html index 7af6dad9c7..6ca7d81c2c 100644 --- a/packages/core/src/api/exporters/html/__snapshots__/mention/basic/internal.html +++ b/packages/core/src/api/exporters/html/__snapshots__/mention/basic/internal.html @@ -1 +1 @@ -

I enjoy working with@Matthew

\ No newline at end of file +

I enjoy working with@Matthew

\ No newline at end of file diff --git a/packages/core/src/api/exporters/html/__snapshots__/small/basic/external.html b/packages/core/src/api/exporters/html/__snapshots__/small/basic/external.html index 4206d07a95..35c3d5c232 100644 --- a/packages/core/src/api/exporters/html/__snapshots__/small/basic/external.html +++ b/packages/core/src/api/exporters/html/__snapshots__/small/basic/external.html @@ -1 +1 @@ -

This is a small text

\ No newline at end of file +

This is a small text

\ No newline at end of file diff --git a/packages/core/src/api/exporters/html/__snapshots__/small/basic/internal.html b/packages/core/src/api/exporters/html/__snapshots__/small/basic/internal.html index 805c78112e..73836f647d 100644 --- a/packages/core/src/api/exporters/html/__snapshots__/small/basic/internal.html +++ b/packages/core/src/api/exporters/html/__snapshots__/small/basic/internal.html @@ -1 +1 @@ -

This is a small text

\ No newline at end of file +

This is a small text

\ No newline at end of file diff --git a/packages/core/src/api/exporters/html/__snapshots__/tag/basic/external.html b/packages/core/src/api/exporters/html/__snapshots__/tag/basic/external.html index 4229ae0a83..b8387e9a55 100644 --- a/packages/core/src/api/exporters/html/__snapshots__/tag/basic/external.html +++ b/packages/core/src/api/exporters/html/__snapshots__/tag/basic/external.html @@ -1 +1 @@ -

I love #BlockNote

\ No newline at end of file +

I love #BlockNote

\ No newline at end of file diff --git a/packages/core/src/api/exporters/html/__snapshots__/tag/basic/internal.html b/packages/core/src/api/exporters/html/__snapshots__/tag/basic/internal.html index dac5db0ca8..bac28633b0 100644 --- a/packages/core/src/api/exporters/html/__snapshots__/tag/basic/internal.html +++ b/packages/core/src/api/exporters/html/__snapshots__/tag/basic/internal.html @@ -1 +1 @@ -

I love #BlockNote

\ No newline at end of file +

I love #BlockNote

\ No newline at end of file diff --git a/packages/core/src/api/exporters/html/htmlConversion.test.ts b/packages/core/src/api/exporters/html/htmlConversion.test.ts index 9f52f2d558..f6592f1bb7 100644 --- a/packages/core/src/api/exporters/html/htmlConversion.test.ts +++ b/packages/core/src/api/exporters/html/htmlConversion.test.ts @@ -369,9 +369,6 @@ describe("Test HTML conversion", () => { for (const document of testCase.documents) { // eslint-disable-next-line no-loop-func it("Convert " + document.name + " to HTML", async () => { - if (document.name !== "complex/misc") { - return; - } const nameSplit = document.name.split("/"); await convertToHTMLAndCompareSnapshots( editor, diff --git a/packages/core/src/api/testCases/cases/customInlineContent.ts b/packages/core/src/api/testCases/cases/customInlineContent.ts index 8ad1828152..304df912cb 100644 --- a/packages/core/src/api/testCases/cases/customInlineContent.ts +++ b/packages/core/src/api/testCases/cases/customInlineContent.ts @@ -87,7 +87,7 @@ export const customInlineContentTestCases: EditorTestCases< user: "Matthew", }, content: undefined, - } as any, + } as any, // TODO ], }, ], @@ -103,7 +103,7 @@ export const customInlineContentTestCases: EditorTestCases< type: "tag", // props: {}, content: "BlockNote", - } as any, + } as any, // TODO ], }, ], diff --git a/packages/core/src/api/testCases/cases/defaultSchema.ts b/packages/core/src/api/testCases/cases/defaultSchema.ts index bb7ccf4526..87aa6b01b1 100644 --- a/packages/core/src/api/testCases/cases/defaultSchema.ts +++ b/packages/core/src/api/testCases/cases/defaultSchema.ts @@ -24,7 +24,7 @@ export const defaultSchemaTestCases: EditorTestCases< name: "paragraph/empty", blocks: [ { - type: "paragraph" as const, + type: "paragraph", }, ], }, @@ -32,7 +32,7 @@ export const defaultSchemaTestCases: EditorTestCases< name: "paragraph/basic", blocks: [ { - type: "paragraph" as const, + type: "paragraph", content: "Paragraph", }, ], @@ -41,12 +41,12 @@ export const defaultSchemaTestCases: EditorTestCases< name: "paragraph/styled", blocks: [ { - type: "paragraph" as const, + type: "paragraph", props: { textAlignment: "center", textColor: "orange", backgroundColor: "pink", - } as const, + }, content: [ { type: "text", @@ -83,15 +83,15 @@ export const defaultSchemaTestCases: EditorTestCases< name: "paragraph/nested", blocks: [ { - type: "paragraph" as const, + type: "paragraph", content: "Paragraph", children: [ { - type: "paragraph" as const, + type: "paragraph", content: "Nested Paragraph 1", }, { - type: "paragraph" as const, + type: "paragraph", content: "Nested Paragraph 2", }, ], @@ -102,7 +102,7 @@ export const defaultSchemaTestCases: EditorTestCases< name: "image/button", blocks: [ { - type: "image" as const, + type: "image", }, ], }, @@ -110,7 +110,7 @@ export const defaultSchemaTestCases: EditorTestCases< name: "image/basic", blocks: [ { - type: "image" as const, + type: "image", props: { url: "exampleURL", caption: "Caption", @@ -123,20 +123,20 @@ export const defaultSchemaTestCases: EditorTestCases< name: "image/nested", blocks: [ { - type: "image" as const, + type: "image", props: { url: "exampleURL", caption: "Caption", width: 256, - } as const, + }, children: [ { - type: "image" as const, + type: "image", props: { url: "exampleURL", caption: "Caption", width: 256, - } as const, + }, }, ], }, diff --git a/packages/core/src/extensions/Blocks/api/inlineContent/createSpec.ts b/packages/core/src/extensions/Blocks/api/inlineContent/createSpec.ts index 124923268a..534ce36bf2 100644 --- a/packages/core/src/extensions/Blocks/api/inlineContent/createSpec.ts +++ b/packages/core/src/extensions/Blocks/api/inlineContent/createSpec.ts @@ -1,8 +1,13 @@ import { Node } from "@tiptap/core"; +import { ParseRule } from "@tiptap/pm/model"; import { nodeToCustomInlineContent } from "../../../../api/nodeConversions/nodeConversions"; import { propsToAttributes } from "../blocks/internal"; +import { Props } from "../blocks/types"; import { StyleSchema } from "../styles/types"; -import { createInlineContentSpecFromTipTapNode } from "./internal"; +import { + addInlineContentAttributes, + createInlineContentSpecFromTipTapNode, +} from "./internal"; import { InlineContentConfig, InlineContentFromConfig, @@ -37,6 +42,16 @@ export type CustomInlineContentImplementation< }; }; +export function getInlineContentParseRules( + config: InlineContentConfig +): ParseRule[] { + return [ + { + tag: `.bn-inline-content-section[data-inline-content-type="${config.type}"]`, + }, + ]; +} + export function createInlineContentSpec< T extends InlineContentConfig, S extends StyleSchema @@ -57,6 +72,10 @@ export function createInlineContentSpec< return propsToAttributes(inlineContentConfig.propSchema); }, + parseHTML() { + return getInlineContentParseRules(inlineContentConfig); + }, + renderHTML({ node }) { const editor = this.options.editor; @@ -68,7 +87,15 @@ export function createInlineContentSpec< ) as any as InlineContentFromConfig // TODO: fix cast ); - return output; + return { + dom: addInlineContentAttributes( + output.dom, + inlineContentConfig.type, + node.attrs as Props, + inlineContentConfig.propSchema + ), + contentDOM: output.contentDOM, + }; }, }); diff --git a/packages/core/src/extensions/Blocks/api/inlineContent/internal.ts b/packages/core/src/extensions/Blocks/api/inlineContent/internal.ts index 9c623c44cf..d081338be8 100644 --- a/packages/core/src/extensions/Blocks/api/inlineContent/internal.ts +++ b/packages/core/src/extensions/Blocks/api/inlineContent/internal.ts @@ -1,5 +1,6 @@ import { Node } from "@tiptap/core"; -import { PropSchema } from "../blocks/types"; +import { camelToDataKebab } from "../blocks/internal"; +import { Props, PropSchema } from "../blocks/types"; import { InlineContentConfig, InlineContentImplementation, @@ -7,6 +8,38 @@ import { InlineContentSpec, InlineContentSpecs, } from "./types"; +import { mergeCSSClasses } from "../../../../shared/utils"; + +// Function that adds necessary classes and attributes to the `dom` element +// returned from a custom inline content's 'render' function, to ensure no data +// is lost on internal copy & paste. +export function addInlineContentAttributes< + IType extends string, + PSchema extends PropSchema +>( + element: HTMLElement, + inlineContentType: IType, + inlineContentProps: Props, + propSchema: PSchema +): HTMLElement { + // Sets inline content section class + element.className = mergeCSSClasses( + "bn-inline-content-section", + element.className + ); + // Sets content type attribute + element.setAttribute("data-inline-content-type", inlineContentType); + // Adds props as HTML attributes in kebab-case with "data-" prefix. Skips props + // set to their default values. + Object.entries(inlineContentProps) + .filter(([prop, value]) => value !== propSchema[prop].default) + .map(([prop, value]) => { + return [camelToDataKebab(prop), value]; + }) + .forEach(([prop, value]) => element.setAttribute(prop, value)); + + return element; +} // This helper function helps to instantiate a InlineContentSpec with a // config and implementation that conform to the type of Config diff --git a/packages/core/src/extensions/Blocks/api/styles/createSpec.ts b/packages/core/src/extensions/Blocks/api/styles/createSpec.ts index 9f0d742f75..14c1c2274f 100644 --- a/packages/core/src/extensions/Blocks/api/styles/createSpec.ts +++ b/packages/core/src/extensions/Blocks/api/styles/createSpec.ts @@ -1,6 +1,11 @@ import { Mark } from "@tiptap/core"; +import { ParseRule } from "@tiptap/pm/model"; import { UnreachableCaseError } from "../../../../shared/utils"; -import { createInternalStyleSpec } from "./internal"; +import { + addStyleAttributes, + createInternalStyleSpec, + stylePropsToAttributes, +} from "./internal"; import { StyleConfig, StyleSpec } from "./types"; export type CustomStyleImplementation = { @@ -17,6 +22,14 @@ export type CustomStyleImplementation = { // TODO: support serialization +export function getStyleParseRules(config: StyleConfig): ParseRule[] { + return [ + { + tag: `.bn-style[data-style-type="${config.type}"]`, + }, + ]; +} + export function createStyleSpec( styleConfig: T, styleImplementation: CustomStyleImplementation @@ -25,21 +38,11 @@ export function createStyleSpec( name: styleConfig.type, addAttributes() { - if (styleConfig.propSchema === "boolean") { - return {}; - } - return { - stringValue: { - default: undefined, - // TODO: parsing + return stylePropsToAttributes(styleConfig.propSchema); + }, - // parseHTML: (element) => - // element.getAttribute(`data-${styleConfig.type}`), - // renderHTML: (attributes) => ({ - // [`data-${styleConfig.type}`]: attributes.stringValue, - // }), - }, - }; + parseHTML() { + return getStyleParseRules(styleConfig); }, renderHTML({ mark }) { @@ -58,7 +61,15 @@ export function createStyleSpec( } // const renderResult = styleImplementation.render(); - return renderResult; + return { + dom: addStyleAttributes( + renderResult.dom, + styleConfig.type, + mark.attrs.stringValue, + styleConfig.propSchema + ), + contentDOM: renderResult.contentDOM, + }; }, }); diff --git a/packages/core/src/extensions/Blocks/api/styles/internal.ts b/packages/core/src/extensions/Blocks/api/styles/internal.ts index 648bb133d5..27b32a3f7a 100644 --- a/packages/core/src/extensions/Blocks/api/styles/internal.ts +++ b/packages/core/src/extensions/Blocks/api/styles/internal.ts @@ -1,4 +1,4 @@ -import { Mark } from "@tiptap/core"; +import { Attributes, Mark } from "@tiptap/core"; import { StyleConfig, StyleImplementation, @@ -7,6 +7,53 @@ import { StyleSpec, StyleSpecs, } from "./types"; +import { mergeCSSClasses } from "../../../../shared/utils"; + +export function stylePropsToAttributes( + propSchema: StylePropSchema +): Attributes { + if (propSchema === "boolean") { + return {}; + } + return { + stringValue: { + default: undefined, + keepOnSplit: true, + parseHTML: (element) => element.getAttribute("data-value"), + renderHTML: (attributes) => + attributes.stringValue !== undefined + ? { + "data-value": attributes.stringValue, + } + : {}, + }, + }; +} + +// Function that adds necessary classes and attributes to the `dom` element +// returned from a custom style's 'render' function, to ensure no data is lost +// on internal copy & paste. +export function addStyleAttributes< + SType extends string, + PSchema extends StylePropSchema +>( + element: HTMLElement, + styleType: SType, + styleValue: PSchema extends "boolean" ? undefined : string, + propSchema: PSchema +): HTMLElement { + // Sets inline content section class + element.className = mergeCSSClasses("bn-style", element.className); + // Sets content type attribute + element.setAttribute("data-style-type", styleType); + // Adds style value as an HTML attribute in kebab-case with "data-" prefix, if + // the style takes a string value. + if (propSchema === "string") { + element.setAttribute("data-value", styleValue as string); + } + + return element; +} // This helper function helps to instantiate a stylespec with a // config and implementation that conform to the type of Config diff --git a/packages/core/src/extensions/Blocks/nodes/BlockContainer.ts b/packages/core/src/extensions/Blocks/nodes/BlockContainer.ts index 443cc7d7fd..bba83b4308 100644 --- a/packages/core/src/extensions/Blocks/nodes/BlockContainer.ts +++ b/packages/core/src/extensions/Blocks/nodes/BlockContainer.ts @@ -483,13 +483,12 @@ export const BlockContainer = Node.create<{ // Reverts block content type to a paragraph if the selection is at the start of the block. () => commands.command(({ state }) => { - const { contentType } = getBlockInfoFromPos( + const { contentType, startPos } = getBlockInfoFromPos( state.doc, state.selection.from )!; - const selectionAtBlockStart = - state.selection.$anchor.parentOffset === 0; + const selectionAtBlockStart = state.selection.from === startPos + 1; const isParagraph = contentType.name === "paragraph"; if (selectionAtBlockStart && !isParagraph) { @@ -504,8 +503,12 @@ export const BlockContainer = Node.create<{ // Removes a level of nesting if the block is indented if the selection is at the start of the block. () => commands.command(({ state }) => { - const selectionAtBlockStart = - state.selection.$anchor.parentOffset === 0; + const { startPos } = getBlockInfoFromPos( + state.doc, + state.selection.from + )!; + + const selectionAtBlockStart = state.selection.from === startPos + 1; if (selectionAtBlockStart) { return commands.liftListItem("blockContainer"); @@ -522,10 +525,8 @@ export const BlockContainer = Node.create<{ state.selection.from )!; - const selectionAtBlockStart = - state.selection.$anchor.parentOffset === 0; - const selectionEmpty = - state.selection.anchor === state.selection.head; + const selectionAtBlockStart = state.selection.from === startPos + 1; + const selectionEmpty = state.selection.empty; const blockAtDocStart = startPos === 2; const posBetweenBlocks = startPos - 1; @@ -552,17 +553,14 @@ export const BlockContainer = Node.create<{ // end of the block. () => commands.command(({ state }) => { - const { node, contentNode, depth, endPos } = getBlockInfoFromPos( + const { node, depth, endPos } = getBlockInfoFromPos( state.doc, state.selection.from )!; const blockAtDocEnd = false; - const selectionAtBlockEnd = - state.selection.$anchor.parentOffset === - contentNode.firstChild!.nodeSize; - const selectionEmpty = - state.selection.anchor === state.selection.head; + const selectionAtBlockEnd = state.selection.from === endPos - 1; + const selectionEmpty = state.selection.empty; const hasChildBlocks = node.childCount === 2; if ( diff --git a/packages/core/src/extensions/Blocks/nodes/BlockContent/ParagraphBlockContent/ParagraphBlockContent.ts b/packages/core/src/extensions/Blocks/nodes/BlockContent/ParagraphBlockContent/ParagraphBlockContent.ts index a645ba347c..8c826f413e 100644 --- a/packages/core/src/extensions/Blocks/nodes/BlockContent/ParagraphBlockContent/ParagraphBlockContent.ts +++ b/packages/core/src/extensions/Blocks/nodes/BlockContent/ParagraphBlockContent/ParagraphBlockContent.ts @@ -15,6 +15,7 @@ export const ParagraphBlockContent = createStronglyTypedTiptapNode({ group: "blockContent", parseHTML() { return [ + { tag: "div[data-content-type=" + this.name + "]" }, { tag: "p", priority: 200, diff --git a/packages/react/src/ReactInlineContentSpec.tsx b/packages/react/src/ReactInlineContentSpec.tsx index 70f2db7c7d..adf51e09a2 100644 --- a/packages/react/src/ReactInlineContentSpec.tsx +++ b/packages/react/src/ReactInlineContentSpec.tsx @@ -1,9 +1,14 @@ import { + addInlineContentAttributes, + camelToDataKebab, createInternalInlineContentSpec, createStronglyTypedTiptapNode, + getInlineContentParseRules, InlineContentConfig, InlineContentFromConfig, nodeToCustomInlineContent, + Props, + PropSchema, propsToAttributes, StyleSchema, } from "@blocknote/core"; @@ -36,6 +41,40 @@ export type ReactInlineContentImplementation< // }>; }; +// Function that adds a wrapper with necessary classes and attributes to the +// component returned from a custom inline content's 'render' function, to +// ensure no data is lost on internal copy & paste. +export function reactWrapInInlineContentStructure< + IType extends string, + PSchema extends PropSchema +>( + element: JSX.Element, + inlineContentType: IType, + inlineContentProps: Props, + propSchema: PSchema +) { + return () => ( + // Creates inline content section element + value !== propSchema[prop].default) + .map(([prop, value]) => { + return [camelToDataKebab(prop), value]; + }) + )}> + {element} + + ); +} + // A function to create custom block for API consumers // we want to hide the tiptap node from API consumers and provide a simpler API surface instead export function createReactInlineContentSpec< @@ -50,6 +89,8 @@ export function createReactInlineContentSpec< name: inlineContentConfig.type as T["type"], inline: true, group: "inline", + selectable: inlineContentConfig.content === "styled", + atom: inlineContentConfig.content === "none", content: (inlineContentConfig.content === "styled" ? "inline*" : "") as T["content"] extends "styled" ? "inline*" : "", @@ -58,9 +99,9 @@ export function createReactInlineContentSpec< return propsToAttributes(inlineContentConfig.propSchema); }, - // parseHTML() { - // return parse(blockConfig); - // }, + parseHTML() { + return getInlineContentParseRules(inlineContentConfig); + }, renderHTML({ node }) { const editor = this.options.editor; @@ -71,10 +112,19 @@ export function createReactInlineContentSpec< editor.styleSchema ) as any as InlineContentFromConfig; // TODO: fix cast const Content = inlineContentImplementation.render; - - return renderToDOMSpec((refCB) => ( + const output = renderToDOMSpec((refCB) => ( )); + + return { + dom: addInlineContentAttributes( + output.dom, + inlineContentConfig.type, + node.attrs as Props, + inlineContentConfig.propSchema + ), + contentDOM: output.contentDOM, + }; }, // TODO: needed? @@ -88,20 +138,22 @@ export function createReactInlineContentSpec< const ref = (NodeViewContent({}) as any).ref; const Content = inlineContentImplementation.render; - return ( - - // TODO: fix cast - } - /> - + const FullContent = reactWrapInInlineContentStructure( + // TODO: fix cast + } + />, + inlineContentConfig.type, + props.node.attrs as Props, + inlineContentConfig.propSchema ); + return ; }, { className: "bn-ic-react-node-view-renderer", diff --git a/packages/react/src/ReactStyleSpec.tsx b/packages/react/src/ReactStyleSpec.tsx index 645a519e48..cb401850b7 100644 --- a/packages/react/src/ReactStyleSpec.tsx +++ b/packages/react/src/ReactStyleSpec.tsx @@ -1,4 +1,10 @@ -import { createInternalStyleSpec, StyleConfig } from "@blocknote/core"; +import { + addStyleAttributes, + createInternalStyleSpec, + getStyleParseRules, + StyleConfig, + stylePropsToAttributes, +} from "@blocknote/core"; import { Mark } from "@tiptap/react"; import { FC } from "react"; import { renderToDOMSpec } from "./ReactRenderUtil"; @@ -22,21 +28,11 @@ export function createReactStyleSpec( name: styleConfig.type, addAttributes() { - if (styleConfig.propSchema === "boolean") { - return {}; - } - return { - stringValue: { - default: undefined, - // TODO: parsing - - // parseHTML: (element) => - // element.getAttribute(`data-${styleConfig.type}`), - // renderHTML: (attributes) => ({ - // [`data-${styleConfig.type}`]: attributes.stringValue, - // }), - }, - }; + return stylePropsToAttributes(styleConfig.propSchema); + }, + + parseHTML() { + return getStyleParseRules(styleConfig); }, renderHTML({ mark }) { @@ -47,10 +43,19 @@ export function createReactStyleSpec( } const Content = styleImplementation.render; - - return renderToDOMSpec((refCB) => ( + const renderResult = renderToDOMSpec((refCB) => ( )); + + return { + dom: addStyleAttributes( + renderResult.dom, + styleConfig.type, + mark.attrs.stringValue, + styleConfig.propSchema + ), + contentDOM: renderResult.contentDOM, + }; }, }); diff --git a/packages/react/src/test/__snapshots__/fontSize/basic/external.html b/packages/react/src/test/__snapshots__/fontSize/basic/external.html index 00a5bc6b6e..6c8910692f 100644 --- a/packages/react/src/test/__snapshots__/fontSize/basic/external.html +++ b/packages/react/src/test/__snapshots__/fontSize/basic/external.html @@ -1 +1 @@ -

This is text with a custom fontSize

\ No newline at end of file +

This is text with a custom fontSize

\ No newline at end of file diff --git a/packages/react/src/test/__snapshots__/fontSize/basic/internal.html b/packages/react/src/test/__snapshots__/fontSize/basic/internal.html index a41d39869a..998d9bcf8b 100644 --- a/packages/react/src/test/__snapshots__/fontSize/basic/internal.html +++ b/packages/react/src/test/__snapshots__/fontSize/basic/internal.html @@ -1 +1 @@ -

This is text with a custom fontSize

\ No newline at end of file +

This is text with a custom fontSize

\ No newline at end of file diff --git a/packages/react/src/test/__snapshots__/mention/basic/external.html b/packages/react/src/test/__snapshots__/mention/basic/external.html index e1513fed2d..2e6f533ca1 100644 --- a/packages/react/src/test/__snapshots__/mention/basic/external.html +++ b/packages/react/src/test/__snapshots__/mention/basic/external.html @@ -1 +1 @@ -

I enjoy working with@Matthew

\ No newline at end of file +

I enjoy working with@Matthew

\ No newline at end of file diff --git a/packages/react/src/test/__snapshots__/mention/basic/internal.html b/packages/react/src/test/__snapshots__/mention/basic/internal.html index 7af6dad9c7..6ca7d81c2c 100644 --- a/packages/react/src/test/__snapshots__/mention/basic/internal.html +++ b/packages/react/src/test/__snapshots__/mention/basic/internal.html @@ -1 +1 @@ -

I enjoy working with@Matthew

\ No newline at end of file +

I enjoy working with@Matthew

\ No newline at end of file diff --git a/packages/react/src/test/__snapshots__/small/basic/external.html b/packages/react/src/test/__snapshots__/small/basic/external.html index 4206d07a95..35c3d5c232 100644 --- a/packages/react/src/test/__snapshots__/small/basic/external.html +++ b/packages/react/src/test/__snapshots__/small/basic/external.html @@ -1 +1 @@ -

This is a small text

\ No newline at end of file +

This is a small text

\ No newline at end of file diff --git a/packages/react/src/test/__snapshots__/small/basic/internal.html b/packages/react/src/test/__snapshots__/small/basic/internal.html index 805c78112e..73836f647d 100644 --- a/packages/react/src/test/__snapshots__/small/basic/internal.html +++ b/packages/react/src/test/__snapshots__/small/basic/internal.html @@ -1 +1 @@ -

This is a small text

\ No newline at end of file +

This is a small text

\ No newline at end of file diff --git a/packages/react/src/test/__snapshots__/tag/basic/external.html b/packages/react/src/test/__snapshots__/tag/basic/external.html index 4229ae0a83..b8387e9a55 100644 --- a/packages/react/src/test/__snapshots__/tag/basic/external.html +++ b/packages/react/src/test/__snapshots__/tag/basic/external.html @@ -1 +1 @@ -

I love #BlockNote

\ No newline at end of file +

I love #BlockNote

\ No newline at end of file diff --git a/packages/react/src/test/__snapshots__/tag/basic/internal.html b/packages/react/src/test/__snapshots__/tag/basic/internal.html index dac5db0ca8..bac28633b0 100644 --- a/packages/react/src/test/__snapshots__/tag/basic/internal.html +++ b/packages/react/src/test/__snapshots__/tag/basic/internal.html @@ -1 +1 @@ -

I love #BlockNote

\ No newline at end of file +

I love #BlockNote

\ No newline at end of file