github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

siteroller / moorte

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 11
    • 2
  • Source
  • Commits
  • Network (2)
  • Issues (17)
  • Downloads (1)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (2)
    • 0.54AlphaDemo
    • master ✓
  • Tags (1)
    • 0.55
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Mootools Wysiwyg/NAWTE Rich Text Editor - small, extensible! — Read more

  cancel

http://www.siteroller.net/projects/moorte

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

removed extra data from package.yaml 
SamGoody (author)
Mon Jan 11 02:06:52 -0800 2010
commit  95b28c55d3a5449386229997395ef3648c5fb82a
tree    839843d78e0995cef79ea76aa27534b3303f6027
parent  d6f66bf64b99b65ededbf570e160c1049f409103
moorte /
name age
history
message
directory Demo/ Tue Jan 05 13:41:46 -0800 2010 Rewrote waiter/spinner on Depender.require Now ... [SamGoody]
directory Deprecated/ Mon Jan 04 04:29:07 -0800 2010 Removed old demos, new demos are in the middle ... [SamGoody]
directory Docs/ Sun Jan 03 01:28:13 -0800 2010 Part #2 of name change Renamed folders to origi... [SamGoody]
file README.md Mon Jan 11 01:55:06 -0800 2010 Added link to group Signed-off-by: samgoody <s... [SamGoody]
directory Source/ Mon Jan 11 01:25:55 -0800 2010 Updated Readme, Fixed display in IE6 of demo, s... [SamGoody]
directory Specs/ Sun Jan 03 01:28:13 -0800 2010 Part #2 of name change Renamed folders to origi... [SamGoody]
file package.yml Mon Jan 11 02:06:52 -0800 2010 removed extra data from package.yaml Signed-of... [SamGoody]
README.md

MooRTE

Rich Text Editor Framework for Mootools.

Tiny, flexible, and does not use a IFrame.

Screenshot

Official Group

Dependencies:

The basic buttons (bold, italic, etc) only require mootools-core.

Many other buttons buttons rely on 3rd party scripts. [The popup in the "hyperlink" button uses StickyWin, the "Upload Button" uses FancyUpload, etc.] They require Depender.js, which is used to load in each of these third-party scripts as needed. See the Depender docs for the correct setup of these docs. The Demo folder of the download is setup correctly.

How to use

Basic usage:

$('myElement').moorte(options);

Alternative usage:

// a group of elements
$$('.myElements').moorte(options);
// single, group, or to apply to the page.
var myRTE = new MooRTE(options);

Options


  • buttons: 'div.Toolbar':['bold','italic','underline] "buttons" can refer to anything in the MooRTE.Elements object. It will accept a JSON Object of any complexity, and is very loose in the definition. The Element object can be extended, see on.
  • skin: 'Word03'
    • This is a classname added to the MooRTE Element.
    • To define your own skin, modify the existing styles or add another
    • location: 'elements'
    • 'elements' - aplied above each passed in element.
    • 'inline' - Each of the passed in elements will assume an RTE when focused. The RTE will be removed when the element loses focus.
    • 'pageTop' - One RTE toolbar will be applied to the top of the page and will control all passed in elements.
    • 'PageBottom' - One RTE toolbar will be applied to the bottom of the page and will control all passed in elements.
    • 'none' - No visible toolbar will be applied, but keyboard shortcuts will still work.
  • floating: false
    • Should the RTE be inserted into the element (affecting page layout) or should it float above it.
  • elements: 'textarea, .rte' - What elements should the RTE extend.
    • Only applicable when called with the new keyword [var mrte = new MooRTE({elements:'textarea'}) ])

Customization:

MooRTE.Path

This is the path to your sources.json file.
By default, is "js/sources.json"

If you have your own folder structure, modify this path, or no plugins will work!

MooRTE.Path = 'Javascripts/2010/mootools/classes/experiments/moorte/scripts.json';
$('myEl').moorte();`

MooRTE.Elements

The MooRTE.Elements object can be extended.

To create a button (some random options, all are optional)

MooRTE.Elements.extend({
    myButton:{
        img:     'path/to/myImg.jpg', 
        onLoad:  function(){alert("button loaded")},
        onClick: function(){alert("Hello World!")}},
        source:  function(){alert("3..2...1...*boom*")}
    })
});

If your function relies on a 3rd party script, it should be included in the onLoad event as follows: 'scripts' may either be a path to your script, or the class name used by Depender (if you know how to set that up).

MooRTE.Elements.extend({
    myButton:{
        onLoad: function(){
            MooRTE.Utilities.assetLoader({
                scripts: 'StickyWinModalUI',
                onComplete: function(){ alert("done") }
            })
        }
    }
});

To define a custom toolbar: + If the toolbar must show when a button on the menu is clicked, the button should have an onClick event. + If the toolbar should should also show when menu button is loaded, the onLoad should reference the onClick. + The toolbar should be passed in as an array where the first item is 'group' and the buttons object is the second.

var myToolbar = {Toolbar:['bold','underline','italic']};
MooRTE.Elements.extend({
    myMenuEntry:{
        text:'edit', 
        onLoad: 'onClick',
        onClick:['group',myToolbar]
    }           
});

Contact:

Due to a GITHUB issue, the cached version of this project was a broken one.
Please redownload and test - this version should work. If you have issues, please comment on the Google group (Sign up required to prevent spam bots.) http://groups.google.com/group/moorte or email me at siteroller - the at dingbat - gmail.

There are many more options, see the docs on the site.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server