Home > Mobile >  How to use 2 different ckEditor5 in one build
How to use 2 different ckEditor5 in one build

Time:09-28

I am following this link(documentation) but it is not working.

enter image description here

please guide me about that problem if anyone knows about it.

CodePudding user response:

use different

id

for each CKEditor.

if the issue still persists then try sharing some code so i can see what's happening

CodePudding user response:

Yes, you can do that. You can install two versions of same npm modules. First of all, delete the existing version and install using this command and you can provide the version number to install it. This is the command:

npm i <package_name_alias>@npm:<package_name>

In your case, it should become this(for latest version):

npm i latest-ckEditor5@npm:ckEditor5

And for any other version lower than the latest use this:

npm i latest-ckEditor5@npm:ckEditor5@versionNumber

In your package, it will look something like this:

  "dependencies": {
    "latest-ckEditor5": "^latestPackage",
    "oldest-ckEditor5": "Olderverion"
  }

You can use them like this:

import { ckEditor5 } from 'latest-ckEditor5'; // check the exported member name
import { ckEditor5 } from 'oldest-ckEditor5';
  • Related