Skip to content

Commit

Permalink
fix: fixed list style format in sidebar context and TextSize icon (#729)
Browse files Browse the repository at this point in the history
  • Loading branch information
SaraBianchi authored Jul 25, 2024
1 parent 0b2d71d commit 7addcf3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
28 changes: 9 additions & 19 deletions src/config/RichTextEditor/ToolbarButtons/TextSizeButton.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import React from 'react';
import { defineMessages, useIntl } from 'react-intl';
// import { defineMessages, useIntl } from 'react-intl';
import Icon from '@plone/volto/components/theme/Icon/Icon';

// import DraftJsDropdownButton from 'design-comuni-plone-theme/config/RichTextEditor/ToolbarButtons/DraftJsDropdownButton';

import formatSVG from '@plone/volto/icons/format.svg';

const messages = defineMessages({
TextSizeButton: {
id: 'text-size-button',
defaultMessage: 'Dimensione del testo',
},
});
// const messages = defineMessages({
// TextSizeButton: {
// id: 'text-size-button',
// defaultMessage: 'Dimensione del testo',
// },
// });

/*
const TextSizeButton = (props) => {
Expand Down Expand Up @@ -44,22 +44,12 @@ const TextSizeButton = (props) => {
};
*/

const ButtonIcon = (props) => {
const intl = useIntl();
return (
<Icon
name={formatSVG}
size="1.25em"
title={intl.formatMessage(messages.TextSizeButton)}
/>
);
};

const TextSizeButton = (props) => {
const createInlineStyleButton = props.draftJsCreateInlineStyleButton.default;

return createInlineStyleButton({
style: 'TEXT_LARGER',
children: ButtonIcon,
children: <Icon name={formatSVG} size="24px" />,
});
};
export default TextSizeButton;
8 changes: 8 additions & 0 deletions theme/_cms-ui.scss
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,14 @@ body.cms-ui {
}
}

// Sidebar - campi editabili con draftJs
// - liste
#sidebar .sidebar-container .ui.form ul.public-DraftStyleDefault-ul {
li.public-DraftStyleDefault-unorderedListItem {
display: list-item;
}
}

[data-rbd-draggable-context-id] {
margin-bottom: 1rem;
}
Expand Down

0 comments on commit 7addcf3

Please sign in to comment.