mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
8393c01be9
Closes #2984, #3020 Ref #1463, #3019 #### Shortcut Values Shortcut values can now be either strings (as before) or objects like {action:string, options:hash}. #### Markdown shortcuts added - 'ctrl+alt+u' strkethrough - 'ctrl+alt+1' h1 - 'ctrl+alt+2' h2 - 'ctrl+alt+3' h3 - 'ctrl+alt+4' h4 - 'ctrl+alt+5' h5 - 'ctrl+alt+6' h6 - 'ctrl+shift+i' image - 'ctrl/command+k' link - 'ctrl+l' list Left behind commented out stubs for additional markdown shortcuts. #### Editor Controllers (New and Edit) - Moved shared init function into editor-base-controller. - Removed MarkerManager mixin from editor controllers as it's included in the base.
20 lines
575 B
JavaScript
20 lines
575 B
JavaScript
import EditorControllerMixin from 'ghost/mixins/editor-base-controller';
|
|
|
|
var EditorNewController = Ember.ObjectController.extend(EditorControllerMixin, {
|
|
actions: {
|
|
/**
|
|
* Redirect to editor after the first save
|
|
*/
|
|
save: function () {
|
|
var self = this;
|
|
this._super().then(function (model) {
|
|
if (model.get('id')) {
|
|
self.transitionTo('editor.edit', model);
|
|
}
|
|
return model;
|
|
});
|
|
}
|
|
}
|
|
});
|
|
|
|
export default EditorNewController;
|