Skip to content

ryanburnette/textarea-as-ace-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

textarea-as-ace-editor

Turn a textarea element into an instance of Ace Editor in a hurry.

Usage

You'll need jQuery. Version 1.11.2 or 2+ recommended.

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.js"></script>

You'll need Ace Editor. Load any additional themes or modules that you're using too.

<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.1.3/ace.js"></script>

You'll need this plugin.

<script src="dist/textarea-as-ace-editor.js"></script>

Call the plugin on a textarea and you're good to go.

<script>
  $('textarea').asAceEditor();
</script>

If you know Ace Editor you can get the object from the textarea.

editor = $('textarea').data('ace-editor');

License

Apache2

About

Turn a textarea into an instance of Ace Editor.

Resources

License

Stars

Watchers

Forks

Packages

No packages published