@pretextbook/web-editor 0.0.4 → 0.0.6
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/components/Editors.d.ts +2 -0
- package/dist/components/FullPreview.d.ts +5 -1
- package/dist/components/MenuBar.d.ts +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +359 -344
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +76 -76
- package/dist/index.js.map +1 -1
- package/dist/web-editor.css +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import './Editors.css';
|
|
1
2
|
export interface editorProps {
|
|
2
3
|
content: string;
|
|
3
4
|
onContentChange: (value: string | undefined) => void;
|
|
@@ -7,6 +8,7 @@ export interface editorProps {
|
|
|
7
8
|
saveButtonLabel?: string;
|
|
8
9
|
onCancelButton?: () => void;
|
|
9
10
|
cancelButtonLabel?: string;
|
|
11
|
+
onPreviewRebuild?: (content: string, title: string, postToIframe: (url: string, data: any) => void) => void;
|
|
10
12
|
}
|
|
11
13
|
declare const Editors: (props: editorProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
export default Editors;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import './FullPreview.css';
|
|
1
2
|
interface FullPreviewProps {
|
|
2
3
|
content: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
onRebuild: (content: string, title: string, postToIframe: (url: string, data: any) => void) => void;
|
|
3
6
|
}
|
|
4
|
-
declare const
|
|
7
|
+
export declare const postToIframe: (url: string, data: any, iframeName: string) => void;
|
|
8
|
+
declare const FullPreview: ({ content, title, onRebuild }: FullPreviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
9
|
export default FullPreview;
|
|
@@ -7,6 +7,8 @@ export interface MenuBarProps {
|
|
|
7
7
|
saveButtonLabel?: string;
|
|
8
8
|
onCancelButton?: () => void;
|
|
9
9
|
cancelButtonLabel?: string;
|
|
10
|
+
showPreviewModeToggle?: boolean;
|
|
10
11
|
}
|
|
12
|
+
import './MenuBar.css';
|
|
11
13
|
declare const MenuBar: (props: MenuBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
export default MenuBar;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export { default as Editors } from './components/Editors';
|
|
|
3
3
|
export type { editorProps } from './components/Editors';
|
|
4
4
|
export { default as CodeEditor } from './components/CodeEditor';
|
|
5
5
|
export { default as VisualEditor } from './components/VisualEditor';
|
|
6
|
-
export { default as FullPreview } from './components/FullPreview';
|
|
6
|
+
export { default as FullPreview, postToIframe } from './components/FullPreview';
|