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

Pagebreak integration with PFW doesn't work when dynamically loading plugin #3220

Closed
Comandeer opened this issue Jun 27, 2019 · 3 comments
Closed
Labels
plugin:pastefromword The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:bug A bug.
Milestone

Comments

@Comandeer
Copy link
Member

Type of report

Bug

Provide detailed reproduction steps (if any)

  1. Open https://jsfiddle.net/Comandeer/gb497f1s/
  2. Paste linked Word document content into the editor.
  3. Check if there is a page break inside the editor.

Expected result

Page break is present.

Actual result

There is no page break inside the editor.

Other details

  • CKEditor version: 4.12.0
  • Installed CKEditor plugins: pastefromword, pagebreak

Seems like something's messed up during loading pagebreak plugin via extraPlugins option.

@Comandeer Comandeer added type:bug A bug. status:confirmed An issue confirmed by the development team. plugin:pastefromword The plugin which probably causes the issue. labels Jun 27, 2019
@f1ames
Copy link
Contributor

f1ames commented Jun 27, 2019

The quick workaround is to add extraAllowedContent when initializing editor like:

CKEDITOR.replace( 'editor', {
  extraPlugins: 'pagebreak',
  extraAllowedContent: 'div'
} );

@Comandeer
Copy link
Member Author

After some investigation it seems that the issue is with PFW filter itself. It detects br with page break styles and change it to div. However the same filter then picks up this div and modify it even further, resulting finally in deleting the div.

@f1ames f1ames added this to the 4.12.1 milestone Jun 27, 2019
@f1ames
Copy link
Contributor

f1ames commented Jun 28, 2019

Fixed in 64749bb.

@f1ames f1ames closed this as completed Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin:pastefromword The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:bug A bug.
Projects
None yet
Development

No branches or pull requests

2 participants