Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25812

BlockNote offers text and background colors that it cannot load back

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 18.0.0
    • BlockNote
    • None
    • Unknown

    Description

      The BlockNote editor lets users pick a text color and a background color. The color is saved in the page content, but it is not loaded back when the page is edited again.

      Steps to reproduce

      1. Make BlockNote the default WYSIWYG editor.
      2. Edit a page and type some text.
      3. Open the block handle menu (the drag handle on the left of the block), then Colors, and pick a background color, e.g. Brown. The color button of the formatting toolbar offers the same choice.
      4. Save.
      5. Look at the page source, then edit the page again.

      Actual

      • The page source holds (% style="background-color:brown" %).
      • View mode renders the CSS brown keyword, which is much darker than the light brown offered by the editor palette.
      • When editing the page again, the editor does not display the color.

      Expected

      The editor does not offer a color choice, since the BlockNote syntax cannot load the colors back.

      Details

      The choice is offered in two places, both BlockNote defaults kept by the integration:

      • the Colors submenu of the block handle menu (SideMenuController in BlockNoteViewWrapper.tsx);
      • the ColorStyleButton of the formatting toolbar (CustomFormattingToolbar.tsx).

      See the attached screenshot of the block handle menu.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mleduc Manuel Leduc
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: