@dialob/composer-material 0.0.12 → 0.0.13
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/README.md +8 -0
- package/dist-lib/index.d.ts +2 -0
- package/dist-lib/index.js +24537 -15895
- package/package.json +10 -6
package/README.md
CHANGED
|
@@ -102,3 +102,11 @@ pnpm run preview
|
|
|
102
102
|
Starts preview server for built application from `/dist` (No hot-reload!). Run `pnpm build` first to build the package
|
|
103
103
|
|
|
104
104
|
---
|
|
105
|
+
|
|
106
|
+
### Customixing Markdown components
|
|
107
|
+
|
|
108
|
+
You can customize how markdown is rendered by passing custom components to the `Markdown` component from `react-markdown`.
|
|
109
|
+
|
|
110
|
+
List of available components can be found in [`src/defaults/markdown.tsx`](https://github.com/dialob/dialob-parent/blob/dev/frontend/dialob-composer-material/src/defaults/markdown.tsx). See also [`src/components/editors/LocalizedStringEditor.tsx`](https://github.com/dialob/dialob-parent/blob/dev/frontend/dialob-composer-material/src/components/editors/LocalizedStringEditor.tsx) for an example of how to use custom components. To support table rendering, you also need to include the `remark-gfm` plugin.
|
|
111
|
+
|
|
112
|
+
The same components can be used on the filling side as well, so that the markdown looks the same when editing and when filling the form.
|
package/dist-lib/index.d.ts
CHANGED
|
@@ -653,6 +653,8 @@ export declare const useEditor: () => {
|
|
|
653
653
|
setActiveList: (listId?: string) => void;
|
|
654
654
|
setActiveVariableTab: (tab?: VariableTabType) => void;
|
|
655
655
|
setConfirmationActiveItem: (item?: DialobItem) => void;
|
|
656
|
+
toggleItemCollapsed: (itemId: string) => void;
|
|
657
|
+
setMarkdownHelpDialogOpen: (open: boolean) => void;
|
|
656
658
|
};
|
|
657
659
|
|
|
658
660
|
declare const useErrorColor: (error: EditorError | undefined) => string | undefined;
|