Skip to content

IBX-11714: Custom class can not be added on ul and ol elements#318

Open
OstafinL wants to merge 1 commit into
5.0from
IBX-11714-custom-class-can-not-be-added-on-ul-and-ol-elements
Open

IBX-11714: Custom class can not be added on ul and ol elements#318
OstafinL wants to merge 1 commit into
5.0from
IBX-11714-custom-class-can-not-be-added-on-ul-and-ol-elements

Conversation

@OstafinL

@OstafinL OstafinL commented Jun 1, 2026

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-11714

Description:

For QA:

Documentation:

@OstafinL OstafinL force-pushed the IBX-11714-custom-class-can-not-be-added-on-ul-and-ol-elements branch 6 times, most recently from 50438bc to 7b67fd6 Compare June 1, 2026 10:19
@OstafinL OstafinL force-pushed the IBX-11714-custom-class-can-not-be-added-on-ul-and-ol-elements branch from 7b67fd6 to dfe99b5 Compare June 1, 2026 10:21
@sonarqubecloud

sonarqubecloud Bot commented Jun 1, 2026

Copy link
Copy Markdown

@OstafinL OstafinL requested a review from a team June 1, 2026 10:30
@ibexa-workflow-automation-1 ibexa-workflow-automation-1 Bot requested review from GrabowskiM, albozek, alekmick, dew326 and tischsoic and removed request for a team June 1, 2026 10:31
Comment on lines +88 to +92
if (schema.getDefinition('$listItem')) {
schema.extend('$listItem', { allowAttributes: `list-${attributeName}` });
} else {
schema.extend('$block', { allowAttributes: `list-${attributeName}` });
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (schema.getDefinition('$listItem')) {
schema.extend('$listItem', { allowAttributes: `list-${attributeName}` });
} else {
schema.extend('$block', { allowAttributes: `list-${attributeName}` });
}
const elementName = schema.getDefinition('$listItem') ? '$listItem' : '$block';
schema.extend(elementName { allowAttributes: `list-${attributeName}` });

up to you :)

const elementSiblings = [element];
const matchesSibling =
siblingsName === 'listItem'
? (item) => item?.hasAttribute?.('listItemId') || item?.name === 'listItem'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

❤️

findElementSiblings(element, siblingsName) {
let iterator = element;
const elementSiblings = [element];
const matchesSibling =

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

proposal: hasMatchingSibling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants