Skip to content

Commit

Permalink
Merge pull request #3512 from Pandabweer/acceptance
Browse files Browse the repository at this point in the history
 add option to clear richTextInput
  • Loading branch information
dylanBetty authored Oct 24, 2024
2 parents 702e0c7 + 50806e0 commit 6dbb364
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# [2.194.0](https://github.com/bettyblocks/material-ui-component-set/compare/v2.193.2...v2.194.0) (2024-10-22)


### Bug Fixes

* force pipeline ([323ed59](https://github.com/bettyblocks/material-ui-component-set/commit/323ed5999820be6aca7c1b3c66787f74ee51ef83))


### Features

* changed column overflow in designtime ([356fa42](https://github.com/bettyblocks/material-ui-component-set/commit/356fa4215b7f7ba232197d7ea73e2c91be746f9c))

## [2.193.2](https://github.com/bettyblocks/material-ui-component-set/compare/v2.193.1...v2.193.2) (2024-10-11)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "component-set",
"version": "2.193.2",
"version": "2.194.0",
"main": "dist/templates.json",
"license": "UNLICENSED",
"private": false,
Expand Down
13 changes: 13 additions & 0 deletions src/components/richTextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,19 @@
);
const fragment = deserialize(parsed.body);

B.defineFunction('Clear', () => {
editor.children.forEach(() => {
Transforms.delete(editor, { at: [0] });
});

editor.children = [
{
type: 'p',
children: [{ text: '' }],
},
];
});

if (isDev) {
useEffect(() => {
Transforms.delete(editor, {
Expand Down

0 comments on commit 6dbb364

Please sign in to comment.