Jump to:

5542 Posts in 1739 Topics by 1225 members

Customising the CMS

SilverStripe Forums » Customising the CMS » shortcode GUI in TinyMCE

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1027 Views
  • Tuckie
    Community Member
    10 Posts

    shortcode GUI in TinyMCE Link to this post

    Is there a proper, pluggable way to create a GUI for shortcodes in TinyMCE (Much like the insert link sidebar)?

    I found an example here http://chillburn.com.au/demos/code-differences-wysiwyg-editor/ that seems to be on the right track, but requires modifying the core files, which doesn't seem like the best route.

    Creating the TinyMCE plugin with button is easy, but things get murky due to the hard coding in LeftAndMain.ss and HTMLEditorField.php

    Is there a best way to add a new right side element?

    Ultimately, I'm looking to create a rightside selector for files, that uses ID rather than simply embedding the path in an href.
    This would allow the shortcode to display more of the file properties, such as size, date modified etc.

    Thanks in advance!

  • SamTheJarvis
    Community Member
    24 Posts

    Re: shortcode GUI in TinyMCE Link to this post

    I'm also pretty interested in this.

    A few CMS' we use do this, ElefantCMS (new) and Sitellite (old as heck!).

    I would think something similar to the way the Image panel and Link panel are implemented, but I have no idea if that's easily replicated/extendable. Oh you just said that, well, reinforcing the point.

  • Howard
    Community Member
    215 Posts

    Re: shortcode GUI in TinyMCE Link to this post

    Unfortunately there isn't an easy way to do this - I once looked into creating another right side panel but gave up pretty quick. That is getting an overhaul in SS 3 (see design here https://github.com/silverstripe/silverstripe-design/blob/master/Design/ss3-ui_insert-link.jpg) but I'm unsure how they are implementing it and how pluggable it will be.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.