Is there a way to trim something based on a tag in the wysiwig ft?
Created 7 years ago by edster

Anyone know if there is a way to trim something based on a tag?

for instance I have a wysiwyg ft and I want to slice it into 2 parts based on the p tag so first p then all other p tags

ryanthompson  —  7 years ago

You can use the .content presenter method to work with the HTML directly. Might wanna make a new plugin to wrap up the specific logic you want and do something like this:

{{ my_special_function(page.wysiwyg_field_here.content) }}