Using Linkit with the CKEditor module

Install the Linkit module and enable it.

>>> Insert a short explanation why we need a profile. <<<

Create a Linkit profile

  1. Go to /admin/modules and click on its Configure link.
  2. You’ll be now on page /admin/config/content/linkit.
  3. Click on the ADD NEW PROFILE tab.
  4. For example lets create a profile for admins:
    • In field set ROLES WITH ACCESS click the administrator checkbox.
    • In field set LINKIT PLUGINS click the content that should be searched by Linkit, e.g. click Node if Linkit should present page names in its auto-complete search field.
    • In field set NODE PLUGIN SETTINGS check all node types that should included in the search.
    • In field set HTML ATTRIBUTES check all the link attributes you need Linkit to include when creating the links.
    • Ignore the AUTOCOMPLETE OPTIONS, its setting will cover most use cases. You can always come back and fine-tune these options.
  5. Click Save

Now that we have configured the Linkit module we need to tell CKEditor that it should use Linkit.

Enable Linkit use in CHEditor

  1. Go to /admin/config/content/ckeditor.
  2. You’ll see a list of CKEditor profiles.
  3. Click on the Edit link of the profile that you want to use Linkit with.
  4. Open the field set EDITOR APPEARANCE.
  5. Find the checkbox grouping Plugins.
  6. Select the checkbox Support for Linkit module.
  7. Find section Toolbar. This should be right above the Plugins section. Here you can configure the CKEditor toolbar via drag-and-drop.
  8. Under All buttons find the Linkit link button. This button features a horizontal chainlink with a red plus sign next to it. (Hover over it and the tooltip will say Linkit).
  9. Drag this button to section Used Buttons.
  10. Click Save.

You are done. Go to any content item of a type that was enabled in the Linkit profile and you’ll see now the linkit button in the CKEditor toolbar.

Comments

wernerglinka’s picture

Explanation for what is a Linkit profile:
A profile defines Linkit's scope. By defining which roles have access to a profile we are able to provide sets of linkit capabilities to various roles.
For example one profile for a admin could include search for nodes, Taxonomy tern and users, while a profile for an editor could include only nodes.

Khayelitsha’s picture

Version: 7.x-2.3 » 7.x-2.5

Hello,
I am unable to create a profile for Linkit : it says the website encountered an inexpected error and to try again later. It's been a week so I guess there's no point in waiting, I have to fix it somehow. I have installed the Linkit module 7.x-2.5, on a 7.10 Drupal core... any idea where the problem could be?
Thank you

anon’s picture

Khayelitsha
Please, check the DB log and see if you get more info there.

Also, please make sure you have entity installed.

Khayelitsha’s picture

Hello Anon,

I'm not sure where/what the "DB log" is (database? I'm a pure newbie and I'm no informatician!). Anyway I have some info from the Drupal admin reports : when I can't create a profile, it says

PDOException : SQLSTATE[42S02]: Base table or view not found: 1146 Table 'fesefaasbl2_h1.linkit_profiles' doesn't exist: INSERT INTO {linkit_profiles} (name, admin_title, data, role_rids, weight) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => untitled_profile [:db_insert_placeholder_1] => Untitled profile [:db_insert_placeholder_2] => a:6:{s:7:"plugins";a:3:{s:11:"entity:node";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:1;}s:20:"entity:taxonomy_term";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}s:11:"entity:user";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}}s:11:"entity:node";a:4:{s:18:"result_description";s:0:"";s:7:"bundles";a:4:{s:9:"evenement";s:9:"evenement";s:11:"page_priv_e";s:11:"page_priv_e";s:13:"page_publique";s:13:"page_publique";s:4:"poll";s:4:"poll";}s:15:"group_by_bundle";i:0;s:19:"include_unpublished";i:0;}s:20:"entity:taxonomy_term";a:1:{s:18:"result_description";s:0:"";}s:11:"entity:user";a:1:{s:18:"result_description";s:0:"";}s:12:"autocomplete";a:3:{s:9:"charLimit";i:3;s:4:"wait";i:350;s:13:"remoteTimeout";i:10000;}s:10:"attributes";a:5:{s:3:"rel";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}s:5:"class";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}s:9:"accesskey";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}s:2:"id";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}s:5:"title";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}}} [:db_insert_placeholder_3] => a:1:{i:3;i:1;} [:db_insert_placeholder_4] => 0 ) dans drupal_write_record() (ligne 6888 dans /home/cust/f/e/fesefaasbl2_h1/www/includes/common.inc).

All I can do with this is check common.inc but it says a lot of things and I don't know where to look (I'm not supposed to count untill 6888 right? Should I open common.inc with smth else than TextEdit?). Anyway I'm not sure I'm going to understand it more than I do understand this log above...

Thank you soo much

{edit :} I have entity API and tokens installed

anon’s picture

Khayelitsha's:
Reinstall linkit, there is a database table missing. And also, please use the latest Drupal verison.

anon’s picture

Status: Active » Fixed

Werner Glinka THANKS!
I have commited your text to the README.txt file.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.