playbook_ui_docs 13.10.0.pre.alpha.play978makehighchartsadevdependencypoc1322 → 13.10.0.pre.alpha.play10481357
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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_disabled.jsx +33 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_disabled.md +3 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +2 -1
- data/dist/playbook-doc.js +8 -8
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 296328e3d1c7eb5cf5f0dc6696afff99f1bd1d8ce2ee64e2c35d21ab98833330
|
4
|
+
data.tar.gz: '019600190da21da1ea40428c2e6334285066ab5a8939ec4cd8c1bb71e8f7986c'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e96d98faa465ca46cf792d25f1762160f6c83aa52eaba899748595960ece45d2d0a86315100ef917840809460c9f4d681875ce6a734231925f248bd3b0ca8219
|
7
|
+
data.tar.gz: 794c82fde93a25a935f1f3f78f179b132618e088bd18ff1a4713ee77c157acc8a6da45bee4ae9715e9d7b675d2bd80c3d48c45d97cd0b7d20d0b61b74c53711a
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { useEditor, EditorContent } from "@tiptap/react";
|
3
|
+
|
4
|
+
import { RichTextEditor } from "../..";
|
5
|
+
|
6
|
+
import Document from "@tiptap/extension-document";
|
7
|
+
import Paragraph from "@tiptap/extension-paragraph";
|
8
|
+
import Text from "@tiptap/extension-text";
|
9
|
+
|
10
|
+
const RichTextEditorToolbarDisabled = (props) => {
|
11
|
+
const editor = useEditor({
|
12
|
+
extensions: [Document, Paragraph, Text],
|
13
|
+
content:
|
14
|
+
"Add your text here. You can format your text, add links, quotes, and bullets.",
|
15
|
+
});
|
16
|
+
if (!editor) {
|
17
|
+
return null;
|
18
|
+
}
|
19
|
+
|
20
|
+
return (
|
21
|
+
<div>
|
22
|
+
<RichTextEditor
|
23
|
+
advancedEditor={editor}
|
24
|
+
advancedEditorToolbar={false}
|
25
|
+
{...props}
|
26
|
+
>
|
27
|
+
<EditorContent editor={editor} />
|
28
|
+
</RichTextEditor>
|
29
|
+
</div>
|
30
|
+
);
|
31
|
+
};
|
32
|
+
|
33
|
+
export default RichTextEditorToolbarDisabled;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
This variant allows you to optionally include the default toolbar.
|
2
|
+
|
3
|
+
The default toolbar relies on [Tiptap's StarterKit](https://tiptap.dev/api/extensions/starter-kit) which might add that are not necessary for your application. Setting the `advancedEditorToobar` to false enables you to instantiate an editor with the minimum requirements.
|
@@ -15,6 +15,7 @@ examples:
|
|
15
15
|
- rich_text_editor_default: Default
|
16
16
|
- rich_text_editor_advanced_default: Advanced Default
|
17
17
|
- rich_text_editor_more_extensions: Advanced (Extra Extensions)
|
18
|
+
- rich_text_editor_toolbar_disabled: Advanced (Toolbar disabled)
|
18
19
|
- rich_text_editor_simple: Simple
|
19
20
|
- rich_text_editor_attributes: Attributes
|
20
21
|
- rich_text_editor_focus: Focus
|
@@ -8,4 +8,5 @@ export { default as RichTextEditorToolbarBottom } from './_rich_text_editor_tool
|
|
8
8
|
export { default as RichTextEditorInline } from './_rich_text_editor_inline.jsx'
|
9
9
|
export { default as RichTextEditorPreview } from './_rich_text_editor_preview.jsx'
|
10
10
|
export { default as RichTextEditorAdvancedDefault } from './_rich_text_editor_advanced_default.jsx'
|
11
|
-
export { default as RichTextEditorMoreExtensions } from './_rich_text_editor_more_extensions.jsx'
|
11
|
+
export { default as RichTextEditorMoreExtensions } from './_rich_text_editor_more_extensions.jsx'
|
12
|
+
export { default as RichTextEditorToolbarDisabled } from './_rich_text_editor_toolbar_disabled.jsx'
|