Using Linkit with TinyMCE and Drupal

tutuploadstutuploads1._Download_Linkit.png

Linkit provides an easy interface for internal linking. Linkit links to nodes, users, views and terms by default, using an autocomplete field.
Linkit requires that Pathologic is also installed.

Pathologic is an input filter which can correct paths in links and images in your Drupal content in situations which would otherwise cause them to “break;” for example, if the URL of the site changes, or the content was moved to a different server.

1. Download Linkit

tutuploadstutuploads1._Download_Linkit.png

Download Pathologic from this page http://drupal.org/project/pathologic
Download the module from http://drupal.org/project/linkit
Install and enable linkit and at least one of linkit_node, linkit_views, linkit_taxonomy or linkit_user

2. Install using the “Install Module” facility

tutuploadstutuploads2._Install_using_the_Install_Module_facility.png

Go to “Modules” and then “Install new module.”

2. Browse and upload

tutuploadstutuploads2._Browse_and_upload.png

Browse your local computer and choose one of the files you just downloaded.
First upload Pathologic.
Then upload Linkit

If you upload Linkit first you will get an error message saying that it did not upload. If you upload Pathologic first you will not get an error message.

3. Enable Pathologic and Linkit

tutuploadstutuploads3._Enable_Pathologic_and_Linkit.png

Enable Pathologic first, by putting a check in the checkbox, then scroll down the page and click the check marks on all the Linkit check boxes.

tutuploadstutuploadsmedia_1309237181820.png

Scroll all the way to the bottom of the page and click on “Save Configuration” Notice that after you’ve saved, all the words “disabled”, in red, are replaced with “enabled” in green.

tutuploadstutuploadsmedia_1309237242778.png

Now you need to put the access icon on the editor’s menu bar.

4. Add the link icon to your WYSIWYG editor

tutuploadstutuploads4._Add_the_link_icon_to_your_WYSIWYG_editor.png

On the same “Module” page, scroll until you find the “User Interface” section and click on the Wysiwyg “Configure” link.

tutuploadstutuploadsmedia_1309238341249.png

Choose the WYSIWYG profile you want to use Linkit on and click on “Edit”. You can use it an any or all of them. After you enable it on one profile, repeat the procedure on any other profiles you want to use it on.

tutuploadstutuploadsmedia_1309275717512.png

Expand Buttons and Plugins by clicking on it. Then scroll down and find the Linkit checkbox. Enable it by clicking the checkbox.

tutuploadstutuploadsmedia_1309275845948.png

Check the box and scroll down to click the “Save” button.

tutuploadstutuploadsmedia_1309276308310.png

You will know you are successful if you see an additional link icon on your toolbar. You will now have three icons that deal with links, the default link icon, the unlink icon and the Linkit icon. If you want to remove the default link you can uncheck it from Buttons and Plugins page, but you don’t need to do that. It will still be functional.

tutuploadstutuploadsmedia_1309276384858.png

When you click linkit you will see the “Browse server” button on the dialog box.

Author

0 0 votes
Article Rating
Subscribe
Notify of
guest

2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Florian
Florian
12 years ago

Thanks alot for this tutorial. I’d recommend to add a few lines about Pathauto, as it wasn’t enabled for my input format by default and thus the links didn’t work.

Quoting the Pathologic documentation: “Go to Administration > Site configuration > Input formats (Drupal 6) or Administration > Configuration > Content authoring > Text formats (Drupal 7). A list will appear of the various input formats your site uses. Find one in the list which you want to use Pathologic with, and click the “configure” link for that format.”

Nick
12 years ago
Reply to  Florian

You’re welcome, Florian! Also, thanks for adding that information!

Kind regards,

Nick

2
0
Would love your thoughts, please comment.x
()
x