old_contents:
= The Molly Project =
http://mollyproject.org/

The Molly Project is a Django-based Python application which provides a
framework for creating a mobile web portal for higher education institutions.

Please do Fork our code! We're looking for more contributors to the project.

== Get Started ==

The 'quickinstall' script will automate the whole process of deploying Molly for
you on Linux (particularly Fedora and Ubuntu), including configuring Postgres
as needed.

For more information, please read the docs: http://docs.mollyproject.org/

== Get in Touch ==

At the time of writing there are a few primary  methods of getting (free, best
effort) support for the Molly Project:

 * Mailing lists: https://sourceforge.net/mail/?group_id=309230
 * IRC: irc://irc.freenode.net/#molly
 * Email the main contributing team (Mobile Oxford at Oxford University
   Computing Services): mobileoxford@oucs.ox.ac.uk

new_contents:
= The Molly Project =
http://mollyproject.org/

The Molly Project is a Django-based Python application which provides a
framework for creating a mobile web portal for higher education institutions.

Please do Fork our code! We're looking for more contributors to the project.

== Get Started ==

The 'quickinstall' script will automate the whole process of deploying Molly for
you on Linux (particularly Fedora and Ubuntu), including configuring Postgres
as needed.

For more information, please read the docs: http://docs.mollyproject.org/

== Get in Touch ==

At the time of writing there are a few primary  methods of getting (free, best
effort) support for the Molly Project:

 * Issue Tracker: http://issues.mollyproject.org/
 * Mailing lists: https://sourceforge.net/mail/?group_id=309230
 * IRC: irc://irc.freenode.net/#molly
 * Email the main contributing team (Mobile Oxford at Oxford University
   Computing Services): mobileoxford@oucs.ox.ac.uk

subject: Add link to issue tracker

message: Add link to issue tracker


old_contents:
---
title: Adding a Rich Text Editor

parent_title: Recipes

previous_title:
previous_link:
next_title: Custom Actions
next_link: /recipes/custom-actions/

---

= Adding a Rich Text Editor

Download **CKEditor** and uncompress it under the {{{public/javascripts}}}
folder.

{{{
$ cd public/javascripts
$ curl -O http://download.cksource.com/CKEditor/CKEditor/CKEditor%203.4/ckeditor_3.4.tar.gz
$ tar xvzf ckeditor_3.4.tar.gz
$ rm ckeditor_3.4.tar.gz
}}}

Edit the file {{{public/admin/javascripts/application.js}}} and copy the
following snippet. This will replace all {{{textarea}}} with **CKEditor**.

{{{
document.write("<script type='text/javascript' src='/javascripts/ckeditor/ckeditor.js'></script>");

$(function() {
  if ($('textarea').length > 0) {
    var data = $('textarea');
    $.each(data, function(i) { CKEDITOR.replace(data[i].id); });
  }
});
}}}

Now you can configure **CKEditor** editing {{{public/javascripts/ckeditor/config.js}}}.
This is how mine looks like, but you can customize all the settings of
**CKEditor** to match your requirements.

{{{
CKEDITOR.editorConfig = function( config )
{

  config.height = '250px';
  config.width = '690px';

  config.toolbar = 'Easy';
  config.toolbar_Easy =
    [
        ['Source','-','Templates', '-', 'Cut','Copy','Paste','PasteText','PasteFromWord',],
        ['Maximize'],
        ['Undo','Redo','-','SelectAll','RemoveFormat'],
        ['Link','Unlink','Anchor', '-', 'Image','Embed'],
        ['Styles','Format', 'Bold','Italic','Underline','Strike','-', 'TextColor'],
        ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
        ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
    ];

};
}}}

new_contents:
---
title: Adding a Rich Text Editor

parent_title: Recipes

previous_title:
previous_link:
next_title: Custom Actions
next_link: /recipes/custom-actions/

---

= Adding a Rich Text Editor

You can add a **Rich Text Editor**, ([[http://ckeditor.com/|CKEditor]]), to
your application by running the following task into your application folder:

{{{
$ rake rails:template LOCATION=http://core.typuscms.com/templates/extras/ckeditor.rb
}}}

subject: Use a template to add CKEditor support

message: [docs] Use a template to add CKEditor support

license: mit