playbook_ui 12.9.1.pre.alpha.play664tiptapinvestigation353 → 12.9.1
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/_rich_text_editor.jsx +8 -20
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +0 -1
- data/lib/playbook/version.rb +2 -2
- metadata +7 -9
- data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap.jsx +0 -66
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_tip_tap.jsx +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c69bc1999d0d0eff6fb2fe27e30fcf7ba6ad31220226d8201c1e9fbeac7b4e5d
|
4
|
+
data.tar.gz: 98b5b63fc62da2359e4739e85d8e6d44411739d08d6510b048e772d5c9956bb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc9fb71c1003c487e09a0ae2df98a7c3ecfb1b2fab12755bef90a329529adc23e82415d6b03179d38456fe95b3cdf75b763115901a876de6b96e7ba016f841e4
|
7
|
+
data.tar.gz: 8a7e54dac38e626f767c3d22476577cced9e04b5a772f57b30687a913eaec6bc28dcc4fb943ffcc6af00db381b6d6b86e346a6912826ea424ff2616981a6b83a
|
@@ -7,7 +7,6 @@ import inlineFocus from './inlineFocus'
|
|
7
7
|
import useFocus from './useFocus'
|
8
8
|
import { globalProps } from '../utilities/globalProps'
|
9
9
|
import { buildAriaProps, buildDataProps, noop } from '../utilities/props'
|
10
|
-
import PBTipTapEditor from './_tiptap'
|
11
10
|
|
12
11
|
try {
|
13
12
|
const Trix = require('trix')
|
@@ -21,7 +20,6 @@ import { TrixEditor } from "react-trix"
|
|
21
20
|
|
22
21
|
type RichTextEditorProps = {
|
23
22
|
aria?: object,
|
24
|
-
advanced?: Boolean,
|
25
23
|
toolbarBottom?: Boolean,
|
26
24
|
className?: string,
|
27
25
|
data?: object,
|
@@ -40,7 +38,6 @@ type RichTextEditorProps = {
|
|
40
38
|
const RichTextEditor = (props: RichTextEditorProps) => {
|
41
39
|
const {
|
42
40
|
aria = {},
|
43
|
-
advanced = false,
|
44
41
|
toolbarBottom = false,
|
45
42
|
className,
|
46
43
|
data = {},
|
@@ -148,23 +145,14 @@ const RichTextEditor = (props: RichTextEditorProps) => {
|
|
148
145
|
{...dataProps}
|
149
146
|
className={css}
|
150
147
|
>
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
fileParamName={name}
|
160
|
-
onChange={onChange}
|
161
|
-
onEditorReady={handleOnEditorReady}
|
162
|
-
placeholder={placeholder}
|
163
|
-
value={value}
|
164
|
-
/>
|
165
|
-
)
|
166
|
-
}
|
167
|
-
|
148
|
+
<TrixEditor
|
149
|
+
className=""
|
150
|
+
fileParamName={name}
|
151
|
+
onChange={onChange}
|
152
|
+
onEditorReady={handleOnEditorReady}
|
153
|
+
placeholder={placeholder}
|
154
|
+
value={value}
|
155
|
+
/>
|
168
156
|
</div>
|
169
157
|
)
|
170
158
|
}
|
@@ -13,7 +13,6 @@ examples:
|
|
13
13
|
|
14
14
|
react:
|
15
15
|
- rich_text_editor_default: Default
|
16
|
-
- rich_text_editor_tip_tap: Advanced
|
17
16
|
- rich_text_editor_simple: Simple
|
18
17
|
- rich_text_editor_attributes: Attributes
|
19
18
|
- rich_text_editor_focus: Focus
|
@@ -22,4 +21,3 @@ examples:
|
|
22
21
|
- rich_text_editor_toolbar_bottom: Toolbar Bottom
|
23
22
|
- rich_text_editor_inline: Inline
|
24
23
|
- rich_text_editor_preview: Preview
|
25
|
-
|
@@ -7,4 +7,3 @@ export { default as RichTextEditorTemplates } from './_rich_text_editor_template
|
|
7
7
|
export { default as RichTextEditorToolbarBottom } from './_rich_text_editor_toolbar_bottom.jsx'
|
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
|
-
export { default as RichTextEditorTipTap } from './_rich_text_editor_tip_tap.jsx'
|
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.9.1
|
4
|
+
version: 12.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
8
8
|
- Power Devs
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-03-
|
12
|
+
date: 2023-03-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -1707,7 +1707,6 @@ files:
|
|
1707
1707
|
- app/pb_kits/playbook/pb_radio/radio.test.js
|
1708
1708
|
- app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.jsx
|
1709
1709
|
- app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss
|
1710
|
-
- app/pb_kits/playbook/pb_rich_text_editor/_tiptap.jsx
|
1711
1710
|
- app/pb_kits/playbook/pb_rich_text_editor/_trix_styles.scss
|
1712
1711
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_attributes.html.erb
|
1713
1712
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_attributes.jsx
|
@@ -1725,7 +1724,6 @@ files:
|
|
1725
1724
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_sticky.jsx
|
1726
1725
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.html.erb
|
1727
1726
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
|
1728
|
-
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_tip_tap.jsx
|
1729
1727
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_bottom.html.erb
|
1730
1728
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_bottom.jsx
|
1731
1729
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml
|
@@ -2447,7 +2445,7 @@ homepage: http://playbook.powerapp.cloud
|
|
2447
2445
|
licenses:
|
2448
2446
|
- ISC
|
2449
2447
|
metadata: {}
|
2450
|
-
post_install_message:
|
2448
|
+
post_install_message:
|
2451
2449
|
rdoc_options: []
|
2452
2450
|
require_paths:
|
2453
2451
|
- lib
|
@@ -2458,12 +2456,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2458
2456
|
version: '0'
|
2459
2457
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2460
2458
|
requirements:
|
2461
|
-
- - "
|
2459
|
+
- - ">="
|
2462
2460
|
- !ruby/object:Gem::Version
|
2463
|
-
version:
|
2461
|
+
version: '0'
|
2464
2462
|
requirements: []
|
2465
2463
|
rubygems_version: 3.3.7
|
2466
|
-
signing_key:
|
2464
|
+
signing_key:
|
2467
2465
|
specification_version: 4
|
2468
2466
|
summary: Playbook Design System
|
2469
2467
|
test_files: []
|
@@ -1,66 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { useEditor, EditorContent } from "@tiptap/react"
|
3
|
-
import StarterKit from "@tiptap/starter-kit"
|
4
|
-
import Bold from '@tiptap/extension-bold'
|
5
|
-
import Strike from '@tiptap/extension-strike'
|
6
|
-
import Italic from '@tiptap/extension-italic'
|
7
|
-
|
8
|
-
const PBTipTapEditor = () => {
|
9
|
-
const editor = useEditor({
|
10
|
-
extensions: [
|
11
|
-
StarterKit,
|
12
|
-
Bold,
|
13
|
-
Italic,
|
14
|
-
Strike
|
15
|
-
],
|
16
|
-
content:"Hi from Tiptap!"
|
17
|
-
})
|
18
|
-
Bold.configure({
|
19
|
-
HTMLAttributes: {
|
20
|
-
class: 'my-custom-class',
|
21
|
-
},
|
22
|
-
})
|
23
|
-
if (!editor) {
|
24
|
-
return null
|
25
|
-
}
|
26
|
-
|
27
|
-
return (
|
28
|
-
<>
|
29
|
-
<button
|
30
|
-
className={editor.isActive('bold') ? 'is-active' : ''}
|
31
|
-
onClick={() => editor.chain().focus().toggleBold().run()}
|
32
|
-
>
|
33
|
-
Bold
|
34
|
-
</button>
|
35
|
-
<button
|
36
|
-
className={editor.isActive('italic') ? 'is-active' : ''}
|
37
|
-
disabled={
|
38
|
-
!editor.can()
|
39
|
-
.chain()
|
40
|
-
.focus()
|
41
|
-
.toggleItalic()
|
42
|
-
.run()
|
43
|
-
}
|
44
|
-
onClick={() => editor.chain().focus().toggleItalic().run()}
|
45
|
-
>
|
46
|
-
italic
|
47
|
-
</button>
|
48
|
-
<button
|
49
|
-
className={editor.isActive('strike') ? 'is-active' : ''}
|
50
|
-
disabled={
|
51
|
-
!editor.can()
|
52
|
-
.chain()
|
53
|
-
.focus()
|
54
|
-
.toggleStrike()
|
55
|
-
.run()
|
56
|
-
}
|
57
|
-
onClick={() => editor.chain().focus().toggleStrike().run()}
|
58
|
-
>
|
59
|
-
strike
|
60
|
-
</button>
|
61
|
-
<EditorContent editor={editor}/>
|
62
|
-
</>
|
63
|
-
)
|
64
|
-
}
|
65
|
-
|
66
|
-
export default PBTipTapEditor
|