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

FIX (before submit): save html content to textarea before shortcode change #58

Closed Neumes closed 7 years ago

Neumes commented 7 years ago

Save the updated content from the html editor to the underlying text area before the shortcode's html is replaced with the actual shortcode. This way the shortcode tag will be in the database instead of the html tag.

The fix in https://github.com/sheadawson/silverstripe-shortcodable/commit/165ce3b013aef1db6f0dea0ba08b97e7e81428f0 was 99% of the way there, just the wrong way around

This should fix https://github.com/sheadawson/silverstripe-shortcodable/issues/45 as well as https://github.com/sheadawson/silverstripe-shortcodable/issues/49 for 3.0. I'll pull request the fix for master as well.

sheadawson commented 7 years ago

Nice one! Does this also fix the dreaded #52 by chance? Sorry I haven't had time to look at this module for a while

Neumes commented 7 years ago

I'm unsure on whether or not this will fix https://github.com/sheadawson/silverstripe-shortcodable/issues/52 unfortunately however I'm digging around on this one as we speak, so I'll let you know if I can reasonably conclude whether or not this fixes that as well

sheadawson commented 7 years ago

Cool, thanks for your help!

On 11 July 2017 at 15:47, Tom notifications@github.com wrote:

I'm unsure on whether or not this will fix #52 https://github.com/sheadawson/silverstripe-shortcodable/issues/52 unfortunately however I'm digging around on this one as we speak, so I'll let you know if I can reasonably conclude whether or not this fixes that as well

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/sheadawson/silverstripe-shortcodable/pull/58#issuecomment-314314995, or mute the thread https://github.com/notifications/unsubscribe-auth/ABHLOJso5k_UCVaLA3pHmiQ7Wl_9mZuvks5sMvBjgaJpZM4OTpFX .

-- Shea Dawson Web Developer LiveSource

mobile +64 20 4028 5647 skype squatchnz email shea@livesource.co.nz web www.livesource.co.nz