Merge pull request #213 from MatheusRich/add-support-to-history-custom-settings

Add support to history custom settings
This commit is contained in:
Philipp Kühn 2019-03-06 06:50:13 +01:00 committed by GitHub
commit d411863bbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,13 @@ export default class History extends Extension {
return 'history'
}
get defaultOptions() {
return {
depth: '',
newGroupDelay: '',
}
}
keys() {
const isMac = typeof navigator !== 'undefined' ? /Mac/.test(navigator.platform) : false
const keymap = {
@ -23,7 +30,10 @@ export default class History extends Extension {
get plugins() {
return [
history(),
history({
depth: this.options.depth,
newGroupDelay: this.options.newGroupDelay,
}),
]
}