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
- Go to /admin/modules and click on its Configure link.
- You’ll be now on page /admin/config/content/linkit.
- Click on the ADD NEW PROFILE tab.
- 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.
- 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
- Go to /admin/config/content/ckeditor.
- You’ll see a list of CKEditor profiles.
- Click on the Edit link of the profile that you want to use Linkit with.
- Open the field set EDITOR APPEARANCE.
- Find the checkbox grouping Plugins.
- Select the checkbox Support for Linkit module.
- Find section Toolbar. This should be right above the Plugins section. Here you can configure the CKEditor toolbar via drag-and-drop.
- 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).
- Drag this button to section Used Buttons.
- 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
Comment #1
wernerglinka commentedExplanation 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.
Comment #2
Khayelitsha commentedHello,
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
Comment #3
anonKhayelitsha
Please, check the DB log and see if you get more info there.
Also, please make sure you have entity installed.
Comment #4
Khayelitsha commentedHello 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
Comment #5
anonKhayelitsha's:
Reinstall linkit, there is a database table missing. And also, please use the latest Drupal verison.
Comment #6
anonWerner Glinka THANKS!
I have commited your text to the README.txt file.