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

Rich placeholders for shortcodes #9

Closed jonom closed 8 years ago

jonom commented 9 years ago

As touched on here https://github.com/sheadawson/silverstripe-shortcodable/issues/6#issuecomment-57972237

With this module installed there shouldn't be any need to directly edit shortcode properties in the editor so it would be great to replace the shortcode text with a visual placeholder.

Clicking anywhere on the placeholder could open the shortcode editing form.

Placeholder could perhaps be rendered via ajax by sending shortcode arguments to a Placeholder() method defined on each class that implements ShortCodable. That way a rich preview could be shown for each shortcode instance.

satrun77 commented 8 years ago

I'm currently working on this feature. I'm planning to create a pull request in few days, if I'm happy with the code.

sheadawson commented 8 years ago

Behold! https://github.com/sheadawson/silverstripe-shortcodable/tree/2.0.2

jonom commented 8 years ago

Awesome! Thanks for your efforts guys!