This repository has been archived by the owner on Nov 28, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs TryGhost/Ghost#8106, TryGhost/Ghost#7429, requires TryGhost/Ghost#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.
- Loading branch information
1 parent
a2c389e
commit 8c800ef
Showing
30 changed files
with
612 additions
and
267 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default { | ||
name: 'hr-card', | ||
label: 'HR Card', | ||
icon: '', | ||
genus: 'ember', | ||
buttons: { | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import Component from 'ember-component'; | ||
import layout from '../../templates/components/hr-card'; | ||
export default Component.extend({ | ||
layout | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,23 @@ | ||
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: 'li', | ||
|
||
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'); | ||
|
||
actions: { | ||
select() { | ||
let {section/* , startOffset, endOffset */} = this.get('range'); | ||
window.getSelection().removeAllRanges(); | ||
|
||
let range = document.createRange(); | ||
|
||
range.setStart(section.renderNode._element, 0); // startOffset-1); // todo | ||
range.setEnd(section.renderNode._element, 0); // endOffset-1); | ||
|
||
let selection = window.getSelection(); | ||
selection.addRange(range); | ||
editor.range = Range.create(section, 0, section, 0); | ||
|
||
this.get('tool').onClick(this.get('editor')); | ||
} | ||
this.get('tool').onClick(editor, section); | ||
this.sendAction('clicked'); | ||
} | ||
}); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.