Skip to content

Cmd-L to open Link Dialog #417

Closed
Closed

Description

@kushal

It looks like the default CKEditor has a shortcut for adding a link, but it appears to not be in Alloy, and I can't quite figure out how to add it. Any tips or insights? Thanks!

Activity

  1. ipeychev commented on Dec 31, 2015

    @ipeychev
    Member

    Hey @kushal,

    We currently don't support this. In general, AlloyEditor is able to work with the keyboard (and it is also screen reader friendly) - by pressing Alt+F10 the toolbar will be focused and then you will be able to navigate using they arrows. Going back and forth to the next Toolbar is done using Tab.
    However, directly invoking specific commands is not supported and I think this will a good feature.

  2. jbalsas commented on Jan 2, 2016

    @jbalsas
    Contributor

    Hey @kushal, as @ipeychev pointed out, some keystrokes aren't currently available in AlloyEditor because they're added by some CKEditor plugins we're not using. I'm working on a fix for this, that will allow creating keystrokes for the buttons.

    Keep in mind, though, that AlloyEditor works in a different way, so the keystrokes will only be available as long as the button holding the required functionality is available in a toolbar. This means you won't be able to create a link just by pressing Cmd + L if you haven't selected any text. For that, however, we enable ae_autolink by default which creates links automatically as you type.

  3. added 2 commits that reference this issue on Jan 3, 2016
    a4dc62a
    f64d214
  4. kushal commented on Jan 5, 2016

    @kushal
    ContributorAuthor

    This works great, thanks!

    Out of curiosity, is there even a hacky way to make cmd-L work when no text
    is selected?

    On Sat, Jan 2, 2016 at 11:03 PM Chema Balsas notifications@github.com
    wrote:

    Closed #417 #417 via
    8db98bd
    8db98bd
    .

    —
    Reply to this email directly or view it on GitHub
    #417 (comment).

  5. jbalsas commented on Jan 5, 2016

    @jbalsas
    Contributor

    Hey @kushal, as @ipeychev would say, "we are developers, we can do anything" 😉

    I think you could:

    • Have cmd-L trigger a command that would create a CKEditor bookmark
    • Create an additional selection with the linkEdit button that would resolve true for the created bookmarks

    If everything plays out and a selectionChange event is triggered when creating the bookmark, that should prompt the special toolbar with the edit button. You'd need to take care of registering/unregistering the commands so they don't clash, but that's a way I can see it working.

    @ipeychev, what do you think? Would you like to have this behaviour out of the box?

  6. ipeychev commented on Jan 5, 2016

    @ipeychev
    Member

    I vote with +1, definitely!

  7. jbalsas commented on Jan 5, 2016

    @jbalsas
    Contributor

    Will work on that, then 😉

  8. ipeychev commented on Jan 5, 2016

    @ipeychev
    Member

    That proves you are a real developer :)

  9. added this to the 1.0.0 milestone on Jan 5, 2016
  10. jbalsas commented on Jan 13, 2016

    @jbalsas
    Contributor

    Hey @kushal, we just implemented this in #422. Should be in for the next release 😉

  11. kushal commented on Jan 13, 2016

    @kushal
    ContributorAuthor

    Very cool!

    On Tue, Jan 12, 2016 at 9:53 PM Chema Balsas notifications@github.com
    wrote:

    Hey @kushal https://github.com/kushal, we just implemented this in #422
    #422. Should be in for
    the next release [image: 😉]

    —
    Reply to this email directly or view it on GitHub
    #417 (comment)
    .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions