Skip to content

Commit

Permalink
Pass showLinkTooltips option to editor
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmcmanus authored and lukemelia committed Jun 6, 2020
1 parent cd15614 commit de8c70a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ The component accepts these arguments:
to use atoms with Ember components.
* `spellcheck` boolean
* `autofocus` boolean
* `showLinkTooltips` boolean
* `placeholder` string -- the placeholder text to display when the mobiledoc is blank
* `options` hash -- any properties in the `options` hash will be passed to the MobiledocKitEditor constructor
* `serializeVersion` string -- The mobiledoc version to serialize to when firing the on-change action. Default: 0.3.2
Expand Down
14 changes: 8 additions & 6 deletions addon/components/mobiledoc-editor/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export default Component.extend({
placeholder: 'Write here...',
spellcheck: true,
autofocus: true,
showLinkTooltips: true,
serializeVersion: MOBILEDOC_VERSION,

options: null,
Expand All @@ -63,12 +64,13 @@ export default Component.extend({
let options = this.get('options') || {};

return assign({
placeholder: this.get('placeholder'),
spellcheck: this.get('spellcheck'),
autofocus: this.get('autofocus'),
cardOptions: this.get('cardOptions'),
cards: this.get('cards') || [],
atoms: this.get('atoms') || []
placeholder: this.get('placeholder'),
spellcheck: this.get('spellcheck'),
autofocus: this.get('autofocus'),
showLinkTooltips: this.get('showLinkTooltips'),
cardOptions: this.get('cardOptions'),
cards: this.get('cards') || [],
atoms: this.get('atoms') || []
}, options);
}),

Expand Down

0 comments on commit de8c70a

Please sign in to comment.