While I've noticed similar questions on this topic in the past, my query has a unique angle.
In today's world of responsive design, it has become crucial to be able to integrate divs with media query CSS into our content seamlessly.
I am interested in creating a button that can easily insert divs into the text area of Wordpress pages. Although a WordPress shortcode could achieve this, I would prefer the page layout to appear exactly as it will on the website without causing confusion for clients, especially when it comes to layout.
We can add tables to tinyMCE which display accurately in the editor by enabling tinyMCE's table button in Wordpress or using a WordPress plugin. I'm aiming for a similar effect with divs.
When switching to the text tab in Wordpress edit pages/posts, we can add HTML markup and see the divs when reverting back to Visual (using TinyMCE). However, this method might be too complex for most clients, making it less practical.
Therefore, I have two queries: 1. Is it feasible to create a TinyMCE button that adds divs visually matching their appearance on the web page? 2. Can the outcome of WP shortcodes be displayed visually in the editor?
Thank you in advance,
Neil