@blocknote/core 0.37.0 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BlockNoteSchema-DmZ6UQfY.cjs +11 -0
- package/dist/BlockNoteSchema-DmZ6UQfY.cjs.map +1 -0
- package/dist/BlockNoteSchema-oR047ACf.js +4275 -0
- package/dist/BlockNoteSchema-oR047ACf.js.map +1 -0
- package/dist/blocknote.cjs +4 -12
- package/dist/blocknote.cjs.map +1 -1
- package/dist/blocknote.js +3311 -7230
- package/dist/blocknote.js.map +1 -1
- package/dist/blocks.cjs +2 -0
- package/dist/blocks.cjs.map +1 -0
- package/dist/blocks.js +71 -0
- package/dist/blocks.js.map +1 -0
- package/dist/{en-CvDoFvhc.js → en-Bq3Es3Np.js} +6 -12
- package/dist/en-Bq3Es3Np.js.map +1 -0
- package/dist/en-D3B48eJ7.cjs +2 -0
- package/dist/en-D3B48eJ7.cjs.map +1 -0
- package/dist/locales.cjs +1 -1
- package/dist/locales.cjs.map +1 -1
- package/dist/locales.js +109 -229
- package/dist/locales.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/webpack-stats.json +1 -1
- package/package.json +25 -22
- package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts +1 -1
- package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts +2 -2
- package/src/api/blockManipulation/commands/splitBlock/splitBlock.ts +34 -25
- package/src/api/blockManipulation/setupTestEnv.ts +0 -1
- package/src/api/clipboard/fromClipboard/handleFileInsertion.ts +4 -8
- package/src/api/clipboard/toClipboard/copyExtension.ts +1 -3
- package/src/api/exporters/html/externalHTMLExporter.ts +0 -1
- package/src/api/exporters/html/util/serializeBlocksExternalHTML.ts +128 -28
- package/src/api/exporters/html/util/serializeBlocksInternalHTML.ts +101 -41
- package/src/api/exporters/markdown/markdownExporter.ts +13 -22
- package/src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts +2 -12
- package/src/api/parsers/html/parseHTML.ts +3 -2
- package/src/api/parsers/html/util/nestedLists.test.ts +8 -8
- package/src/api/parsers/markdown/parseMarkdown.ts +17 -14
- package/src/api/pmUtil.ts +1 -1
- package/src/api/positionMapping.test.ts +197 -33
- package/src/api/positionMapping.ts +4 -6
- package/src/blocks/Audio/block.ts +174 -0
- package/src/blocks/BlockNoteSchema.ts +59 -0
- package/src/blocks/Code/block.ts +303 -0
- package/src/blocks/Code/shiki.ts +73 -0
- package/src/blocks/File/block.ts +98 -0
- package/src/blocks/{FileBlockContent → File}/helpers/render/createAddFileButton.ts +8 -4
- package/src/blocks/{FileBlockContent → File}/helpers/render/createFileBlockWrapper.ts +16 -13
- package/src/blocks/{FileBlockContent → File}/helpers/render/createFileNameWithIcon.ts +15 -2
- package/src/blocks/{FileBlockContent → File}/helpers/render/createResizableFileBlockWrapper.ts +63 -19
- package/src/blocks/Heading/block.ts +138 -0
- package/src/blocks/Image/block.ts +190 -0
- package/src/blocks/ListItem/BulletListItem/block.ts +116 -0
- package/src/blocks/ListItem/CheckListItem/block.ts +175 -0
- package/src/blocks/ListItem/NumberedListItem/IndexingPlugin.ts +173 -0
- package/src/blocks/ListItem/NumberedListItem/block.ts +133 -0
- package/src/blocks/ListItem/ToggleListItem/block.ts +78 -0
- package/src/blocks/PageBreak/block.ts +72 -0
- package/src/blocks/{PageBreakBlockContent → PageBreak}/getPageBreakSlashMenuItems.ts +9 -7
- package/src/blocks/Paragraph/block.ts +80 -0
- package/src/blocks/Quote/block.ts +90 -0
- package/src/blocks/{TableBlockContent/TableBlockContent.ts → Table/block.ts} +169 -51
- package/src/blocks/ToggleWrapper/createToggleWrapper.ts +1 -1
- package/src/blocks/Video/block.ts +143 -0
- package/src/blocks/defaultBlockHelpers.ts +2 -2
- package/src/blocks/defaultBlockTypeGuards.ts +143 -174
- package/src/blocks/defaultBlocks.ts +107 -35
- package/src/blocks/defaultProps.ts +145 -4
- package/src/blocks/index.ts +26 -0
- package/src/blocks/utils/listItemEnterHandler.ts +42 -0
- package/src/editor/Block.css +54 -18
- package/src/editor/BlockNoteEditor.ts +265 -230
- package/src/editor/BlockNoteExtension.ts +92 -0
- package/src/editor/BlockNoteExtensions.ts +20 -16
- package/src/editor/defaultColors.ts +2 -2
- package/src/exporter/Exporter.ts +1 -1
- package/src/exporter/mapping.ts +1 -1
- package/src/extensions/BackgroundColor/BackgroundColorExtension.ts +3 -20
- package/src/extensions/BackgroundColor/BackgroundColorMark.ts +6 -8
- package/src/extensions/BlockChange/BlockChangePlugin.ts +2 -1
- package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-editor-forked.json +2 -2
- package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-editor.json +2 -2
- package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-forked.html +1 -1
- package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap.html +1 -1
- package/src/extensions/Collaboration/schemaMigration/SchemaMigrationPlugin.ts +52 -0
- package/src/extensions/Collaboration/schemaMigration/migrationRules/index.ts +4 -0
- package/src/extensions/Collaboration/schemaMigration/migrationRules/migrationRule.ts +4 -0
- package/src/extensions/Collaboration/schemaMigration/migrationRules/moveColorAttributes.ts +78 -0
- package/src/extensions/Comments/CommentsPlugin.ts +2 -0
- package/src/extensions/FilePanel/FilePanelPlugin.ts +5 -10
- package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +1 -1
- package/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +4 -3
- package/src/extensions/Placeholder/PlaceholderPlugin.ts +2 -2
- package/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts +1 -23
- package/src/extensions/SideMenu/SideMenuPlugin.ts +0 -2
- package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +0 -5
- package/src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts +6 -2
- package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +24 -17
- package/src/extensions/TableHandles/TableHandlesPlugin.ts +2 -2
- package/src/extensions/TextAlignment/TextAlignmentExtension.ts +5 -11
- package/src/extensions/TextColor/TextColorExtension.ts +3 -17
- package/src/extensions/TextColor/TextColorMark.ts +4 -9
- package/src/extensions/UniqueID/UniqueID.ts +6 -13
- package/src/i18n/locales/ar.ts +6 -12
- package/src/i18n/locales/de.ts +6 -12
- package/src/i18n/locales/en.ts +6 -12
- package/src/i18n/locales/es.ts +6 -12
- package/src/i18n/locales/fr.ts +6 -12
- package/src/i18n/locales/he.ts +6 -12
- package/src/i18n/locales/hr.ts +6 -12
- package/src/i18n/locales/is.ts +6 -12
- package/src/i18n/locales/it.ts +6 -12
- package/src/i18n/locales/ja.ts +6 -12
- package/src/i18n/locales/ko.ts +6 -12
- package/src/i18n/locales/nl.ts +6 -12
- package/src/i18n/locales/no.ts +6 -12
- package/src/i18n/locales/pl.ts +6 -12
- package/src/i18n/locales/pt.ts +6 -12
- package/src/i18n/locales/ru.ts +6 -12
- package/src/i18n/locales/sk.ts +6 -12
- package/src/i18n/locales/uk.ts +6 -12
- package/src/i18n/locales/vi.ts +6 -12
- package/src/i18n/locales/zh-tw.ts +6 -12
- package/src/i18n/locales/zh.ts +6 -12
- package/src/index.ts +2 -29
- package/src/schema/blocks/createSpec.ts +342 -169
- package/src/schema/blocks/internal.ts +77 -138
- package/src/schema/blocks/types.ts +264 -94
- package/src/schema/index.ts +1 -0
- package/src/schema/inlineContent/createSpec.ts +99 -21
- package/src/schema/inlineContent/internal.ts +16 -7
- package/src/schema/inlineContent/types.ts +24 -2
- package/src/schema/propTypes.ts +15 -9
- package/src/schema/schema.ts +209 -0
- package/src/schema/styles/createSpec.ts +79 -31
- package/src/schema/styles/internal.ts +61 -2
- package/src/schema/styles/types.ts +17 -3
- package/src/util/topo-sort.test.ts +125 -0
- package/src/util/topo-sort.ts +160 -0
- package/types/src/api/blockManipulation/commands/splitBlock/splitBlock.d.ts +2 -1
- package/types/src/api/blockManipulation/selections/selection.d.ts +1 -1
- package/types/src/api/blockManipulation/setupTestEnv.d.ts +29 -543
- package/types/src/api/exporters/html/util/serializeBlocksExternalHTML.d.ts +1 -1
- package/types/src/api/exporters/html/util/serializeBlocksInternalHTML.d.ts +1 -1
- package/types/src/api/exporters/markdown/markdownExporter.d.ts +1 -1
- package/types/src/api/parsers/html/parseHTML.d.ts +1 -1
- package/types/src/api/parsers/markdown/parseMarkdown.d.ts +2 -2
- package/types/src/api/pmUtil.d.ts +1 -1
- package/types/src/blocks/Audio/block.d.ts +58 -0
- package/types/src/blocks/BlockNoteSchema.d.ts +18 -0
- package/types/src/blocks/{CodeBlockContent/CodeBlockContent.d.ts → Code/block.d.ts} +25 -26
- package/types/src/blocks/Code/shiki.d.ts +4 -0
- package/types/src/blocks/File/block.d.ts +37 -0
- package/types/src/blocks/File/helpers/render/createAddFileButton.d.ts +6 -0
- package/types/src/blocks/File/helpers/render/createFileBlockWrapper.d.ts +25 -0
- package/types/src/blocks/{FileBlockContent → File}/helpers/render/createFileNameWithIcon.d.ts +6 -2
- package/types/src/blocks/File/helpers/render/createResizableFileBlockWrapper.d.ts +31 -0
- package/types/src/blocks/Heading/block.d.ts +71 -0
- package/types/src/blocks/Image/block.d.ts +102 -0
- package/types/src/blocks/ListItem/BulletListItem/block.d.ts +25 -0
- package/types/src/blocks/ListItem/CheckListItem/block.d.ts +33 -0
- package/types/src/blocks/ListItem/NumberedListItem/IndexingPlugin.d.ts +8 -0
- package/types/src/blocks/ListItem/NumberedListItem/block.d.ts +33 -0
- package/types/src/blocks/ListItem/ToggleListItem/block.d.ts +25 -0
- package/types/src/blocks/PageBreak/block.d.ts +11 -0
- package/types/src/blocks/{PageBreakBlockContent → PageBreak}/getPageBreakSlashMenuItems.d.ts +4 -2
- package/types/src/blocks/Paragraph/block.d.ts +25 -0
- package/types/src/blocks/Quote/block.d.ts +17 -0
- package/types/src/blocks/Table/block.d.ts +21 -0
- package/types/src/blocks/Video/block.d.ts +67 -0
- package/types/src/blocks/defaultBlockHelpers.d.ts +1 -1
- package/types/src/blocks/defaultBlockTypeGuards.d.ts +15 -36
- package/types/src/blocks/defaultBlocks.d.ts +221 -1060
- package/types/src/blocks/defaultProps.d.ts +17 -1
- package/types/src/blocks/index.d.ts +24 -0
- package/types/src/blocks/utils/listItemEnterHandler.d.ts +2 -0
- package/types/src/editor/BlockNoteEditor.d.ts +39 -75
- package/types/src/editor/BlockNoteExtension.d.ts +67 -0
- package/types/src/editor/BlockNoteExtensions.d.ts +2 -0
- package/types/src/editor/defaultColors.d.ts +8 -76
- package/types/src/exporter/Exporter.d.ts +1 -1
- package/types/src/exporter/mapping.d.ts +1 -1
- package/types/src/extensions/BackgroundColor/BackgroundColorMark.d.ts +4 -1
- package/types/src/extensions/Collaboration/schemaMigration/SchemaMigrationPlugin.d.ts +7 -0
- package/types/src/extensions/Collaboration/schemaMigration/migrationRules/index.d.ts +3 -0
- package/types/src/extensions/Collaboration/schemaMigration/migrationRules/migrationRule.d.ts +3 -0
- package/types/src/extensions/Collaboration/schemaMigration/migrationRules/moveColorAttributes.d.ts +2 -0
- package/types/src/extensions/Comments/CommentsPlugin.d.ts +3 -1
- package/types/src/extensions/FilePanel/FilePanelPlugin.d.ts +4 -4
- package/types/src/extensions/TextColor/TextColorMark.d.ts +4 -1
- package/types/src/i18n/locales/en.d.ts +1 -12
- package/types/src/i18n/locales/sk.d.ts +1 -12
- package/types/src/index.d.ts +2 -26
- package/types/src/schema/blocks/createSpec.d.ts +16 -36
- package/types/src/schema/blocks/internal.d.ts +11 -33
- package/types/src/schema/blocks/types.d.ts +181 -57
- package/types/src/schema/index.d.ts +1 -0
- package/types/src/schema/inlineContent/createSpec.d.ts +36 -2
- package/types/src/schema/inlineContent/internal.d.ts +7 -15
- package/types/src/schema/inlineContent/types.d.ts +15 -1
- package/types/src/schema/propTypes.d.ts +4 -4
- package/types/src/schema/schema.d.ts +40 -0
- package/types/src/schema/styles/createSpec.d.ts +6 -4
- package/types/src/schema/styles/internal.d.ts +6 -3
- package/types/src/schema/styles/types.d.ts +11 -2
- package/types/src/util/topo-sort.d.ts +18 -0
- package/types/src/util/topo-sort.test.d.ts +1 -0
- package/dist/en-CvDoFvhc.js.map +0 -1
- package/dist/en-ub2yVBX0.cjs +0 -2
- package/dist/en-ub2yVBX0.cjs.map +0 -1
- package/src/blocks/AudioBlockContent/AudioBlockContent.ts +0 -145
- package/src/blocks/CodeBlockContent/CodeBlockContent.ts +0 -445
- package/src/blocks/FileBlockContent/FileBlockContent.ts +0 -100
- package/src/blocks/HeadingBlockContent/HeadingBlockContent.ts +0 -159
- package/src/blocks/ImageBlockContent/ImageBlockContent.ts +0 -160
- package/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts +0 -134
- package/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts +0 -299
- package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts +0 -86
- package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts +0 -172
- package/src/blocks/ListItemBlockContent/ToggleListItemBlockContent/ToggleListItemBlockContent.ts +0 -104
- package/src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts +0 -49
- package/src/blocks/PageBreakBlockContent/schema.ts +0 -40
- package/src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts +0 -78
- package/src/blocks/QuoteBlockContent/QuoteBlockContent.ts +0 -121
- package/src/blocks/VideoBlockContent/VideoBlockContent.ts +0 -159
- package/src/editor/BlockNoteSchema.ts +0 -107
- package/src/editor/BlockNoteTipTapEditor.ts +0 -335
- package/src/util/esmDependencies.ts +0 -51
- package/types/src/blocks/AudioBlockContent/AudioBlockContent.d.ts +0 -99
- package/types/src/blocks/FileBlockContent/FileBlockContent.d.ts +0 -90
- package/types/src/blocks/FileBlockContent/helpers/render/createAddFileButton.d.ts +0 -6
- package/types/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.d.ts +0 -9
- package/types/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.d.ts +0 -9
- package/types/src/blocks/HeadingBlockContent/HeadingBlockContent.d.ts +0 -67
- package/types/src/blocks/ImageBlockContent/ImageBlockContent.d.ts +0 -131
- package/types/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.d.ts +0 -46
- package/types/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.d.ts +0 -55
- package/types/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.d.ts +0 -2
- package/types/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.d.ts +0 -58
- package/types/src/blocks/ListItemBlockContent/ToggleListItemBlockContent/ToggleListItemBlockContent.d.ts +0 -46
- package/types/src/blocks/PageBreakBlockContent/PageBreakBlockContent.d.ts +0 -31
- package/types/src/blocks/PageBreakBlockContent/schema.d.ts +0 -86
- package/types/src/blocks/ParagraphBlockContent/ParagraphBlockContent.d.ts +0 -52
- package/types/src/blocks/QuoteBlockContent/QuoteBlockContent.d.ts +0 -52
- package/types/src/blocks/TableBlockContent/TableBlockContent.d.ts +0 -39
- package/types/src/blocks/VideoBlockContent/VideoBlockContent.d.ts +0 -131
- package/types/src/editor/BlockNoteSchema.d.ts +0 -34
- package/types/src/editor/BlockNoteTipTapEditor.d.ts +0 -43
- package/types/src/util/esmDependencies.d.ts +0 -24
- /package/src/blocks/{AudioBlockContent → Audio}/parseAudioElement.ts +0 -0
- /package/src/blocks/{FileBlockContent → File}/helpers/parse/parseEmbedElement.ts +0 -0
- /package/src/blocks/{FileBlockContent → File}/helpers/parse/parseFigureElement.ts +0 -0
- /package/src/blocks/{FileBlockContent → File}/helpers/toExternalHTML/createFigureWithCaption.ts +0 -0
- /package/src/blocks/{FileBlockContent → File}/helpers/toExternalHTML/createLinkWithCaption.ts +0 -0
- /package/src/blocks/{FileBlockContent → File/helpers}/uploadToTmpFilesDotOrg_DEV_ONLY.ts +0 -0
- /package/src/blocks/{ImageBlockContent → Image}/parseImageElement.ts +0 -0
- /package/src/blocks/{ListItemBlockContent → ListItem}/ListItemKeyboardShortcuts.ts +0 -0
- /package/src/blocks/{ListItemBlockContent → ListItem}/getListItemContent.ts +0 -0
- /package/src/blocks/{TableBlockContent → Table}/TableExtension.ts +0 -0
- /package/src/blocks/{VideoBlockContent → Video}/parseVideoElement.ts +0 -0
- /package/types/src/blocks/{AudioBlockContent → Audio}/parseAudioElement.d.ts +0 -0
- /package/types/src/blocks/{FileBlockContent → File}/helpers/parse/parseEmbedElement.d.ts +0 -0
- /package/types/src/blocks/{FileBlockContent → File}/helpers/parse/parseFigureElement.d.ts +0 -0
- /package/types/src/blocks/{FileBlockContent → File}/helpers/toExternalHTML/createFigureWithCaption.d.ts +0 -0
- /package/types/src/blocks/{FileBlockContent → File}/helpers/toExternalHTML/createLinkWithCaption.d.ts +0 -0
- /package/types/src/blocks/{FileBlockContent → File/helpers}/uploadToTmpFilesDotOrg_DEV_ONLY.d.ts +0 -0
- /package/types/src/blocks/{ImageBlockContent → Image}/parseImageElement.d.ts +0 -0
- /package/types/src/blocks/{ListItemBlockContent → ListItem}/ListItemKeyboardShortcuts.d.ts +0 -0
- /package/types/src/blocks/{ListItemBlockContent → ListItem}/getListItemContent.d.ts +0 -0
- /package/types/src/blocks/{TableBlockContent → Table}/TableExtension.d.ts +0 -0
- /package/types/src/blocks/{VideoBlockContent → Video}/parseVideoElement.d.ts +0 -0
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
InlineContentSchema,
|
|
18
18
|
StyleSchema,
|
|
19
19
|
} from "../../schema/index.js";
|
|
20
|
-
import { initializeESMDependencies } from "../../util/esmDependencies.js";
|
|
21
20
|
import { getDraggableBlockFromElement } from "../getDraggableBlockFromElement.js";
|
|
22
21
|
import { dragStart, unsetDragImage } from "./dragging.js";
|
|
23
22
|
|
|
@@ -171,7 +170,6 @@ export class SideMenuView<
|
|
|
171
170
|
this.onDragEnd as EventListener,
|
|
172
171
|
true,
|
|
173
172
|
);
|
|
174
|
-
initializeESMDependencies();
|
|
175
173
|
|
|
176
174
|
// Shows or updates menu position whenever the cursor moves, if the menu isn't frozen.
|
|
177
175
|
this.pmView.root.addEventListener(
|
|
@@ -204,11 +204,6 @@ export class SuggestionMenuProseMirrorPlugin<
|
|
|
204
204
|
_oldState,
|
|
205
205
|
newState,
|
|
206
206
|
): SuggestionPluginState => {
|
|
207
|
-
// TODO: More clearly define which transactions should be ignored.
|
|
208
|
-
if (transaction.getMeta("orderedListIndexing") !== undefined) {
|
|
209
|
-
return prev;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
207
|
// Ignore transactions in code blocks.
|
|
213
208
|
if (transaction.selection.$from.parent.type.spec.code) {
|
|
214
209
|
return prev;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Emoji, EmojiMartData } from "@emoji-mart/data";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { defaultInlineContentSchema } from "../../blocks/defaultBlocks.js";
|
|
4
4
|
import { BlockNoteEditor } from "../../editor/BlockNoteEditor.js";
|
|
5
5
|
import {
|
|
6
6
|
BlockSchema,
|
|
@@ -54,7 +54,11 @@ export async function getDefaultEmojiPickerItems<
|
|
|
54
54
|
editor: BlockNoteEditor<BSchema, I, S>,
|
|
55
55
|
query: string,
|
|
56
56
|
): Promise<DefaultGridSuggestionItem[]> {
|
|
57
|
-
if (
|
|
57
|
+
if (
|
|
58
|
+
!("text" in editor.schema.inlineContentSchema) ||
|
|
59
|
+
editor.schema.inlineContentSchema["text"] !==
|
|
60
|
+
defaultInlineContentSchema["text"]
|
|
61
|
+
) {
|
|
58
62
|
return [];
|
|
59
63
|
}
|
|
60
64
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Block, PartialBlock } from "../../blocks/defaultBlocks.js";
|
|
2
2
|
import type { BlockNoteEditor } from "../../editor/BlockNoteEditor.js";
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { editorHasBlockWithType } from "../../blocks/defaultBlockTypeGuards.js";
|
|
5
5
|
import {
|
|
6
6
|
BlockSchema,
|
|
7
7
|
InlineContentSchema,
|
|
@@ -87,7 +87,7 @@ export function getDefaultSlashMenuItems<
|
|
|
87
87
|
>(editor: BlockNoteEditor<BSchema, I, S>) {
|
|
88
88
|
const items: DefaultSuggestionItem[] = [];
|
|
89
89
|
|
|
90
|
-
if (
|
|
90
|
+
if (editorHasBlockWithType(editor, "heading", { level: "number" })) {
|
|
91
91
|
items.push(
|
|
92
92
|
{
|
|
93
93
|
onItemClick: () => {
|
|
@@ -125,7 +125,7 @@ export function getDefaultSlashMenuItems<
|
|
|
125
125
|
);
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
if (
|
|
128
|
+
if (editorHasBlockWithType(editor, "quote")) {
|
|
129
129
|
items.push({
|
|
130
130
|
onItemClick: () => {
|
|
131
131
|
insertOrUpdateBlock(editor, {
|
|
@@ -137,7 +137,7 @@ export function getDefaultSlashMenuItems<
|
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
if (
|
|
140
|
+
if (editorHasBlockWithType(editor, "toggleListItem")) {
|
|
141
141
|
items.push({
|
|
142
142
|
onItemClick: () => {
|
|
143
143
|
insertOrUpdateBlock(editor, {
|
|
@@ -150,7 +150,7 @@ export function getDefaultSlashMenuItems<
|
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
if (
|
|
153
|
+
if (editorHasBlockWithType(editor, "numberedListItem")) {
|
|
154
154
|
items.push({
|
|
155
155
|
onItemClick: () => {
|
|
156
156
|
insertOrUpdateBlock(editor, {
|
|
@@ -163,7 +163,7 @@ export function getDefaultSlashMenuItems<
|
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
if (
|
|
166
|
+
if (editorHasBlockWithType(editor, "bulletListItem")) {
|
|
167
167
|
items.push({
|
|
168
168
|
onItemClick: () => {
|
|
169
169
|
insertOrUpdateBlock(editor, {
|
|
@@ -176,7 +176,7 @@ export function getDefaultSlashMenuItems<
|
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
if (
|
|
179
|
+
if (editorHasBlockWithType(editor, "checkListItem")) {
|
|
180
180
|
items.push({
|
|
181
181
|
onItemClick: () => {
|
|
182
182
|
insertOrUpdateBlock(editor, {
|
|
@@ -189,7 +189,7 @@ export function getDefaultSlashMenuItems<
|
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
if (
|
|
192
|
+
if (editorHasBlockWithType(editor, "paragraph")) {
|
|
193
193
|
items.push({
|
|
194
194
|
onItemClick: () => {
|
|
195
195
|
insertOrUpdateBlock(editor, {
|
|
@@ -202,7 +202,7 @@ export function getDefaultSlashMenuItems<
|
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
if (
|
|
205
|
+
if (editorHasBlockWithType(editor, "codeBlock")) {
|
|
206
206
|
items.push({
|
|
207
207
|
onItemClick: () => {
|
|
208
208
|
insertOrUpdateBlock(editor, {
|
|
@@ -215,7 +215,7 @@ export function getDefaultSlashMenuItems<
|
|
|
215
215
|
});
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
if (
|
|
218
|
+
if (editorHasBlockWithType(editor, "table")) {
|
|
219
219
|
items.push({
|
|
220
220
|
onItemClick: () => {
|
|
221
221
|
insertOrUpdateBlock(editor, {
|
|
@@ -230,7 +230,7 @@ export function getDefaultSlashMenuItems<
|
|
|
230
230
|
cells: ["", "", ""],
|
|
231
231
|
},
|
|
232
232
|
],
|
|
233
|
-
},
|
|
233
|
+
} as any,
|
|
234
234
|
});
|
|
235
235
|
},
|
|
236
236
|
badge: undefined,
|
|
@@ -239,7 +239,7 @@ export function getDefaultSlashMenuItems<
|
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
if (
|
|
242
|
+
if (editorHasBlockWithType(editor, "image", { url: "string" })) {
|
|
243
243
|
items.push({
|
|
244
244
|
onItemClick: () => {
|
|
245
245
|
const insertedBlock = insertOrUpdateBlock(editor, {
|
|
@@ -258,7 +258,7 @@ export function getDefaultSlashMenuItems<
|
|
|
258
258
|
});
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
-
if (
|
|
261
|
+
if (editorHasBlockWithType(editor, "video", { url: "string" })) {
|
|
262
262
|
items.push({
|
|
263
263
|
onItemClick: () => {
|
|
264
264
|
const insertedBlock = insertOrUpdateBlock(editor, {
|
|
@@ -277,7 +277,7 @@ export function getDefaultSlashMenuItems<
|
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
if (
|
|
280
|
+
if (editorHasBlockWithType(editor, "audio", { url: "string" })) {
|
|
281
281
|
items.push({
|
|
282
282
|
onItemClick: () => {
|
|
283
283
|
const insertedBlock = insertOrUpdateBlock(editor, {
|
|
@@ -296,7 +296,7 @@ export function getDefaultSlashMenuItems<
|
|
|
296
296
|
});
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
if (
|
|
299
|
+
if (editorHasBlockWithType(editor, "file", { url: "string" })) {
|
|
300
300
|
items.push({
|
|
301
301
|
onItemClick: () => {
|
|
302
302
|
const insertedBlock = insertOrUpdateBlock(editor, {
|
|
@@ -315,7 +315,12 @@ export function getDefaultSlashMenuItems<
|
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
if (
|
|
318
|
+
if (
|
|
319
|
+
editorHasBlockWithType(editor, "heading", {
|
|
320
|
+
level: "number",
|
|
321
|
+
isToggleable: "boolean",
|
|
322
|
+
})
|
|
323
|
+
) {
|
|
319
324
|
items.push(
|
|
320
325
|
{
|
|
321
326
|
onItemClick: () => {
|
|
@@ -349,8 +354,10 @@ export function getDefaultSlashMenuItems<
|
|
|
349
354
|
...editor.dictionary.slash_menu.toggle_heading_3,
|
|
350
355
|
},
|
|
351
356
|
);
|
|
357
|
+
}
|
|
352
358
|
|
|
353
|
-
|
|
359
|
+
if (editorHasBlockWithType(editor, "heading", { level: "number" })) {
|
|
360
|
+
(editor.schema.blockSchema.heading.propSchema.level.values || [])
|
|
354
361
|
.filter((level): level is 4 | 5 | 6 => level > 3)
|
|
355
362
|
.forEach((level) => {
|
|
356
363
|
items.push({
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
import { nodeToBlock } from "../../api/nodeConversions/nodeToBlock.js";
|
|
28
28
|
import { getNodeById } from "../../api/nodeUtil.js";
|
|
29
29
|
import {
|
|
30
|
-
|
|
30
|
+
editorHasBlockWithType,
|
|
31
31
|
isTableCellSelection,
|
|
32
32
|
} from "../../blocks/defaultBlockTypeGuards.js";
|
|
33
33
|
import { DefaultBlockSchema } from "../../blocks/defaultBlocks.js";
|
|
@@ -278,7 +278,7 @@ export class TableHandlesView<
|
|
|
278
278
|
this.editor.schema.styleSchema,
|
|
279
279
|
);
|
|
280
280
|
|
|
281
|
-
if (
|
|
281
|
+
if (editorHasBlockWithType(this.editor, "table")) {
|
|
282
282
|
this.tablePos = pmNodeInfo.posBeforeNode + 1;
|
|
283
283
|
tableBlock = block;
|
|
284
284
|
}
|
|
@@ -6,17 +6,11 @@ export const TextAlignmentExtension = Extension.create({
|
|
|
6
6
|
addGlobalAttributes() {
|
|
7
7
|
return [
|
|
8
8
|
{
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"bulletListItem",
|
|
15
|
-
"numberedListItem",
|
|
16
|
-
"checkListItem",
|
|
17
|
-
"tableCell",
|
|
18
|
-
"tableHeader",
|
|
19
|
-
],
|
|
9
|
+
// Generally text alignment is handled through props using the custom
|
|
10
|
+
// blocks API. Tables are the only blocks that are created as TipTap
|
|
11
|
+
// nodes and ported to blocks, so we need to add text alignment in a
|
|
12
|
+
// separate extension.
|
|
13
|
+
types: ["tableCell", "tableHeader"],
|
|
20
14
|
attributes: {
|
|
21
15
|
textAlignment: {
|
|
22
16
|
default: "left",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Extension } from "@tiptap/core";
|
|
2
|
-
import {
|
|
2
|
+
import { getTextColorAttribute } from "../../blocks/defaultProps.js";
|
|
3
3
|
|
|
4
4
|
export const TextColorExtension = Extension.create({
|
|
5
5
|
name: "blockTextColor",
|
|
@@ -7,23 +7,9 @@ export const TextColorExtension = Extension.create({
|
|
|
7
7
|
addGlobalAttributes() {
|
|
8
8
|
return [
|
|
9
9
|
{
|
|
10
|
-
types: ["
|
|
10
|
+
types: ["table", "tableCell", "tableHeader"],
|
|
11
11
|
attributes: {
|
|
12
|
-
textColor:
|
|
13
|
-
default: defaultProps.textColor.default,
|
|
14
|
-
parseHTML: (element) =>
|
|
15
|
-
element.hasAttribute("data-text-color")
|
|
16
|
-
? element.getAttribute("data-text-color")
|
|
17
|
-
: defaultProps.textColor.default,
|
|
18
|
-
renderHTML: (attributes) => {
|
|
19
|
-
if (attributes.textColor === defaultProps.textColor.default) {
|
|
20
|
-
return {};
|
|
21
|
-
}
|
|
22
|
-
return {
|
|
23
|
-
"data-text-color": attributes.textColor,
|
|
24
|
-
};
|
|
25
|
-
},
|
|
26
|
-
},
|
|
12
|
+
textColor: getTextColorAttribute(),
|
|
27
13
|
},
|
|
28
14
|
},
|
|
29
15
|
];
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import { Mark } from "@tiptap/core";
|
|
2
2
|
import { createStyleSpecFromTipTapMark } from "../../schema/index.js";
|
|
3
|
+
import { getTextColorAttribute } from "../../blocks/defaultProps.js";
|
|
3
4
|
|
|
4
5
|
const TextColorMark = Mark.create({
|
|
5
6
|
name: "textColor",
|
|
6
7
|
|
|
7
8
|
addAttributes() {
|
|
8
9
|
return {
|
|
9
|
-
stringValue:
|
|
10
|
-
default: undefined,
|
|
11
|
-
parseHTML: (element) => element.getAttribute("data-text-color"),
|
|
12
|
-
renderHTML: (attributes) => ({
|
|
13
|
-
"data-text-color": attributes.stringValue,
|
|
14
|
-
}),
|
|
15
|
-
},
|
|
10
|
+
stringValue: getTextColorAttribute("stringValue"),
|
|
16
11
|
};
|
|
17
12
|
},
|
|
18
13
|
|
|
@@ -25,8 +20,8 @@ const TextColorMark = Mark.create({
|
|
|
25
20
|
return false;
|
|
26
21
|
}
|
|
27
22
|
|
|
28
|
-
if (element.hasAttribute("data-text-color")) {
|
|
29
|
-
return {
|
|
23
|
+
if (element.hasAttribute("data-text-color") || element.style.color) {
|
|
24
|
+
return {};
|
|
30
25
|
}
|
|
31
26
|
|
|
32
27
|
return false;
|
|
@@ -134,19 +134,12 @@ const UniqueID = Extension.create({
|
|
|
134
134
|
new Plugin({
|
|
135
135
|
key: new PluginKey("uniqueID"),
|
|
136
136
|
appendTransaction: (transactions, oldState, newState) => {
|
|
137
|
-
// console.log("appendTransaction");
|
|
138
137
|
const docChanges =
|
|
139
138
|
transactions.some((transaction) => transaction.docChanged) &&
|
|
140
139
|
!oldState.doc.eq(newState.doc);
|
|
141
140
|
const filterTransactions =
|
|
142
141
|
this.options.filterTransaction &&
|
|
143
|
-
transactions.some((tr) =>
|
|
144
|
-
let _a, _b;
|
|
145
|
-
return !((_b = (_a = this.options).filterTransaction) === null ||
|
|
146
|
-
_b === void 0
|
|
147
|
-
? void 0
|
|
148
|
-
: _b.call(_a, tr));
|
|
149
|
-
});
|
|
142
|
+
transactions.some((tr) => !this.options.filterTransaction?.(tr));
|
|
150
143
|
if (!docChanges || filterTransactions) {
|
|
151
144
|
return;
|
|
152
145
|
}
|
|
@@ -172,16 +165,14 @@ const UniqueID = Extension.create({
|
|
|
172
165
|
.map(({ node }) => node.attrs[attributeName])
|
|
173
166
|
.filter((id) => id !== null);
|
|
174
167
|
const duplicatedNewIds = findDuplicates(newIds);
|
|
168
|
+
|
|
175
169
|
newNodes.forEach(({ node, pos }) => {
|
|
176
|
-
let _a;
|
|
177
170
|
// instead of checking `node.attrs[attributeName]` directly
|
|
178
171
|
// we look at the current state of the node within `tr.doc`.
|
|
179
172
|
// this helps to prevent adding new ids to the same node
|
|
180
173
|
// if the node changed multiple times within one transaction
|
|
181
|
-
const id =
|
|
182
|
-
|
|
183
|
-
? void 0
|
|
184
|
-
: _a.attrs[attributeName];
|
|
174
|
+
const id = tr.doc.nodeAt(pos)?.attrs[attributeName];
|
|
175
|
+
|
|
185
176
|
if (id === null) {
|
|
186
177
|
// edge case, when using collaboration, yjs will set the id to null in `_forceRerender`
|
|
187
178
|
// when loading the editor
|
|
@@ -230,6 +221,8 @@ const UniqueID = Extension.create({
|
|
|
230
221
|
if (!tr.steps.length) {
|
|
231
222
|
return;
|
|
232
223
|
}
|
|
224
|
+
// mark the transaction as having been processed by the uniqueID plugin
|
|
225
|
+
tr.setMeta("uniqueID", true);
|
|
233
226
|
return tr;
|
|
234
227
|
},
|
|
235
228
|
// we register a global drag handler to track the current drag source element
|
package/src/i18n/locales/ar.ts
CHANGED
|
@@ -169,18 +169,12 @@ export const ar: Dictionary = {
|
|
|
169
169
|
comment_reply: "أضف تعليقًا...",
|
|
170
170
|
},
|
|
171
171
|
file_blocks: {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
},
|
|
178
|
-
audio: {
|
|
179
|
-
add_button_text: "إضافة صوت",
|
|
180
|
-
},
|
|
181
|
-
file: {
|
|
182
|
-
add_button_text: "إضافة ملف",
|
|
183
|
-
},
|
|
172
|
+
add_button_text: {
|
|
173
|
+
image: "إضافة صورة",
|
|
174
|
+
video: "إضافة فيديو",
|
|
175
|
+
audio: "إضافة صوت",
|
|
176
|
+
file: "إضافة ملف",
|
|
177
|
+
} as Record<string, string>,
|
|
184
178
|
},
|
|
185
179
|
toggle_blocks: {
|
|
186
180
|
add_block_button: "تبديل فارغ. انقر لإضافة كتلة.",
|
package/src/i18n/locales/de.ts
CHANGED
|
@@ -204,18 +204,12 @@ export const de: Dictionary = {
|
|
|
204
204
|
comment_reply: "Kommentar hinzufügen …",
|
|
205
205
|
},
|
|
206
206
|
file_blocks: {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
},
|
|
213
|
-
audio: {
|
|
214
|
-
add_button_text: "Audio hinzufügen",
|
|
215
|
-
},
|
|
216
|
-
file: {
|
|
217
|
-
add_button_text: "Datei hinzufügen",
|
|
218
|
-
},
|
|
207
|
+
add_button_text: {
|
|
208
|
+
image: "Bild hinzufügen",
|
|
209
|
+
video: "Video hinzufügen",
|
|
210
|
+
audio: "Audio hinzufügen",
|
|
211
|
+
file: "Datei hinzufügen",
|
|
212
|
+
} as Record<string, string>,
|
|
219
213
|
},
|
|
220
214
|
toggle_blocks: {
|
|
221
215
|
add_block_button:
|
package/src/i18n/locales/en.ts
CHANGED
|
@@ -184,18 +184,12 @@ export const en = {
|
|
|
184
184
|
comment_reply: "Add comment...",
|
|
185
185
|
} as Record<string | "default" | "emptyDocument", string | undefined>,
|
|
186
186
|
file_blocks: {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
},
|
|
193
|
-
audio: {
|
|
194
|
-
add_button_text: "Add audio",
|
|
195
|
-
},
|
|
196
|
-
file: {
|
|
197
|
-
add_button_text: "Add file",
|
|
198
|
-
},
|
|
187
|
+
add_button_text: {
|
|
188
|
+
image: "Add image",
|
|
189
|
+
video: "Add video",
|
|
190
|
+
audio: "Add audio",
|
|
191
|
+
file: "Add file",
|
|
192
|
+
} as Record<string, string>,
|
|
199
193
|
},
|
|
200
194
|
toggle_blocks: {
|
|
201
195
|
add_block_button: "Empty toggle. Click to add a block.",
|
package/src/i18n/locales/es.ts
CHANGED
|
@@ -184,18 +184,12 @@ export const es: Dictionary = {
|
|
|
184
184
|
comment_reply: "Agregar comentario...",
|
|
185
185
|
},
|
|
186
186
|
file_blocks: {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
},
|
|
193
|
-
audio: {
|
|
194
|
-
add_button_text: "Agregar audio",
|
|
195
|
-
},
|
|
196
|
-
file: {
|
|
197
|
-
add_button_text: "Agregar archivo",
|
|
198
|
-
},
|
|
187
|
+
add_button_text: {
|
|
188
|
+
image: "Agregar imagen",
|
|
189
|
+
video: "Agregar vídeo",
|
|
190
|
+
audio: "Agregar audio",
|
|
191
|
+
file: "Agregar archivo",
|
|
192
|
+
} as Record<string, string>,
|
|
199
193
|
},
|
|
200
194
|
toggle_blocks: {
|
|
201
195
|
add_block_button: "Toggle vacío. Haz clic para añadir un bloque.",
|
package/src/i18n/locales/fr.ts
CHANGED
|
@@ -230,18 +230,12 @@ export const fr: Dictionary = {
|
|
|
230
230
|
comment_reply: "Ajouter un commentaire...",
|
|
231
231
|
},
|
|
232
232
|
file_blocks: {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
},
|
|
239
|
-
audio: {
|
|
240
|
-
add_button_text: "Ajouter un audio",
|
|
241
|
-
},
|
|
242
|
-
file: {
|
|
243
|
-
add_button_text: "Ajouter un fichier",
|
|
244
|
-
},
|
|
233
|
+
add_button_text: {
|
|
234
|
+
image: "Ajouter une image",
|
|
235
|
+
video: "Ajouter une vidéo",
|
|
236
|
+
audio: "Ajouter un audio",
|
|
237
|
+
file: "Ajouter un fichier",
|
|
238
|
+
} as Record<string, string>,
|
|
245
239
|
},
|
|
246
240
|
toggle_blocks: {
|
|
247
241
|
add_block_button: "Toggle vide. Cliquez pour ajouter un bloc.",
|
package/src/i18n/locales/he.ts
CHANGED
|
@@ -186,18 +186,12 @@ export const he: Dictionary = {
|
|
|
186
186
|
comment_reply: "הוסף תגובה...",
|
|
187
187
|
} as Record<string | "default" | "emptyDocument", string | undefined>,
|
|
188
188
|
file_blocks: {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
},
|
|
195
|
-
audio: {
|
|
196
|
-
add_button_text: "הוסף אודיו",
|
|
197
|
-
},
|
|
198
|
-
file: {
|
|
199
|
-
add_button_text: "הוסף קובץ",
|
|
200
|
-
},
|
|
189
|
+
add_button_text: {
|
|
190
|
+
image: "הוסף תמונה",
|
|
191
|
+
video: "הוסף וידאו",
|
|
192
|
+
audio: "הוסף אודיו",
|
|
193
|
+
file: "הוסף קובץ",
|
|
194
|
+
} as Record<string, string>,
|
|
201
195
|
},
|
|
202
196
|
toggle_blocks: {
|
|
203
197
|
add_block_button: "מתג ריק. לחץ כדי להוסיף בלוק.",
|
package/src/i18n/locales/hr.ts
CHANGED
|
@@ -197,18 +197,12 @@ export const hr: Dictionary = {
|
|
|
197
197
|
comment_reply: "Dodaj komentar...",
|
|
198
198
|
},
|
|
199
199
|
file_blocks: {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
},
|
|
206
|
-
audio: {
|
|
207
|
-
add_button_text: "Dodaj audio",
|
|
208
|
-
},
|
|
209
|
-
file: {
|
|
210
|
-
add_button_text: "Dodaj datoteku",
|
|
211
|
-
},
|
|
200
|
+
add_button_text: {
|
|
201
|
+
image: "Dodaj sliku",
|
|
202
|
+
video: "Dodaj video",
|
|
203
|
+
audio: "Dodaj audio",
|
|
204
|
+
file: "Dodaj datoteku",
|
|
205
|
+
} as Record<string, string>,
|
|
212
206
|
},
|
|
213
207
|
toggle_blocks: {
|
|
214
208
|
add_block_button: "Prazan sklopivi blok. Klikni da dodaš sadržaj.",
|
package/src/i18n/locales/is.ts
CHANGED
|
@@ -198,18 +198,12 @@ export const is: Dictionary = {
|
|
|
198
198
|
comment_reply: "Bæta við athugasemd...",
|
|
199
199
|
},
|
|
200
200
|
file_blocks: {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
},
|
|
207
|
-
audio: {
|
|
208
|
-
add_button_text: "Bæta við hljóði",
|
|
209
|
-
},
|
|
210
|
-
file: {
|
|
211
|
-
add_button_text: "Bæta við skrá",
|
|
212
|
-
},
|
|
201
|
+
add_button_text: {
|
|
202
|
+
image: "Bæta við mynd",
|
|
203
|
+
video: "Bæta við myndbandi",
|
|
204
|
+
audio: "Bæta við hljóði",
|
|
205
|
+
file: "Bæta við skrá",
|
|
206
|
+
} as Record<string, string>,
|
|
213
207
|
},
|
|
214
208
|
toggle_blocks: {
|
|
215
209
|
add_block_button: "Tóm fellilína. Smelltu til að bæta við blokk.",
|
package/src/i18n/locales/it.ts
CHANGED
|
@@ -206,18 +206,12 @@ export const it: Dictionary = {
|
|
|
206
206
|
comment_reply: "Aggiungi commento...",
|
|
207
207
|
},
|
|
208
208
|
file_blocks: {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
},
|
|
215
|
-
audio: {
|
|
216
|
-
add_button_text: "Aggiungi audio",
|
|
217
|
-
},
|
|
218
|
-
file: {
|
|
219
|
-
add_button_text: "Aggiungi file",
|
|
220
|
-
},
|
|
209
|
+
add_button_text: {
|
|
210
|
+
image: "Aggiungi immagine",
|
|
211
|
+
video: "Aggiungi video",
|
|
212
|
+
audio: "Aggiungi audio",
|
|
213
|
+
file: "Aggiungi file",
|
|
214
|
+
} as Record<string, string>,
|
|
221
215
|
},
|
|
222
216
|
toggle_blocks: {
|
|
223
217
|
add_block_button: "Toggle vuoto. Clicca per aggiungere un blocco.",
|
package/src/i18n/locales/ja.ts
CHANGED
|
@@ -224,18 +224,12 @@ export const ja: Dictionary = {
|
|
|
224
224
|
comment_reply: "コメントを追加...",
|
|
225
225
|
},
|
|
226
226
|
file_blocks: {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
},
|
|
233
|
-
audio: {
|
|
234
|
-
add_button_text: "オーディオを追加",
|
|
235
|
-
},
|
|
236
|
-
file: {
|
|
237
|
-
add_button_text: "ファイルを追加",
|
|
238
|
-
},
|
|
227
|
+
add_button_text: {
|
|
228
|
+
image: "画像を追加",
|
|
229
|
+
video: "ビデオを追加",
|
|
230
|
+
audio: "オーディオを追加",
|
|
231
|
+
file: "ファイルを追加",
|
|
232
|
+
} as Record<string, string>,
|
|
239
233
|
},
|
|
240
234
|
toggle_blocks: {
|
|
241
235
|
add_block_button: "空のトグルです。クリックしてブロックを追加。",
|
package/src/i18n/locales/ko.ts
CHANGED
|
@@ -197,18 +197,12 @@ export const ko: Dictionary = {
|
|
|
197
197
|
comment_reply: "댓글 추가...",
|
|
198
198
|
},
|
|
199
199
|
file_blocks: {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
},
|
|
206
|
-
audio: {
|
|
207
|
-
add_button_text: "오디오 추가",
|
|
208
|
-
},
|
|
209
|
-
file: {
|
|
210
|
-
add_button_text: "파일 추가",
|
|
211
|
-
},
|
|
200
|
+
add_button_text: {
|
|
201
|
+
image: "이미지 추가",
|
|
202
|
+
video: "비디오 추가",
|
|
203
|
+
audio: "오디오 추가",
|
|
204
|
+
file: "파일 추가",
|
|
205
|
+
} as Record<string, string>,
|
|
212
206
|
},
|
|
213
207
|
toggle_blocks: {
|
|
214
208
|
add_block_button: "비어 있는 토글입니다. 클릭하여 블록을 추가하세요.",
|