margox / braft-utils

Braft Editor基础工具包
37 stars 34 forks source link

Fix decreaseSelectionIndent with a custom maxIndent value #4

Closed bwencke closed 5 years ago

bwencke commented 5 years ago

increaseSelectionIndent allowed a custom maxIndent to be passed in, but decreaseSelectionIndent did not. This made it possible that in toggleSelectionIndent it would not decrease the indent if it was greater than 6 since it was only checking the default maxIndent value.

Adding support for larger maxIndent values was achieved by passing in a value to override the default.