0

We have ckeditor on our wep page which allows users to select text and format it as link by clicking that little chain icon. Users can set the protocol, the target, etc.

We wondered if there is a way to add a dropdown of all nodes (which the user has access to) to pick from? Is there a module/plugin which does that?

1
  • 1
    Have you at least tried to search for it?..
    – Mołot
    Feb 24, 2014 at 8:29

2 Answers 2

4

CKEditor Link

You are looking for CKEditor Link - A plugin to easily create links to Drupal internal paths.

4
  • Does this work with all paths or just node, term, etc, aliases?
    – mpdonadio
    Feb 24, 2014 at 14:05
  • @MPD last time I needed it, I needed it for nodes only, but given the fact there are specific extensions for managed files, users and organic groups, I'm afraid it only works with nodes out of the box. But it has this very easy hook_ckeditor_link_TYPE_url() to add other stuff to it. For more complicated cases than simple nodes, rooby's answer seems actually better - at the cost of more code to execute and more settings to configure, of course.
    – Mołot
    Feb 24, 2014 at 14:17
  • Thanks. I normally install LinkIt for people, but I don't really do much content creation myself (I make others do it for me :). I am always on the lookout ways to streamline the process.
    – mpdonadio
    Feb 24, 2014 at 14:32
  • @MPD Just checked: plugin to add users support is about 30 lines of code, total. So when only a specific things needs to be linked, I think it may be lighter than LinkIt. And probably it would be easy to make it work for all aliases, if needed, it's dead simple. On the other hand, CPU power is cheap these days, and our work isn't.
    – Mołot
    Feb 24, 2014 at 14:38
4

The linkit module provides this kind of functionality, however it adds its own button to the editor instead of using the regular link button.

2
  • Looks more powerful and more complicated than CKEditor Link from my answer. Well, these 2 properties usually comes together.
    – Mołot
    Feb 24, 2014 at 8:33
  • Yeah, it requires a little more configuration, however the search functionality is useful if you have a large amount of content.
    – rooby
    Feb 24, 2014 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.