TrainBBCode Editor
The TrainBBCode Editor is an editor for TrainBBCode (obviously).It works by having 2 divs and a text area.
#tbbce_bar is the bar at the top of the editor, and #tbbce_frame is the div under the editor which is exactly the same size as the the text area. The text area has the class .tbbce_area.
Requirements
- TrainBBCode (Gem or Plugin)
- jQuery (not supplied)
Setup
There are 2 ways to install tbbce. As a Gem or as a Plugin. Either way is fine but the plugin method will always get you the very latest version, where as the Gem will be the latest stable.
As a Gem
This is the easiest install:
1 gem install trainbbcodeeditorYou then need to add:
1 config.gem "trainbbcodeeditor"
To your config/environments.rb file.
As a plugin
To install as a plugin run:
1 script/plugin install git://github.com/Arcath/TrainBBCode-Editor.gitRunning the generator
Once you have tbbce installed you will need to run a generator to copy all the files into the right places. This bascially copies all the icons into public/images/tbbce and the .js files into public/javascripts.
1 script/generate tbbcejsConfiguring the views
To use tbbce you need to include a couple of javascript files on any pages you wish to use it on.
Demo
You do not have Javascript Enabled