diff --git a/docs/pages/docs/editor-basics/setup.mdx b/docs/pages/docs/editor-basics/setup.mdx index fbb8795f8..84115ddd5 100644 --- a/docs/pages/docs/editor-basics/setup.mdx +++ b/docs/pages/docs/editor-basics/setup.mdx @@ -32,6 +32,9 @@ type BlockNoteEditorOptions = { width?: number; class?: string; }) => Plugin; + heading?: { + levels?: number[]; + }; initialContent?: PartialBlock[]; pasteHandler?: (context: { event: ClipboardEvent; @@ -73,6 +76,8 @@ The hook takes two optional parameters: `initialContent:` The content that should be in the editor when it's created, represented as an array of [Partial Blocks](/docs/manipulating-blocks#partial-blocks). +`heading`: Configuration for headings. Allows you to configure the number of levels of headings that should be available in the editor. Defaults to `[1, 2, 3]`. Configurable up to 6 levels of headings. + `pasteHandler`: A function that can be used to override the default paste behavior. See [Paste Handling](/docs/advanced/paste-handling) for more. `resolveFileUrl:` Function to resolve file URLs for display/download. Useful for creating authenticated URLs or implementing custom protocols. diff --git a/packages/core/src/blocks/HeadingBlockContent/HeadingBlockContent.ts b/packages/core/src/blocks/HeadingBlockContent/HeadingBlockContent.ts index aa503356b..5b8d7003d 100644 --- a/packages/core/src/blocks/HeadingBlockContent/HeadingBlockContent.ts +++ b/packages/core/src/blocks/HeadingBlockContent/HeadingBlockContent.ts @@ -11,10 +11,13 @@ import { import { createDefaultBlockDOMOutputSpec } from "../defaultBlockHelpers.js"; import { defaultProps } from "../defaultProps.js"; import { createToggleWrapper } from "../ToggleWrapper/createToggleWrapper.js"; +import { BlockNoteEditor } from "../../editor/BlockNoteEditor.js"; + +const HEADING_LEVELS = [1, 2, 3, 4, 5, 6] as const; export const headingPropSchema = { ...defaultProps, - level: { default: 1, values: [1, 2, 3] as const }, + level: { default: 1, values: HEADING_LEVELS }, isToggleable: { default: false }, } satisfies PropSchema; @@ -28,8 +31,9 @@ const HeadingBlockContent = createStronglyTypedTiptapNode({ }, addInputRules() { + const editor = this.options.editor as BlockNoteEditor; return [ - ...[1, 2, 3].map((level) => { + ...editor.settings.heading.levels.map((level) => { // Creates a heading of appropriate level when starting with "#", "##", or "###". return new InputRule({ find: new RegExp(`^(#{${level}})\\s$`), @@ -61,87 +65,46 @@ const HeadingBlockContent = createStronglyTypedTiptapNode({ }, addKeyboardShortcuts() { - return { - "Mod-Alt-1": () => { - const blockInfo = getBlockInfoFromSelection(this.editor.state); - if ( - !blockInfo.isBlockContainer || - blockInfo.blockContent.node.type.spec.content !== "inline*" - ) { - return true; - } - - // call updateBlockCommand - return this.editor.commands.command( - updateBlockCommand(blockInfo.bnBlock.beforePos, { - type: "heading", - props: { - level: 1 as any, - }, - }), - ); - }, - "Mod-Alt-2": () => { - const blockInfo = getBlockInfoFromSelection(this.editor.state); - if ( - !blockInfo.isBlockContainer || - blockInfo.blockContent.node.type.spec.content !== "inline*" - ) { - return true; - } - - return this.editor.commands.command( - updateBlockCommand(blockInfo.bnBlock.beforePos, { - type: "heading", - props: { - level: 2 as any, - }, - }), - ); - }, - "Mod-Alt-3": () => { - const blockInfo = getBlockInfoFromSelection(this.editor.state); - if ( - !blockInfo.isBlockContainer || - blockInfo.blockContent.node.type.spec.content !== "inline*" - ) { - return true; - } - - return this.editor.commands.command( - updateBlockCommand(blockInfo.bnBlock.beforePos, { - type: "heading", - props: { - level: 3 as any, - }, - }), - ); - }, - }; + const editor = this.options.editor as BlockNoteEditor; + + return Object.fromEntries( + editor.settings.heading.levels.map((level) => [ + `Mod-Alt-${level}`, + () => { + const blockInfo = getBlockInfoFromSelection(this.editor.state); + if ( + !blockInfo.isBlockContainer || + blockInfo.blockContent.node.type.spec.content !== "inline*" + ) { + return true; + } + + return this.editor.commands.command( + updateBlockCommand(blockInfo.bnBlock.beforePos, { + type: "heading", + props: { + level: level as any, + }, + }), + ); + }, + ]), + ); }, parseHTML() { + const editor = this.options.editor as BlockNoteEditor; + return [ // Parse from internal HTML. { tag: "div[data-content-type=" + this.name + "]", contentElement: ".bn-inline-content", }, - // Parse from external HTML. - { - tag: "h1", - attrs: { level: 1 }, - node: "heading", - }, - { - tag: "h2", - attrs: { level: 2 }, + ...editor.settings.heading.levels.map((level) => ({ + tag: `h${level}`, + attrs: { level }, node: "heading", - }, - { - tag: "h3", - attrs: { level: 3 }, - node: "heading", - }, + })), ]; }, diff --git a/packages/core/src/editor/Block.css b/packages/core/src/editor/Block.css index 17495ff9b..88a7c6d57 100644 --- a/packages/core/src/editor/Block.css +++ b/packages/core/src/editor/Block.css @@ -130,6 +130,15 @@ NESTED BLOCKS [data-content-type="heading"][data-level="3"] { --level: 1.3em; } +[data-content-type="heading"][data-level="4"] { + --level: 1em; +} +[data-content-type="heading"][data-level="5"] { + --level: 0.9em; +} +[data-content-type="heading"][data-level="6"] { + --level: 0.8em; +} [data-prev-level="1"] { --prev-level: 3em; @@ -140,6 +149,15 @@ NESTED BLOCKS [data-prev-level="3"] { --prev-level: 1.3em; } +[data-prev-level="4"] { + --prev-level: 1em; +} +[data-prev-level="5"] { + --prev-level: 0.9em; +} +[data-prev-level="6"] { + --prev-level: 0.8em; +} .bn-block-outer[data-prev-type="heading"] > .bn-block > .bn-block-content { font-size: var(--prev-level); diff --git a/packages/core/src/editor/BlockNoteEditor.ts b/packages/core/src/editor/BlockNoteEditor.ts index 8008312c3..fe6812803 100644 --- a/packages/core/src/editor/BlockNoteEditor.ts +++ b/packages/core/src/editor/BlockNoteEditor.ts @@ -229,6 +229,18 @@ export type BlockNoteEditorOptions< class?: string; }) => Plugin; + /** + * Configuration for headings + */ + heading?: { + /** + * The levels of headings that should be available in the editor. + * @note Configurable up to 6 levels of headings. + * @default [1, 2, 3] + */ + levels?: (1 | 2 | 3 | 4 | 5 | 6)[]; + }; + /** * The content that should be in the editor when it's created, represented as an array of partial block objects. */ @@ -527,6 +539,9 @@ export class BlockNoteEditor< headers: boolean; }; codeBlock: CodeBlockOptions; + heading: { + levels: (1 | 2 | 3 | 4 | 5 | 6)[]; + }; }; public static create< @@ -580,6 +595,9 @@ export class BlockNoteEditor< supportedLanguages: options?.codeBlock?.supportedLanguages ?? {}, createHighlighter: options?.codeBlock?.createHighlighter ?? undefined, }, + heading: { + levels: options?.heading?.levels ?? [1, 2, 3], + }, }; // apply defaults diff --git a/packages/core/src/editor/editor.css b/packages/core/src/editor/editor.css index 3c5871b89..eb267a7b5 100644 --- a/packages/core/src/editor/editor.css +++ b/packages/core/src/editor/editor.css @@ -44,6 +44,9 @@ Tippy popups that are appended to document.body directly .bn-default-styles h1, .bn-default-styles h2, .bn-default-styles h3, +.bn-default-styles h4, +.bn-default-styles h5, +.bn-default-styles h6, .bn-default-styles li { margin: 0; padding: 0; diff --git a/packages/core/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts b/packages/core/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts index a5f7c4bca..bcc95c83a 100644 --- a/packages/core/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +++ b/packages/core/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts @@ -122,37 +122,6 @@ export function getDefaultSlashMenuItems< key: "heading_3", ...editor.dictionary.slash_menu.heading_3, }, - { - onItemClick: () => { - insertOrUpdateBlock(editor, { - type: "heading", - props: { level: 1, isToggleable: true }, - }); - }, - key: "toggle_heading", - ...editor.dictionary.slash_menu.toggle_heading, - }, - { - onItemClick: () => { - insertOrUpdateBlock(editor, { - type: "heading", - props: { level: 2, isToggleable: true }, - }); - }, - - key: "toggle_heading_2", - ...editor.dictionary.slash_menu.toggle_heading_2, - }, - { - onItemClick: () => { - insertOrUpdateBlock(editor, { - type: "heading", - props: { level: 3, isToggleable: true }, - }); - }, - key: "toggle_heading_3", - ...editor.dictionary.slash_menu.toggle_heading_3, - }, ); } @@ -346,6 +315,57 @@ export function getDefaultSlashMenuItems< }); } + if (checkDefaultBlockTypeInSchema("heading", editor)) { + items.push( + { + onItemClick: () => { + insertOrUpdateBlock(editor, { + type: "heading", + props: { level: 1, isToggleable: true }, + }); + }, + key: "toggle_heading", + ...editor.dictionary.slash_menu.toggle_heading, + }, + { + onItemClick: () => { + insertOrUpdateBlock(editor, { + type: "heading", + props: { level: 2, isToggleable: true }, + }); + }, + + key: "toggle_heading_2", + ...editor.dictionary.slash_menu.toggle_heading_2, + }, + { + onItemClick: () => { + insertOrUpdateBlock(editor, { + type: "heading", + props: { level: 3, isToggleable: true }, + }); + }, + key: "toggle_heading_3", + ...editor.dictionary.slash_menu.toggle_heading_3, + }, + ); + + editor.settings.heading.levels + .filter((level): level is 4 | 5 | 6 => level > 3) + .forEach((level) => { + items.push({ + onItemClick: () => { + insertOrUpdateBlock(editor, { + type: "heading", + props: { level: level }, + }); + }, + key: `heading_${level}`, + ...editor.dictionary.slash_menu[`heading_${level}`], + }); + }); + } + items.push({ onItemClick: () => { editor.openSuggestionMenu(":", { diff --git a/packages/core/src/i18n/locales/ar.ts b/packages/core/src/i18n/locales/ar.ts index ac714adb5..12ae9f698 100644 --- a/packages/core/src/i18n/locales/ar.ts +++ b/packages/core/src/i18n/locales/ar.ts @@ -20,23 +20,41 @@ export const ar: Dictionary = { aliases: ["ع3", "عنوان3", "عنوان فرعي"], group: "العناوين", }, + heading_4: { + title: "عنوان 4", + subtext: "عنوان فرعي ثانوي صغير", + aliases: ["ع4", "عنوان4", "عنوان فرعي صغير"], + group: "العناوين الفرعية", + }, + heading_5: { + title: "عنوان 5", + subtext: "عنوان فرعي صغير", + aliases: ["ع5", "عنوان5", "عنوان فرعي صغير"], + group: "العناوين الفرعية", + }, + heading_6: { + title: "عنوان 6", + subtext: "أدنى مستوى للعناوين", + aliases: ["ع6", "عنوان6", "العنوان الفرعي الأدنى"], + group: "العناوين الفرعية", + }, toggle_heading: { title: "عنوان قابل للطي 1", subtext: "عنوان قابل للطي لإظهار وإخفاء المحتوى", aliases: ["ع", "عنوان1", "ع1", "قابل للطي", "طي"], - group: "العناوين", + group: "العناوين الفرعية", }, toggle_heading_2: { title: "عنوان قابل للطي 2", subtext: "عنوان فرعي قابل للطي لإظهار وإخفاء المحتوى", aliases: ["ع2", "عنوان2", "عنوان فرعي", "قابل للطي", "طي"], - group: "العناوين", + group: "العناوين الفرعية", }, toggle_heading_3: { title: "عنوان قابل للطي 3", subtext: "عنوان فرعي ثانوي قابل للطي لإظهار وإخفاء المحتوى", aliases: ["ع3", "عنوان3", "عنوان فرعي", "قابل للطي", "طي"], - group: "العناوين", + group: "العناوين الفرعية", }, quote: { title: "اقتباس", diff --git a/packages/core/src/i18n/locales/de.ts b/packages/core/src/i18n/locales/de.ts index 648584e05..fa97a6aeb 100644 --- a/packages/core/src/i18n/locales/de.ts +++ b/packages/core/src/i18n/locales/de.ts @@ -20,11 +20,29 @@ export const de: Dictionary = { aliases: ["h3", "überschrift3", "unterüberschrift"], group: "Überschriften", }, + heading_4: { + title: "Überschrift 4", + subtext: "Überschrift für kleinere Unterabschnitte", + aliases: ["h4", "überschrift4", "unterüberschrift4"], + group: "Unterüberschriften", + }, + heading_5: { + title: "Überschrift 5", + subtext: "Überschrift für tiefere Unterabschnitte", + aliases: ["h5", "überschrift5", "unterüberschrift5"], + group: "Unterüberschriften", + }, + heading_6: { + title: "Überschrift 6", + subtext: "Überschrift auf der untersten Ebene", + aliases: ["h6", "überschrift6", "unterüberschrift6"], + group: "Unterüberschriften", + }, toggle_heading: { title: "Aufklappbare Überschrift 1", subtext: "Aufklappbare Hauptebene Überschrift", aliases: ["h", "überschrift1", "h1", "aufklappbar", "einklappbar"], - group: "Überschriften", + group: "Unterüberschrift", }, toggle_heading_2: { title: "Aufklappbare Überschrift 2", @@ -36,7 +54,7 @@ export const de: Dictionary = { "aufklappbar", "einklappbar", ], - group: "Überschriften", + group: "Unterüberschriften", }, toggle_heading_3: { title: "Aufklappbare Überschrift 3", @@ -48,7 +66,7 @@ export const de: Dictionary = { "aufklappbar", "einklappbar", ], - group: "Überschriften", + group: "Unterüberschriften", }, quote: { title: "Zitat", diff --git a/packages/core/src/i18n/locales/en.ts b/packages/core/src/i18n/locales/en.ts index 0557e4114..78f5d83bb 100644 --- a/packages/core/src/i18n/locales/en.ts +++ b/packages/core/src/i18n/locales/en.ts @@ -18,23 +18,41 @@ export const en = { aliases: ["h3", "heading3", "subheading"], group: "Headings", }, + heading_4: { + title: "Heading 4", + subtext: "Minor subsection heading", + aliases: ["h4", "heading4", "subheading4"], + group: "Subheadings", + }, + heading_5: { + title: "Heading 5", + subtext: "Small subsection heading", + aliases: ["h5", "heading5", "subheading5"], + group: "Subheadings", + }, + heading_6: { + title: "Heading 6", + subtext: "Lowest-level heading", + aliases: ["h6", "heading6", "subheading6"], + group: "Subheadings", + }, toggle_heading: { title: "Toggle Heading 1", subtext: "Toggleable top-level heading", aliases: ["h", "heading1", "h1", "collapsable"], - group: "Headings", + group: "Subheadings", }, toggle_heading_2: { title: "Toggle Heading 2", subtext: "Toggleable key section heading", aliases: ["h2", "heading2", "subheading", "collapsable"], - group: "Headings", + group: "Subheadings", }, toggle_heading_3: { title: "Toggle Heading 3", subtext: "Toggleable subsection and group heading", aliases: ["h3", "heading3", "subheading", "collapsable"], - group: "Headings", + group: "Subheadings", }, quote: { title: "Quote", diff --git a/packages/core/src/i18n/locales/es.ts b/packages/core/src/i18n/locales/es.ts index eb4f8d171..66af2f092 100644 --- a/packages/core/src/i18n/locales/es.ts +++ b/packages/core/src/i18n/locales/es.ts @@ -20,23 +20,41 @@ export const es: Dictionary = { aliases: ["h3", "encabezado3", "subencabezado"], group: "Encabezados", }, + heading_4: { + title: "Encabezado 4", + subtext: "Encabezado de subsección menor", + aliases: ["h4", "encabezado4", "subencabezado4"], + group: "Subencabezados", + }, + heading_5: { + title: "Encabezado 5", + subtext: "Encabezado de subsección pequeña", + aliases: ["h5", "encabezado5", "subencabezado5"], + group: "Subencabezados", + }, + heading_6: { + title: "Encabezado 6", + subtext: "Encabezado de nivel más bajo", + aliases: ["h6", "encabezado6", "subencabezado6"], + group: "Subencabezados", + }, toggle_heading: { title: "Encabezado Plegable 1", subtext: "Encabezado de primer nivel que se puede plegar", aliases: ["h", "encabezado1", "h1", "plegable", "contraible"], - group: "Encabezados", + group: "Subencabezados", }, toggle_heading_2: { title: "Encabezado Plegable 2", subtext: "Encabezado de sección principal que se puede plegar", aliases: ["h2", "encabezado2", "subencabezado", "plegable", "contraible"], - group: "Encabezados", + group: "Subencabezados", }, toggle_heading_3: { title: "Encabezado Plegable 3", subtext: "Encabezado de subsección y grupo que se puede plegar", aliases: ["h3", "encabezado3", "subencabezado", "plegable", "contraible"], - group: "Encabezados", + group: "Subencabezados", }, quote: { title: "Cita", diff --git a/packages/core/src/i18n/locales/fr.ts b/packages/core/src/i18n/locales/fr.ts index 64e3cc644..b5cc28b1a 100644 --- a/packages/core/src/i18n/locales/fr.ts +++ b/packages/core/src/i18n/locales/fr.ts @@ -21,12 +21,30 @@ export const fr: Dictionary = { aliases: ["h3", "titre3", "sous-titre"], group: "Titres", }, + heading_4: { + title: "Titre 4", + subtext: "Titre de sous‑section mineure", + aliases: ["h4", "titre4", "sous‑titre4"], + group: "Sous-titres", + }, + heading_5: { + title: "Titre 5", + subtext: "Titre de sous-section mineure", + aliases: ["h5", "titre5", "sous-titre5"], + group: "Sous-titres", + }, + heading_6: { + title: "Titre 6", + subtext: "Titre de niveau le plus bas", + aliases: ["h6", "titre6", "sous-titre6"], + group: "Sous-titres", + }, toggle_heading: { title: "Titre Repliable 1", subtext: "Titre de premier niveau qui peut être replié pour masquer son contenu", aliases: ["h", "titre1", "h1", "repliable", "masquable", "déroulant"], - group: "Titres", + group: "Sous-titres", }, toggle_heading_2: { title: "Titre Repliable 2", @@ -39,7 +57,7 @@ export const fr: Dictionary = { "masquable", "déroulant", ], - group: "Titres", + group: "Sous-titres", }, toggle_heading_3: { title: "Titre Repliable 3", @@ -53,7 +71,7 @@ export const fr: Dictionary = { "masquable", "déroulant", ], - group: "Titres", + group: "Sous-titres", }, quote: { title: "Citation", diff --git a/packages/core/src/i18n/locales/hr.ts b/packages/core/src/i18n/locales/hr.ts index 8adf918fa..74527a60c 100644 --- a/packages/core/src/i18n/locales/hr.ts +++ b/packages/core/src/i18n/locales/hr.ts @@ -20,23 +20,41 @@ export const hr: Dictionary = { aliases: ["h3", "naslov3", "podnaslov"], group: "Naslovi", }, + heading_4: { + title: "Naslov 4", + subtext: "Manji naslov podpoglavlja", + aliases: ["h4", "naslov4", "podnaslov4"], + group: "Podnaslovi", + }, + heading_5: { + title: "Naslov 5", + subtext: "Mali naslov podpoglavlja", + aliases: ["h5", "naslov5", "podnaslov5"], + group: "Podnaslovi", + }, + heading_6: { + title: "Naslov 6", + subtext: "Naslov najniže razine", + aliases: ["h6", "naslov6", "podnaslov6"], + group: "Podnaslovi", + }, toggle_heading: { title: "Proširivi Naslov 1", subtext: "Proširivi glavni naslov", aliases: ["h", "naslov1", "h1", "proširivi"], - group: "Naslovi", + group: "Podnaslovi", }, toggle_heading_2: { title: "Proširivi Naslov 2", subtext: "Proširivi naslov poglavlja", aliases: ["h2", "naslov2", "podnaslov", "proširivi"], - group: "Naslovi", + group: "Podnaslovi", }, toggle_heading_3: { title: "Proširivi Naslov 3", subtext: "Proširivi naslov podpoglavlja", aliases: ["h3", "naslov3", "podnaslov", "proširivi"], - group: "Naslovi", + group: "Podnaslovi", }, quote: { title: "Citat", diff --git a/packages/core/src/i18n/locales/is.ts b/packages/core/src/i18n/locales/is.ts index add3180b5..e0d08db73 100644 --- a/packages/core/src/i18n/locales/is.ts +++ b/packages/core/src/i18n/locales/is.ts @@ -20,12 +20,30 @@ export const is: Dictionary = { aliases: ["h3", "fyrirsogn3", "undirfyrirsogn"], group: "Fyrirsagnir", }, + heading_4: { + title: "Fyrirsögn 4", + subtext: "Titill fyrir minni undirhluta", + aliases: ["h4", "fyrirsogn4", "undirfyrirsogn4"], + group: "Undirfyrirsagnir", + }, + heading_5: { + title: "Fyrirsögn 5", + subtext: "Titill fyrir litla undirkafla", + aliases: ["h5", "fyrirsogn5", "undirfyrirsogn5"], + group: "Undirfyrirsagnir", + }, + heading_6: { + title: "Fyrirsögn 6", + subtext: "Titill á lægsta stigi", + aliases: ["h6", "fyrirsogn6", "undirfyrirsogn6"], + group: "Undirfyrirsagnir", + }, toggle_heading: { title: "Fellanleg Fyrirsögn 1", subtext: "Fellanleg efsta fyrirsögn sem hægt er að sýna eða fela innihald", aliases: ["h", "fyrirsogn1", "h1", "fellanleg", "fellanlegt"], - group: "Fyrirsagnir", + group: "Undirfyrirsagnir", }, toggle_heading_2: { title: "Fellanleg Fyrirsögn 2", @@ -38,7 +56,7 @@ export const is: Dictionary = { "fellanleg", "fellanlegt", ], - group: "Fyrirsagnir", + group: "Undirfyrirsagnir", }, toggle_heading_3: { title: "Fellanleg Fyrirsögn 3", @@ -51,7 +69,7 @@ export const is: Dictionary = { "fellanleg", "fellanlegt", ], - group: "Fyrirsagnir", + group: "Undirfyrirsagnir", }, quote: { title: "Tilvitnun", diff --git a/packages/core/src/i18n/locales/it.ts b/packages/core/src/i18n/locales/it.ts index 7b7b03be8..cba938b4c 100644 --- a/packages/core/src/i18n/locales/it.ts +++ b/packages/core/src/i18n/locales/it.ts @@ -20,12 +20,30 @@ export const it: Dictionary = { aliases: ["h3", "intestazione3", "sottotitolo"], group: "Intestazioni", }, + heading_4: { + title: "Intestazione 4", + subtext: "Intestazione di sottosezione minore", + aliases: ["h4", "intestazione4", "sottotitolo4"], + group: "Sottotitoli", + }, + heading_5: { + title: "Intestazione 5", + subtext: "Intestazione di sottosezione minore", + aliases: ["h5", "intestazione5", "sottotitolo5"], + group: "Sottotitoli", + }, + heading_6: { + title: "Intestazione 6", + subtext: "Intestazione di livello più basso", + aliases: ["h6", "intestazione6", "sottotitolo6"], + group: "Sottotitoli", + }, toggle_heading: { title: "Intestazione Espandibile 1", subtext: "Intestazione di primo livello che può essere espansa o compressa per mostrare il contenuto", aliases: ["h", "intestazione1", "h1", "espandibile", "comprimibile"], - group: "Intestazioni", + group: "Sottotitoli", }, toggle_heading_2: { title: "Intestazione Espandibile 2", @@ -38,7 +56,7 @@ export const it: Dictionary = { "espandibile", "comprimibile", ], - group: "Intestazioni", + group: "Sottotitoli", }, toggle_heading_3: { title: "Intestazione Espandibile 3", @@ -51,7 +69,7 @@ export const it: Dictionary = { "espandibile", "comprimibile", ], - group: "Intestazioni", + group: "Sottotitoli", }, quote: { title: "Citazione", diff --git a/packages/core/src/i18n/locales/ja.ts b/packages/core/src/i18n/locales/ja.ts index 12b2d1e88..3bd6ff47f 100644 --- a/packages/core/src/i18n/locales/ja.ts +++ b/packages/core/src/i18n/locales/ja.ts @@ -20,11 +20,29 @@ export const ja: Dictionary = { aliases: ["h3", "見出し3", "subheading", "小見出し"], group: "見出し", }, + heading_4: { + title: "見出し4", + subtext: "小さなサブセクションの見出しに使用", + aliases: ["h4", "見出し4", "subheading4", "小見出し4"], + group: "サブ見出し", + }, + heading_5: { + title: "見出し5", + subtext: "小さなサブセクションの見出しに使用", + aliases: ["h5", "見出し5", "subheading5", "小見出し5"], + group: "サブ見出し", + }, + heading_6: { + title: "見出し6", + subtext: "最下位レベルの見出しに使用", + aliases: ["h6", "見出し6", "subheading6", "小見出し6"], + group: "サブ見出し", + }, toggle_heading: { title: "折りたたみ見出し1", subtext: "内容の表示/非表示が切り替え可能なトップレベルの見出し", aliases: ["h", "見出し1", "h1", "大見出し", "折りたたみ", "トグル"], - group: "見出し", + group: "サブ見出し", }, toggle_heading_2: { title: "折りたたみ見出し2", @@ -37,7 +55,7 @@ export const ja: Dictionary = { "折りたたみ", "トグル", ], - group: "見出し", + group: "サブ見出し", }, toggle_heading_3: { title: "折りたたみ見出し3", @@ -50,7 +68,7 @@ export const ja: Dictionary = { "折りたたみ", "トグル", ], - group: "見出し", + group: "サブ見出し", }, quote: { title: "引用", diff --git a/packages/core/src/i18n/locales/ko.ts b/packages/core/src/i18n/locales/ko.ts index 5f36b9de4..dc13c893c 100644 --- a/packages/core/src/i18n/locales/ko.ts +++ b/packages/core/src/i18n/locales/ko.ts @@ -20,6 +20,24 @@ export const ko: Dictionary = { aliases: ["h3", "제목3", "subheading"], group: "제목", }, + heading_4: { + title: "제목4", + subtext: "하위 소단락 제목", + aliases: ["h4", "제목4", "소제목4"], + group: "소제목", + }, + heading_5: { + title: "제목5", + subtext: "작은 하위 섹션 제목", + aliases: ["h5", "제목5", "소제목5"], + group: "소제목", + }, + heading_6: { + title: "제목6", + subtext: "가장 하위 수준 제목", + aliases: ["h6", "제목6", "소제목6"], + group: "소제목", + }, toggle_heading: { title: "접을 수 있는 제목1", subtext: "내용을 표시하거나 숨길 수 있는 섹션 제목(대)", @@ -30,13 +48,13 @@ export const ko: Dictionary = { title: "접을 수 있는 제목2", subtext: "내용을 표시하거나 숨길 수 있는 섹션 제목(중)", aliases: ["h2", "제목2", "중제목", "접기", "토글"], - group: "제목", + group: "소제목", }, toggle_heading_3: { title: "접을 수 있는 제목3", subtext: "내용을 표시하거나 숨길 수 있는 섹션 제목(소)", aliases: ["h3", "제목3", "subheading", "접기", "토글"], - group: "제목", + group: "소제목", }, quote: { title: "인용", diff --git a/packages/core/src/i18n/locales/nl.ts b/packages/core/src/i18n/locales/nl.ts index 951c965fc..923026e83 100644 --- a/packages/core/src/i18n/locales/nl.ts +++ b/packages/core/src/i18n/locales/nl.ts @@ -20,24 +20,42 @@ export const nl: Dictionary = { aliases: ["h3", "kop3", "subkop"], group: "Koppen", }, + heading_4: { + title: "Kop 4", + subtext: "Gebruikt voor kleinere subsecties", + aliases: ["h4", "kop4", "subkop4"], + group: "Subkoppen", + }, + heading_5: { + title: "Kop 5", + subtext: "Gebruikt voor kleinere subsecties", + aliases: ["h5", "kop5", "subkop5"], + group: "Subkoppen", + }, + heading_6: { + title: "Kop 6", + subtext: "Gebruikt voor koppen op het laagste niveau", + aliases: ["h6", "kop6", "subkop6"], + group: "Subkoppen", + }, toggle_heading: { title: "Uitklapbare Kop 1", subtext: "Hoofdkop die kan worden uit- en ingeklapt om inhoud te tonen", aliases: ["h", "kop1", "h1", "uitklapbaar", "inklapbaar"], - group: "Koppen", + group: "Subkoppen", }, toggle_heading_2: { title: "Uitklapbare Kop 2", subtext: "Sectiekop die kan worden uit- en ingeklapt om inhoud te tonen", aliases: ["h2", "kop2", "subkop", "uitklapbaar", "inklapbaar"], - group: "Koppen", + group: "Subkoppen", }, toggle_heading_3: { title: "Uitklapbare Kop 3", subtext: "Subsectiekop die kan worden uit- en ingeklapt om inhoud te tonen", aliases: ["h3", "kop3", "subkop", "uitklapbaar", "inklapbaar"], - group: "Koppen", + group: "Subkoppen", }, quote: { title: "Citaat", diff --git a/packages/core/src/i18n/locales/no.ts b/packages/core/src/i18n/locales/no.ts index cc0b3713d..e6c661664 100644 --- a/packages/core/src/i18n/locales/no.ts +++ b/packages/core/src/i18n/locales/no.ts @@ -20,11 +20,29 @@ export const no: Dictionary = { aliases: ["h3", "overskrift3", "underoverskrift"], group: "Overskrifter", }, + heading_4: { + title: "Overskrift 4", + subtext: "Underoverskrift for mindre underseksjoner", + aliases: ["h4", "overskrift4", "underoverskrift4"], + group: "Underoverskrifter", + }, + heading_5: { + title: "Overskrift 5", + subtext: "Overskrift for mindre underseksjoner", + aliases: ["h5", "overskrift5", "underoverskrift5"], + group: "Underoverskrifter", + }, + heading_6: { + title: "Overskrift 6", + subtext: "Overskrift på laveste nivå", + aliases: ["h6", "overskrift6", "underoverskrift6"], + group: "Underoverskrifter", + }, toggle_heading: { title: "Sammenleggbar Overskrift 1", subtext: "Toppnivåoverskrift som kan vises eller skjules", aliases: ["h", "overskrift1", "h1", "sammenleggbar", "toggle"], - group: "Overskrifter", + group: "Underoverskrifter", }, toggle_heading_2: { title: "Sammenleggbar Overskrift 2", @@ -36,7 +54,7 @@ export const no: Dictionary = { "sammenleggbar", "toggle", ], - group: "Overskrifter", + group: "Underoverskrifter", }, toggle_heading_3: { title: "Sammenleggbar Overskrift 3", @@ -48,7 +66,7 @@ export const no: Dictionary = { "sammenleggbar", "toggle", ], - group: "Overskrifter", + group: "Underoverskrifter", }, quote: { title: "Sitat", diff --git a/packages/core/src/i18n/locales/pl.ts b/packages/core/src/i18n/locales/pl.ts index cc5117448..8684c6a91 100644 --- a/packages/core/src/i18n/locales/pl.ts +++ b/packages/core/src/i18n/locales/pl.ts @@ -20,23 +20,41 @@ export const pl: Dictionary = { aliases: ["h3", "naglowek3", "podnaglowek"], group: "Nagłówki", }, + heading_4: { + title: "Nagłówek 4", + subtext: "Nagłówek mniejszej podsekcji", + aliases: ["h4", "naglowek4", "podnaglowek4"], + group: "Podnagłówki", + }, + heading_5: { + title: "Nagłówek 5", + subtext: "Nagłówek mniejszej podsekcji", + aliases: ["h5", "naglowek5", "podnaglowek5"], + group: "Podnagłówki", + }, + heading_6: { + title: "Nagłówek 6", + subtext: "Nagłówek najniższego poziomu", + aliases: ["h6", "naglowek6", "podnaglowek6"], + group: "Podnagłówki", + }, toggle_heading: { title: "Nagłówek rozwijany 1", subtext: "Rozwijany nagłówek najwyższego poziomu", aliases: ["h", "naglowek1", "h1", "rozwijany"], - group: "Nagłówki", + group: "Podnagłówki", }, toggle_heading_2: { title: "Nagłówek rozwijany 2", subtext: "Rozwijany nagłówek dla kluczowych sekcji", aliases: ["h2", "naglowek2", "podnaglowek", "rozwijany"], - group: "Nagłówki", + group: "Podnagłówki", }, toggle_heading_3: { title: "Nagłówek rozwijany 3", subtext: "Rozwijany nagłówek dla podsekcji i grup", aliases: ["h3", "naglowek3", "podnaglowek", "rozwijany"], - group: "Nagłówki", + group: "Podnagłówki", }, quote: { title: "Cytat", diff --git a/packages/core/src/i18n/locales/pt.ts b/packages/core/src/i18n/locales/pt.ts index 5c9e035c0..a10c5ec3a 100644 --- a/packages/core/src/i18n/locales/pt.ts +++ b/packages/core/src/i18n/locales/pt.ts @@ -20,23 +20,41 @@ export const pt: Dictionary = { aliases: ["h3", "titulo3", "subtitulo"], group: "Títulos", }, + heading_4: { + title: "Título 4", + subtext: "Usado para subseções menores", + aliases: ["h4", "titulo4", "subtitulo4"], + group: "Subtítulos", + }, + heading_5: { + title: "Título 5", + subtext: "Usado para títulos de subseções pequenas", + aliases: ["h5", "titulo5", "subtitulo5"], + group: "Subtítulos", + }, + heading_6: { + title: "Título 6", + subtext: "Usado para títulos de nível mais baixo", + aliases: ["h6", "titulo6", "subtitulo6"], + group: "Subtítulos", + }, toggle_heading: { title: "Título Expansível", subtext: "Título expansível de nível superior", aliases: ["h", "titulo1", "h1", "expansível"], - group: "Títulos", + group: "Subtítulos", }, toggle_heading_2: { title: "Título Expansível 2", subtext: "Título expansível para seções principais", aliases: ["h2", "titulo2", "subtitulo", "expansível"], - group: "Títulos", + group: "Subtítulos", }, toggle_heading_3: { title: "Título Expansível 3", subtext: "Título expansível para subseções e títulos de grupo", aliases: ["h3", "titulo3", "subtitulo", "expansível"], - group: "Títulos", + group: "Subtítulos", }, quote: { title: "Citação", diff --git a/packages/core/src/i18n/locales/ru.ts b/packages/core/src/i18n/locales/ru.ts index 813b5b517..e7f9f19e0 100644 --- a/packages/core/src/i18n/locales/ru.ts +++ b/packages/core/src/i18n/locales/ru.ts @@ -20,11 +20,29 @@ export const ru: Dictionary = { aliases: ["h3", "heading3", "subheading", "заголовок3", "подзаголовок"], group: "Заголовки", }, + heading_4: { + title: "Заголовок 4 уровня", + subtext: "Используется для более мелких подразделов", + aliases: ["h4", "heading4", "subheading4", "заголовок4", "подзаголовок4"], + group: "Подзаголовки", + }, + heading_5: { + title: "Заголовок 5 уровня", + subtext: "Используется для заголовков небольших подразделов", + aliases: ["h5", "heading5", "subheading5", "заголовок5", "подзаголовок5"], + group: "Подзаголовки", + }, + heading_6: { + title: "Заголовок 6 уровня", + subtext: "Используется для заголовков самого низкого уровня", + aliases: ["h6", "heading6", "subheading6", "заголовок6", "подзаголовок6"], + group: "Подзаголовки", + }, toggle_heading: { title: "Сворачиваемый заголовок 1 уровня", subtext: "Заголовок верхнего уровня, который можно свернуть/развернуть", aliases: ["h", "heading1", "h1", "заголовок1", "сворачиваемый"], - group: "Заголовки", + group: "Подзаголовки", }, toggle_heading_2: { title: "Сворачиваемый заголовок 2 уровня", @@ -38,7 +56,7 @@ export const ru: Dictionary = { "подзаголовок", "сворачиваемый", ], - group: "Заголовки", + group: "Подзаголовки", }, toggle_heading_3: { title: "Сворачиваемый заголовок 3 уровня", @@ -52,7 +70,7 @@ export const ru: Dictionary = { "подзаголовок", "сворачиваемый", ], - group: "Заголовки", + group: "Подзаголовки", }, quote: { title: "Цитата", diff --git a/packages/core/src/i18n/locales/sk.ts b/packages/core/src/i18n/locales/sk.ts index 1791bbac1..8fc616758 100644 --- a/packages/core/src/i18n/locales/sk.ts +++ b/packages/core/src/i18n/locales/sk.ts @@ -18,23 +18,41 @@ export const sk = { aliases: ["h3", "nadpis3", "podnadpis"], group: "Nadpisy", }, + heading_4: { + title: "Nadpis 4", + subtext: "Podsekcia alebo skupinový nadpis", + aliases: ["h4", "nadpis4", "podnadpis"], + group: "Podnáslovi", + }, + heading_5: { + title: "Nadpis 5", + subtext: "Podsekcia alebo skupinový nadpis", + aliases: ["h5", "nadpis5", "podnadpis"], + group: "Podnáslovi", + }, + heading_6: { + title: "Nadpis 6", + subtext: "Podsekcia alebo skupinový nadpis", + aliases: ["h6", "nadpis6", "podnadpis"], + group: "Podnáslovi", + }, toggle_heading: { title: "Rozbaľovací Nadpis 1", subtext: "Rozbaľovací nadpis najvyššej úrovne", aliases: ["h", "nadpis1", "h1", "rozbaľovací"], - group: "Nadpisy", + group: "Podnáslovi", }, toggle_heading_2: { title: "Rozbaľovací Nadpis 2", subtext: "Rozbaľovací kľúčový nadpis sekcie", aliases: ["h2", "nadpis2", "podnadpis", "rozbaľovací"], - group: "Nadpisy", + group: "Podnáslovi", }, toggle_heading_3: { title: "Rozbaľovací Nadpis 3", subtext: "Rozbaľovací nadpis podsekcie alebo skupiny", aliases: ["h3", "nadpis3", "podnadpis", "rozbaľovací"], - group: "Nadpisy", + group: "Podnáslovi", }, quote: { title: "Citát", diff --git a/packages/core/src/i18n/locales/uk.ts b/packages/core/src/i18n/locales/uk.ts index a9d81026c..c44c4c198 100644 --- a/packages/core/src/i18n/locales/uk.ts +++ b/packages/core/src/i18n/locales/uk.ts @@ -20,23 +20,41 @@ export const uk: Dictionary = { aliases: ["h3", "heading3", "subheading", "заголовок3"], group: "Заголовки", }, + heading_4: { + title: "Заголовок 4", + subtext: "Використовується для менших підрозділів", + aliases: ["h4", "heading4", "subheading4", "заголовок4"], + group: "Підзаголовки", + }, + heading_5: { + title: "Заголовок 5", + subtext: "Використовується для заголовків менших підрозділів", + aliases: ["h5", "heading5", "subheading5", "заголовок5", "підзаголовок5"], + group: "Підзаголовки", + }, + heading_6: { + title: "Заголовок 6", + subtext: "Використовується для заголовків найнижчого рівня", + aliases: ["h6", "heading6", "subheading6", "заголовок6", "підзаголовок6"], + group: "Підзаголовки", + }, toggle_heading: { title: "Розгортаємий заголовок 1", subtext: "Розгортаємий заголовок найвищого рівня", aliases: ["h", "heading1", "h1", "заголовок1", "розгортаємий"], - group: "Заголовки", + group: "Підзаголовки", }, toggle_heading_2: { title: "Розгортаємий заголовок 2", subtext: "Розгортаємий основний заголовок розділу", aliases: ["h2", "heading2", "subheading", "заголовок2", "розгортаємий"], - group: "Заголовки", + group: "Підзаголовки", }, toggle_heading_3: { title: "Розгортаємий заголовок 3", subtext: "Розгортаємий підзаголовок і груповий заголовок", aliases: ["h3", "heading3", "subheading", "заголовок3", "розгортаємий"], - group: "Заголовки", + group: "Підзаголовки", }, quote: { title: "Цитата", diff --git a/packages/core/src/i18n/locales/vi.ts b/packages/core/src/i18n/locales/vi.ts index 4107d9d67..12f005b4e 100644 --- a/packages/core/src/i18n/locales/vi.ts +++ b/packages/core/src/i18n/locales/vi.ts @@ -20,23 +20,41 @@ export const vi: Dictionary = { aliases: ["h3", "tieude3", "tieudephu"], group: "Tiêu đề", }, + heading_4: { + title: "Tiêu đề H4", + subtext: "Sử dụng cho tiêu đề phụ nhỏ hơn", + aliases: ["h4", "tieude4", "tieudephu4"], + group: "Tiêu đề phụ", + }, + heading_5: { + title: "Tiêu đề H5", + subtext: "Sử dụng cho tiêu đề phụ nhỏ hơn", + aliases: ["h5", "tieude5", "tieudephu5"], + group: "Tiêu đề phụ", + }, + heading_6: { + title: "Tiêu đề H6", + subtext: "Sử dụng cho tiêu đề cấp thấp nhất", + aliases: ["h6", "tieude6", "tieudephu6"], + group: "Tiêu đề phụ", + }, toggle_heading: { title: "Tiêu đề có thể thu gọn H1", subtext: "Tiêu đề cấp cao nhất có thể thu gọn", aliases: ["h", "tieude1", "dd1", "thugon"], - group: "Tiêu đề", + group: "Tiêu đề phụ", }, toggle_heading_2: { title: "Tiêu đề có thể thu gọn H2", subtext: "Tiêu đề cho các phần chính có thể thu gọn", aliases: ["h2", "tieude2", "tieudephu", "thugon"], - group: "Tiêu đề", + group: "Tiêu đề phụ", }, toggle_heading_3: { title: "Tiêu đề có thể thu gọn H3", subtext: "Tiêu đề cho phụ đề và tiêu đề nhóm có thể thu gọn", aliases: ["h3", "tieude3", "tieudephu", "thugon"], - group: "Tiêu đề", + group: "Tiêu đề phụ", }, quote: { title: "Trích dẫn", diff --git a/packages/core/src/i18n/locales/zh-tw.ts b/packages/core/src/i18n/locales/zh-tw.ts index 3cc92f9f3..91a86c1e6 100644 --- a/packages/core/src/i18n/locales/zh-tw.ts +++ b/packages/core/src/i18n/locales/zh-tw.ts @@ -20,11 +20,29 @@ export const zhTW: Dictionary = { aliases: ["h3", "heading3", "subheading", "標題", "三級標題"], group: "標題", }, + heading_4: { + title: "四級標題", + subtext: "用於小節和分組標題", + aliases: ["h4", "heading4", "subheading", "標題", "四級標題"], + group: "副標題", + }, + heading_5: { + title: "五級標題", + subtext: "用於小節和分組標題", + aliases: ["h5", "heading5", "subheading", "標題", "五級標題"], + group: "副標題", + }, + heading_6: { + title: "六級標題", + subtext: "用於小節和分組標題", + aliases: ["h6", "heading6", "subheading", "標題", "六級標題"], + group: "副標題", + }, toggle_heading: { title: "可摺疊一級標題", subtext: "可摺疊的頂級標題", aliases: ["h", "heading1", "h1", "標題", "一級標題", "摺疊"], - group: "標題", + group: "副標題", }, toggle_heading_2: { title: "可摺疊二級標題", @@ -38,13 +56,13 @@ export const zhTW: Dictionary = { "副標題", "摺疊", ], - group: "標題", + group: "副標題", }, toggle_heading_3: { title: "可摺疊三級標題", subtext: "可摺疊的小節和分組標題", aliases: ["h3", "heading3", "subheading", "標題", "三級標題", "摺疊"], - group: "標題", + group: "副標題", }, quote: { title: "引用", diff --git a/packages/core/src/i18n/locales/zh.ts b/packages/core/src/i18n/locales/zh.ts index c0c25961d..1de7db42a 100644 --- a/packages/core/src/i18n/locales/zh.ts +++ b/packages/core/src/i18n/locales/zh.ts @@ -20,11 +20,29 @@ export const zh: Dictionary = { aliases: ["h3", "heading3", "subheading", "标题", "三级标题"], group: "标题", }, + heading_4: { + title: "四级标题", + subtext: "用于较小的子节标题", + aliases: ["h4", "heading4", "subheading4", "四级标题"], + group: "副标题", + }, + heading_5: { + title: "五级标题", + subtext: "用于较小的子节标题", + aliases: ["h5", "heading5", "subheading5", "五级标题"], + group: "副标题", + }, + heading_6: { + title: "六级标题", + subtext: "用于最低层级的标题", + aliases: ["h6", "heading6", "subheading6", "六级标题"], + group: "副标题", + }, toggle_heading: { title: "可折叠一级标题", subtext: "可折叠的顶级标题", aliases: ["h", "heading1", "h1", "标题", "一级标题", "折叠"], - group: "标题", + group: "副标题", }, toggle_heading_2: { title: "可折叠二级标题", @@ -38,13 +56,13 @@ export const zh: Dictionary = { "副标题", "折叠", ], - group: "标题", + group: "副标题", }, toggle_heading_3: { title: "可折叠三级标题", subtext: "可折叠的小节和分组标题", aliases: ["h3", "heading3", "subheading", "标题", "三级标题", "折叠"], - group: "标题", + group: "副标题", }, quote: { title: "引用", diff --git a/packages/react/src/components/FormattingToolbar/DefaultSelects/BlockTypeSelect.tsx b/packages/react/src/components/FormattingToolbar/DefaultSelects/BlockTypeSelect.tsx index eef2b1e7c..a2d61c7ea 100644 --- a/packages/react/src/components/FormattingToolbar/DefaultSelects/BlockTypeSelect.tsx +++ b/packages/react/src/components/FormattingToolbar/DefaultSelects/BlockTypeSelect.tsx @@ -11,6 +11,9 @@ import { RiH1, RiH2, RiH3, + RiH4, + RiH5, + RiH6, RiListCheck3, RiListOrdered, RiListUnordered, @@ -77,6 +80,36 @@ export const blockTypeSelectItems = ( "level" in block.props && block.props.level === 3, }, + { + name: dict.slash_menu.heading_4.title, + type: "heading", + props: { level: 4 }, + icon: RiH4, + isSelected: (block) => + block.type === "heading" && + "level" in block.props && + block.props.level === 4, + }, + { + name: dict.slash_menu.heading_5.title, + type: "heading", + props: { level: 5 }, + icon: RiH5, + isSelected: (block) => + block.type === "heading" && + "level" in block.props && + block.props.level === 5, + }, + { + name: dict.slash_menu.heading_6.title, + type: "heading", + props: { level: 6 }, + icon: RiH6, + isSelected: (block) => + block.type === "heading" && + "level" in block.props && + block.props.level === 6, + }, { name: dict.slash_menu.toggle_heading.title, type: "heading", diff --git a/packages/react/src/components/SuggestionMenu/getDefaultReactSlashMenuItems.tsx b/packages/react/src/components/SuggestionMenu/getDefaultReactSlashMenuItems.tsx index 4e7c2cf55..62adf03b1 100644 --- a/packages/react/src/components/SuggestionMenu/getDefaultReactSlashMenuItems.tsx +++ b/packages/react/src/components/SuggestionMenu/getDefaultReactSlashMenuItems.tsx @@ -13,6 +13,9 @@ import { RiH1, RiH2, RiH3, + RiH4, + RiH5, + RiH6, RiImage2Fill, RiListCheck3, RiListOrdered, @@ -31,6 +34,9 @@ const icons: Record = { heading: RiH1, heading_2: RiH2, heading_3: RiH3, + heading_4: RiH4, + heading_5: RiH5, + heading_6: RiH6, toggle_heading: RiH1, toggle_heading_2: RiH2, toggle_heading_3: RiH3, diff --git a/packages/xl-ai/src/api/schema/__snapshots__/schemaToJSONSchema.test.ts.snap b/packages/xl-ai/src/api/schema/__snapshots__/schemaToJSONSchema.test.ts.snap index ec1c28279..c40733efa 100644 --- a/packages/xl-ai/src/api/schema/__snapshots__/schemaToJSONSchema.test.ts.snap +++ b/packages/xl-ai/src/api/schema/__snapshots__/schemaToJSONSchema.test.ts.snap @@ -50,6 +50,9 @@ exports[`creates json schema 1`] = ` 1, 2, 3, + 4, + 5, + 6, ], "type": "number", }, diff --git a/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx b/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx index 1bc9d7082..79a2e1b07 100644 --- a/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx +++ b/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx @@ -67,12 +67,18 @@ export const pdfBlockMappingForDefaultSchema: BlockMapping< ); }, heading: (block, exporter) => { - const fontSizeEM = - block.props.level === 1 ? 2 : block.props.level === 2 ? 1.5 : 1.17; + const levelFontSizeEM = { + 1: 2, + 2: 1.5, + 3: 1.17, + 4: 1, + 5: 0.83, + 6: 0.67, + }[block.props.level]; return ( diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-emoji-picker-webkit-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-emoji-picker-webkit-linux.png index 02baab8f2..3e48eae5e 100644 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-emoji-picker-webkit-linux.png and b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-emoji-picker-webkit-linux.png differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-link-toolbar-webkit-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-link-toolbar-webkit-linux.png index 32c2b37c4..ce5e013ff 100644 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-link-toolbar-webkit-linux.png and b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-link-toolbar-webkit-linux.png differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-chromium-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-chromium-linux.png index 9825ec51e..9dee39cb3 100644 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-chromium-linux.png and b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-chromium-linux.png differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-firefox-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-firefox-linux.png index 4a89300ce..9c7689e33 100644 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-firefox-linux.png and b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-firefox-linux.png differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-webkit-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-webkit-linux.png index 37caf33a1..139ec2032 100644 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-webkit-linux.png and b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-webkit-linux.png differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-formatting-toolbar-webkit-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-formatting-toolbar-webkit-linux.png index 384b284f7..5b7116c94 100644 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-formatting-toolbar-webkit-linux.png and b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-formatting-toolbar-webkit-linux.png differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-image-toolbar-webkit-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-image-toolbar-webkit-linux.png index 4f562f974..62005d1b9 100644 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-image-toolbar-webkit-linux.png and b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-image-toolbar-webkit-linux.png differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-link-toolbar-webkit-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-link-toolbar-webkit-linux.png index 36395ce11..99964be6b 100644 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-link-toolbar-webkit-linux.png and b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-link-toolbar-webkit-linux.png differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-chromium-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-chromium-linux.png index 8ba9721dd..49434267a 100644 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-chromium-linux.png and b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-chromium-linux.png differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-firefox-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-firefox-linux.png index ff4d4f83a..011d44ec6 100644 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-firefox-linux.png and b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-firefox-linux.png differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-webkit-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-webkit-linux.png index f283bd142..0f3eae697 100644 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-webkit-linux.png and b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-webkit-linux.png differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-formatting-toolbar-chromium-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-formatting-toolbar-chromium-linux.png index 35b580119..303dc6358 100644 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-formatting-toolbar-chromium-linux.png and b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-formatting-toolbar-chromium-linux.png differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-chromium-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-chromium-linux.png index ee03c98fc..15c37b5f6 100644 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-chromium-linux.png and b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-chromium-linux.png differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-firefox-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-firefox-linux.png index 39e99f551..fa2b7c540 100644 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-firefox-linux.png and b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-firefox-linux.png differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-webkit-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-webkit-linux.png index a266ce2bf..c61094a7e 100644 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-webkit-linux.png and b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-webkit-linux.png differ diff --git a/tests/src/unit/core/createTestEditor.ts b/tests/src/unit/core/createTestEditor.ts index ad11c2111..b7639f0a6 100644 --- a/tests/src/unit/core/createTestEditor.ts +++ b/tests/src/unit/core/createTestEditor.ts @@ -35,6 +35,9 @@ export const createTestEditor = < }, }, }, + heading: { + levels: [1, 2, 3, 4, 5, 6], + }, schema, trailingBlock: false, uploadFile: uploadToTmpFilesDotOrg_DEV_ONLY, diff --git a/tests/src/unit/core/formatConversion/parse/__snapshots__/html/basicBlockTypes.json b/tests/src/unit/core/formatConversion/parse/__snapshots__/html/basicBlockTypes.json index 477c02e9b..b8bc803a5 100644 --- a/tests/src/unit/core/formatConversion/parse/__snapshots__/html/basicBlockTypes.json +++ b/tests/src/unit/core/formatConversion/parse/__snapshots__/html/basicBlockTypes.json @@ -61,11 +61,68 @@ "content": [ { "styles": {}, - "text": "Paragraph", + "text": "Heading 4", "type": "text", }, ], "id": "4", + "props": { + "backgroundColor": "default", + "isToggleable": false, + "level": 4, + "textAlignment": "left", + "textColor": "default", + }, + "type": "heading", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Heading 5", + "type": "text", + }, + ], + "id": "5", + "props": { + "backgroundColor": "default", + "isToggleable": false, + "level": 5, + "textAlignment": "left", + "textColor": "default", + }, + "type": "heading", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Heading 6", + "type": "text", + }, + ], + "id": "6", + "props": { + "backgroundColor": "default", + "isToggleable": false, + "level": 6, + "textAlignment": "left", + "textColor": "default", + }, + "type": "heading", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph", + "type": "text", + }, + ], + "id": "7", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -76,7 +133,7 @@ { "children": [], "content": undefined, - "id": "5", + "id": "8", "props": { "backgroundColor": "default", "caption": "Image Caption", @@ -134,7 +191,7 @@ "type": "text", }, ], - "id": "6", + "id": "9", "props": { "backgroundColor": "default", "textAlignment": "left", diff --git a/tests/src/unit/core/formatConversion/parse/__snapshots__/html/deepNestedContent.json b/tests/src/unit/core/formatConversion/parse/__snapshots__/html/deepNestedContent.json index 9218e1545..420948fc2 100644 --- a/tests/src/unit/core/formatConversion/parse/__snapshots__/html/deepNestedContent.json +++ b/tests/src/unit/core/formatConversion/parse/__snapshots__/html/deepNestedContent.json @@ -129,11 +129,68 @@ "content": [ { "styles": {}, - "text": "Paragraph", + "text": "Heading 4", "type": "text", }, ], "id": "8", + "props": { + "backgroundColor": "default", + "isToggleable": false, + "level": 4, + "textAlignment": "left", + "textColor": "default", + }, + "type": "heading", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Heading 5", + "type": "text", + }, + ], + "id": "9", + "props": { + "backgroundColor": "default", + "isToggleable": false, + "level": 5, + "textAlignment": "left", + "textColor": "default", + }, + "type": "heading", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Heading 6", + "type": "text", + }, + ], + "id": "10", + "props": { + "backgroundColor": "default", + "isToggleable": false, + "level": 6, + "textAlignment": "left", + "textColor": "default", + }, + "type": "heading", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph", + "type": "text", + }, + ], + "id": "11", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -144,7 +201,7 @@ { "children": [], "content": undefined, - "id": "9", + "id": "12", "props": { "backgroundColor": "default", "caption": "Image Caption", @@ -217,7 +274,7 @@ "type": "text", }, ], - "id": "10", + "id": "13", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -234,7 +291,7 @@ "type": "text", }, ], - "id": "11", + "id": "14", "props": { "backgroundColor": "default", "textAlignment": "left", diff --git a/tests/src/unit/core/formatConversion/parse/__snapshots__/html/googleDocs.json b/tests/src/unit/core/formatConversion/parse/__snapshots__/html/googleDocs.json index 837e69abf..cb1c6802a 100644 --- a/tests/src/unit/core/formatConversion/parse/__snapshots__/html/googleDocs.json +++ b/tests/src/unit/core/formatConversion/parse/__snapshots__/html/googleDocs.json @@ -62,6 +62,69 @@ }, "type": "heading", }, + { + "children": [], + "content": [ + { + "styles": { + "bold": true, + }, + "text": "Heading 4", + "type": "text", + }, + ], + "id": "4", + "props": { + "backgroundColor": "default", + "isToggleable": false, + "level": 4, + "textAlignment": "left", + "textColor": "default", + }, + "type": "heading", + }, + { + "children": [], + "content": [ + { + "styles": { + "bold": true, + }, + "text": "Heading 5", + "type": "text", + }, + ], + "id": "5", + "props": { + "backgroundColor": "default", + "isToggleable": false, + "level": 5, + "textAlignment": "left", + "textColor": "default", + }, + "type": "heading", + }, + { + "children": [], + "content": [ + { + "styles": { + "bold": true, + }, + "text": "Heading 6", + "type": "text", + }, + ], + "id": "6", + "props": { + "backgroundColor": "default", + "isToggleable": false, + "level": 6, + "textAlignment": "left", + "textColor": "default", + }, + "type": "heading", + }, { "children": [], "content": [ @@ -71,7 +134,7 @@ "type": "text", }, ], - "id": "4", + "id": "7", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -88,7 +151,7 @@ "type": "text", }, ], - "id": "5", + "id": "8", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -105,7 +168,7 @@ "type": "text", }, ], - "id": "6", + "id": "9", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -123,7 +186,7 @@ Hard Break", "type": "text", }, ], - "id": "7", + "id": "10", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -180,7 +243,7 @@ Hard Break", "type": "text", }, ], - "id": "8", + "id": "11", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -201,7 +264,7 @@ Hard Break", "type": "text", }, ], - "id": "11", + "id": "14", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -218,7 +281,7 @@ Hard Break", "type": "text", }, ], - "id": "12", + "id": "15", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -234,7 +297,7 @@ Hard Break", "type": "text", }, ], - "id": "10", + "id": "13", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -251,7 +314,7 @@ Hard Break", "type": "text", }, ], - "id": "13", + "id": "16", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -267,7 +330,7 @@ Hard Break", "type": "text", }, ], - "id": "9", + "id": "12", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -284,7 +347,7 @@ Hard Break", "type": "text", }, ], - "id": "14", + "id": "17", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -301,7 +364,7 @@ Hard Break", "type": "text", }, ], - "id": "15", + "id": "18", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -318,7 +381,7 @@ Hard Break", "type": "text", }, ], - "id": "16", + "id": "19", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -329,7 +392,7 @@ Hard Break", { "children": [], "content": undefined, - "id": "17", + "id": "20", "props": { "backgroundColor": "default", "caption": "", @@ -351,7 +414,7 @@ Hard Break", "type": "text", }, ], - "id": "18", + "id": "21", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -538,7 +601,7 @@ Hard Break", ], "type": "tableContent", }, - "id": "19", + "id": "22", "props": { "textColor": "default", }, @@ -553,7 +616,7 @@ Hard Break", "type": "text", }, ], - "id": "20", + "id": "23", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -571,7 +634,7 @@ Hard Break", "type": "text", }, ], - "id": "21", + "id": "24", "props": { "backgroundColor": "default", "textAlignment": "left", diff --git a/tests/src/unit/core/formatConversion/parse/__snapshots__/html/notion.json b/tests/src/unit/core/formatConversion/parse/__snapshots__/html/notion.json index 0c2eb8284..9b9d39ca3 100644 --- a/tests/src/unit/core/formatConversion/parse/__snapshots__/html/notion.json +++ b/tests/src/unit/core/formatConversion/parse/__snapshots__/html/notion.json @@ -61,11 +61,68 @@ "content": [ { "styles": {}, - "text": "Paragraph 1", + "text": "Heading 4", "type": "text", }, ], "id": "4", + "props": { + "backgroundColor": "default", + "isToggleable": false, + "level": 4, + "textAlignment": "left", + "textColor": "default", + }, + "type": "heading", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Heading 5", + "type": "text", + }, + ], + "id": "5", + "props": { + "backgroundColor": "default", + "isToggleable": false, + "level": 5, + "textAlignment": "left", + "textColor": "default", + }, + "type": "heading", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Heading 6", + "type": "text", + }, + ], + "id": "6", + "props": { + "backgroundColor": "default", + "isToggleable": false, + "level": 6, + "textAlignment": "left", + "textColor": "default", + }, + "type": "heading", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 1", + "type": "text", + }, + ], + "id": "7", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -82,7 +139,7 @@ "type": "text", }, ], - "id": "5", + "id": "8", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -99,7 +156,7 @@ "type": "text", }, ], - "id": "6", + "id": "9", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -116,7 +173,7 @@ "type": "text", }, ], - "id": "7", + "id": "10", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -173,7 +230,7 @@ "type": "text", }, ], - "id": "8", + "id": "11", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -194,7 +251,7 @@ "type": "text", }, ], - "id": "11", + "id": "14", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -211,7 +268,7 @@ "type": "text", }, ], - "id": "12", + "id": "15", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -227,7 +284,7 @@ "type": "text", }, ], - "id": "10", + "id": "13", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -244,7 +301,7 @@ "type": "text", }, ], - "id": "13", + "id": "16", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -260,7 +317,7 @@ "type": "text", }, ], - "id": "9", + "id": "12", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -277,7 +334,7 @@ "type": "text", }, ], - "id": "14", + "id": "17", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -294,7 +351,7 @@ "type": "text", }, ], - "id": "15", + "id": "18", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -311,7 +368,7 @@ "type": "text", }, ], - "id": "16", + "id": "19", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -328,7 +385,7 @@ "type": "text", }, ], - "id": "17", + "id": "20", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -356,7 +413,7 @@ "type": "link", }, ], - "id": "18", + "id": "21", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -543,7 +600,7 @@ ], "type": "tableContent", }, - "id": "19", + "id": "22", "props": { "textColor": "default", }, @@ -558,7 +615,7 @@ "type": "text", }, ], - "id": "20", + "id": "23", "props": { "backgroundColor": "default", "textAlignment": "left", diff --git a/tests/src/unit/core/formatConversion/parse/__snapshots__/markdown/complex.json b/tests/src/unit/core/formatConversion/parse/__snapshots__/markdown/complex.json index e904a186d..758a0902a 100644 --- a/tests/src/unit/core/formatConversion/parse/__snapshots__/markdown/complex.json +++ b/tests/src/unit/core/formatConversion/parse/__snapshots__/markdown/complex.json @@ -61,11 +61,68 @@ "content": [ { "styles": {}, - "text": "Paragraph", + "text": "Heading 4", "type": "text", }, ], "id": "4", + "props": { + "backgroundColor": "default", + "isToggleable": false, + "level": 4, + "textAlignment": "left", + "textColor": "default", + }, + "type": "heading", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Heading 5", + "type": "text", + }, + ], + "id": "5", + "props": { + "backgroundColor": "default", + "isToggleable": false, + "level": 5, + "textAlignment": "left", + "textColor": "default", + }, + "type": "heading", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Heading 6", + "type": "text", + }, + ], + "id": "6", + "props": { + "backgroundColor": "default", + "isToggleable": false, + "level": 6, + "textAlignment": "left", + "textColor": "default", + }, + "type": "heading", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph", + "type": "text", + }, + ], + "id": "7", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -101,7 +158,7 @@ "type": "text", }, ], - "id": "5", + "id": "8", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -137,7 +194,7 @@ "type": "text", }, ], - "id": "6", + "id": "9", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -154,7 +211,7 @@ "type": "text", }, ], - "id": "7", + "id": "10", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -175,7 +232,7 @@ "type": "text", }, ], - "id": "10", + "id": "13", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -191,7 +248,7 @@ "type": "text", }, ], - "id": "9", + "id": "12", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -210,7 +267,7 @@ "type": "text", }, ], - "id": "12", + "id": "15", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -227,7 +284,7 @@ "type": "text", }, ], - "id": "13", + "id": "16", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -246,7 +303,7 @@ "type": "text", }, ], - "id": "15", + "id": "18", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -262,7 +319,7 @@ "type": "text", }, ], - "id": "14", + "id": "17", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -279,7 +336,7 @@ "type": "text", }, ], - "id": "16", + "id": "19", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -295,7 +352,7 @@ "type": "text", }, ], - "id": "11", + "id": "14", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -312,7 +369,7 @@ "type": "text", }, ], - "id": "17", + "id": "20", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -328,7 +385,7 @@ "type": "text", }, ], - "id": "8", + "id": "11", "props": { "backgroundColor": "default", "textAlignment": "left", @@ -345,7 +402,7 @@ "type": "text", }, ], - "id": "18", + "id": "21", "props": { "backgroundColor": "default", "textAlignment": "left", diff --git a/tests/src/unit/core/formatConversion/parse/parseTestInstances.ts b/tests/src/unit/core/formatConversion/parse/parseTestInstances.ts index db65f162f..24691a394 100644 --- a/tests/src/unit/core/formatConversion/parse/parseTestInstances.ts +++ b/tests/src/unit/core/formatConversion/parse/parseTestInstances.ts @@ -22,6 +22,9 @@ export const parseTestInstancesHTML: TestInstance< content: `

Heading 1

Heading 2

Heading 3

+

Heading 4

+
Heading 5
+
Heading 6

Paragraph

Image Caption

None Bold Italic Underline Strikethrough All

`, @@ -576,6 +579,9 @@ export const parseTestInstancesHTML: TestInstance<

Heading 1

Heading 2

Heading 3

+

Heading 4

+
Heading 5
+
Heading 6

Paragraph

Image Caption

Bold Italic Underline Strikethrough All

@@ -642,6 +648,9 @@ export const parseTestInstancesHTML: TestInstance< content: `

Heading 1

Heading 2

Heading 3

+

Heading 4

+
Heading 5
+
Heading 6

Paragraph 1

Nested Paragraph 1

Nested Paragraph 2

@@ -703,6 +712,9 @@ With Hard Break

Heading 1

Heading 2

Heading 3

+

Heading 4

+
Heading 5
+
Heading 6

Paragraph 1

Paragraph 2

Paragraph 3

@@ -854,6 +866,12 @@ Paragraph ### Heading 3 +#### Heading 4 + +##### Heading 5 + +###### Heading 6 + Paragraph P**ara***grap*h