vansonhk:meteor-autoform-ace-editor

v0.0.4Published 9 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

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:

1{
2  description: {
3    type: String,
4    label: "Description",
5    autoform: {
6      afFieldInput: {
7                      type: "ace-editor",
8                      editorWidth: "600px",
9                      editorHeight: "250px",
10                      theme: "twilight",
11                      mode: "text"
12                    }
13    }
14  }
15}

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.