Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EE Packages #33

Open
OscarGodson opened this issue Feb 25, 2012 · 1 comment
Open

EE Packages #33

OscarGodson opened this issue Feb 25, 2012 · 1 comment
Labels
Milestone

Comments

@OscarGodson
Copy link
Owner

I want to enable 3rd party devs to easily script EE not just with the normal public API, but through packages or plugins. Ideas?

I have this idea currently:

EpicEditor.extend({
  name:'wiki'
, type:'parser'
},function(){
  //parser code...
  return html;
});

Above creates a parser package so you could replace Markdown parser we use, or in this case, add wiki support. There could be other types like plugin or extension or some other name that is a general extension of EE. By default it'd run it as a plugin, but offer alternatives like parser to change more of the core code programmatically and without worry about breakages during upgrades.

@OscarGodson
Copy link
Owner Author

Another go at playing around with a hello world one

(function (ee) {
  ee.extend({
    helloWorld: function(options) {
      ee.on('load', function() {
        alert('Hello World');
      });
    };
  });
})(EpicEditor);

I like this better than specifying a type and instead just give them hooks into the processor in the extension. Something like on('onBeforeParse', function(e, data)){}' where data or something could hold the parsing data. Then you could do like return data.replace('foo', 'bar') and it'll give it back to EE? Not sure... @johnmdonahue, thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant