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.

Widgets /

Discuss SilverStripe Widgets.

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

HTMLTextField in Widget


Go to End


16 Posts   8134 Views

Avatar
swaiba

Forum Moderator, 1899 Posts

18 January 2012 at 11:19pm

I just read that (btw the link isn't correctly linking in your article) but it wasn't clear to me whether you have used that code and "hacked the core" - did you hack the core?

Also how are the other functions that are added to TinyMCE handled - for instance inserting a link to another ss page?

btw I am intrested in this, but without hacking the core and providing all TinyMCE functions, until then I'll stick to bbcode only and a text edit

Avatar
CHD

Community Member, 219 Posts

18 January 2012 at 11:36pm

Edited: 18/01/2012 11:36pm

Sorry hadn't quite finished with the article!
check it now...hopefully it's clearer

http://www.clickheredigital.co.uk/blog/bad-widget-class-name-given-our-experience-with-widgets-on-any-silverstripe-page/

Avatar
swaiba

Forum Moderator, 1899 Posts

18 January 2012 at 11:42pm

sorry to be a pain but the link in the article "http://groups.google.com/group/silverstripe-dev/msg/1a3b1292c4f46117" still links to "http:"
and the article is advising a replacing a core class yes?

Avatar
CHD

Community Member, 219 Posts

18 January 2012 at 11:46pm

oh that link! fixed. thanks for pointing it out.

no we ONLY used the "widgets_content" folder from his link of attachments at the bottom of the page. We didn't make ANY core changes. Or changes to WidgetEditorArea.js.

Avatar
swaiba

Forum Moderator, 1899 Posts

18 January 2012 at 11:48pm

hmmm, no core change great! and it handles things link inserting a link the same way tinyMCE in the "normal" use does?

Avatar
CHD

Community Member, 219 Posts

18 January 2012 at 11:55pm

yep!

The ONLY draw back is that you still need to save the page when you add a content widget before the TinyMCE applet will load.
But links, images, internal links etc all work fine.

Avatar
Digital Punk

Community Member, 51 Posts

25 January 2012 at 1:06am

Edited: 25/01/2012 1:06am

To CHD:

I try to implement your plugin, but it seems that .js file is missing in archive. In the ContentWidget.php you have requirement:

Requirements::javascript('widgets_content/ContentWidget.js');

And there is no such file in this folder. Could you check this please? Thanks!

Avatar
CHD

Community Member, 219 Posts

25 January 2012 at 1:16am

You're right!
That's odd. Doesn't look like it matters, I just commented it out and all still works fine.
I'll update my .zip files now.

(in case you haven't noticed, this isn't my strong point, so the code may not be great! But it works, so I wanted to share anyway, I'm sure the pros here can clean up these widget packs for general public use!)

Go to Top