BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

New WYSIWYG Editor: Beta Testing Feedback

Open ssddanbrown opened this issue 6 months ago • 24 comments

This is a thread specifically to collect feedback regarding issues and limitations of the new WYSIWYG editor, introduced in BookStack v24.10, during its beta phase which starts as of BookStack v25.05. This follows on from thread #5245.

This below list will be continuously updated from feedback to form a full listing to be worked on. Please only report issues where not already in this list. Generally our goal is to match the existing TinyMCE based editor as close as possible.

Known Issues

  • [x] Switching editor to new editor with bold text can lead to double-bold. ref.
  • [x] Text formats can carry across to below non-formatted existing lines. ref
  • Videos/Embeds
    • [x] Can't re-edit embed code. ref
    • [x] Can't control dimensions after insert. ref
  • [x] Inline Highlight format changes text color instead of background. ref
  • [x] Table cell background color does not retain consistently.
  • [x] Add way to focus in new empty paragraph if edit area clicked below a last block consuming element (drawing, table, details). ref
  • [x] Header formats via keyboard shortcuts are all a size too big. ref
  • [x] Link protocols are allow-listed, old editor did not seem to allow-list. ref
  • [x] Source code editor is much smaller than TinyMCE editor. ref
  • [x] Source code output shows all as a single line, should be multi-line ideally. ref.
  • [x] Inline highlight color should ideally have a different name to background color to result in better translations. ref.
  • [x] Inserting multiple collapisble blocks results in very buggy behaviour. ref
  • [x] When inserting a link, the popup is not in focus, so pasting a link right away will paste it in the editor which remains in focus in the background.
  • [x] Entity selector shows with undefined in search by default. ref.

Related PRs

  • #5653
  • #5731
  • #5775
  • #5939

ssddanbrown avatar May 28 '25 21:05 ssddanbrown

  1. One thing that I recently added to our instance was the PDF embedding script - I haven't tried to modify the script to function on the new editor, but there is currently no way to embed a PDF into the page. Maybe their file import/export feature? though I haven't tried this.

  2. Another thing that we like to use (though I will note, it's not officially supported, but with a small code tweak, you can add the functionality to the original wysiwyg editor) is the alphabet bullet list. While I understand it's not officially supported, the sheer capabilities of tinymce allow extended customization that BookStack does not include out of the box.

Lexical does not currently support more than 3 out of the box solutions as sited in this issue. https://github.com/facebook/lexical/issues/6327

  1. Lastly, assuming that the choice to add lexical is inevitable regardless of issues, can we look into including more out of the box functions through their addons and plugins? Such as dragon naturally speaking,

joshhcd avatar May 29 '25 17:05 joshhcd

@joshhcd

  1. PDFs could technically be embedded via iframe/embed/object elements, which we do support in the new editor. This is something we could make easier (like we do for adding video attachments), but official support for that is outside the scope of this thread. I have not yet exposed any internals for customization/extensibility, that is probably something I start to plan out later in this beta stage, to emulate some of the common abilities of the TinyMCE editor.

  2. As above in regards to extensibility, although some of this may be achievable via css and external customization (especially as this is just a visual/style difference to ordered lists, which we do support). I wouldn't consider too much about what Lexical supports for the reasons stated in the next point.

  3. I would not look to add more for the sake of it showing in lexical examples or the list of available modules. If there's reason to add something that can be raised via it's own worth/need, otherwise the scope will remain limited. With lexical, what you might see in their example is not things we have, or can directly, use. I have forked some core parts of the editor. All of the UI, many of the format types and much of the behaviour has been written custom from scratch by me, to emulate our existing editor as best as possible while not having to rely on the same frameworks/libraries (like React) which they use within their ready-provided implementations. I've also made customizations to the core elements as part of our fork. This is quite a different and extensive approach compared to what we had with TinyMCE, giving us more control (at the cost of maintenance and effort), but it does mean that much of what you may see elsewhere with lexical is irrelevant, at least relative to how you might have previously referred to TinyMCE guidance for prior options/customization/extension since we worked upon a standard provided library as-is there.

ssddanbrown avatar May 29 '25 21:05 ssddanbrown

Since this is still in "beta", are feature requests possible ?

  • inline code (perhaps its already possible)
  • de code button as one of the default buttons ? (or make this a setting?)

Our use case includes allot of system paths, code snippets and configuration examples, therefor we use it way more then for example aligning center/right/justify.

svennd avatar Jun 03 '25 11:06 svennd

@svennd Inline code is already possible via a button in the overflow of the inline formats menu (or alternatively via shortcut):

Image

The purpose of the current phase is to match the existing editor, I'm not looking to move things around or add features but we can think about that in the future after the default editor switch has occurred.

ssddanbrown avatar Jun 04 '25 12:06 ssddanbrown

Hey Dan, I just found a styling bug (at least to my eyes it's a bug): If you make a regular paragraph bold, in the old editor, the font-weight is "bold". But if you switch to the new WYSIWYG beta, if you save the page marked as bold, the font-weight is "bolder", which IMO doesn't look as nice.

Details

New editor:

Image

Image

Old editor:

Image

Image

PancakeZik avatar Jun 06 '25 09:06 PancakeZik

A thing that has now gotten in my way more times than not using the new editor:

  • I type some text. Call it line 1.
  • I hit enter to force a new line to type on. Call it line 2.
  • I go back and highlight the text on line 1 and format it somehow (code, bold, italic).
  • I cursor back down to line 2 and type something.
  • The formatting that I thought I isolated to line 1 still applies to line 2.

The fix has been to go back to the old editor because it keeps tripping me up taking notes in class.

virtadpt avatar Jun 07 '25 01:06 virtadpt

Issue with Video Editing in BookStack (New WYSIWYG vs Old WYSIWYG)

Details

Problem Description

When adding a video in BookStack using the New WYSIWYG editor, I encounter the following limitations:

  1. Inability to edit the video's HTML code after insertion
  2. Lack of control over video dimensions (width/height)
  3. Need to completely delete and reinsert the video script to change width/height

In contrast, the Old WYSIWYG editor allows:

  • Freely editing the video's HTML code
  • Easily modifying dimensions (width/height)
  • Supporting more insertion parameters

Steps to Reproduce the Issue

  1. Enable the New WYSIWYG editor (Settings → Features)

Image

  1. Add a video using the "Insert/Edit Media" button

Image

Image

  1. Attempt to modify the video parameters after insertion

Expected Behavior

The editor should allow:

  • Editing video parameters after insertion
  • Modifying dimensions (width/height)
  • Directly modifying the HTML code

Image

Current Behavior (New WYSIWYG)

  1. Video parameters cannot be changed after insertion
  2. No access to the video's HTML code
  3. To make changes, the video must be deleted and reinserted

Image

AGARES2101 avatar Jun 07 '25 09:06 AGARES2101

I understand the issue of font editing has been addressed, and while I personally don't have an issue with custom css, the omission of a font and font size selector in the editing toolbar/ribbon threw me at first and I don't doubt has put a lot of potential users off. Surely more important to be easily accessible than bold, italic, and underline buttons, the keyboard shortcuts of which are much more widely known than how to import a custom font or change its size in CSS. If compatibility is the issue, im sure a selection of standard websafe fonts would be adequate.

annie-things avatar Jun 10 '25 00:06 annie-things

Thanks @PancakeZik @virtadpt @AGARES2101, Have added these to be tested and addressed.

@annie-things Thanks for the input but that's outside the scope of this thread. There a prior related issues in #3330 and #1148.

ssddanbrown avatar Jun 13 '25 17:06 ssddanbrown

@PancakeZik Just as a warning, the double/extra bold will be addressed for the next patch release, but existing saved content may stay double-bold until re-edited & saved in the editor (should fix itself when content is opened in editor).

ssddanbrown avatar Jun 14 '25 13:06 ssddanbrown

What about custom components added to the existing TinyMCE editor? I have some toolbar icons and functions I have added via the "Custom HTML Head Content" and they do not show up in the new Beta editor. Is there information on how I can port?

quirkiest avatar Jun 19 '25 03:06 quirkiest

@quirkiest not yet. There are currently no provided methods of extension exposed but I'll likely open that up as a later part of the beta stage. It will not be directly compatible with existing TinyMCE APIs, as the new editor behaviour/model is quite different.

ssddanbrown avatar Jun 19 '25 07:06 ssddanbrown

Hi @ssddanbrown

When using the new editor, CTRL+1-5 at times works as intended, at times has the following issue

Details

  • CTRL+1 sets text to be even larger than Large Header
  • CTRL+2 sets text to Large Header
  • CTRL+3 sets text to Medium Header
  • CTRL+4 sets text to Small Header
  • CTRL+5 sets text to normal paragraph

Image

Therefore it is not possible to set the text to Tiny Header with the keyboard shortcuts

Some other times, the shortcuts work as intended (CTRL+1 Large Header, 2 Medium Header etc...)

Furthermore, when CTRL+1 sets the text even larger than Large Header, it does not show up as any of the "formats" on the text formatting tab

Image

Switching back to the other stable WYSIWYG editor, the keyboard shortcuts for text formatting work as intended all the time

bughidudi avatar Jul 09 '25 10:07 bughidudi

The new Editor destroys all Links in our documentation upon saving. TinyMCE allowed links with the ps8:// protocol (which is a link handler associated with your Password manager), the new editor removes all links and just replaces them with about:blank. Is the new Editor somehow forcing only to accept some protocols? Please provide an option to allow everything (maybe even javascript:) in the URL field. I think this array is the culprit and needs to be able to be changed/disabled. Also, when using the whitelist the Editor should only accept allowed protocols in the first place instead of deleting the links upon saving.

FaySmash avatar Jul 14 '25 10:07 FaySmash

@quirkiest not yet. There are currently no provided methods of extension exposed but I'll likely open that up as a later part of the beta stage. It will not be directly compatible with existing TinyMCE APIs, as the new editor behaviour/model is quite different.

Thanks @ssddanbrown - I have absolutely no problem with re-doing my stuff in the new format, so long as there is capacity to add these JS (etc) snippets in.

quirkiest avatar Jul 15 '25 23:07 quirkiest

Thanks @bughidudi and @FaySmash, Can confirm both of these and have added to be addressed.

ssddanbrown avatar Jul 16 '25 13:07 ssddanbrown

[Low Priority] The Sourcecode editor appears way smaller than with TinyMCE and because the new editor seems to store all HTML code in a single line, it's rather confusing to work with. Automatic code formatting and Syntax highlighting would be the optimum.

FaySmash avatar Jul 16 '25 14:07 FaySmash

Thanks @bughidudi and @FaySmash, Can confirm both of these and have added to be addressed.

In addition to this, if not already known. Some other inconsistencies:

  • I can apply background color to a cell when selecting table > cell properties via the top toolbar, but not via the hovering toolbar. The hovering toolbar then defaults to the entire cell when applying color, not the selection.

  • When the background color is applied, in the editor when selecting those cells and unselecting the cells, the color disappears (only visually). When saving page and reopening, the color is still there. Untill you select/unselect those cells again.

  • Minor translation thing, in Dutch the 'Background color' = 'Tekstmarkeringskleur'. Whilst these are not the same, this made it I initially couldnt find the background color option because the translation wasnt correct. Background color = Achtergrondkleur Text background/marking color = Tekstmarkeringskleur. I noticed in English both text marking color(top toolbar) and background color(cell/table properties) are actually both named background color

xsxavier avatar Jul 20 '25 09:07 xsxavier

Thanks again @FaySmash and thanks @xsxavier, Items added.

but not via the hovering toolbar.

@xsxavier not all options are available as part of the toolbar so that is expected. In regards to the translation one, I've logged that as something to change but it might take time after for the translations to then be updated to match what's expected.

ssddanbrown avatar Jul 24 '25 12:07 ssddanbrown

In the new editor, I can't add a page break or new line between a table and a following element, like a line separator. Previously, in the old editor, I could click to the right of the table and press Enter to create a new line before the next element. This feature no longer functions in the new editor.

TritonB7 avatar Aug 05 '25 00:08 TritonB7

Entity Select

When using the new (beta) WYSIWYG editor, the Entity Select interface used when browsing link targets comes up with "Undefined" pre-filled in the search field, and it has to be deleted before I can start finding entities. In the old editor, that field comes up empty, so I can simply start typing immediately.

Add Attachment Link to Page

When using the "Add Attachment Link to Page" button in the attachments list, it puts the link in the page as this like weird immutable object that you can't interact with normally. It can be fixed by deleting the line break it inserts ahead of the link. The issue only seems to occur if you use that button when you're on a fresh, empty line in the editor.

shartcarbuncle avatar Nov 23 '25 21:11 shartcarbuncle