add support to history custom settings

This commit is contained in:
Matheus Richard
2019-02-26 11:14:11 -03:00
parent 3de6b13004
commit 0b83723a6b

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,
}),
]
}