Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(properties): implement counterType config property #92

Merged
merged 7 commits into from
Oct 28, 2024

Conversation

e11sy
Copy link
Contributor

@e11sy e11sy commented Oct 28, 2024

Problem

For now we can't customize counters for ordered list

Solution

Added counterType customisation in toolbox
image
Now we support:

  • numeric (default)
  • lower-roman
  • upper-roman
  • lower-alpha
  • upper-alpha

Changes

NestedList

  • In constructor we check that list is ordered and if it is, we assign default value to the data.counterType if it is not specified
  • Export customisation toolbox items into toolbox
  • Change data.counterType value when related toolbox triggered

Tabulator

  • Change own data.counterType and set list's --list-counter-type to the concrete value, when NestedList calls changeCounterType() method
  • On save, check, if list is ordered and add counterType to the dataToSave variable

Styles

  • Added variable that is responsible for list counter type

Types

  • Added union type that represents supported values for data.counterType
  • Added Map that is responsible for getting exact counterType by it's name displayed in toolbox item

@e11sy e11sy merged commit 7c74b64 into release/2.0 Oct 28, 2024
1 check passed
@e11sy e11sy deleted the ol-couters-customization branch October 28, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants