Skip to content

Commit

Permalink
feat(toolips): Editor link tooltips can be disabled (#602)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmcmanus authored and bantic committed Feb 23, 2018
1 parent ce378e2 commit 7da84f8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/js/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const defaults = {
placeholder: 'Write here...',
spellcheck: true,
autofocus: true,
showLinkTooltips: true,
undoDepth: 5,
undoBlockTimeout: 5000, // ms for an undo event
cards: [],
Expand Down Expand Up @@ -113,6 +114,7 @@ class Editor {
* @param {String} [options.placeholder] Default text to show before user starts typing.
* @param {Boolean} [options.spellcheck=true] Whether to enable spellcheck
* @param {Boolean} [options.autofocus=true] Whether to focus the editor when it is first rendered.
* @param {Boolean} [options.showLinkTooltips=true] Whether to show the url tooltip for links
* @param {number} [options.undoDepth=5] How many undo levels will be available.
* Set to 0 to disable undo/redo functionality.
* @return {Editor}
Expand Down Expand Up @@ -239,7 +241,9 @@ class Editor {

this.element = element;

this._addTooltip();
if (this.showLinkTooltips) {
this._addTooltip();
}

// A call to `run` will trigger the didUpdatePostCallbacks hooks with a
// postEditor.
Expand Down

0 comments on commit 7da84f8

Please sign in to comment.