Composer Button Bonanza

I just released version 2.0.0 of Composer Button Bonanza. The only change is to fix the deprecated use of site.desktopView. See the source commit for details.

I updated that warning. Having investigated the issues now, I think it’s actually the other way around: the richtext editor is not compatible with this theme component, because its ProsemirrorTextManipulation implementation of the TextManipulation interface is incomplete and/or incorrect.

In particular:

  • The ProsemirrorTextManipulation.applyList() implementation doesn’t quite use the head parameter supplied by the caller. Instead, it looks at the key for the example text supplied by the caller to guess at what the caller is trying to do, and it is hard-coded to only understand the built-in buttons for bullet lists, ordered lists, and blockquotes.
  • The ProsemirrorTextManipulation.applySurround() implementation does not match the behavior of the original TextareaTextManipulation.applySurround() implementation, and is responsible for indiscriminately using <div> even when it should be using <span>. The Prosemirror implementation also ignores the opts argument to applySurround(). (And, using the same trick as applyList(), it hard-codes example-text keys to detect the buttons for italics, bold, and preformatted text.)

@renato, are these issues on anyone’s radar? Is there a timeline for fixing them?

3 Likes