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

Editor Placeholder plugin throws an error during editor initialization when used with bbcode and fullpage #4253

Closed
f1ames opened this issue Sep 3, 2020 · 3 comments · Fixed by #4370
Assignees
Labels
good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. plugin:bbcode The plugin which probably causes the issue. plugin:editorplaceholder The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:bug A bug.
Milestone

Comments

@f1ames
Copy link
Contributor

f1ames commented Sep 3, 2020

Type of report

Bug

Provide detailed reproduction steps (if any)

See #4251 (review).

  1. Open any empty editor instance with bbcode plugin and fullPage: true configuration set.

Expected result

Editor initializes and works correctly.

Actual result

Error is thrown (same as in #4249).

Other details

Can be tested on https://codepen.io/f1ames/pen/oNLQvNe.

  • Browser: -
  • OS: -
  • CKEditor version: 4.15.0
  • Installed CKEditor plugins: editorplaceholder,bbcode
@f1ames f1ames added type:bug A bug. status:confirmed An issue confirmed by the development team. plugin:bbcode The plugin which probably causes the issue. plugin:editorplaceholder The plugin which probably causes the issue. labels Sep 3, 2020
@mflorea
Copy link
Contributor

mflorea commented Sep 9, 2020

I don't use the bbcode plugin but I have the same issue because I have a filter that removes the body tag when getData() is called. Basically my input is a full page but my output is not. It may not be a common use case but I think it's valid. The editorplaceholder needs to bulletproof a bit this line where the error is thrown:

data = data.match( fullPageRegex )[ 1 ];

It makes the wrong assumption that getData() always returns the body tag when full page is on.

@f1ames f1ames added good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. workload:low labels Sep 10, 2020
@sculpt0r sculpt0r self-assigned this Nov 9, 2020
@Dumluregn
Copy link
Contributor

For future reference - if you add bbcode plugin using config.extraPlugins, you'll get an error. If you just add it to the explicit plugin list with config.plugins, like in our dev sample, everything works fine.

@CKEditorBot
Copy link
Collaborator

Closed in #4370

@CKEditorBot CKEditorBot added this to the 4.15.2 milestone Nov 20, 2020
@f1ames f1ames modified the milestones: 4.15.2, 4.16.0 Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. plugin:bbcode The plugin which probably causes the issue. plugin:editorplaceholder The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:bug A bug.
Projects
None yet
5 participants