Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
DReffects2 Posted May 29, 2022 Posted May 29, 2022 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!
Randy Calvert Posted May 30, 2022 Posted May 30, 2022 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
DReffects2 Posted May 30, 2022 Author Posted May 30, 2022 Interesting, thank you! Where are the configs for CKEditor located so that I can activate the plugin? 🙂
DReffects2 Posted May 30, 2022 Author Posted May 30, 2022 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?
Martin A. Posted May 31, 2022 Posted May 31, 2022 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. DReffects2 1
DReffects2 Posted May 31, 2022 Author Posted May 31, 2022 Thanks. I Found a "solution" as described within this "Bug" Report :
Recommended Posts