You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,18 @@
1
1
# Changelog
2
2
3
+
## 3.0.0 (2024-09-03)
4
+
5
+
This release introduces some significant changes to the terminology and variables used in mutators, however there are only two very small breaking changes, please read [upgrade guide](https://jacksleight.dev/docs/bard-mutator/upgrade-2-0-to-3-0) for more information.
6
+
7
+
-[new] Mutators are now known as plugins
8
+
-[new] Class based plugins for easier organisation and reuse
9
+
-[new] Scoped plugins that can be enabled per-field
10
+
-[new] New helpers and metadata for advanced data manipulation
11
+
- Easier setup with no custom editor class binding
Copy file name to clipboardExpand all lines: docs/data-formats.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,17 @@
1
1
---
2
-
title: Data Formats
2
+
title: Formats
3
3
order: 7
4
4
---
5
5
6
-
# Data Formats
6
+
# Formats
7
7
8
8
[TOC]
9
9
10
10
---
11
11
12
-
## Node Data
12
+
## Nodes
13
13
14
-
Nodes mostly map to block elements in the rendered HTML. They're used for things like paragraphs, headings and lists. Node data looks like this:
14
+
Nodes mostly map to block elements in the rendered HTML. They're used for things like paragraphs, headings and lists. Nodes look like this:
15
15
16
16
```yaml
17
17
-
@@ -35,7 +35,7 @@ Each node is an object with the following properties:
35
35
36
36
---
37
37
38
-
## Mark Data
38
+
## Marks
39
39
40
40
Marks mostly map to inline elements in the rendered HTML. They're used for things like links, bold, and italic text. Marks are not nested in the same way they are in HTML. Instead they're applied to a node in a flat list. For example, a bold link is a text node with marks that look like this:
Copy file name to clipboardExpand all lines: docs/index.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,11 @@ This Statamic addon allows you to modify the data and tags rendered by the Bard
11
11
12
12
This is how Tiptap (the magic behind Bard's content format and rendering) handles the rendering process, and how Bard Mutator interacts with that process:
13
13
14
-
1. The raw content is stored as a ProseMirror document in your entries, these documents consist of [nodes and marks](data-formats)
14
+
1. The raw content is stored as a ProseMirror document in your entries, these documents consist of [nodes and marks](formats)
15
15
2. Statamic's augmentation process passes this data to the Tiptap renderer
16
-
3.**Bard Mutator's [data mutators](mutators#data-mutators) jump in here, allowing you to modify the raw data**
17
-
4. Tiptap converts the raw node and mark data to their standard [tag values](data-formats#html-values)
18
-
5.**Bard Mutator's [HTML mutators](mutators#html-mutators) jump in here, allowing you to modify the tag values**
16
+
3.**Bard Mutator's [data plugins](plugins#data-plugins) jump in here, allowing you to modify the raw data**
17
+
4. Tiptap converts the raw node and mark data to their standard [tag values](formats#html-values)
18
+
5.**Bard Mutator's [HTML plugins](plugins#html-plugins) jump in here, allowing you to modify the tag values**
19
19
6. Tiptap renders the tag values to an HTML string
Advanced features such as [data mutators](mutators#data-mutators) and [metadata](mutators#metadata) require deeper access to Tiptap's rendering process, which isn't avaliable by default. Bard Mutator includes an extended Tiptap Editor class that makes this access possible. To enable these features simply bind the Bard Mutator Editor class in your app service providers `register()` method:
17
-
18
-
```php
19
-
$this->app->bind(
20
-
\Tiptap\Editor::class,
21
-
\JackSleight\StatamicBardMutator\Editor::class
22
-
);
23
-
```
24
-
25
-
If you don't want to use those features you don't need to do this, all other features work without it.
0 commit comments