editor.js icon indicating copy to clipboard operation
editor.js copied to clipboard

Multiple block selection

Open zeinabzahran opened this issue 2 years ago • 9 comments

How to select more than one block and perform action like bold or italic to whole selection?

zeinabzahran avatar Sep 11 '23 08:09 zeinabzahran

Hi, @zeinabzahran

As of version 2.29.0-rc.0, editor.js still does not support perform inline actions across mutiple blocks.

lijie1129 avatar Sep 12 '23 16:09 lijie1129

Hi,Have you found a way to achieve this requirement?

Ian4869 avatar Oct 11 '23 02:10 Ian4869

I can look at it one of these days

osain-az avatar Oct 19 '23 07:10 osain-az

this will be really helpful

anand-cubyts avatar Nov 28 '23 10:11 anand-cubyts

I've somewhat achieved this by using a MutationObserver on the editor__redactor element, and save which blocks contain the 'selected' class, showing the inline toolbar manually after the mouse up event (adding the necesary classes) and then extending the Inline Tools you need to also handle cross block selections ann apply the styling to all [contenteditable=true] elements

sebmeister2077 avatar Feb 04 '24 13:02 sebmeister2077