playbook_ui_docs 15.1.0.pre.alpha.testingtiptap11004 → 15.1.0.pre.alpha.testingtiptap11043
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 192f398b5253e62b9e469435620b9d0a06b85e17726ea73c252414f8783dec0e
|
4
|
+
data.tar.gz: 067c71a037c638ff0c3d51a14db7e9d0c2a42685fc0718c8f98748c6c216c535
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2d8f28ec32c3c0355a778f8dfc951b497a491769f4946847655e2ef479c343eb8a5879128405412148ec30348645e10d30cb26d220956930503d4f1e2f61fa4
|
7
|
+
data.tar.gz: 5999df95a099b842d7261d8f7d9e0bce75ebe87c82f8324c34db273e8de741216401b7433a0c366ae304c87fd19715386774901a15968c1814bcd8457f244b85
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import RichTextEditor from '../../pb_rich_text_editor/_rich_text_editor'
|
3
|
+
import { useEditor, EditorContent } from "@tiptap/react"
|
4
|
+
import StarterKit from "@tiptap/starter-kit"
|
5
|
+
import Link from '@tiptap/extension-link'
|
6
|
+
|
7
|
+
|
8
|
+
const RichTextEditorAdvancedSimple = (props) => {
|
9
|
+
|
10
|
+
const editor = useEditor({
|
11
|
+
extensions: [
|
12
|
+
StarterKit,
|
13
|
+
Link
|
14
|
+
],
|
15
|
+
content:"Add your text here. You can format your text, add links, quotes, and bullets."
|
16
|
+
})
|
17
|
+
if (!editor) {
|
18
|
+
return null
|
19
|
+
}
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
return (
|
25
|
+
<div>
|
26
|
+
<RichTextEditor
|
27
|
+
advancedEditor={editor}
|
28
|
+
simple
|
29
|
+
{...props}
|
30
|
+
>
|
31
|
+
<EditorContent editor={editor}/>
|
32
|
+
</RichTextEditor>
|
33
|
+
</div>
|
34
|
+
)
|
35
|
+
}
|
36
|
+
|
37
|
+
export default RichTextEditorAdvancedSimple
|
@@ -16,6 +16,7 @@ examples:
|
|
16
16
|
- rich_text_editor_advanced_default: Advanced Default
|
17
17
|
- rich_text_editor_more_extensions: Advanced (Extra Extensions)
|
18
18
|
- rich_text_editor_toolbar_disabled: Advanced (Toolbar disabled)
|
19
|
+
- rich_text_editor_advanced_simple: Advanced (Simple)
|
19
20
|
- rich_text_editor_simple: Simple
|
20
21
|
- rich_text_editor_attributes: Attributes
|
21
22
|
- rich_text_editor_focus: Focus
|
@@ -11,3 +11,4 @@ export { default as RichTextEditorAdvancedDefault } from './_rich_text_editor_ad
|
|
11
11
|
export { default as RichTextEditorMoreExtensions } from './_rich_text_editor_more_extensions.jsx'
|
12
12
|
export { default as RichTextEditorToolbarDisabled } from './_rich_text_editor_toolbar_disabled.jsx'
|
13
13
|
export { default as RichTextEditorAdvancedPreview } from './_rich_text_editor_advanced_preview.jsx'
|
14
|
+
export { default as RichTextEditorAdvancedSimple } from './_rich_text_editor_advanced_simple.jsx'
|