@functionalcms/svelte-components 5.9.0 → 5.9.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.
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
rootCtx,
|
|
5
5
|
commandsCtx,
|
|
6
6
|
defaultValueCtx,
|
|
7
|
-
editorViewCtx,
|
|
8
7
|
} from "@milkdown/kit/core";
|
|
9
8
|
import { commonmark } from "@milkdown/kit/preset/commonmark";
|
|
10
9
|
import { history } from "@milkdown/kit/plugin/history";
|
|
@@ -16,7 +15,7 @@
|
|
|
16
15
|
wrapInBulletListCommand,
|
|
17
16
|
turnIntoTextCommand,
|
|
18
17
|
} from "@milkdown/kit/preset/commonmark";
|
|
19
|
-
import {
|
|
18
|
+
import { getHTML } from "@milkdown/kit/utils";
|
|
20
19
|
import { listener, listenerCtx } from "@milkdown/kit/plugin/listener";
|
|
21
20
|
import { Button, ButtonGroup } from "@functionalcms/svelte-components";
|
|
22
21
|
|
|
@@ -115,9 +115,10 @@ export declare function createSelectField(id: string, label: string, selectOptio
|
|
|
115
115
|
export declare function createTimePickerField(id: string, label: string, value?: any, options?: Partial<Omit<TimePickerField, "id" | "label" | "typeOfField">>): TimePickerField;
|
|
116
116
|
export declare function createPhoneInputField(id: string, label: string, value?: any, options?: Partial<Omit<PhoneInputField, "id" | "label" | "typeOfField">>): PhoneInputField;
|
|
117
117
|
export declare function createHiddenField(id: string, value: string): HiddenField;
|
|
118
|
-
export declare function createEditorField(id: string,
|
|
118
|
+
export declare function createEditorField(id: string, label: string, type: "markdown" | "html", value: string | undefined): {
|
|
119
119
|
id: string;
|
|
120
|
-
|
|
120
|
+
label: string;
|
|
121
|
+
value: string | undefined;
|
|
121
122
|
typeOfField: "html" | "markdown";
|
|
122
123
|
};
|
|
123
124
|
export type ButtonConfig = {
|
|
@@ -116,9 +116,10 @@ export function createHiddenField(id, value) {
|
|
|
116
116
|
typeOfField: "hidden",
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
export function createEditorField(id,
|
|
119
|
+
export function createEditorField(id, label, type, value) {
|
|
120
120
|
return {
|
|
121
121
|
id,
|
|
122
|
+
label,
|
|
122
123
|
value,
|
|
123
124
|
typeOfField: type,
|
|
124
125
|
};
|