playbook_ui_docs 16.5.0.pre.alpha.RTEPOC15746 → 16.5.0.pre.alpha.RTEPOC15748

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: 056dc08b39c257907ec45103ed7e835c4600a81b95ebde1d4a5b81ecf3dc49dc
4
- data.tar.gz: e75755a216f44ecf652440926e3f949be96e8a42d361d856ca3a25a930005e52
3
+ metadata.gz: 5bf3decce98ef69e3f64e249f9d06677764b9992b4a1bcd29f849abcc16b7e34
4
+ data.tar.gz: a97dec8cf151aaf146e3568ea8ba914797e970b118786fe55aa893592518e925
5
5
  SHA512:
6
- metadata.gz: a55377fad33803a3a790994e32dd556bfc32efea60dd62277f9604457b513d5d85c54fc2ad3ef2bc29af6aba7fd52ff2a9369743391ce3d124966832e5ec82d9
7
- data.tar.gz: d458309c493a88cd2eef86f90a25ffc5daf29fbed920834e766291deb2bbf981542742b87e81d61972fedb8c7f2f7759da85e43f8551042eec1bdfd7c8f62fc9
6
+ metadata.gz: 971652d9cb9bee1f0ec336cdc3a6741373212d80469ed92dd4b20031360edd59480a6227a64c3e38e2fca24361ad58ec7083f9f206a54eea9b534bb9fbbb27c4
7
+ data.tar.gz: 76782640af2ccf989ede578939561ec1743d608ec2756dc28014c85c4d974ca99c097b2768a054c98ccdb9511032b5bf210da9fd9f6713169ac338e99335d84f
@@ -10,3 +10,7 @@ The Rails rich text editor is a TipTap surface with no React. The UI (toolbar, b
10
10
 
11
11
  - Same core: both use TipTap v2 on top of ProseMirror; styling lives in Playbook SCSS (`_tiptap_styles.scss`) so the editor chrome lines up between platforms.
12
12
  - Different shell: Rails uses ERB + Playbook Rails components + inline module script. React uses `RichTextEditor` / `_tiptap_editor.tsx` and TipTap wired through the bundled Playbook React package—see Advanced Default for that stack and when you need TipTap installed in your JavaScript bundle.
13
+
14
+ ### Simple toolbar (`simple: true`)
15
+
16
+ **Bold**, **Italic**, **Undo**, and **Redo** only (no block dropdown / Popover). See the **Rails (TipTap — Simple toolbar)** example.
@@ -0,0 +1,9 @@
1
+ <%= pb_rails("rich_text_editor", props: {
2
+ simple: true,
3
+ label: "Notes",
4
+ input_options: {
5
+ id: "rails_rte_simple_demo",
6
+ name: "content",
7
+ },
8
+ value: "<p>Use <strong>Bold</strong> and <em>Italic</em> from the toolbar.</p>",
9
+ }) %>
@@ -0,0 +1,12 @@
1
+ ### Simple toolbar (`simple: true`)
2
+
3
+ Pass **`simple: true`** for a compact toolbar: **Bold**, **Italic**, **Undo**, and **Redo** (same history controls as the full toolbar—plain buttons, not popovers).
4
+
5
+ - No block-style dropdown (no “Paragraph” / headings / lists in the menu).
6
+ - No **`pb_popover`** on the toolbar—useful in **native `<dialog>`** modals, turbo-loaded panels, or other tight layouts where the full block menu is awkward to position.
7
+
8
+ The underlying TipTap document still accepts the same HTML as the default Rails editor; `simple` only changes which **toolbar controls** are shown.
9
+
10
+ ### When to use the default instead
11
+
12
+ Keep the **default** toolbar (omit `simple` or pass `simple: false`) when you need the block-style menu, strikethrough, code block, and link actions in the chrome.
@@ -2,6 +2,7 @@ examples:
2
2
 
3
3
  rails:
4
4
  - rich_text_editor_rails_default: "Rails (TipTap)"
5
+ - rich_text_editor_rails_simple: "Rails (TipTap — Simple toolbar)"
5
6
 
6
7
  react:
7
8
  - rich_text_editor_advanced_default: Advanced Default
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui_docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.5.0.pre.alpha.RTEPOC15746
4
+ version: 16.5.0.pre.alpha.RTEPOC15748
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -2000,6 +2000,8 @@ files:
2000
2000
  - app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_more_extensions.md
2001
2001
  - app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_default.html.erb
2002
2002
  - app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_default.md
2003
+ - app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_simple.html.erb
2004
+ - app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_simple.md
2003
2005
  - app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_disabled.jsx
2004
2006
  - app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_disabled.md
2005
2007
  - app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml