Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't add plugin made with Package Generator #402

Open
piernik opened this issue Jan 18, 2024 · 3 comments
Open

Can't add plugin made with Package Generator #402

piernik opened this issue Jan 18, 2024 · 3 comments
Labels
pending:feedback This issue is blocked by necessary feedback.

Comments

@piernik
Copy link

piernik commented Jan 18, 2024

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?

@Witoso
Copy link
Member

Witoso commented Jan 22, 2024

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 Witoso added the pending:feedback This issue is blocked by necessary feedback. label Jan 22, 2024
@piernik
Copy link
Author

piernik commented Jan 30, 2024

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

@Witoso
Copy link
Member

Witoso commented Jan 31, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending:feedback This issue is blocked by necessary feedback.
Projects
None yet
Development

No branches or pull requests

2 participants