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

setData: unexpected result with latex expression #5906

Closed
centaur54dev opened this issue Dec 5, 2019 · 3 comments
Closed

setData: unexpected result with latex expression #5906

centaur54dev opened this issue Dec 5, 2019 · 3 comments
Labels
resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). type:bug This issue reports a buggy (incorrect) behavior.

Comments

@centaur54dev
Copy link

📝 Reproduction steps

Using setData with an argument containing a latex expression produces unexpected result. For example:

let editor = ClassicEditor
	        .create(  editorDiv )
	        .then( (editor) => {
                    editor.setData("<p>\\[x=0\\]</p>");
	        } )

✔️ Expected result

\[x=0\]

❌ Actual result

x=0x=0

📃 Other details

It is remarkable that the issue occurs only during editor initialization. Running the setData command with the same argument, through the console (after the editor is loaded) works normally.

  • Browser: chrome
  • OS: linux mint
  • CKEditor version: 16
  • Installed CKEditor plugins: default ClassicEditor
@centaur54dev centaur54dev added the type:bug This issue reports a buggy (incorrect) behavior. label Dec 5, 2019
@Mgsy
Copy link
Member

Mgsy commented Dec 10, 2019

Hello, I'm not able to reproduce your issue. It works fine if I use editor#setData after the initialization as well as in the console. Do you use any third-party plugins/libraries?

@Mgsy Mgsy added the pending:feedback This issue is blocked by necessary feedback. label Dec 10, 2019
@ETHwsch
Copy link

ETHwsch commented Dec 12, 2019

I can confirm that a plain Ckeditor 5 version works correctly: https://jsfiddle.net/Lvywge37/4/

The error seems to be related to the ckeditor5-math-preview plugin: https://github.com/centaur54dev/ckeditor5-math-preview#readme
An example which envisions the wrong behavior can be seen here: https://jsfiddle.net/ub472vq6/

@centaur54dev
Copy link
Author

Indeed i have accidentally loaded the math-preview plugin when i was looking at this bug. Accept my apologies.

@Mgsy Mgsy added resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). and removed pending:feedback This issue is blocked by necessary feedback. labels Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

3 participants