-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
using Html::addHtml()
$html= "<body><p><img src="data:image/jpeg;base64,XXXXXXX" /></p></body>
writer HTML : ok
writer Word2007 : ok
writer ODText : img not showing, but existing without error in the ODT XML (odt is zip, just extract it)
then
$html= "<body><img src="data:image/jpeg;base64,XXXXXXX" /><p>stuff</p></body>
=> img showing in ODT
$html= "<body><div><img src="data:image/jpeg;base64,XXXXXXX" /></div></body>
=> img showing in ODT
just saying
Note: for those wondering how add /> in img,br,hr tag from summernote&other textarea editor, i use HTMLPurifier on the string :
$config = HTMLPurifier_Config::createDefault();
$config->set('URI.AllowedSchemes',array('data' => true));
$this->HTMLPurifier=new HTMLPurifier($config);