Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted May 29, 20222 yr Hey Guys, so for some reason I really want to preserve HTML Code with embedded base64 images like this one: <div> <p>Taken from wikpedia</p> <img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUA AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO 9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" /> </div> unfortunately the base64 image breaks apart when saving. There seem to be some options for CKEditor to allow this. Could you point me into the right direction please? Thanks!
May 30, 20222 yr Community Expert This is not directly supported in the base software. There look to be some ckeditor plugins that might be able to help with this however. For example, check out: https://ckeditor.com/cke4/addon/base64image
May 30, 20222 yr Author Interesting, thank you! Where are the configs for CKEditor located so that I can activate the plugin? 🙂
May 30, 20222 yr Author Update: managed to install various base64 plugins. while they all work during the edit phase (pictures are getting pasted as base64 encoded images in the html code) when i hit 'save' the image tag gets stripped and the base64 data part remains as text. Is there a separate <img> tag cleanup/filtering method in play?
May 31, 20222 yr Yeah, looks like there's a method in the editor parser (\IPS\Text\Parser::isAllowedImageUrl()) that will convert an illegal image element to <span> if the image source is not allowed. The first condition in this method is if the source is a valid URL.