Skip to content

Commit

Permalink
fix: Drop semantic list component as it cannot append the slate node …
Browse files Browse the repository at this point in the history
…- ref 278427

* Drop semantic ui list component as it cannot append the slate node ref

* style: Automated code fix

* Update slate.js

---------

Co-authored-by: eea-jenkins <eea-github@googlegroups.com>
  • Loading branch information
dobri1408 and eea-jenkins authored Jan 29, 2025
1 parent 42dd743 commit 3852353
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/slate.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import cx from 'classnames';
import { List } from 'semantic-ui-react';
import {
MarkElementButton,
ToolbarButton,
Expand Down Expand Up @@ -275,15 +274,21 @@ export default function installSlate(config) {

// Align Slate Lists to EEA Design System
config.settings.slate.elements.ul = ({ attributes, children }) => (
<List bulleted as="ul" {...attributes}>
<ul
{...attributes}
className={cx('ui bulleted list', attributes?.className)}
>
{children}
</List>
</ul>
);

config.settings.slate.elements.ol = ({ attributes, children }) => (
<List ordered as="ol" {...attributes}>
<ol
{...attributes}
className={cx('ui ordered list', attributes?.className)}
>
{children}
</List>
</ol>
);

config.settings.slate.allowedHeadlineElements.push('zotero');
Expand Down

0 comments on commit 3852353

Please sign in to comment.