When we want to insert image in announcement it is always left aligned. When we use the same code in intro to journal the selecte dimage is center aligned.
Check this link so you can see result: http://journal.jusk.rs/index.php/ijaq
Image is nicely aligned in editor but after saving the announcement it moves on left in published announcement.
We would like to have both aligned center.
It doesn’t look like the same markup is being permitted in both places. The journal intro field supports arbitrary HTML, but for announcements, the elements/attributes are filtered; see config.inc.php's allowed_html directive.
Public Knowledge Project Team
Markup as in editor is like this: <p><img style="display: block; margin-left: auto; margin-right: auto;" src="/public/logo jusk on wall.png" alt="logo jusk on wall" width="450" height="318" align="middle" /></p>.
I put in config.inc.php
allowed_html = “a[href|target|title],em,strong,cite,code,ul,ol,li[class],dl,dt,dd,b,i,align,u,img[src|alt|align],sup,sub,br,p”
but I still have the same issue. Should it be done through template (Bootstrap) style files or so? I think that HTML5 does not accept align tag.
Yes, I think the align attribute would be stripped as invalid in HTML5. If you add an allowed attribute of style to your img in allowed_html, you should be able to do this in inline CSS with a float. Alternately, you could use classing or ids to tag the markup and target that within your template’s CSS.