Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TinyMCE per block: Trying the temporary content editable approach for cross-block selection #272

Closed
wants to merge 1 commit into from

Conversation

youknowriad
Copy link
Contributor

For now, it supports:

  • Cross selection using the mouse
  • Deleting the selected content

I noticed this introduced a bug when selecting inside a TinyMCE (the cursor jumps)

@youknowriad youknowriad requested a review from mtias March 15, 2017 14:19
@youknowriad youknowriad force-pushed the add/per-block/multi-selection-experiment branch from a39811c to 1849118 Compare March 15, 2017 15:19
@mtias mtias added [Type] Enhancement A suggestion for improvement. [Type] Technical Prototype Offers a technical exploration into an idea as an example of what's possible labels Mar 15, 2017
@youknowriad youknowriad changed the title TinyMCE per block: Trying to the temporary content editable approach TinyMCE per block: Trying the temporary content editable approach for cross-block selection Mar 15, 2017
@youknowriad youknowriad force-pushed the add/per-block/multi-selection-experiment branch from 1849118 to c884f27 Compare March 16, 2017 16:07
@nylen nylen force-pushed the add/per-block/multi-selection-experiment branch from c884f27 to 15b0d6f Compare March 17, 2017 16:12
@ellatrix
Copy link
Member

This seems to be a PR where we start to reimplement a lot of behaviour that we'd normally have with a single content editable field. I'm not sure if it's a good idea to temporary set a global content editable attribute instead of just having it there permanently, but limiting inter-block behaviour where we want it.

What's the benefit of introducing rangy?

@youknowriad
Copy link
Contributor Author

@iseulde This was a PR to play with multiselection in the multi-prototype instance (as a POC). It's not intended to be merged.

I'm not sure if it's a good idea to temporary set a global content editable attribute instead of just having it there permanently, but limiting inter-block behaviour where we want it.

I don't have strong opinions, I tried both approach and this is was the most promising one I could come up with at that moment.

rangy?

This was introduced to ease the manipulation of the Selection and ranges. I found it easier to work with instead of the different browser implementations of the Selection API.

@youknowriad
Copy link
Contributor Author

I'm closing this for now

@ellatrix
Copy link
Member

@youknowriad So what do you see as a way to enable inter block selection? Or is the way forward a shared block?

@youknowriad
Copy link
Contributor Author

@iseulde I think the approach in this PR is possible but I'd use your proposal to limit inter block selection to the whole blocks instead of trying to figure out which part of the blocks were selected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement. [Type] Technical Prototype Offers a technical exploration into an idea as an example of what's possible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants