ckeditor5-angular icon indicating copy to clipboard operation
ckeditor5-angular copied to clipboard

Can't add plugin made with Package Generator

Open piernik opened this issue 1 year ago • 3 comments

I'm trying to add plugin that is created with Package Generator

It is clean plugin generated with dll:build command. What next? If I import it like import LukanaPlugin from '../../../../../../../../libsJs/ckeditor5-lukana/build/lukana.js';

I get error while console.log(LukanaPlugin): ReferenceError: CKEditor5 is not defined

also tried import {LukanaPlugin} import * as LukanaPlugin. Always the same error.

How to import dll plugins in angular? Or how to export them in Package Generator?

piernik avatar Jan 18 '24 10:01 piernik

How to import dll plugins in angular?

Make sure that your app includes the main DLL build, without it, the plugin will not work:

<!-- Base DLL build in plain HTML -->
<!-- Note: It includes ckeditor5-paragraph too. -->
<script src="path/to/node_modules/ckeditor5/build/ckeditor5-dll.js"></script>

Could you share more info about your setup?

Witoso avatar Jan 22 '24 13:01 Witoso

I want to import it in Angular App. There should not be script tags.

piernik avatar Jan 30 '24 12:01 piernik

First, you need to import our base DLL:

import ckeditor5Dll from "ckeditor5/build/ckeditor5-dll.js";

and then your plugin. Maybe our DLL Strapi integration could serve as a reference, although it's not in Angular.

Witoso avatar Jan 31 '24 09:01 Witoso