Jump to content

Recommended Posts

Posted

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!

Posted

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?

Posted

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...