Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken autoformat / markup shortcuts for headings in Slate text block #5452

Closed
mbarde opened this issue Nov 28, 2023 · 1 comment · Fixed by #5495
Closed

Broken autoformat / markup shortcuts for headings in Slate text block #5452

mbarde opened this issue Nov 28, 2023 · 1 comment · Fixed by #5495

Comments

@mbarde
Copy link

mbarde commented Nov 28, 2023

Describe the bug

Markup shortcuts for headings (# for h2 or ## for h3) in slate text blocks do not work (anymore).

To Reproduce

  • Go to https://demo.plone.org (or any other page using Volto 17.x)
  • Edit a page
  • Add text block
  • Enter # new heading
  • Text still formatted as normal text, but heading icon is selected in toolbar (see screenshot)

JSON of block looks like this:

{
  "@type": "slate",
  "plaintext": "heading",
  "value": [
   {
    "type": "p",
    "children": [
     {
      "text": "heading",
      "type": "h2"
     }
    ]
   }
  ]
 }

Expected behavior

Text should be formatted as heading.

JSON should like that (as opposed to above snippet):

{
  "@type": "slate",
  "plaintext": "heading",
  "value": [
   {
    "type": "h2",
    "children": [
     {
      "text": "heading",
      "type": "h2"
     }
    ]
   }
  ]
 }

Screenshots

Screenshot_2023-11-28_14-25-53

Software (please complete the following information):

  • Plone Version: 6.0.8
  • Plone REST API Version: 9.1.2
  • Volto Version: 17.6.0
  • OS: Ubuntu 22.04
  • Browser: Firefox, Google Chrome
@pranayjoshi
Copy link

The case is same in the case of Italics and every other commands

@plone plone deleted a comment from Nishannb Nov 30, 2023
sneridagh added a commit that referenced this issue Jun 29, 2024
Co-authored-by: HAPPY_KAMBOJ <95476677+kHAPPY2004@users.noreply.github.com>
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Co-authored-by: Víctor Fernández de Alba <sneridagh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants