Skip to content

JokerCatz/bbcoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

this Source fork with BBCodeizer(MIT)

easy to use & care Performance , only save or update to process convert bbcode
Just add to Model like

=======Model======
class Post < ActiveRecord::Base
  bbcoder :column => "body" , :title => "bb"
end
==================

:column can be Array or String , set column you need BBCode
:title is addon method name , default is "bb"

then add the title in column name with new/edit form

=======View=======
  <%= f.text_area :bb_body , :class => "mceEditor" %>
==================

& you can try this :

>> x = Post.first
>> x.bb_body #=> "[u][i]brtb[/i][/u][br]"
>> x.body #=> "<u><em>brtb</em></u><br/>"
>> x.bb_body = "[color=#ff0000]werwer[/color]" #=> "[color=#ff0000]werwer[/color]"
>> x.body #=> "<span style=\"color: #ff0000\">werwer</span>"



& if you using TinyMCE BBCode plugin , you can use %LIB_DIR%/support/TinyMCE/BBCode
to change original plugin to make sure TinyMCE to support all tags & some fix

okay , have fun :P

JokerCatz @ http://railsfun.tw/

About

Rails BBCode Solution

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages