codex-team / editor.js

A block-style editor with clean JSON output
https://editorjs.io
Apache License 2.0
28.22k stars 2.06k forks source link

Selecting multiblock text precisely #2410

Open kiliandr opened 1 year ago

kiliandr commented 1 year ago

I found out that it is not possible to select text that spans over multiple blocks without selecting the whole blocks..

Steps to reproduce:

  1. go to https://codepen.io/kili123/pen/MWzOQNM
  2. select the text between the arrows ---> [text to select] <---
  3. it selects all affected blocks but not only the chars between the arrows

Expected behavior: It should only select the chars between the array like selecting normal text in browsers...

Device, Browser, OS: Windows, Android

Editor.js version: 2.27.2

Plugins you use with their versions: none

jarodxu12 commented 1 year ago

It is essential for a text editor to have the ability to select specific characters. However, I'm not sure if this is a mechanism of editor.js or a bug. From a user's perspective, it is definitely a necessary feature.

rondorkerin commented 10 months ago

Are you guys ever planning on getting multiblock select done? My editor has AI writing and I need to be able to get the text selected when you do a multiblock select, but theres nothing in the API for getting it and it doesnt obey the actual window selection api. There should at the very least be an api method to get the current selection as text or a list of blocks at least.

If someone wants to do this we can pay a $200 bounty

markolofsen commented 1 month ago

Are you guys ever planning on getting multiblock select done? My editor has AI writing and I need to be able to get the text selected when you do a multiblock select, but theres nothing in the API for getting it and it doesnt obey the actual window selection api. There should at the very least be an api method to get the current selection as text or a list of blocks at least.

If someone wants to do this we can pay a $200 bounty

I can do)