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

fix(_cleanStyle): fix for when window.getComputedStyle(context.element.wysiwyg) does not contain style tag #1422

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

KonstantinosAng
Copy link
Contributor

fix for when window.getComputedStyle(context.element.wysiwyg) does not contain style tag

I have a .docx file that contains an element with a style tag mso-element that does not exist in the getComputedStyle resulting in
this.wwComputedStyle[k] being undefined and calling replace on it breaks the editor content. My users were saving a react-hook-form and the editor contents were always empty.

I have attached the word document that breaks the editor. Try to Ctr + A and Ctrl + C, paste the contents in the editor and see the console.

v2.46.4

@KonstantinosAng
Copy link
Contributor Author

@JiHong88 it doesn't let me add a reviewer so I thought I could tag you here

@KonstantinosAng KonstantinosAng changed the title fix(_cleanStyle) fix(_cleanStyle): fix for when window.getComputedStyle(context.element.wysiwyg) does not contain style tag Jul 15, 2024
@JiHong88 JiHong88 merged commit 0772760 into JiHong88:master Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants