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(OrderedList UI): support start property #90

Merged
merged 12 commits into from
Oct 23, 2024
Merged

Conversation

e11sy
Copy link
Contributor

@e11sy e11sy commented Oct 23, 2024

Problem

Problem is discussed in this issue #66

Solution

Now we can set start property for OrderedList:
image

We use custom html inside of the toolbox to render input:
image

We check, that input value is actually integer:
image

OrderedList data model now contains extra field related to the whole list
image

Checklist and Unordered list does not save this field
image

Note that UI is still to be improved

src/index.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
src/index.ts Show resolved Hide resolved
src/types/ItemMeta.ts Outdated Show resolved Hide resolved
src/utils/renderStartWithElement.ts Outdated Show resolved Hide resolved
src/utils/renderStartWithElement.ts Outdated Show resolved Hide resolved
src/utils/renderToolboxInput.ts Outdated Show resolved Hide resolved
Comment on lines 27 to 30
/**
* Value of the start property, if it is not specified, then it is set to one
*/
value: start ?? 1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hardcoded

Comment on lines 36 to 37
input.setAttribute('type', 'number');
input.setAttribute('pattern', '\d*');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hardcoded

@e11sy e11sy merged commit 307277c into release/2.0 Oct 23, 2024
1 check passed
@e11sy e11sy deleted the ol-customisation branch October 23, 2024 19:51
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