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: docs/upgrade-2-0-to-3-0.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,29 @@ It is no longer necessary to bind a custom Tiptap Editor class in order to use a
32
32
-);
33
33
```
34
34
35
+
### New node/mark creation (High Impact)
36
+
37
+
If you're creating new nodes or marks in data plugins you should use the new `node` and `mark` helpers provided by the Data support class. eg. Instead of:
38
+
39
+
```php
40
+
$node = (object) [
41
+
'type' => 'paragraph',
42
+
'attrs' => (object) [
43
+
'class' => 'text-base',
44
+
],
45
+
];
46
+
```
47
+
48
+
You should now do:
49
+
50
+
```php
51
+
use JackSleight\StatamicBardMutator\Support\Data;
52
+
53
+
$node = Data::node('paragraph', [
54
+
'class' => 'text-base',
55
+
]);
56
+
```
57
+
35
58
### Deprecated method removed (Low Impact)
36
59
37
60
The previously deprecated `Mutator:tag()` method has been removed. You should use `Mutator:html()` instead.
0 commit comments