You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Rendering html with an inline style that has a font-size as a word (e.g. small) throws an error which crashes the editor completely in my page.
Paste html in editor: <p><span style='font-size: small;'>Test</span></p>
Open browser console, see error:
Uncaught TypeError: Cannot read properties of null (reading '1')
at Object._cleanStyle (core.js:5277:96)
at Object._cleanTags (core.js:5335:34)
at String.replace (<anonymous>)
at Object.cleanHTML (core.js:5460:111)
at Object.getContents (core.js:5114:35)
at h (history.js:56:30)
at Object.push (history.js:114:21)
at Object.toggleCodeView (core.js:4685:34)
at Object.commandHandler (core.js:4515:26)
at Object.actionCall (core.js:4464:22)
Uncaught TypeError: Cannot read properties of null (reading '1')
at Object._convertFontSize (core.js:5224:29)
at Object.active (fontSize.js:66:89)
at Object._applyTagEffects (core.js:6394:90)
at HTMLDivElement.onClick_wysiwyg (core.js:6581:23)
Desktop (please complete the following information):
OS: Windows
Browser: Chrome
Version: 111.0.5563.147
Additional context
Looking at the code, the bug is only if fontSize plugin is utilised. Possibly a mistmatch in the regex used for testing and the regex used for matching/replacing:
Describe the bug
Rendering html with an inline style that has a font-size as a word (e.g. small) throws an error which crashes the editor completely in my page.
To Reproduce
Steps to reproduce the behavior:
Code view
button<p><span style='font-size: small;'>Test</span></p>
Expected behavior
HTML with valid font-size style attribute should render without crashing.
Screenshots
Crash:
On Suneditor.com
Desktop (please complete the following information):
Additional context
Looking at the code, the bug is only if fontSize plugin is utilised. Possibly a mistmatch in the regex used for testing and the regex used for matching/replacing:
The text was updated successfully, but these errors were encountered: