mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 18:31:57 +03:00
9a0b72071d
refs https://github.com/TryGhost/Ghost/issues/8106, https://github.com/TryGhost/Ghost/issues/7429, requires https://github.com/TryGhost/Ghost/pull/8137 -Adds new "card" menus - Navigation with keyboard in both axis. - Search with keyboard in both menus. - Adds a "+" Menu for cards - Adds a "/" Menu for cards - if the block has content and it becomes a markdown or HTML Embed card then the content is included into the card. - Image and HR cards appear below the current section - Adds new toolbar with both inline and block styling. - Adds a new 'divider' card.
24 lines
704 B
JavaScript
24 lines
704 B
JavaScript
import Component from 'ember-component';
|
|
import layout from '../templates/components/koenig-menu-item';
|
|
import Range from 'mobiledoc-kit/utils/cursor/range';
|
|
|
|
export default Component.extend({
|
|
layout,
|
|
tagName: 'div',
|
|
classNames: ['gh-cardmenu-card'],
|
|
classNameBindings: ['selected'],
|
|
init() {
|
|
this._super(...arguments);
|
|
this.set('selected', this.get('tool').selected);
|
|
},
|
|
click: function () { // eslint-disable-line
|
|
let {section} = this.get('range');
|
|
let editor = this.get('editor');
|
|
|
|
editor.range = Range.create(section, 0, section, 0);
|
|
|
|
this.get('tool').onClick(editor, section);
|
|
this.sendAction('clicked');
|
|
}
|
|
});
|