Skip to content

Commit

Permalink
chore: add resize option to adjust the height of tinymce editor manually
Browse files Browse the repository at this point in the history
  • Loading branch information
AfaqShuaib09 committed Nov 14, 2024
1 parent c73567b commit c657233
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
24 changes: 20 additions & 4 deletions src/components/RichEditor/__snapshots__/RichEditor.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ exports[`RichEditor shows a rich text editor and an error 1`] = `
"content_css": false,
"content_style": "",
"default_link_target": "_blank",
"elementpath": false,
"entity_encoding": "raw",
"extended_valid_elements": "span[lang|id] -span",
"max_height": 500,
"menubar": false,
"min_height": 200,
"plugins": "legacyoutput link lists language directionality",
"resize": "vertical",
"selector": "#rich-text-editor-test",
"statusbar": false,
"statusbar": true,
"toolbar": "undo redo | bold italic underline | bullist numlist | link | language | ltr rtl",
}
}
Expand Down Expand Up @@ -72,12 +76,16 @@ exports[`RichEditor shows a rich text editor with default text value 1`] = `
"content_css": false,
"content_style": "",
"default_link_target": "_blank",
"elementpath": false,
"entity_encoding": "raw",
"extended_valid_elements": "span[lang|id] -span",
"max_height": 500,
"menubar": false,
"min_height": 200,
"plugins": "legacyoutput link lists language directionality",
"resize": "vertical",
"selector": "#rich-text-editor-test",
"statusbar": false,
"statusbar": true,
"toolbar": "undo redo | bold italic underline | bullist numlist | link | language | ltr rtl",
}
}
Expand Down Expand Up @@ -118,12 +126,16 @@ exports[`RichEditor shows a rich text editor with no default text value 1`] = `
"content_css": false,
"content_style": "",
"default_link_target": "_blank",
"elementpath": false,
"entity_encoding": "raw",
"extended_valid_elements": "span[lang|id] -span",
"max_height": 500,
"menubar": false,
"min_height": 200,
"plugins": "legacyoutput link lists language directionality",
"resize": "vertical",
"selector": "#rich-text-editor-test",
"statusbar": false,
"statusbar": true,
"toolbar": "undo redo | bold italic underline | bullist numlist | link | language | ltr rtl",
}
}
Expand Down Expand Up @@ -166,12 +178,16 @@ exports[`RichEditor shows a rich text editor with no maxChars 1`] = `
"content_css": false,
"content_style": "",
"default_link_target": "_blank",
"elementpath": false,
"entity_encoding": "raw",
"extended_valid_elements": "span[lang|id] -span",
"max_height": 500,
"menubar": false,
"min_height": 200,
"plugins": "legacyoutput link lists language directionality",
"resize": "vertical",
"selector": "#rich-text-editor-test",
"statusbar": false,
"statusbar": true,
"toolbar": "undo redo | bold italic underline | bullist numlist | link | language | ltr rtl",
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/components/RichEditor/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,12 @@ class RichEditor extends React.Component {
branding: false,
menubar: false,
plugins: 'legacyoutput link lists language directionality',
statusbar: false,
statusbar: true,
elementpath: false,
resize: 'vertical',
selector: `#${id}`,
min_height: 200,
max_height: 500,
toolbar: 'undo redo | bold italic underline | bullist numlist | link | language | ltr rtl',
entity_encoding: 'raw',
extended_valid_elements: 'span[lang|id] -span',
Expand Down

0 comments on commit c657233

Please sign in to comment.