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
7d176f9dc2
13
CHANGELOG.md
13
CHANGELOG.md
@ -9,9 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- `inputStyle` and `nativeSpellcheck` options to manage the native language of the browser (Thanks to [@firm1], [#143]).
|
||||
- Group buttons in drop-down lists by adding a sub-option `children` for the items in the toolbar (Thanks to [@firm1], [#141]).
|
||||
- `sanitizerFunction` option to allow custom HTML sanitizing in the markdown preview (Thanks to [@adamb70], [#147]).
|
||||
- Time formatting and custom text options for the autosave message (Thanks to [@dima-bzz], [#170]).
|
||||
### Changed
|
||||
- Delay before assuming that submit of the form as failed is `autosave.submit_delay` instead of `autosave.delay` (Thanks to [@Situphen], [#139]).
|
||||
- Add `watch` task for gulp.
|
||||
- Add `watch` task for gulp (Thanks to [@A-312], [#150].
|
||||
### Fixed
|
||||
- Issue with Marked when using IE11 and webpack (Thanks to [@felipefdl], [#169]).
|
||||
|
||||
## [2.9.0] - 2020-01-13
|
||||
### Added
|
||||
@ -148,7 +151,12 @@ Project forked from [SimpleMDE](https://github.com/sparksuite/simplemde-markdown
|
||||
[#9]: https://github.com/Ionaru/easy-markdown-editor/issues/9
|
||||
|
||||
<!-- Linked PRs -->
|
||||
[#170]: https://github.com/Ionaru/easy-markdown-editor/pull/170
|
||||
[#169]: https://github.com/Ionaru/easy-markdown-editor/pull/169
|
||||
[#150]: https://github.com/Ionaru/easy-markdown-editor/pull/150
|
||||
[#147]: https://github.com/Ionaru/easy-markdown-editor/pull/147
|
||||
[#143]: https://github.com/Ionaru/easy-markdown-editor/pull/143
|
||||
[#141]: https://github.com/Ionaru/easy-markdown-editor/pull/141
|
||||
[#139]: https://github.com/Ionaru/easy-markdown-editor/pull/139
|
||||
[#132]: https://github.com/Ionaru/easy-markdown-editor/pull/132
|
||||
[#123]: https://github.com/Ionaru/easy-markdown-editor/pull/123
|
||||
@ -165,6 +173,9 @@ Project forked from [SimpleMDE](https://github.com/sparksuite/simplemde-markdown
|
||||
[#19]: https://github.com/Ionaru/easy-markdown-editor/pull/19
|
||||
|
||||
<!-- Linked users -->
|
||||
[@felipefdl]: https://github.com/felipefdl
|
||||
[@A-312]: https://github.com/A-312
|
||||
[@dima-bzz]: https://github.com/dima-bzz
|
||||
[@firm1]: https://github.com/firm1
|
||||
[@Situphen]: https://github.com/Situphen
|
||||
[@t49tran]: https://github.com/t49tran
|
||||
|
@ -55,8 +55,8 @@ function styles() {
|
||||
|
||||
// Watch for file changes
|
||||
function watch() {
|
||||
gulp.watch('./src/js/**/*.js', scripts)
|
||||
gulp.watch(css_files, styles)
|
||||
gulp.watch('./src/js/**/*.js', scripts);
|
||||
gulp.watch(css_files, styles);
|
||||
}
|
||||
|
||||
var build = gulp.parallel(gulp.series(lint, scripts), styles);
|
||||
|
1380
package-lock.json
generated
1380
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -24,7 +24,7 @@
|
||||
"marked": "^0.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/codemirror": "0.0.85",
|
||||
"@types/codemirror": "0.0.88",
|
||||
"@types/marked": "^0.7.2",
|
||||
"browserify": "^16.5.0",
|
||||
"gulp": "^4.0.2",
|
||||
|
@ -11,7 +11,7 @@ require('codemirror/addon/search/searchcursor.js');
|
||||
require('codemirror/mode/gfm/gfm.js');
|
||||
require('codemirror/mode/xml/xml.js');
|
||||
var CodeMirrorSpellChecker = require('codemirror-spell-checker');
|
||||
var marked = require('marked');
|
||||
var marked = require('marked/lib/marked');
|
||||
|
||||
|
||||
// Some variables
|
||||
@ -1643,6 +1643,12 @@ function EasyMDE(options) {
|
||||
options.blockStyles = extend({}, blockStyles, options.blockStyles || {});
|
||||
|
||||
|
||||
if (options.autosave != undefined) {
|
||||
// Merging the Autosave timeFormat, with the given options
|
||||
options.autosave.timeFormat = extend({}, timeFormat, options.autosave.timeFormat || {});
|
||||
}
|
||||
|
||||
|
||||
// Merging the shortcuts, with the given options
|
||||
options.shortcuts = extend({}, shortcuts, options.shortcuts || {});
|
||||
|
||||
|
@ -161,7 +161,7 @@ const editorImagesCustom = new EasyMDE({
|
||||
image: 'Insert URL'
|
||||
},
|
||||
syncSideBySidePreviewScroll: true
|
||||
});
|
||||
});
|
||||
|
||||
const editorAutosave = new EasyMDE({
|
||||
autosave: {
|
||||
@ -169,5 +169,12 @@ const editorAutosave = new EasyMDE({
|
||||
delay: 2000,
|
||||
submit_delay: 10000,
|
||||
uniqueId: 'abc',
|
||||
timeFormat: {
|
||||
locale: 'en-GB',
|
||||
format: {
|
||||
month: 'long',
|
||||
}
|
||||
},
|
||||
text: 'Stored: ',
|
||||
}
|
||||
});
|
||||
|
8
types/easymde.d.ts
vendored
8
types/easymde.d.ts
vendored
@ -46,11 +46,19 @@ type ToolbarButton =
|
||||
| 'guide';
|
||||
|
||||
declare namespace EasyMDE {
|
||||
|
||||
interface TimeFormatOptions {
|
||||
locale?: string | string[];
|
||||
format?: Intl.DateTimeFormatOptions;
|
||||
}
|
||||
|
||||
interface AutoSaveOptions {
|
||||
enabled?: boolean;
|
||||
delay?: number;
|
||||
submit_delay?: number;
|
||||
uniqueId: string;
|
||||
timeFormat?: TimeFormatOptions;
|
||||
text?: string;
|
||||
}
|
||||
|
||||
interface BlockStyleOptions {
|
||||
|
Loading…
x
Reference in New Issue
Block a user