Closed deymundson closed 1 month ago
You can achieve this with your own plugin - you need to register two things, basically:
u
tag when encounteredRefer to the docs for more details on the matter.
As a general note: the toolbar is an "accessory"; its contents are by no means hard-bound to the editor capabilities, nor they can enable or restrict certain behavior.
I need this as well. I've been struggling with it for a day now, but cannot really put the pieces together from the docs. Could you provide me/us with an example?
Describe the bug I am attempting to configure the editor to support only a sub-set of possible markdown. One of the features I would like to remove is the ability to underline text. I was able to use the toolbar primitives to create a custom formatting toggle that only includes Bold and Italic buttons, and was able to ensure HTML cannot be used by setting
suppressHtmlProcessing={true}
, however, it is still possible to underline text by selecting the text and hittingCtrl-U
. The markdown produced then includes<u>text</u>
, even thoughsuppressHtmlProcessing
istrue
.Expected behavior I'm not entirely sure what the correct fix for this would be... a couple options I can think of would be:
<u></u>
cannot be produced whensuppressHtmlProcessing
istrue
.options
prop to theBoldItalicUnderlineToggles
, much like theListsToggle
, and then only enable the keyboard shortcuts for those options selected.