Skip to content

Prevent including typed text into the existing markup  #402

@lessless

Description

@lessless

Hello,

I'm really struggling to find proper words (for the title as well), so let me quote @bantic's answer on SO

default behavior for browsers (and for mobiledoc-kit, so far) is for the style of text to be "right-inclusive". If the cursor is on the right side of styled text, typing continues that style.

While this might good for the text formatting commands, it's really making user experience more complicated in some situations like link insertion.

Let's take demo app as example:

  1. there is a text 'This is Mobiledoc-kit' on the page
  2. I select 'Mobiledoc-kit' fragment of it and make it a link pointing to the https://bustlelabs.github.io/mobiledoc-kit/demo/
  3. Right after that I started to type and entered ' example app'
  4. And this text became a part of the link, so now link is not just 'Mobiledoc-kit', but also all the text till the end of the line: 'Mobiledoc-kit example app'

I know that there is no ready answer yet, so I just want to put that issue on the order of business.

Also, might it be sensible to make this behavior adjustable, not just for links but maybe for all commands?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions