Idecoder gem
Idecoder was created for developers building web applications with coding editors. Idecoder provides a plugin that gives the developer a screen inside their own app to give the users a way to develop codes.
Installation
Add this line to your application's Gemfile:
gem 'idecoder'
And then execute:
$ bundle
Or install it yourself as:
$ gem install idecoder
Usage
Simply add the render_idecoder
helper method to your Rails layout or to any specific page you wish.
after installing, go to " / idecoder" for testing screen:
<html> <head>...</head> <body> <h1>My Content</h1> ... <%= render_idecoder %> </body> </html>
To add options to the Idecoder plugin, simply pass them as a Hash to the helper method:
# Switching to Haml %html %head ... something ... %body %h1 Any content ... something ... = render_idecoder {language: 'sql', read_only: 'false'}
If you wish to have Idecoder in your production and/or staging environment, pass the last argument of false
:
= render_idecoder {language: 'ruby', read_only: 'false'}, false
Options
Value | Default | Description |
---|---|---|
mode | ruby | See Language Options List |
theme | monokai | See Themes Options List |
height | 300px | Canvas height |
width | 90% | Canvas width |
border | '1px solid lightgray' | Border style |
read_only | true | Does not allow the user to make changes in databases |
Language Options
Value | Description |
---|---|
html | Design Html |
javascript | Javascript |
ruby | Ruby Language |
Theme Options
Value | Description |
---|---|
ambiance | Ambiance |
chaos | Chaos |
chrome | Chrome |
clouds | Clouds |
clouds_midnight | Clouds Midnight |
cobalt | Cobalt |
crimson_editor | Crimson Editor |
dawn | Dawn |
dreamweaver | Dreamweaver |
eclipse | Eclipse |
github | Github |
idle_fingers | Idle Fingers |
kr | KR |
merbivore | Merbivore |
merbivore_soft | Merbivore Soft |
mono_industrial | Mono Industrial |
monokai | Monokai |
pastel_on_dark | Pastel On Dark |
solarized_dark | Solarized Dark |
solarized_light | Solarized Dark |
textmate | TextMate |
tomorrow | Tomorrow |
tomorrow_night | Tomorrow Night |
tomorrow_night_blue | Tomorrow Night Blue |
tomorrow_night_bright | Tomorrow Night Bright |
tomorrow_night_eighties | Tomorrow Night Eighties |
twillight | Twillight |
vibrant_ink | Vibrant Ink |
xcode | XCode |
Dependencies
Idecoder has a dependency on:
- gem execjs (sstephenson/execjs)
Contributing
- Fork it ( https://github.com/popolin/idecoder/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request