Needs review
Project:
CKEditor Copy Formatting
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
25 May 2019 at 17:08 UTC
Updated:
29 Jun 2019 at 07:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
alonaoneill commentedI uploaded a patch that fixs dependency namespacing in the .info.yml file.
Thanks!
Comment #3
supriya1992 commentedComment #4
supriya1992 commentedHi,
For using ckeditor dependency inside any custom module, we have to first define dependency inside library.yml file which will attached inside anywhere in that custom module.
Code for library.yml file as:
scripts:
js:
js/my_script.js: {}
dependencies:
- ckeditor/drupal.ckeditor
Now just create a js file named "my_script.js" inside js folder(or where you want)
Final step is to attach the library where you want as:
[
"#attached" => [
"library" => ["mymodule/scripts"]
];
Here mymodule/scripts ---- is used to attached the library name "scripts" define inside library.yml file and "mymodule" is the name of custom module.