Comparing version 1.2.5 to 1.2.6
{ | ||
"name": "editore", | ||
"version": "1.2.5", | ||
"version": "1.2.6", | ||
"main": "src/editore.js", | ||
@@ -5,0 +5,0 @@ "ignore": [], |
{ | ||
"name": "editore", | ||
"version": "1.2.5", | ||
"version": "1.2.6", | ||
"author": "Evandro Eisinger <evandroeisinger@gmail.com>", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -10,3 +10,3 @@ # editore.js [](https://travis-ci.org/evandroeisinger/editore.js) [](http://badge.fury.io/js/editore) [](http://badge.fury.io/bo/editore) | ||
#### basic usage | ||
Load editor.js into your application, create the editor wrapper element, set some fields and instantiate a new Editore. | ||
Load editore.js into your application, create the editor wrapper element, set some fields and instantiate a new Editore. | ||
@@ -74,2 +74,11 @@ ```html | ||
### methods | ||
- [editore.values()](https://github.com/evandroeisinger/editore.js/blob/master/README.md#editorevalues) | ||
- [editore.fields()](https://github.com/evandroeisinger/editore.js/blob/master/README.md#editorefields) | ||
- [editore.clearFields()](https://github.com/evandroeisinger/editore.js/blob/master/README.md#editoreclearfields) | ||
- [editore.setFieldsValues( *fields* )](https://github.com/evandroeisinger/editore.js/blob/master/README.md#editoresetfieldsvalues-fields-) | ||
- [editore.destroy()](https://github.com/evandroeisinger/editore.js/blob/master/README.md#editoredestroy) | ||
- [editore.subscribeInput( *callback* )](https://github.com/evandroeisinger/editore.js/blob/master/README.md#editoresubscribeinput-callback-) | ||
- [editore.registerEditionPlugin( *Plugin* )](https://github.com/evandroeisinger/editore.js/blob/master/README.md#editoreregistereditionplugin-plugin-) | ||
- [editore.registerInsertionPlugin( *Plugin* )](https://github.com/evandroeisinger/editore.js/blob/master/README.md#editoreregisterinsertionplugin-plugin-) | ||
###### editore.values() | ||
@@ -176,4 +185,3 @@ - return a object with all fields values. | ||
- injected objects | ||
- **this.component**: *DOMElement* **(required)** | ||
- Editore adds in the plugin instance context it's component object, enabling access to it's element, plugins and checkPluginsState method. | ||
- **this.component**: Editore adds in the plugin instance context it's component object, enabling access to it's element, plugins and checkPluginsState method. | ||
- element: *DOMElement* | ||
@@ -227,1 +235,4 @@ - plugins: *Array* | ||
**Fork it** -> **Branch it** -> **Test it** -> **Push it** -> **Pull Request it** :gem: | ||
*Currently development is being maintained by [Núcleo Digital Grupo RBS](http://nucleodigital.gruporbs.com.br/).* | ||
@@ -110,3 +110,3 @@ (function (global, editore) { | ||
// register edition plugins | ||
function registerEditionPlugin(Plugin) { | ||
function registerEditionPlugin(Plugin, options) { | ||
if (!Plugin) | ||
@@ -116,2 +116,4 @@ return new Error('invalid plugin'); | ||
Plugin.prototype.component = self.components.edition; | ||
Plugin.prototype.options = options || {}; | ||
// instance a new plugin | ||
@@ -127,3 +129,3 @@ var plugin = new Plugin(); | ||
// register edition plugins | ||
function registerInsertionPlugin(Plugin) { | ||
function registerInsertionPlugin(Plugin, options) { | ||
if (!Plugin) | ||
@@ -133,2 +135,4 @@ return new Error('invalid plugin'); | ||
Plugin.prototype.component = self.components.insert; | ||
Plugin.prototype.options = options || {}; | ||
// instance a new plugin | ||
@@ -135,0 +139,0 @@ var plugin = new Plugin(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
391565
15
996
235