@plone/volto 17.18.0 → 17.18.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.
package/CHANGELOG.md CHANGED
@@ -17,6 +17,12 @@ myst:
17
17
 
18
18
  <!-- towncrier release notes start -->
19
19
 
20
+ ## 17.18.1 (2024-06-29)
21
+
22
+ ### Bugfix
23
+
24
+ - In the Slate text block, the markup shortcuts for heading and blockquote work again. @kHAPPY2004 [#5452](https://github.com/plone/volto/issues/5452)
25
+
20
26
  ## 17.18.0 (2024-06-28)
21
27
 
22
28
  ### Feature
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  }
10
10
  ],
11
11
  "license": "MIT",
12
- "version": "17.18.0",
12
+ "version": "17.18.1",
13
13
  "repository": {
14
14
  "type": "git",
15
15
  "url": "git@github.com:plone/volto.git"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plone/volto-slate",
3
- "version": "17.18.0",
3
+ "version": "17.18.1",
4
4
  "description": "Slate.js integration with Volto",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -22,6 +22,9 @@ export const P = 'p';
22
22
  export const LI = 'li';
23
23
  export const UL = 'ul';
24
24
  export const OL = 'ol';
25
+ export const H2 = 'h2';
26
+ export const H3 = 'h3';
27
+ export const BLOCKQUOTE = 'blockquote';
25
28
 
26
29
  // dom parsing node information
27
30
  export const TEXT_NODE = 3;
@@ -1,6 +1,6 @@
1
1
  import { toggleList, unwrapList } from './utils';
2
2
  import { isBlockActive } from '@plone/volto-slate/utils';
3
- import { UL, OL, LI } from '@plone/volto-slate/constants';
3
+ import { UL, OL, LI, H2, H3, BLOCKQUOTE } from '@plone/volto-slate/constants';
4
4
 
5
5
  /**
6
6
  * Uses the old toggleList function to toggle lists on or off or from a type to another.
@@ -22,11 +22,11 @@ export const localToggleList = (editor, format) => {
22
22
  */
23
23
  export const autoformatRules = [
24
24
  {
25
- type: 'h2',
25
+ type: H2,
26
26
  markup: '#',
27
27
  },
28
28
  {
29
- type: 'h3',
29
+ type: H3,
30
30
  markup: '##',
31
31
  },
32
32
  {
@@ -44,7 +44,7 @@ export const autoformatRules = [
44
44
  },
45
45
  },
46
46
  {
47
- type: 'blockquote',
47
+ type: BLOCKQUOTE,
48
48
  markup: ['>'],
49
49
  // preFormat,
50
50
  },
@@ -200,6 +200,7 @@ export const autoformatBlock = (editor, type, at, { preFormat, format }) => {
200
200
  Transforms.setNodes(
201
201
  editor,
202
202
  { type },
203
+ { at },
203
204
  { match: (n) => Editor.isBlock(editor, n) },
204
205
  );
205
206
  } else {