mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 17:13:25 +08:00
FEATURE: New markdown editor re-written in Ember
Note this commit leaves out the biggest occurrence of the editor which is the post/topic composer. To avoid major breakage, this replaces it everywhere else it was used: * User preferences (About Me) * Admin Customizations > Text Content * Category Templates * Editing Queued Posts A future commit will replace the main composer with this editor and will remove the unused pagedown code.
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import AppEvents from 'discourse/lib/app-events';
|
||||
import createStore from 'helpers/create-store';
|
||||
import { loadAllHelpers } from 'discourse/initializers/load-all-helpers';
|
||||
|
||||
export default function(name, opts) {
|
||||
opts = opts || {};
|
||||
@ -11,6 +12,8 @@ export default function(name, opts) {
|
||||
}
|
||||
const appEvents = AppEvents.create();
|
||||
|
||||
loadAllHelpers();
|
||||
|
||||
this.container.register('site-settings:main', Discourse.SiteSettings, { instantiate: false });
|
||||
this.container.register('app-events:main', appEvents, { instantiate: false });
|
||||
this.container.register('capabilities:main', Ember.Object);
|
||||
@ -18,12 +21,7 @@ export default function(name, opts) {
|
||||
this.container.injection('component', 'appEvents', 'app-events:main');
|
||||
this.container.injection('component', 'capabilities', 'capabilities:main');
|
||||
|
||||
andThen(() => {
|
||||
this.render(opts.template);
|
||||
});
|
||||
|
||||
andThen(() => {
|
||||
opts.test.call(this, assert);
|
||||
});
|
||||
andThen(() => this.render(opts.template));
|
||||
andThen(() => opts.test.call(this, assert));
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user