terrytompkins:autoform-ace-editor
An add-on Meteor package for aldeed:autoform. Provides a custom input type, "ace-editor", which renders an instance of ace-editor.
Prerequisites
The plugin library must be installed separately.
In a Meteor app directory, enter:
$ meteor add arch:ace-editor
$ meteor add aldeed:autoform
Installation
In a Meteor app directory, enter:
$ meteor add terrytompkins:autoform-ace-editor
Usage
Specify "ace-editor" for the type
attribute of any input. The editor configuration can be specified through afFieldInput options in the field schema:
In the schema, which will then work with a quickForm
or afQuickFields
:
{
description: {
type: String,
label: "Description",
autoform: {
afFieldInput: {
type: "ace-editor",
editorWidth: "600px",
editorHeight: "250px",
theme: "twilight",
mode: "text"
}
}
}
}
An example application that demonstrates the use of this plugin can be found here: https://github.com/TransWebT/meteor-autoform-ace-editor-demo
Limitations
Unit tests are still pending
Contributing
Anyone is welcome to contribute. Fork, make your changes, and then submit a pull request.
See also
When I first looked for a similar package, there wasn't one available. Since creating my own Ace Editor Autoform custom field package I found that there is now another one available. It can be found here: bshamblen:autoform-ace They function similarly but the options and how they're applied is a bit different.