sheadawson / silverstripe-shortcodable

Provides a GUI for CMS users to insert Shortcodes into the HTMLEditorField + an API for developers to define Shortcodable DataObjects and Views.
MIT License
48 stars 36 forks source link

P tags #46

Closed jonom closed 7 years ago

jonom commented 7 years ago

Here's my take on a solution for #8. It turns out regex is difficult, so I don't know if this will work every time but seems to work pretty well with the samples I tried: https://regex101.com/r/bFtD9o/3

Caution: https://github.com/silverstripe/silverstripe-framework/pull/6302 is a prerequisite so this shouldn't be merged until that is resolved. I've been optimistic and bumped the composer framework version requirement to 3.5 accordingly.

jonom commented 7 years ago

Companion fix has been merged so if you do like the look of this solution it should be okay to merge now. Tests won't pass here until 3.5 is released though :/

sheadawson commented 7 years ago

Cool thanks for this, what's say we merge this into master and release as 3.0, keep 2.x branch for < SS 3.5 support?

jonom commented 7 years ago

Sounds good to me :)