Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

TinyMCE in Popup - Adding Images?


Go to End


2 Posts   3164 Views

Avatar
BLU42 Media

Community Member, 71 Posts

10 April 2009 at 4:56am

I'm trying to use the TinyMCE editor in a popup window in a ModelAdmin sub-class I created. The editor's working great, but I'd like to be able to use the ImageForm & LinkForm functionality. I've been digging through the code for the last few days and not had much success in getting these added. Has anyone tried this? If so, could you share some insight?

Thanks!
John

Avatar
Carbon Crayon

Community Member, 598 Posts

12 April 2009 at 1:07pm

I gave up on this pretty quickly and used the official tinyMCE image manager instead (it costs 30EUR but is pretty damn good). The links is more of a problem as the default tinyMCE links editor makes you type the link in, but it should work in a popup.

Just edit yout cms/javascript/tinyMCE.template.js and edit the second row of buttons: 'ssimage,ssflash,sslink' into 'image,media,link'. Downside is you then get this for the main editor too. I guess there must be a way to create a new HTMLEditorField type and have different settings but I never got that far.

Alernatively you could use the simple html editor that comes with unclecheeses DataObjectManager module, it has simple url inputs for images and links, but it's a little sparse on other options.