Search the Community
Showing results for tags 'images in tinymce'.
Found 1 result
OLSA posted a topic in General SupportHello for all, this is old question (and problem) - what is the best option to allow clients to place images inside text in editor field ("body")? Please note that I am not meaning here about default editor image button, because that is bad for administration, clean text data, responsive design etc... My client request is to get them option to create rich content like on many popular world news portals. As one example they want option to insert gallery in some part of text. My answer was that with PW are many, many options how that could be solved - but need to find what is the best for all (user friendly for "editors" (role), clean data storage, manipulation with data and frontend rendering). There are options like using custom markup tags (eg. ![images](1,2,3), or PW Hanna code [[images=1,2,3]]) or another option with repeatable block (editor + image field). What I don't like with markup tags is storing custom (strange) txt format in field, and not so user friendly (could be optimised with custom editor plugin). Using repeatable block can be more user friendly than using macros, but repeatable blocks, are repeatable... and want to avoid later complexity (export, import...). What do you think about custom editor plugin what would insert this: <figure data="1,2,3"><!--data attribute store images ordering number--></figure> In that "empty" figure HTML tag we can store on-page images ordering number using data attribute. To make it visible in editor we can use custom editor.css... That editor plugin can be "button" what would open some modal or popup with options to select on-page image(s). Later in frontend it's not problem to use some PHP HTML parser (eg. Simple HTML DOM Parser) to get and replace figure HTML tag. Please what is your suggestion about this request? Thanks and regards.