Skip to content

h-wang/ace-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Ace-helper

The Ace-helper helps to easily integrate Ace editor into your project, e.g. Silex, Symfony, also on form elements.

This library depends on jQuery to work.

Installation

bower install ace-helper

Use

To use the ace-helper, simply add class="ace-editor" to div or textarea. It will create an Ace editor for you. If it's a textarea, it will create an Ace editor after the textarea and sync the content of the editor with the textarea, which makes it straight-forward to be submitted.

<!-- jQuery -->
<script src=".../jquery.min.js"></script>

<!-- Ace -->
<script src=".../ace-builds/src-min-noconflict/ace.js" charset="utf-8"></script>

<!-- Ace-helper -->
<script src="/bower_components/ace-helper/src/ace-helper.js"></script>

...

<textarea class="ace-editor">Your content here</textarea>

Parameters

Put the Ace parameters as data attributes in the HTML element to enable them.

<textarea class="ace-editor" data-mode="css" data-theme="monokai"></textarea>

Examples

Integrate with Symfony forms:

{{ form_row(form.description, { 'attr': {'class': 'ace-editor', 'data-theme': 'twilight', 'data-mode':'handlebars'} }) }}

About

Helps to easily integrate ace editor into your project, e.g. Silex, Symfony

Resources

License

Stars

Watchers

Forks

Packages

No packages published