mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-09-24 16:40:55 -06:00
Merge branch 'master' into status
This commit is contained in:
commit
2d38e44411
@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Add `watch` task for gulp (Thanks to [@A-312], [#150].
|
- Add `watch` task for gulp (Thanks to [@A-312], [#150].
|
||||||
### Fixed
|
### Fixed
|
||||||
- Issue with Marked when using IE11 and webpack (Thanks to [@felipefdl], [#169]).
|
- Issue with Marked when using IE11 and webpack (Thanks to [@felipefdl], [#169]).
|
||||||
|
- Updated codemirror to version 5.52.2 (Thanks to [@A-312], [#173]).
|
||||||
|
|
||||||
## [2.9.0] - 2020-01-13
|
## [2.9.0] - 2020-01-13
|
||||||
### Added
|
### Added
|
||||||
|
20
package-lock.json
generated
20
package-lock.json
generated
@ -13,14 +13,20 @@
|
|||||||
"@babel/highlight": "^7.8.3"
|
"@babel/highlight": "^7.8.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@babel/helper-validator-identifier": {
|
||||||
|
"version": "7.9.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz",
|
||||||
|
"integrity": "sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"@babel/highlight": {
|
"@babel/highlight": {
|
||||||
"version": "7.8.3",
|
"version": "7.9.0",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz",
|
||||||
"integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==",
|
"integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
"@babel/helper-validator-identifier": "^7.9.0",
|
||||||
"chalk": "^2.0.0",
|
"chalk": "^2.0.0",
|
||||||
"esutils": "^2.0.2",
|
|
||||||
"js-tokens": "^4.0.0"
|
"js-tokens": "^4.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -40,9 +46,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/estree": {
|
"@types/estree": {
|
||||||
"version": "0.0.43",
|
"version": "0.0.44",
|
||||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.43.tgz",
|
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.44.tgz",
|
||||||
"integrity": "sha512-WfOySUnBpyKXbkC9QuZguwOGhGnugDXT2f2P6X8EIis7qlnd5NI1Nr4kRi357NtguxezyizIcaFlQe0wx23XnA==",
|
"integrity": "sha512-iaIVzr+w2ZJ5HkidlZ3EJM8VTZb2MJLCjw3V+505yVts0gRC4UMvjw0d1HPtGqI/HQC/KdsYtayfzl+AXY2R8g==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/marked": {
|
"@types/marked": {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "Jeroen Akkerman",
|
"author": "Jeroen Akkerman",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"codemirror": "^5.51.0",
|
"codemirror": "^5.52.2",
|
||||||
"codemirror-spell-checker": "1.1.2",
|
"codemirror-spell-checker": "1.1.2",
|
||||||
"marked": "^0.8.0"
|
"marked": "^0.8.0"
|
||||||
},
|
},
|
||||||
|
@ -167,8 +167,13 @@ function createToolbarButton(options, enableActions, enableTooltips, shortcuts,
|
|||||||
el.classList.add('no-mobile');
|
el.classList.add('no-mobile');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prevent errors if there is no class name in custom options
|
||||||
|
var classNameParts = [];
|
||||||
|
if(typeof options.className !== 'undefined') {
|
||||||
|
classNameParts = options.className.split(' ');
|
||||||
|
}
|
||||||
|
|
||||||
// Provide backwards compatibility with simple-markdown-editor by adding custom classes to the button.
|
// Provide backwards compatibility with simple-markdown-editor by adding custom classes to the button.
|
||||||
var classNameParts = options.className.split(' ');
|
|
||||||
var iconClasses = [];
|
var iconClasses = [];
|
||||||
for (var classNameIndex = 0; classNameIndex < classNameParts.length; classNameIndex++) {
|
for (var classNameIndex = 0; classNameIndex < classNameParts.length; classNameIndex++) {
|
||||||
var classNamePart = classNameParts[classNameIndex];
|
var classNamePart = classNameParts[classNameIndex];
|
||||||
@ -191,6 +196,11 @@ function createToolbarButton(options, enableActions, enableTooltips, shortcuts,
|
|||||||
}
|
}
|
||||||
el.appendChild(icon);
|
el.appendChild(icon);
|
||||||
|
|
||||||
|
// If there is a custom icon markup set, use that
|
||||||
|
if (typeof options.icon !== 'undefined') {
|
||||||
|
el.innerHTML = options.icon;
|
||||||
|
}
|
||||||
|
|
||||||
if (options.action && enableActions) {
|
if (options.action && enableActions) {
|
||||||
if (typeof options.action === 'function') {
|
if (typeof options.action === 'function') {
|
||||||
el.onclick = function (e) {
|
el.onclick = function (e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user