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

Link targets/opening in _blank #527

Closed
bigclumsyoaf opened this issue Feb 8, 2017 · 1 comment
Closed

Link targets/opening in _blank #527

bigclumsyoaf opened this issue Feb 8, 2017 · 1 comment

Comments

@bigclumsyoaf
Copy link

Hi, a client is wanting us to change the link functionality to be able to select the link target.

I found this old issue which shows examples of extending links:
#203

But the latest version just uses a default javascript prompt for the URL input. Do you have any examples of extending this into a modal to give extra options? Or any pointers where to start?

thanks

Daryl.

@raffij
Copy link
Contributor

raffij commented Jun 7, 2017

@bigclumsyoaf late reply, but wanted to close this up with an answer.

We use scribe as an text editing interface, which uses the scribe-plugin-link-prompt-command to provide the interface to enter the link text that you are wanting to extend.

In order to do this you'll want to modify the functionality of the following module to allow entry of a target as well as a link.

https://github.com/guardian/scribe-plugin-link-prompt-command/blob/master/src/scribe-plugin-link-prompt-command.js

At the moment this module is included here:

scribe.use(scribePluginLinkPromptCommand());

However this could be moved to be configurable in your own fork of sir-trevor or possibly contributed back to sir-trevor-js if you wanted.

@raffij raffij closed this as completed Jun 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants