[Cerrado] Post Snippets integration into views editors
This support ticket is created hace 6 años, 5 meses. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.
With this plugin, I can easily create reusable html snippets, ie: panels, buttons, cards, etc. And then I can scaffold out reusable blocks of html with the post snippets quicktag in code editors.
This doesn't generate shortcodes, this actually lets you scaffold blocks of markup. It's actually a bit like your bootstrap Grid button that's in the same editor where you can pick a layout to scaffold.
This plugin works perfectly on pages, but it causes a toolset codemirror.js error when fired from the editors in views, content templates & cred. And that's where I would really need it.
I've attached a screenshot of the error after clicking the Post Snippets button.
That looks like a very useful plugin, but—unfortunately—I have been able to confirm the error you describe if trying to use it to edit Views Content Templates.
I have escalated this thread so that it can be investigated further and to see if it is something we can fix on our side or whether we need to liaise with the plugin author.
If it ends up being the case that it won't work, do you know of any plugin or method where I can store individual html snippets and scaffold them into the views editor with a button for each? Much like the Bootstrap Grid button you currently have in Toolset views editors.
I see loads of plugins where you can load in shortcodes into the editors, but I specifically need to be able to drop in html markup. Nothing more.
I was waiting for clarification about the issue from my colleagues.
It seems that the Post Snippets plugin calls the addButton() method wrongly in the file \plugins\post-snippets\src\PostSnippets\WPEditor.php line 137 which causes the Code Mirror conflict.
I suggest you pass that on to the plugin author, and hopefully they can fix.
In the meantime I've been looking for alternatives, but haven't come across one myself.
I found a good many HTML snippet inserters, but they each involved inserting the HTML using a shortcode or by specifying a location, they weren't for inserting HTML scaffolding in the editor which is what I think you are after.
Is this for personal use rather than for other users of the website?
If you can't find an alternative you could just use a text expander like aText (enlace oculto) or a similar alternative.
To answer your question earlier, an outside program won't work for me as I need something to scaffold out html snippets right in wp-admin for a few different site developers to use.
I can't believe there's no other options beyond this plugin to store html snippets and then scaffold/echo out the contents of the snippet right into the editor.
Is there a workaround I can use for the time being to kill that Types codemirror error?