[Building Sakai] Adding wyswig editor to JSP form

Matthew Jones jonespm at umich.edu
Tue Sep 20 10:42:41 PDT 2011


The only thing you might need to worry about with this is that the user
change change their editor from fck to the now default for 2.9 (ckeditor).
This would always launch the fckeditor.

There's a function in the portalService api to get the active Editor.

http://source.sakaiproject.org/release/2.8.0/apidocs/org/sakaiproject/portal/api/PortalService.html#getActiveEditor()

You can then build up the appropriate scripts from editor to deal with this:
http://source.sakaiproject.org/release/2.8.0/apidocs/org/sakaiproject/portal/api/Editor.html

This *possibly* should be somewhere other than portal, but everyone has to
have portal, right? ;)

It *looks* like the commit against osp uses this to build up the javascript
needed to dump this into a jsp: http://goo.gl/8vVhc

Hope this is somewhat accurate!

On Tue, Sep 20, 2011 at 3:32 AM, Paul Mungai <paulwando at gmail.com> wrote:

> Its worked.
>
> One also needs to add these scripts on the header section;
>
> <script type="text/javascript" language="JavaScript"
> src="/library/editor/FCKeditor/fckeditor.js"></script>
> <script type="text/javascript" language="JavaScript"
> src="/library/editor/fckeditor.launch.js"></script>
>
> Unfortunately, there is no documentation that the search engine could lead
> to, that explains this.
>
>
> On Tue, Sep 20, 2011 at 9:28 AM, Paul Mungai <paulwando at gmail.com> wrote:
>
>> Kindly advise on what scripts I need to add to load the editor on a text
>> area.
>>
>> I have added this script on the body section after the textarea whose name
>> & id is cdesc
>>
>> <script type="text/javascript" defer="1">sakai.editor.launch('cdesc', {
>> height: 650, width: 400 });</script>
>>
>> --
>> Regards,
>> Paul Mungai
>>
>> "Ability is what youre capable of doing. Motivation determines what you
>> do. Attitude determines how well you do it" By Lou Holtz, Notre Dame
>> Football Coach
>>
>
>
>
> --
> Regards,
> Paul Mungai
>
> "Ability is what youre capable of doing. Motivation determines what you do.
> Attitude determines how well you do it" By Lou Holtz, Notre Dame Football
> Coach
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20110920/ba3a35aa/attachment.html 


More information about the sakai-dev mailing list