├── .gitignore ├── .versions ├── README.md ├── lib └── client │ ├── autoform-summernote.js │ ├── templates.html │ └── templates.js ├── package.js └── versions.json /.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /.versions: -------------------------------------------------------------------------------- 1 | aldeed:autoform@4.2.2 2 | aldeed:simple-schema@1.1.0 3 | base64@1.0.3 4 | blaze@2.1.2 5 | blaze-tools@1.0.3 6 | callback-hook@1.0.3 7 | check@1.0.5 8 | ddp@1.1.0 9 | deps@1.0.7 10 | ejson@1.0.6 11 | geojson-utils@1.0.3 12 | html-tools@1.0.4 13 | htmljs@1.0.4 14 | id-map@1.0.3 15 | jquery@1.11.3_2 16 | json@1.0.3 17 | livedata@1.0.13 18 | logging@1.0.7 19 | meteor@1.1.6 20 | minifiers@1.1.5 21 | minimongo@1.0.8 22 | momentjs:moment@2.8.4 23 | mpowaga:autoform-summernote@0.3.2 24 | observe-sequence@1.0.6 25 | ordered-dict@1.0.3 26 | random@1.0.3 27 | reactive-var@1.0.5 28 | retry@1.0.3 29 | spacebars-compiler@1.0.6 30 | summernote:standalone@0.6.0_1 31 | templating@1.1.1 32 | tracker@1.0.7 33 | ui@1.0.6 34 | underscore@1.0.3 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Summernote for AutoForm 2 | ======================= 3 | 4 | Add WYSIWYG editor to your Meteor app. 5 | 6 | ## Usage 7 | 8 | 1) Install `meteor add mpowaga:autoform-summernote` 9 | 10 | 2) Install bootstrap and fontawesome or skip this if you have them installed 11 | 12 | `meteor add twbs:bootstrap` 13 | 14 | `meteor add fortawesome:fontawesome` 15 | 16 | 3) Create schema 17 | 18 | ``` 19 | var BookSchema = new SimpleSchema({ 20 | title: { 21 | type: String, 22 | label: "Title", 23 | max: 200 24 | }, 25 | content: { 26 | type: String, 27 | label: "Yet another poem", 28 | autoform: { 29 | afFieldInput: { 30 | type: 'summernote', 31 | class: 'editor' // optional 32 | settings: // summernote options goes here 33 | } 34 | } 35 | } 36 | }); 37 | ``` 38 | 39 | 4) Attach schema to your collection `Books.attachSchema(BookSchema)` 40 | 41 | 5) Generate the form with `{{> quickform}}` or `{{#autoform}}` 42 | 43 | ``` 44 | {{> quickForm collection="Books" type="insert"}} 45 | ``` 46 | 47 | 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 `