What if HTML editor in TYPO3 does not work in Chrome

Due to an Chrome update (73) the RTE editor does not work anymore.

I have fixed it in TYPO3 6.2.X by editing:
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js

Change this:
src: Ext.isGecko ? 'javascript:void(0);' : (Ext.isWebKit ? 'about:blank;' : HTMLArea.editorUrl + 'Resources/Public/Html/blank.html')

To this:
src: Ext.isGecko ? 'javascript:void(0);' : (Ext.isWebKit ? (Ext.isChrome ? 'about:blank;' : 'javascript: \'' + HTMLArea.htmlEncode(this.config.documentType + this.config.blankDocument) + '\'' ): HTMLArea.editorUrl + 'Resources/Public/Html/blank.html')

# Or if not working try:
src: Ext.isGecko ? 'javascript:void(0);' : (Ext.isWebKit ? 'javascript: \'' + HTMLArea.htmlEncode(this.config.documentType + this.config.blankDocument) + '\'' : HTMLArea.editorUrl + 'popups/blank.html')

If you cannot find the code then you use an older version of TYPO3. In that case replace this:
src: UserAgent.isGecko ? 'javascript:void(0);' : (UserAgent.isWebKit ? 'javascript: \'' + Util.htmlEncode(this.config.documentType + this.config.blankDocument) + '\'' : HTMLArea.editorUrl + 'Resources/Public/Html/blank.html')

With this:
src: UserAgent.isGecko ? 'javascript:void(0);' : (UserAgent.isWebKit ? 'about:blank;' : HTMLArea.editorUrl + 'Resources/Public/Html/blank.html')

For TYPO3 7 adjust this file:
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/HTMLArea/Editor/Editor.js

Important note. In TYPO3 7 the cache can be sitting in your way. Make sure you test it in Incognito mode. When it is working you can flush the cache by opening the view source of the iframe and then press CTRL-F5 to reload the page.
Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp