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

Export to PDF - Need URL for AJAX request #257

Open
hutber opened this issue Apr 11, 2024 · 1 comment
Open

Export to PDF - Need URL for AJAX request #257

hutber opened this issue Apr 11, 2024 · 1 comment

Comments

@hutber
Copy link

hutber commented Apr 11, 2024

image

I am getting ready the code while I wait for my company to finally give me the OME licence key.

So in the mean time I have no license key plugged into the config, and when I click "export to PDF" I get the above error.

I am unsure what the connector url is meant to be and what its function is, is that meant to give me the PDF file? Does jodit just send the html to that url? It is not in any documentation on the site.

    const [localConfig, setConfig] = useState({
      readonly: false,
      toolbar: true,
      fullsize: fullSize,
      globalFullSize: false,
      uploader: {
        url: 'https://sitename.ru/connector/index.php?action=upload'
      },
      ...config,
    });

    <JoditEditor
      config={localConfig}
      onChange={handleWYSIWYGChange}
      value={value}
      removeButtons={['fullsize']}
      {...props}
    />
@archidigital
Copy link

Hi @hutber ,
Specify the following configuration: exportDocs: { ajax: { url: "https://xdsoft.net/jodit/finder/" } } and it should work.
Below, an example of working code

import JoditEditor from "jodit-pro-react";
import { FC, useState } from "react";

export const DocumentEditor: FC = () => {
    const [editorText] = useState<string>("");

    const [localConfig] = useState({
        exportDocs: {
            ajax: {
                url: "https://xdsoft.net/jodit/finder/"
            }
        },
        license: "*****-*****-*****-*****",
        buttons: ["exportDocs"]
    });

    return <JoditEditor value={editorText} config={localConfig} />;
};

I'm using [email protected] and [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants