From ea44e1dd54b221ca829bd30ac58a11f486e676c4 Mon Sep 17 00:00:00 2001 From: Rishi Jain Date: Wed, 1 Jun 2016 13:15:42 +0530 Subject: [PATCH] documented the showOnEmptyLink option --- OPTIONS.md | 7 +++++++ README.md | 1 + 2 files changed, 8 insertions(+) diff --git a/OPTIONS.md b/OPTIONS.md index 0933fd1f4..0e9416272 100644 --- a/OPTIONS.md +++ b/OPTIONS.md @@ -42,6 +42,7 @@ var editor = new MediumEditor('.editor', { - [Anchor Preview options](#anchor-preview-options) - [`hideDelay`](#hidedelay) - [`previewValueSelector`](#previewvalueselector) + - [`showOnEmptyLinks`](#showonemptylinks) - [Disabling Anchor Preview](#disabling-anchor-preview) - [Placeholder Options](#placeholder-options) - [`text`](#text) @@ -334,6 +335,12 @@ Time in milliseconds to show the anchor tag preview after the mouse has left the The default selector to locate where to put the activeAnchor value in the preview. You should only need to override this if you've modified the way in which the anchor-preview extension renders. +*** +#### `showOnEmptyLinks` +**Default:** `true` + +Determines whether the anchor tag preview shows up on link with href as "" or "#something". You should set this value to false if you do not want the preview to show up in such use cases. + *** #### `showWhenToolbarIsVisible` **Default:** `false` diff --git a/README.md b/README.md index b586b3d7a..939d81b8d 100644 --- a/README.md +++ b/README.md @@ -251,6 +251,7 @@ var editor = new MediumEditor('.editable', { * __hideDelay__: time in milliseconds to show the anchor tag preview after the mouse has left the anchor tag. Default: `500` * __previewValueSelector__: the default selector to locate where to put the activeAnchor value in the preview. You should only need to override this if you've modified the way in which the anchor-preview extension renders. Default: `'a'` * __showWhenToolbarIsVisible__: determines whether the anchor tag preview shows up when the toolbar is visible. You should set this value to true if the static option for the toolbar is true and you want the preview to show at the same time. Default: `false` +* __showOnEmptyLinks__: determines whether the anchor tag preview shows up on link with href as '' or '#something'. You should set this value to false if you do not want the preview to show up in such use cases. Default: `true` To disable the anchor preview, set the value of the `anchorPreview` option to `false`: ```javascript