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.

Archive /

Our old forums are still available as a read-only archive.

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

Idea: Form editor in TinyMCE


Go to End


12 Posts   39713 Views

Avatar
xmedeko

Community Member, 94 Posts

10 July 2007 at 10:36am

Hi,

I was thinking about to create user forms inside TinyMCE, instead of by the UserDefinedForms. I have already found some TinyMCE plugins:

http://sourceforge.net/tracker/index.php?func=detail&aid=1662152&group_id=103281&atid=738747
http://sourceforge.net/tracker/index.php?func=detail&aid=1641859&group_id=103281&atid=738747

But I am not a javascript programmer to see, how it is difficult. Also, SS uses old modified version of TinyMCE. Would it be easy to upgrade to the current version? What do you think about this idea?

Thanks
Andy

Avatar
Nathan Cox

Community Member, 99 Posts

10 July 2007 at 12:33pm

Edited: 10/07/2007 12:34pm

Does anyone know how much SS's TinyMCE been modified? It seems a bit hard to tell since I don't know where to get another copy of the old TinyMCE (2.0.2, I think) to do a diff on.

$excuse = 'I just have to try the forum code formatting';

if ($peopleListening == true) {
   echo("I'm writing this because $excuse");
   }

Avatar
xmedeko

Community Member, 94 Posts

10 July 2007 at 1:41pm

One is downloadable here

http://plone.org/products/tinymce/releases/0.90.2.0.2/tinymce-0-90-2-0-2.rar

go to TinyMCE/skins/tinymce. There's a bunch of changes, and

<cite>
Complex JavaScript like this is what makes me lock my doors at night, so I might stick to the PHP :)
</cite>

Avatar
Nathan Cox

Community Member, 99 Posts

10 July 2007 at 1:52pm

There's a bunch of changes, and

<cite>
Complex JavaScript like this is what makes me lock my doors at night, so I might stick to the PHP :)
</cite>

Yeah, I have a short memory. One of these days I'll learn..

Avatar
xmedeko

Community Member, 94 Posts

10 July 2007 at 2:05pm

I just meant your sentence for myself, if you do not lock your door at night anymore, go ahead :-)

Avatar
Nathan Cox

Community Member, 99 Posts

11 July 2007 at 10:35am

Yeah I noticed there are about 72 changes marked as SilverStripe, although most of them are in one file.

In any case I'm going to give it a go when I have the time, even if just for educational purposes. After all, for the end use the WYSIWYG really is the core of the system.

Avatar
Sigurd

Forum Moderator, 628 Posts

12 July 2007 at 9:03am

Getting back to the original post, what do you want support for forms in the editor for anyway? With the userdefinedform you get automatic saving to the database, email send outs, etc

Avatar
Sam

Administrator, 690 Posts

13 July 2007 at 11:17am

I've reviewed the changes that we've made and I've come up with this analysis. I suggest that a starting point would be to take the current TinyMCE code and re-apply the important features to it. Then look at the bug-fix items and see which ones haven't been fixed in the lateste TinyMCE.

I would recommend that we then submit our changes to the TinyMCE core as a patch, so that they have it in their codebase.

IMPORTANT FEATURES

* Manual placement of toolbar location, and blur/focus handlers on the controls to facillitate this.
* Add macrons to insert character
* Added formElement.isChanged() method, to help with SS change detection

UNIMPORTANT FEATURES

* Added image class field to image properties form
* Changed default with to 600px, not 320.
* Begun adding support for strict XHTML content-type header (nbsp = #160 and case-insensitive tagname checking)

BUGFIXES

* Fixed positioning of context menu when scrolling, and to prevent it from showing off the bottom of the screen.
* Got the editor to respect the <base> tag
* Bug fix in table editor
* Bugfix in inserting the typography stylesheet
* Made area_width and area_height parameters instance specific, rather than global (not actually needed anymore)
* Fixed support for # directive in valid_elements config optin
* Fixed auto-resizing editors
* Fixed isDirty(), although not completely

Go to Top