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

Import from Word plugin not working on custom build #458

Open
axelvaindal opened this issue Mar 7, 2024 · 2 comments
Open

Import from Word plugin not working on custom build #458

axelvaindal opened this issue Mar 7, 2024 · 2 comments
Labels
support:2 An issue reported by a commercially licensed client.

Comments

@axelvaindal
Copy link

Hello,

We're trying to use the import from Word feature, but whenever we import a Word in our Editor, the editor refreshes itself and returns an error we are unable to debug (see screenshot below).

image

As you can see, the Editor seem to be rebuilt and the toolbar is added a second time.
The onReady event is fired twice (once when the page loads first, and a second time when the document is added from the import from word feature).
An error is indeed fired when trying to upload the document, but I really don't know what to do with it.

image

From the look of it, it might be related to the development token and generated user ids but we cannot find relevant docs to help us out.

We have created a custom build with the import from word plugin, and here is our react component:

<CKEditor
        config={{
          licenseKey: "some-license-key",
          language: "fr",
          pagination: {
            // A4
            pageWidth: "21cm",
            pageHeight: "29.7cm",

            pageMargins: {
              top: "20mm",
              bottom: "20mm",
              left: "12mm",
              right: "12mm",
            },
          },
          importWord: {
            tokenUrl:
              "some-token",
          },
        }}
        editor={DecoupledEditor}
        data="<p>Hello from CKEditor&nbsp;5!</p>"
        onReady={(editor) => {
          // You can store the "editor" and use when it is needed.
          const toolbar = document.getElementById("editorToolbar");
          if (toolbar) {
            toolbar.appendChild(editor.ui.view.toolbar.element!);
          }
          console.log("Editor is ready to use!", editor);
        }}
        onChange={(event) => {
          console.log(event);
        }}
        onError={(event) => {
          console.log("An error has occured");
          console.log(event);
        }}
        onBlur={(event, editor) => {
          console.log("Blur.", editor);
        }}
        onFocus={(event, editor) => {
          console.log("Focus.", editor);
        }}
      />
    </div>

Thanks for your help,

@axelvaindal
Copy link
Author

Note that the comment plugin display the exact same behaviour, so I guess we are missing something in terms of configuration with the development token, although it's not really clear what 🤔

@Witoso
Copy link
Member

Witoso commented Mar 7, 2024

@axelvaindal if problems are related to premium features, please reach out to our support, we can spend much more time on investigation then.

@aldonace-wu aldonace-wu added the support:2 An issue reported by a commercially licensed client. label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support:2 An issue reported by a commercially licensed client.
Projects
None yet
Development

No branches or pull requests

3 participants