Idecoder gem

Gem Version

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:

Alt text


  <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'}, <i style='color: #c00'>false</i>

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:

  1. gem execjs (sstephenson/execjs)

Contributing

  1. Fork it ( https://github.com/popolin/idecoder/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request