medium-editor
Advanced tools
Comparing version 5.4.0 to 5.4.1
@@ -0,1 +1,7 @@ | ||
5.4.1 / 2015-07-20 | ||
================== | ||
* Fix issue where custom anchor-preview extensions weren't overriding built-in anchor preview | ||
* Add documentation from wiki into the source code | ||
5.4.0 / 2015-07-16 | ||
@@ -2,0 +8,0 @@ ================== |
{ | ||
"name": "medium-editor", | ||
"version": "5.4.0", | ||
"version": "5.4.1", | ||
"author": "Davi Ferreira <hi@daviferreira.com>", | ||
@@ -5,0 +5,0 @@ "contributors": [ |
@@ -97,5 +97,5 @@ # MediumEditor | ||
View the [MediumEditor Options documentation](https://github.com/yabwe/medium-editor/wiki/Options) on the Wiki for details on all the various options for MediumEditor. | ||
View the [MediumEditor Options documentation](OPTIONS.md) on all the various options for MediumEditor. | ||
Options to customize medium-editor are passed as the second argument to the [MediumEditor constructor](https://github.com/yabwe/medium-editor/wiki/MediumEditor-Object-API#mediumeditorelements-options). Example: | ||
Options to customize medium-editor are passed as the second argument to the [MediumEditor constructor](API.md#mediumeditorelements-options). Example: | ||
@@ -120,3 +120,3 @@ ```js | ||
* __elementsContainer__: specifies a DOM node to contain MediumEditor's toolbar and anchor preview elements. Default: `document.body` | ||
* __extensions__: extension to use (see [Custom Buttons and Extensions](https://github.com/yabwe/medium-editor/wiki/Custom-Buttons-and-Extensions)) for more. Default: `{}` | ||
* __extensions__: extension to use (see [Custom Buttons and Extensions](src/js/extensions)) for more. Default: `{}` | ||
* __spellcheck__: Enable/disable native contentEditable automatic spellcheck. Default: `true` | ||
@@ -176,3 +176,3 @@ * __targetBlank__: enables/disables target="\_blank" for anchor tags. Default: `false` | ||
Button behavior can be modified by passing an object into the buttons array instead of a string. This allow for overriding some of the default behavior of buttons. The following options are some of the basic parts of buttons that you may override, but any part of the `MediumEditor.extension.prototype` can be overriden via these button options. (Check out the [source code for buttons](https://github.com/yabwe/medium-editor/blob/master/src/js/extensions/button.js) to see what all can be overriden). | ||
Button behavior can be modified by passing an object into the buttons array instead of a string. This allow for overriding some of the default behavior of buttons. The following options are some of the basic parts of buttons that you may override, but any part of the `MediumEditor.extension.prototype` can be overriden via these button options. (Check out the [source code for buttons](src/js/extensions/button.js) to see what all can be overriden). | ||
@@ -503,3 +503,3 @@ * __name__: name of the button being overriden | ||
View the [MediumEditor Object API documentation](https://github.com/yabwe/medium-editor/wiki/MediumEditor-Object-API) on the Wiki for details on all the methods supported on the MediumEditor object. | ||
View the [MediumEditor Object API documentation](API.md) on the Wiki for details on all the methods supported on the MediumEditor object. | ||
@@ -523,3 +523,3 @@ ### Initialization methods | ||
* __.getFocusedElement()__: returns an element if any contenteditable element monitored by MediumEditor currently has focused | ||
* __.getSelectionParentElement(range)__: get the parent contenteditable element that contains the current selection | ||
* __.getSelectedParentElement(range)__: get the parent contenteditable element that contains the current selection | ||
* __.restoreSelection()__: restore the selection to what was selected when `saveSelection()` was called | ||
@@ -571,3 +571,3 @@ * __.saveSelection()__: internally store the set of selected text | ||
Check the [documentation](https://github.com/yabwe/medium-editor/wiki/Custom-Buttons-and-Extensions) in order to learn how to develop extensions for MediumEditor. | ||
Check the [documentation](src/js/extensions) in order to learn how to develop extensions for MediumEditor. | ||
@@ -574,0 +574,0 @@ A list of existing extensions and plugins, such as [Images and Media embeds](http://orthes.github.io/medium-editor-insert-plugin/), [Tables](https://github.com/yabwe/medium-editor-tables) and [Markdown](https://github.com/IonicaBizau/medium-editor-markdown) can be found [here](https://github.com/yabwe/medium-editor/wiki/Extensions-Plugins). |
@@ -209,4 +209,14 @@ /*global describe, it, expect, spyOn, AnchorForm, | ||
}); | ||
it('should NOT be in the DOM when a custom anchorPreview extension is provided', function () { | ||
this.newMediumEditor('.editor', { | ||
extensions: { | ||
'anchor-preview': {} | ||
} | ||
}); | ||
expect(document.querySelector('.medium-editor-anchor-preview')).toBeNull(); | ||
}); | ||
}); | ||
}); |
@@ -421,3 +421,3 @@ /*global Util, Selection, Extension, | ||
paste: true, | ||
anchorPreview: isAnchorPreviewEnabled.call(this), | ||
'anchor-preview': isAnchorPreviewEnabled.call(this), | ||
autoLink: isAutoLinkEnabled.call(this), | ||
@@ -714,3 +714,3 @@ keyboardCommands: isKeyboardCommandsEnabled.call(this), | ||
break; | ||
case 'anchorPreview': | ||
case 'anchor-preview': | ||
extension = new MediumEditor.extensions.anchorPreview(this.options.anchorPreview); | ||
@@ -717,0 +717,0 @@ break; |
@@ -8,4 +8,3 @@ /*global Button, FormExtension, AnchorForm, | ||
(function () { | ||
// for now this is empty because nothing interally uses an Extension default. | ||
// as they are converted, provide them here. | ||
extensionDefaults = { | ||
@@ -12,0 +11,0 @@ button: Button, |
@@ -20,3 +20,3 @@ /*global MediumEditor */ | ||
// grunt-bump looks for this: | ||
'version': '5.4.0' | ||
'version': '5.4.1' | ||
}).version); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1480755
124
18090