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

getPDF button not working #397

Open
asadgulxar opened this issue Jun 9, 2024 · 1 comment
Open

getPDF button not working #397

asadgulxar opened this issue Jun 9, 2024 · 1 comment

Comments

@asadgulxar
Copy link

The getPDF toolbox button is not functioning properly. When I click on it, nothing happens, and the console does not display any errors.
Here are my imports:


// Require Editor CSS files.
import 'froala-editor/css/froala_style.min.css';
import 'froala-editor/css/froala_editor.pkgd.min.css';

// Require Editor JS files.
import 'froala-editor/js/froala_editor.pkgd.min.js';
import 'froala-editor/js/plugins.pkgd.min.js';
import 'froala-editor/js/plugins/print.min.js';

import FroalaEditorComponent from 'react-froala-wysiwyg';

my package version is "react-froala-wysiwyg": "^4.2.0"

config:


import Froalaeditor from 'froala-editor';

export const froalaEditorConfig = {
  enter: Froalaeditor.ENTER_BR,
  tableStyles: {
    'no-border': 'No border',
  },
  // language: 'ar',
  useClasses: false,
  attribution: false,
  toolbarSticky: false,
  charCounterCount: false,
  fontFamilySelection: true,
  fontSizeSelection: true,
  paragraphFormatSelection: true,
  heightMin: 200,
  // heightMax: 550,
  linkInsertButtons: [],
  toolbarButtons: [
    'paragraphFormat',
    'lineHeight',
    'align',
    'getPDF' // for pdf
    'print',
    'formatOL',
  ],
};

@tvaughan73
Copy link

Docs do not make it clear at all that you need the library here for this to work. https://github.com/eKoopmans/html2pdf.js
Also make sure it loads before froala or it won't work.

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