Multiple TinyMCE instances in Publii's WYSIWYG editor screen? #1715
-
I'm trying to add some tabbed pages to my site, but have the editor set up so that it's not hard for people without coding knowledge to enter content. Is there some way to have multiple WYSIWYG boxes? Basically, two separate MCE instances -- where one is for Tab 1 and the other is for Tab 2. Then I could call these via variables in my template. I found the TinyMCE docs for this, but wasn't sure if it could be adapted. https://www.tiny.cloud/docs/tinymce/latest/multiple-editors/ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Do you mean tabs like this? Unfortunately, there's no "graphical" way of displaying more complex layouts like that in a meaningful way in the WYSIWYG editor (AFAIK). That said, I'd suggest the following: Find an HTML + CSS code snippet for the tabbed groups that works for you, on Codepen or Free Frontend or the like. Then, find a way for your user to easily insert it. The Template Plugin could be something to look into. The start and end of Maybe @bjazmoore's plugin could help as well: https://github.com/bjazmoore/Key-Replacement. Your users would just have to enter the special "keyword" to designate where tab content starts and ends, and you could even combine this with the Template Plugin. If the presence of tabs is consistent across many pages, and the number of tabs and position is the same (i.e. at the top of the page, below the title), you could consider hard-coding the tabbed group code in the post.hbs (in the theme files), and making the content editable via the Theme Settings API > Post Settings. Last note: make sure tabbed groups are the right call, UX-wise. |
Beta Was this translation helpful? Give feedback.
Do you mean tabs like this?
Unfortunately, there's no "graphical" way of displaying more complex layouts like that in a meaningful way in the WYSIWYG editor (AFAIK).
That said, I'd suggest the following:
Find an HTML + CSS code snippet for the tabbed groups that works for you, on Codepen or Free Frontend or the like.
Then, find a way for your user to easily insert it. The Template Plugin could be something to look into. The start and end of
divs
for each tab might be hard to distinguish in the editor, though, so consider creating some Post Editor CSS rules (they'll only appear in the editor).Maybe @bjazmoore's plugin could help as well: https://github.com/bjazmoore/Key-Replacement. Your…