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

Cmd-L to open Link Dialog #417

Closed
kushal opened this issue Dec 31, 2015 · 9 comments
Closed

Cmd-L to open Link Dialog #417

kushal opened this issue Dec 31, 2015 · 9 comments
Milestone

Comments

@kushal
Copy link
Contributor

kushal commented Dec 31, 2015

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!

@ipeychev
Copy link
Contributor

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.

@jbalsas
Copy link
Contributor

jbalsas commented Jan 2, 2016

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.

@jbalsas jbalsas closed this as completed in 8db98bd Jan 3, 2016
ipeychev added a commit that referenced this issue Jan 3, 2016
ipeychev added a commit that referenced this issue Jan 3, 2016
@kushal
Copy link
Contributor Author

kushal commented Jan 5, 2016

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).

@jbalsas
Copy link
Contributor

jbalsas commented Jan 5, 2016

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?

@ipeychev
Copy link
Contributor

ipeychev commented Jan 5, 2016

I vote with +1, definitely!

@jbalsas
Copy link
Contributor

jbalsas commented Jan 5, 2016

Will work on that, then 😉

@ipeychev
Copy link
Contributor

ipeychev commented Jan 5, 2016

That proves you are a real developer :)

@jbalsas
Copy link
Contributor

jbalsas commented Jan 13, 2016

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

@kushal
Copy link
Contributor Author

kushal commented Jan 13, 2016

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
Projects
None yet
Development

No branches or pull requests

3 participants