p0thi / ckeditor5-line-height-plugin

Plugin for CKEditor5 to create button to change the line height of the selected block.
GNU General Public License v3.0
11 stars 17 forks source link

Issue when adding this package to a Custom ckEditor Build #7

Open mafina opened 2 years ago

mafina commented 2 years ago

I've used the custom builder generator: https://ckeditor.com/ckeditor-5/online-builder/ and everything works fine up until now.

But when I try to add this package as dependency and rebuild the custom build i get this error in console log and my app doesn't work.

core.mjs:6485 ERROR Error: Uncaught (in promise): CKEditorError: ckeditor-duplicated-modules Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-ckeditor-duplicated-modules CKEditorError: ckeditor-duplicated-modules

Any help would be appreciated. Thanks.

JMSevilla commented 2 years ago

same issue

GenesisLQ commented 2 years ago

same issue

gizemay96 commented 2 years ago

same issue

fomin-grigorich commented 2 years ago

same issue. Any suggestions how to fix it?

shihongxins commented 2 years ago

I fixed this issue by copy this plugin source code src/* to custom build folder /src/lineheight/* . image And install this plugin dependencies (notice: keep them same version), then import it import LineHeight from './lineheight/lineheight.js'; ,

/* src/ckeditor.js */
// ...
import LineHeight from './lineheight/lineheight.js';
// ...
Editor.builtinPlugins = [
  // ...
  LineHeight,
  // ...
];
// ...
Editor.defaultConfig = {
  toolbar: {
    items: [
      // ...
      "lineHeight",
      // ...
    ],
  },
};
// ...

rebuild custom folder at last.