froala / angular-froala-wysiwyg

Angular 4, 5, 6, 7, 8 and 9 plugin for Froala WYSIWYG HTML Rich Text Editor.
https://froala.com/wysiwyg-editor
732 stars 200 forks source link

Blocked a frame with origin "https://XXX" from accessing a cross-origin frame #402

Open skyfloyd opened 4 years ago

skyfloyd commented 4 years ago

I am trying to use angular-froala-wysiwyg:3.1.1 from my angular application(on domain https://pstest.opinionwizard.com), which works fine. But when I am trying to use https://pstest.opinionwizard.com by iframe from https://test.opinionwizard.com/ I see Uncaught Error: Blocked a frame with origin "https://pstest.opinionwizard.com" from accessing a cross-origin frame. error. image

It throws error on _nodemodules/angular-froala-wysiwyg/editor/editor.directive.js : line 185 _this._editor = new FroalaEditor(_this._element, _this._opts);

I use

"angular-froala-wysiwyg": "^3.1.1",
"froala-editor": "^3.1.1",

P.S. It worked fine with angular-froala-wysiwyg:2.9.3

skyfloyd commented 4 years ago

I solved this issue by setting document.domain = 'opinionwizard.com'; on https://pstest.opinionwizard.com and https://test.opinionwizard.com/ sites.