ruby on rails - adding a feature that formats a code in a blog -


i creating own blog.

i add feature enabling users format code (based on wanted langage) before posting.

my blog being written ruby on rails.

how can this?

thanks

there ckeditor can download gem:

gem install ckeditor 

which can drop in rails - documentation

since you're using rails, it's super easy make safe drop database without worrying xss scripting attacks.

it's highly customizeable, if there things don't want users (easily) able style through gui, can customize menu items show up. in fact, you're pretty familiar ckeditor - years ago known fckeditor. functionality you'll similar text editing features see here on stackoveflow.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -