alinea 2.0.0-preview.0 → 2.0.0-preview.2
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/.init/content/pages/welcome.json +1 -1
- package/dist/LICENSES.md +134 -80
- package/dist/adapter/next/DevRemote.d.ts +3 -0
- package/dist/adapter/next/DevRemote.js +37 -0
- package/dist/adapter/next/ForwardCredentials.d.ts +1 -0
- package/dist/adapter/next/ForwardCredentials.js +17 -0
- package/dist/adapter/next/cms.js +86 -38
- package/dist/adapter/next/context.d.ts +1 -1
- package/dist/adapter/next/context.js +11 -3
- package/dist/adapter/next/handler.d.ts +2 -0
- package/dist/adapter/next/handler.js +23 -16
- package/dist/adapter/next/with-alinea.js +18 -16
- package/dist/backend/Handler.d.ts +14 -13
- package/dist/backend/Handler.js +70 -36
- package/dist/backend/resolver/ParsePreview.d.ts +8 -4
- package/dist/backend/resolver/ParsePreview.js +40 -43
- package/dist/backend/router/Router.d.ts +1 -0
- package/dist/backend/router/Router.js +21 -15
- package/dist/bundled.d.ts +369 -99
- package/dist/chunks/chunk-6UT4N4CO.js +919 -0
- package/dist/chunks/{chunk-LUBOGJCG.js → chunk-6V4TAD2N.js} +1 -1
- package/dist/chunks/{chunk-TL7ZW6BX.js → chunk-A3XXZBOQ.js} +2535 -2999
- package/dist/chunks/chunk-AC5ATYI3.js +1434 -0
- package/dist/chunks/{chunk-7ORQ7BYK.js → chunk-KMLLLZ6X.js} +202 -269
- package/dist/chunks/{chunk-IWN3T3FL.js → chunk-O7XWTMCB.js} +1 -1
- package/dist/chunks/{chunk-53DZYORR.js → chunk-PAYSVIYI.js} +76 -176
- package/dist/chunks/{chunk-YK3OSMDM.js → chunk-S4AU6SRS.js} +188 -158
- package/dist/chunks/{chunk-EQ3TDHYD.js → chunk-UVOEM4AH.js} +6 -3
- package/dist/chunks/{chunk-I7X64JTZ.js → chunk-VXZM6V4P.js} +4 -4
- package/dist/cli/Generate.js +3 -13
- package/dist/cli/Serve.js +7 -3
- package/dist/cli/bin.js +8 -5
- package/dist/cli/generate/CompileConfig.js +3 -2
- package/dist/cli/generate/CopyStaticFiles.js +2 -3
- package/dist/cli/generate/DevDB.d.ts +1 -1
- package/dist/cli/generate/DevDB.js +3 -5
- package/dist/cli/serve/CreateLocalServer.d.ts +1 -1
- package/dist/cli/serve/CreateLocalServer.js +3 -2
- package/dist/cli/serve/DevServer.d.ts +3 -2
- package/dist/cli/serve/DevServer.js +60 -3
- package/dist/cli/serve/ServeContext.d.ts +1 -0
- package/dist/cli/serve/StartServer.d.ts +1 -0
- package/dist/cli/serve/StartServer.js +6 -1
- package/dist/cli/util/EnsureLibs.js +2 -2
- package/dist/cli/util/EnsureNode.js +2 -2
- package/dist/cloud/CloudRemote.d.ts +2 -1
- package/dist/cloud/CloudRemote.js +3 -2
- package/dist/components/Breadcrumbs.js +8 -8
- package/dist/components/Button.js +6 -6
- package/dist/components/Calendar.js +11 -11
- package/dist/components/Checkbox.js +7 -7
- package/dist/components/CheckboxGroup.js +6 -6
- package/dist/components/ColorSwatch.js +6 -6
- package/dist/components/ColorSwatchPicker.js +6 -6
- package/dist/components/ComboBox.js +17 -17
- package/dist/components/DateField.js +9 -9
- package/dist/components/DatePicker.js +10 -10
- package/dist/components/DateRangePicker.js +14 -14
- package/dist/components/Dialog.js +6 -6
- package/dist/components/Disclosure.js +13 -13
- package/dist/components/DropZone.js +6 -6
- package/dist/components/Label.js +16 -16
- package/dist/components/Link.js +6 -6
- package/dist/components/List.js +34 -34
- package/dist/components/Menu.js +10 -10
- package/dist/components/Modal.js +8 -8
- package/dist/components/MultipleSelect.js +33 -33
- package/dist/components/NumberField.d.ts +2 -1
- package/dist/components/NumberField.js +21 -11
- package/dist/components/Popover.js +6 -6
- package/dist/components/ProgressCircle.js +10 -10
- package/dist/components/RadioGroup.js +6 -6
- package/dist/components/SearchField.js +11 -11
- package/dist/components/Select.js +13 -13
- package/dist/components/Surface.js +3 -3
- package/dist/components/Switch.js +6 -6
- package/dist/components/Table.js +13 -13
- package/dist/components/Tabs.js +8 -8
- package/dist/components/TagGroup.js +7 -7
- package/dist/components/TextField.js +10 -10
- package/dist/components/TimeField.js +6 -6
- package/dist/components/Toggle.js +6 -6
- package/dist/components/Toolbar.js +7 -7
- package/dist/components/Tooltip.js +10 -10
- package/dist/components/Tree.js +9 -9
- package/dist/core/BlobTransport.d.ts +5 -0
- package/dist/core/BlobTransport.js +79 -0
- package/dist/core/Client.d.ts +2 -1
- package/dist/core/Client.js +17 -12
- package/dist/core/Config.d.ts +4 -0
- package/dist/core/Config.js +6 -0
- package/dist/core/Connection.d.ts +4 -3
- package/dist/core/Connection.js +7 -0
- package/dist/core/Graph.d.ts +3 -4
- package/dist/core/ListRow.d.ts +2 -0
- package/dist/core/OrderBy.d.ts +7 -3
- package/dist/core/TextDoc.d.ts +11 -0
- package/dist/core/Trace.d.ts +8 -0
- package/dist/core/Trace.js +32 -0
- package/dist/core/Type.d.ts +7 -1
- package/dist/core/db/CommitRequest.d.ts +0 -3
- package/dist/core/db/CommitRequest.js +0 -9
- package/dist/core/db/EntryDB.js +1 -1
- package/dist/core/db/EntryIndex.d.ts +12 -2
- package/dist/core/db/EntryIndex.js +131 -22
- package/dist/core/db/EntryResolver.js +104 -29
- package/dist/core/db/EntryTransaction.d.ts +1 -2
- package/dist/core/db/EntryTransaction.js +29 -22
- package/dist/core/db/LocalDB.d.ts +5 -5
- package/dist/core/db/LocalDB.js +27 -12
- package/dist/core/field/RichTextField.d.ts +30 -3
- package/dist/core/field/RichTextField.js +124 -56
- package/dist/core/media/MediaAltField.d.ts +1 -0
- package/dist/core/media/MediaAltField.js +9 -1
- package/dist/core/media/MediaLocation.d.ts +5 -2
- package/dist/core/media/MediaLocation.js +6 -7
- package/dist/core/media/MediaTypes.js +11 -0
- package/dist/core/source/CombinedSource.d.ts +2 -2
- package/dist/core/source/CombinedSource.js +6 -3
- package/dist/core/source/FSSource.d.ts +4 -3
- package/dist/core/source/FSSource.js +59 -27
- package/dist/core/source/GithubSource.d.ts +2 -2
- package/dist/core/source/GithubSource.js +21 -9
- package/dist/core/source/IndexedDBSource.d.ts +2 -2
- package/dist/core/source/IndexedDBSource.js +3 -1
- package/dist/core/source/MemorySource.d.ts +2 -2
- package/dist/core/source/MemorySource.js +3 -1
- package/dist/core/source/OverlaySource.d.ts +12 -0
- package/dist/core/source/OverlaySource.js +50 -0
- package/dist/core/source/Source.d.ts +5 -2
- package/dist/core/source/Source.js +3 -3
- package/dist/core/util/Async.d.ts +8 -2
- package/dist/core/util/Async.js +67 -0
- package/dist/core/util/EntryFilenames.d.ts +2 -2
- package/dist/core/util/EntryFilenames.js +3 -3
- package/dist/dashboard/App.css +158 -0
- package/dist/dashboard/App.js +2 -2
- package/dist/dashboard/app/AccessDenied.js +3 -3
- package/dist/dashboard/app/ActivityStatus.js +15 -15
- package/dist/dashboard/app/AppShell.js +1 -1
- package/dist/dashboard/app/AuthView.js +11 -11
- package/dist/dashboard/app/CompactField.js +10 -10
- package/dist/dashboard/app/DashboardErrorBoundary.js +5 -5
- package/dist/dashboard/app/DashboardLayout.js +22 -19
- package/dist/dashboard/app/EntryHeader.js +12 -12
- package/dist/dashboard/app/EntryReferences.js +9 -9
- package/dist/dashboard/app/EntrySidebar.d.ts +1 -1
- package/dist/dashboard/app/EntrySidebar.js +17 -16
- package/dist/dashboard/app/EntrySidebarPreview.d.ts +1 -1
- package/dist/dashboard/app/EntrySidebarPreview.js +19 -14
- package/dist/dashboard/app/EntryTranslationBanner.js +7 -7
- package/dist/dashboard/app/Explorer.js +51 -43
- package/dist/dashboard/app/ExplorerCards.js +34 -34
- package/dist/dashboard/app/ExplorerFileCard.js +18 -18
- package/dist/dashboard/app/ExplorerList.js +13 -13
- package/dist/dashboard/app/ExplorerModal.js +3 -3
- package/dist/dashboard/app/ExplorerTable.js +76 -61
- package/dist/dashboard/app/ExternalLinkPicker.js +15 -4
- package/dist/dashboard/app/LinkPicker.js +8 -8
- package/dist/dashboard/app/LocaleMenu.js +12 -12
- package/dist/dashboard/app/SidebarLayout.d.ts +8 -0
- package/dist/dashboard/app/SidebarLayout.js +1169 -0
- package/dist/dashboard/app/SidebarTree.js +46 -46
- package/dist/dashboard/app/WorkspaceMenu.js +17 -17
- package/dist/dashboard/app/WorkspaceRoots.js +23 -23
- package/dist/dashboard/app/editor/FileEditor.d.ts +2 -1
- package/dist/dashboard/app/editor/FileEditor.js +41 -32
- package/dist/dashboard/app/editor/FilePreview.js +4 -4
- package/dist/dashboard/app/editor/MediaAltField.view.d.ts +1 -1
- package/dist/dashboard/app/editor/MediaAltField.view.js +6 -9
- package/dist/dashboard/app/modals/CreateEntry.js +4 -4
- package/dist/dashboard/app/pages/EntryPage.js +57 -31
- package/dist/dashboard/app/pages/UsersPage.js +33 -33
- package/dist/dashboard/app/ui/DashboardModal.js +23 -23
- package/dist/dashboard/app/ui/Rail.js +3 -3
- package/dist/dashboard/app/ui/Sidebar.js +2 -2
- package/dist/dashboard/atoms/auth.js +2 -0
- package/dist/dashboard/atoms/dashboard.d.ts +9 -0
- package/dist/dashboard/atoms/dashboard.js +17 -0
- package/dist/dashboard/atoms/editor.d.ts +7 -1
- package/dist/dashboard/atoms/editor.js +4 -1
- package/dist/dashboard/atoms/entry.d.ts +48 -2
- package/dist/dashboard/atoms/entry.js +222 -17
- package/dist/dashboard/atoms/explorer.js +4 -9
- package/dist/dashboard/atoms/preview.d.ts +3 -0
- package/dist/dashboard/atoms/preview.js +18 -1
- package/dist/dashboard/atoms/root.d.ts +4 -1
- package/dist/dashboard/atoms/root.js +96 -157
- package/dist/dashboard/hooks.d.ts +4 -2
- package/dist/dashboard/hooks.js +9 -5
- package/dist/dashboard/icons.d.ts +1 -0
- package/dist/dashboard/icons.js +10 -0
- package/dist/field/check/CheckField.view.js +2 -2
- package/dist/field/code/CodeField.view.js +12 -12
- package/dist/field/date/DateField.view.js +12 -2
- package/dist/field/link/FileLink.d.ts +2 -2
- package/dist/field/link/FileLink.js +5 -3
- package/dist/field/link/ImageLink.d.ts +1 -1
- package/dist/field/link/ImageLink.js +1 -1
- package/dist/field/link/Link.js +2 -2
- package/dist/field/link/LinkField.view.js +155 -128
- package/dist/field/list/ListField.view.js +22 -33
- package/dist/field/metadata/MetadataField.view.js +19 -19
- package/dist/field/number/NumberField.d.ts +2 -0
- package/dist/field/number/NumberField.view.js +4 -2
- package/dist/field/richtext/PickTextLink.d.ts +7 -0
- package/dist/field/richtext/PickTextLink.js +104 -2
- package/dist/field/richtext/ReferenceLink.d.ts +4 -1
- package/dist/field/richtext/ReferenceLink.js +18 -4
- package/dist/field/richtext/RichTextDocument.d.ts +7 -2
- package/dist/field/richtext/RichTextDocument.js +34 -5
- package/dist/field/richtext/RichTextExtensions.d.ts +3 -1
- package/dist/field/richtext/RichTextExtensions.js +2704 -7467
- package/dist/field/richtext/RichTextField.d.ts +4 -0
- package/dist/field/richtext/RichTextField.story.d.ts +4 -0
- package/dist/field/richtext/RichTextField.view.js +43 -20
- package/dist/field/richtext/RichTextInsertMenu.js +281 -495
- package/dist/field/richtext/RichTextToolbar.d.ts +5 -2
- package/dist/field/richtext/RichTextToolbar.js +38 -3
- package/dist/field/richtext/Toolbar.d.ts +19 -1
- package/dist/field/richtext/Toolbar.js +18 -13
- package/dist/field/richtext/extensions/Anchor.js +1 -1
- package/dist/field/richtext/extensions/Link.js +1 -1
- package/dist/field/richtext/extensions/Small.js +1 -1
- package/dist/field/select/SelectField.view.js +8 -6
- package/dist/index.css +227 -16
- package/dist/next.cjs +18 -16
- package/dist/next.d.ts +2 -1
- package/dist/next.edge.d.ts +2 -1
- package/dist/picker/entry/EntryPicker.js +9 -35
- package/dist/preview/PreviewPayload.js +35 -250
- package/dist/ui/RichText.d.ts +1 -0
- package/dist/ui/RichText.js +29 -2
- package/package.json +6 -3
- package/dist/cli/util/ExternalPlugin.d.ts +0 -2
- package/dist/cli/util/ExternalPlugin.js +0 -919
- package/dist/chunks/{chunk-JFROOUG6.js → chunk-NIVGVRDS.js} +17 -17
|
@@ -22,10 +22,14 @@ export interface RichTextOptions<Blocks extends Schema> extends FieldOptions<Tex
|
|
|
22
22
|
help?: ReactNode;
|
|
23
23
|
/** Display a minimal version */
|
|
24
24
|
inline?: boolean;
|
|
25
|
+
/** Text shown when the editor is empty */
|
|
26
|
+
placeholder?: string;
|
|
25
27
|
/** Index the text value of this field */
|
|
26
28
|
searchable?: boolean;
|
|
27
29
|
/** Enable inserting and editing tables */
|
|
28
30
|
enableTables?: boolean;
|
|
31
|
+
/** Enable inserting and editing images */
|
|
32
|
+
enableImages?: boolean;
|
|
29
33
|
/** Configure the toolbar layout and items */
|
|
30
34
|
toolbar?: ToolbarConfig;
|
|
31
35
|
/** Configure tiptap extensions */
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
export declare function RichTextStory(): import("react").JSX.Element;
|
|
2
2
|
export declare function RichTextPlainStory(): import("react").JSX.Element;
|
|
3
|
+
export declare function RichTextImageStory(): import("react").JSX.Element;
|
|
4
|
+
export declare function RichTextImageDisabledStory(): import("react").JSX.Element;
|
|
5
|
+
export declare function RichTextReadOnlyImageStory(): import("react").JSX.Element;
|
|
3
6
|
export declare function RichTextLargeStory(): import("react").JSX.Element;
|
|
4
7
|
export declare function RichTextImportedListStory(): import("react").JSX.Element;
|
|
5
8
|
export declare function RichTextCustomToolbarStory(): import("react").JSX.Element;
|
|
6
9
|
export declare function RichTextEmptyStory(): import("react").JSX.Element;
|
|
7
10
|
export declare function RichTextLegacyEmptyStory(): import("react").JSX.Element;
|
|
8
11
|
export declare function RichTextReadOnlyStory(): import("react").JSX.Element;
|
|
12
|
+
export declare function RichTextInlineStory(): import("react").JSX.Element;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Placeholder
|
|
3
|
+
} from "../../chunks/chunk-AC5ATYI3.js";
|
|
1
4
|
import {
|
|
2
5
|
EditorContent,
|
|
3
6
|
useEditor
|
|
4
|
-
} from "../../chunks/chunk-
|
|
5
|
-
import "../../chunks/chunk-
|
|
7
|
+
} from "../../chunks/chunk-KMLLLZ6X.js";
|
|
8
|
+
import "../../chunks/chunk-A3XXZBOQ.js";
|
|
6
9
|
import {
|
|
7
10
|
useAtomValue,
|
|
8
11
|
useSetAtom,
|
|
@@ -49,7 +52,7 @@ import {
|
|
|
49
52
|
import {
|
|
50
53
|
RichTextBlockHosts
|
|
51
54
|
} from "./RichTextBlockHost.js";
|
|
52
|
-
import { editorContent, editorNodes } from "./RichTextDocument.js";
|
|
55
|
+
import { editorContent, editorDocument, editorNodes } from "./RichTextDocument.js";
|
|
53
56
|
import {
|
|
54
57
|
defaultExtensionConfig,
|
|
55
58
|
richTextBlockClipboard,
|
|
@@ -65,9 +68,11 @@ import {
|
|
|
65
68
|
|
|
66
69
|
// src/field/richtext/RichTextField.module.css
|
|
67
70
|
var RichTextField_default = {
|
|
71
|
+
"RichTextFieldView": "alinea-RichTextFieldView",
|
|
68
72
|
"RichTextFieldView-unsupportedBlock": "alinea-RichTextFieldView-unsupportedBlock",
|
|
69
73
|
"RichTextFieldViewUnsupportedBlock": "alinea-RichTextFieldView-unsupportedBlock",
|
|
70
|
-
"RichTextFieldView": "alinea-RichTextFieldView",
|
|
74
|
+
"RichTextFieldView-empty": "alinea-RichTextFieldView-empty",
|
|
75
|
+
"RichTextFieldViewEmpty": "alinea-RichTextFieldView-empty",
|
|
71
76
|
"RichTextFieldCompactView": "alinea-RichTextFieldCompactView"
|
|
72
77
|
};
|
|
73
78
|
|
|
@@ -112,7 +117,9 @@ function RichTextFieldView({
|
|
|
112
117
|
const picker = usePickTextLink();
|
|
113
118
|
const anchorPicker = usePickTextAnchor();
|
|
114
119
|
const dashboardEditor = useDashboardEditor();
|
|
115
|
-
const
|
|
120
|
+
const rootDashboardEditor = rootEditor(dashboardEditor);
|
|
121
|
+
const entryAnchors = rootDashboardEditor.anchors;
|
|
122
|
+
const richTextImages = rootDashboardEditor.resolvedImages;
|
|
116
123
|
const getEntryAnchors = useCallback(
|
|
117
124
|
() => store.get(entryAnchors).map((anchor) => anchor.id),
|
|
118
125
|
[entryAnchors, store]
|
|
@@ -120,10 +127,16 @@ function RichTextFieldView({
|
|
|
120
127
|
const readOnly = Boolean(options.readOnly || fieldNode.readOnly);
|
|
121
128
|
const extensions = useMemo(() => {
|
|
122
129
|
const configured = Object.values(
|
|
123
|
-
configureRichTextExtensions(
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
130
|
+
configureRichTextExtensions(options.extensions, {
|
|
131
|
+
...defaultExtensionConfig(
|
|
132
|
+
getEntryAnchors,
|
|
133
|
+
Boolean(options.enableImages)
|
|
134
|
+
),
|
|
135
|
+
Placeholder: Placeholder.configure({
|
|
136
|
+
placeholder: options.placeholder ?? (options.inline ? "Description" : ""),
|
|
137
|
+
emptyEditorClass: RichTextField_default["RichTextFieldView-empty"]
|
|
138
|
+
})
|
|
139
|
+
})
|
|
127
140
|
);
|
|
128
141
|
const blocks2 = richTextBlockExtensions(options.schema, hosts);
|
|
129
142
|
return [
|
|
@@ -132,10 +145,18 @@ function RichTextFieldView({
|
|
|
132
145
|
...configured.filter((extension) => extension.name !== "doc"),
|
|
133
146
|
...blocks2
|
|
134
147
|
];
|
|
135
|
-
}, [
|
|
148
|
+
}, [
|
|
149
|
+
getEntryAnchors,
|
|
150
|
+
hosts,
|
|
151
|
+
options.enableImages,
|
|
152
|
+
options.extensions,
|
|
153
|
+
options.inline,
|
|
154
|
+
options.placeholder,
|
|
155
|
+
options.schema
|
|
156
|
+
]);
|
|
136
157
|
const content = useMemo(
|
|
137
|
-
() => editorContent(store.get(fieldNode.value)),
|
|
138
|
-
[fieldNode, store]
|
|
158
|
+
() => editorContent(store.get(fieldNode.value), richTextImages),
|
|
159
|
+
[fieldNode, richTextImages, store]
|
|
139
160
|
);
|
|
140
161
|
const resolveBlock = useCallback(
|
|
141
162
|
function resolveBlock2(id, typeName, snapshot) {
|
|
@@ -164,7 +185,7 @@ function RichTextFieldView({
|
|
|
164
185
|
onCreate({ editor: editor2 }) {
|
|
165
186
|
setEditorReadOnly(editor2, readOnly);
|
|
166
187
|
lastEditorDocument.current = documentStructureKey(
|
|
167
|
-
editorNodes(editor2
|
|
188
|
+
editorNodes(editorDocument(editor2), resolveBlock)
|
|
168
189
|
);
|
|
169
190
|
},
|
|
170
191
|
onFocus({ editor: editor2 }) {
|
|
@@ -173,7 +194,7 @@ function RichTextFieldView({
|
|
|
173
194
|
},
|
|
174
195
|
onUpdate({ editor: editor2, transaction }) {
|
|
175
196
|
if (!transaction.docChanged) return;
|
|
176
|
-
const next = editorNodes(editor2
|
|
197
|
+
const next = editorNodes(editorDocument(editor2), resolveBlock);
|
|
177
198
|
const nextKey = documentStructureKey(next);
|
|
178
199
|
if (pendingExternalDocument.current && nextKey === lastEditorDocument.current)
|
|
179
200
|
return;
|
|
@@ -191,15 +212,15 @@ function RichTextFieldView({
|
|
|
191
212
|
}, [editor, readOnly]);
|
|
192
213
|
useEffect(() => {
|
|
193
214
|
if (!editor) return;
|
|
194
|
-
const current = editorNodes(editor
|
|
215
|
+
const current = editorNodes(editorDocument(editor), resolveBlock);
|
|
195
216
|
if (documentKey === documentStructureKey(current)) return;
|
|
196
217
|
const documentValue = store.get(fieldNode.value);
|
|
197
|
-
editor.commands.setContent(editorContent(documentValue), {
|
|
218
|
+
editor.commands.setContent(editorContent(documentValue, richTextImages), {
|
|
198
219
|
emitUpdate: false
|
|
199
220
|
});
|
|
200
221
|
lastEditorDocument.current = documentKey;
|
|
201
222
|
pendingExternalDocument.current = void 0;
|
|
202
|
-
}, [documentKey, editor, fieldNode, resolveBlock, store]);
|
|
223
|
+
}, [documentKey, editor, fieldNode, resolveBlock, richTextImages, store]);
|
|
203
224
|
const toolbarTarget = typeof document === "undefined" ? null : document.getElementById("alinea-toolbar");
|
|
204
225
|
function insertBlock(block) {
|
|
205
226
|
if (!editor || editor.state.selection.$from.depth !== 1) return;
|
|
@@ -240,8 +261,8 @@ function RichTextFieldView({
|
|
|
240
261
|
{
|
|
241
262
|
description: options.help,
|
|
242
263
|
errorMessage: error,
|
|
243
|
-
isRequired: options.required,
|
|
244
|
-
label: options.label,
|
|
264
|
+
isRequired: !options.inline && options.required,
|
|
265
|
+
label: options.inline ? void 0 : options.label,
|
|
245
266
|
shared: options.shared,
|
|
246
267
|
children: /* @__PURE__ */ jsxs(
|
|
247
268
|
"div",
|
|
@@ -290,8 +311,10 @@ function RichTextFieldView({
|
|
|
290
311
|
RichTextToolbar,
|
|
291
312
|
{
|
|
292
313
|
editor,
|
|
314
|
+
enableImages: options.enableImages,
|
|
293
315
|
enableTables: options.enableTables,
|
|
294
316
|
ownerId,
|
|
317
|
+
pickImage: picker.pickImage,
|
|
295
318
|
pickLink: picker.pickLink,
|
|
296
319
|
pickAnchor: anchorPicker.pickAnchor,
|
|
297
320
|
getEntryAnchors,
|
|
@@ -308,7 +331,7 @@ function RichTextFieldView({
|
|
|
308
331
|
}
|
|
309
332
|
function setEditorReadOnly(editor, readOnly) {
|
|
310
333
|
if (editor.isDestroyed) return;
|
|
311
|
-
editor.setEditable(!readOnly
|
|
334
|
+
editor.setEditable(!readOnly);
|
|
312
335
|
editor.view.dom.contentEditable = readOnly ? "false" : "plaintext-only";
|
|
313
336
|
}
|
|
314
337
|
function RichTextBlockPortals({
|