Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mpowaga/meteor-autoform-summernote
https://github.com/mpowaga/meteor-autoform-summernote
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/mpowaga/meteor-autoform-summernote
- Owner: mpowaga
- Created: 2014-11-28T05:05:02.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-09-14T16:46:56.000Z (over 7 years ago)
- Last Synced: 2024-05-18T21:27:39.003Z (7 months ago)
- Language: JavaScript
- Homepage: https://atmospherejs.com/mpowaga/autoform-summernote
- Size: 15.6 KB
- Stars: 25
- Watchers: 3
- Forks: 18
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-summernote - meteor-autoform-summernote
README
Summernote for AutoForm
=======================Add WYSIWYG editor to your Meteor app.
## Usage
1) Install `meteor add mpowaga:autoform-summernote`
2) Install bootstrap and fontawesome or skip this if you have them installed
`meteor add twbs:bootstrap`
`meteor add fortawesome:fontawesome`
3) Create schema
```
var BookSchema = new SimpleSchema({
title: {
type: String,
label: "Title",
max: 200
},
content: {
type: String,
label: "Yet another poem",
autoform: {
afFieldInput: {
type: 'summernote',
class: 'editor' // optional
settings: // summernote options goes here
}
}
}
});
```4) Attach schema to your collection `Books.attachSchema(BookSchema)`
5) Generate the form with `{{> quickform}}` or `{{#autoform}}`
```
{{> quickForm collection="Books" type="insert"}}
```6) Remember to [sanitize the HTML on the server](https://atmospherejs.com/?q=sanitize)! Summernote doesn't do that, and even if it did, the client could always send HTML containing `` tags.
## Summernote options
See all available summernote options [here](http://summernote.org/#/deep-dive#api).
## Summernote callbacks
See all available summernote calbacks [here](http://summernote.org/#/deep-dive#callbacks).