Closed sethmichaelbrown closed 1 year ago
This would be very useful to us - thanks for writing @sethmichaelbrown!
+1 to this. @editorjs/list supports a config: { defaultStyle: "unordered" }
so it would be ideal to have the same config when switching over to this tool.
@sethmichaelbrown thanks for the PR, but this feature is updated via #50
…faulting to ordered so this is fully backwards compatible, updating the README to reflect new config options
This PR adds functionality to make the default list type variable. I added a check to ensure the type was either
ordered
orunordered
- so long as the option passed via theconfig.defaultListStyle
is one of these valid options, it is considered the default style. If it is not a valid option, or does not exist, the fallback isordered
so that it is fully backwards compatible.The README as been updated to reflect this change.
Per the comments on other PRs, this code has been linted with ESLint. I did not see any style linting rules such a
.prettierrc
so I did the style linting by hand. Please ensure it matches the code base style to your liking - if not, please let me know how to improve it. Thanks.