Skip Navigation

[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.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

Etiquetado: 

Este tema contiene 8 respuestas, tiene 2 mensajes.

Última actualización por Nigel hace 6 años, 5 meses.

Asistido por: Nigel.

Autor
Mensajes
#597061

Jay
screenshot.png

I am using Toolset without the Layouts plugin as I prefer hand coding views & content templates.

I am trying to use the popular Post Snippets plugin:
https://wordpress.org/plugins/post-snippets/

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.

Any idea what could be causing the js conflict?

#597210

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+01:00)

Hi Jay

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.

I'll keep you posted.

#597427

Jay

Any word on this Nigel?

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.

Thanks again.

#598574

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+01:00)

Hi Jay

Sorry for the delay getting back to you.

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.

#598616

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+01:00)

Hello again Jay

Maybe hold off contacting the plugin author for a little while.

My colleague wants a second pair of eyes on this to confirm what specific information to pass on.

#598680

Jay

Thank you so much for the followup Nigel!

#599493

Jay

Any word Nigel?

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?

Thanks again
Jay

#599625

Jay

Hi Nigel, I was just wondering if this thread is closed?

#599724

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+01:00)

Hi Jay

No, sorry it is not closed, I was waiting for an update from my colleague to have something to update you with.

After further investigation he has determined that it is a problem with our code, not with the Post Snippets plugin, and is something we need to fix.

It is now with our developers as a bug. There is no workaround, I'm afraid. When they produce a solution I'll let you know as soon as it is available.

I had another look but couldn't find an alternative plugin that does the same.

El debate ‘[Cerrado] Post Snippets integration into views editors’ está cerrado y no admite más respuestas.