This issue has been created
There is 1 update, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-c888c969-acda-4160-8c23-03093832c8b7 XWIKI-25812 Open

BlockNote offers text and background colors that it cannot load back

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-6f0205e8-63ee-4933-a1c4-b5540ba1da92 Manuel Leduc created this issue on 20/Nov/26 10:26
 
Summary: BlockNote offers text and background colors that it cannot load back
Issue Type: cid:jira-generated-image-avatar-c888c969-acda-4160-8c23-03093832c8b7 Bug
Affects Versions: 18.0.0
Assignee: Unassigned
Components: BlockNote
Created: 20/Nov/26 10:26
Priority: cid:jira-generated-image-static-major-0d4f846d-fda8-4860-850e-00988e69a6b1 Major
Reporter: Manuel Leduc
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.

 
 

1 update

 
cid:jira-generated-image-avatar-6f0205e8-63ee-4933-a1c4-b5540ba1da92 Changes by Manuel Leduc on 20/Nov/26 10:26
 
Attachment: blocknote-colors-menu.png
 
 

1 comment

 
cid:jira-generated-image-avatar-6f0205e8-63ee-4933-a1c4-b5540ba1da92 Manuel Leduc on 20/Nov/26 10:28
 

Note the solution is imo to just remove the possibility to pick a color from the editor.