Ckeditor5: Throws an error if img tag has src

Created on 14 Oct 2019  ·  2Comments  ·  Source: ckeditor/ckeditor5

📝 Provide detailed reproduction steps (if any)

  1. … Type anything then uploaded an image
  2. … Successfully saved to db
  3. … But when fetching the data in db then trying to use the editor data to display by editor throws this error:

ERR: Error: Parse error - This page contains the following errors:error on line 1 at column 151: EntityRef: expecting ';' Below is a rendering of the page up to the first error. at C_._toDom (index.es.js:2650) at C_.toView (index.es.js:2650)

✔️ Expected result

What is the expected result of the above steps?
Should not have error

❌ Actual result

What is the actual result of the above steps?
Throws an error

📃 Other details

Used the same saved data and removed the src part of img from the string then the editor works but without the image

  • Browser: …
  • OS: …
  • CKEditor version: …
  • Installed CKEditor plugins: …

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

bug

All 2 comments

It's hard to say what is a source of the problem because we don't know how you save and load your data. The data produced by CKEditor 5 is a valid HTML, so probably there's something wrong in your load/save logic.

Please, see our Getting and saving data guide and review your solution.

Thanks @Mgsy .

I think the problem is the format of my image url that is causing the problem.

Thanks for your fast reply and gonna close this issue for now.

Was this page helpful?
0 / 5 - 0 ratings