Closed yravinderkumar33 closed 5 years ago
Hello, I can't reproduce your issue. Can you provide exact steps to reproduce the problem?
I'm using CKE5 List of plugins that am using 👎
when i try to set this data into the ckeditor it's giving that error
<figure class="image"><img src="/assets/public/content/do_11274189938471731211/artifact/51mmhlbsyel._sx258_bo1204203200__1555407640230.jpg" alt="do_11274189938471731211" data-asset-variable="do_11274189938471731211"></figure>
Note:- this is only happening with the latest version of chrome .
I'm sorry, but still I can't reproduce your issue. Does it happen only with this specific data? Or the editor crashes every time you try to use editor#setData
? Can you clone ckeditor5-build-classic, follow the readme and check whether the problem exists there?
No such error is mentioned in the readme. Please follow these steps to reproduce the issue 1 - "@project-sunbird/ckeditor-build-font": "^1.0.5", ( this is my custom build that I'm using). 2- `import { Component, OnInit } from '@angular/core'; import * as ClassicEditor from '@project-sunbird/ckeditor-build-font'
@Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent {
editor=ClassicEditor; config = { toolbar: ['bold', '|', 'italic', '|', 'underline', '|', 'numberedList', '|', 'fontSize', '|', 'ChemType', '|', 'mathtype', '|', 'subscript', '|', 'superscript', '|', ], fontSize: { options: [ 9, 11, 13, 15, 17, 19, 21, 23, 25 ] }, image: { toolbar: ['imageStyle:alignLeft', 'imageStyle:full', 'imageStyle:alignRight'], styles: ['full', 'alignLeft', 'alignRight', 'alignCenter'] }, isReadOnly: false, removePlugins: ['ImageCaption'] }
} `
3 - template code
<ckeditor [editor]="editor" [config]="config"> </ckeditor>
4 - in my custom build I'm using @wiris/mathtype-ckeditor5 plugin which is causing this issue with the lastest version of chrome . if i disable it everything works fine . 5.
![Uploading Screenshot 2019-06-20 at 11.30.49 AM.png…]()
@yravinderkumar33
My name is Manuel, Plugin Manager at MathType.
We have detected this issue and we are working to fix it. We will back to you when the issue is fixed.
Thanks for your feedback.
@manuelwiris Thanks for your quick response.. Really appreciate. This was the major prod issue in our product after Chrome 75 release has happened 12 days before. @yravinderkumar33 @Mgsy
I'm closing it as the problem isn't related to CKEditor 5.
@Mgsy Can you please share your inputs/findings on this. It will really help us to debug more. Few clarifications:
@manuelwiris @yravinderkumar33
Hi, I'm Xavier, plugin developer at MathType.
Just to close the topic, we have tracked the issue down to a bug in Chrome. As per the thread, the fix in Chrome should be published in the coming days. Meanwhile, I've pushed a fix that should do.
@yravinderkumar33, please update your node_modules and confirm that it is working for you.
@xaviripo , as you said, it is a regex issue on chrome's end.
toView(e) { let t = new DOMParser; e = (e = e.replace(/&.*?;/g, e=>{ let i = t.parseFromString(e, "text/html").body.childNodes[0].data; return "<" == i || ">" == i ? e : i } )).replace(/[\u00A0-\u9999]/gim, e=>"&#" + e.charCodeAt(0) + ";"); const i = this._toDom(e); return this._domConverter.domToView(i, { keepOriginalCase: !0 }) }
The above piece of code is matching the s
character. For reference: https://regexr.com/4gepe. May I know what is the fix from your side? Would like to locally test it before fetching a new pull as our product uses custom build.
Changing /[\u00A0-\u9999]/gim
to /[\u00A0-\u9999]/gm
did the trick, as we actually don't care whether the non-ASCII characters are upper case or lower case, we just want to match the whole indicated range (\u00A0 through \u9999).
Is this a bug report or feature request? (choose one)
🐞 Bug report
💻 Version of CKEditor
CK5
📋 Steps to reproduce
When i'm trying to setData into the editor it's giving out this error . This issue I'm getting only with the latest version of Chrome Version (75.0.3770.90). With previous version it's working fine .
📃 Other details that might be useful