Hello,

I am using Drupal 8 (latest as of today)

I am trying to install CodeSnippet (https://www.drupal.org/project/codesnippet)  and CodeTag (https://www.drupal.org/project/codetag) in both cases they refer to /libraries location which does not exist.

I have install drupal 8 on my website under /dp8 folder so I created /dp8/libraries and then in the root of website /libraries and put both folder for CodeSnippet and CodeTag folder and still no luck  when I enable them and I am getting error for example

If you want support for basic inline code blocks, you will need to download the CodeTag plugin for CKEditor. Get the plugin here. (Currently using CodeTag version Plugin not detected)

Please help me. 

So 

1-I have installed the libraries both shows under "extend" but cant' be enabled

2-I have them under /libraries or /dp8/libraries

I appreciate your help. I even tried https://www.drupal.org/project/syntaxhighlighter  and https://www.drupal.org/project/ssch

I want to be able to show code highlighted either on the site or on server side. 

Cheers

Comments

VM’s picture

using codesnippet as example, what is the exact folder path to plugin.js?

When you created the libraries folder, what server permissions were provided to it

barnamah’s picture

The permission is 644 in /libraries/codesnippet 

barnamah’s picture

I changed the permission and copied the codesnippet directory under /libraries and /dp8/libraries and set the permission. Now it works and I was able to set the codesnippet button in CKeditor. Thank you

I renamed the one the codesnippet to codesnippet999 and tried to find out which one of them worked, it has no affect. it seems the javascrip is being included to  main js file of drupal after setup and is included at the bottom of the page. 

mmjvb’s picture

it should be web/libraries

docker@cli:/var/www$ ls -la web/libraries
total 0
drwxr-xr-x  4 docker dialout 128 Jul 18 19:44 .
drwxr-xr-x 22 docker dialout 704 Jul 18 19:41 ..
drwxr-xr-x 10 docker dialout 320 Jan 27 09:16 codesnippet
drwxr-xr-x  7 docker dialout 224 Aug 30  2020 codetag
docker@cli:/var/www$

Obviously depending on your configuration:

docker@cli:/var/www$ composer config extra.installer-paths
{"web\/core":["type:drupal-core"],"web\/libraries\/{$name}":["type:drupal-library"],"web\/modules\/contrib\/{$name}":["type:drupal-module"],"web\/profiles\/contrib\/{$name}":["type:drupal-profile"],"web\/themes\/contrib\/{$name}":["type:drupal-theme"],"drush\/Commands\/contrib\/{$name}":["type:drupal-drush"],"web\/modules\/custom\/{$name}":["type:drupal-custom-module"],"web\/themes\/custom\/{$name}":["type:drupal-custom-theme"]}
docker@cli:/var/www$