Skip to content

Commit

Permalink
#10719: revert naming enableUploadImg to be uploadEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmoudadel54 committed Jan 13, 2025
1 parent df81e22 commit ca8607f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function CompactRichTextEditor({
image: {
urlEnabled: true,
// upload controlled via props, disabled by default
uploadEnabled: props.enableUploadImg || false,
uploadEnabled: props.uploadEnabled || false,
alignmentEnabled: false,
uploadCallback: (file) => new Promise((resolve, reject) => {
const reader = new FileReader();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ describe('CompactRichTextEditor component', () => {
const uploadImgInput = document.querySelector(".rdw-image-modal-upload-option");
expect(uploadImgInput).toBeFalsy();
});
it('test rendering TextEditor with enabling image upload [enableUploadImg]', () => {
ReactDOM.render(<CompactRichTextEditor enableUploadImg />, document.getElementById("container"));
it('test rendering TextEditor with enabling image upload [uploadEnabled]', () => {
ReactDOM.render(<CompactRichTextEditor uploadEnabled />, document.getElementById("container"));
const textEditorContainer = document.querySelector(".ms-compact-text-editor.rdw-editor-wrapper");
expect(textEditorContainer).toBeTruthy();
const imageWidget = document.querySelector(".rdw-image-wrapper .rdw-option-wrapper");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function TextOptions({ data = {}, onChange = () => {} }) {
</Form>
</Col>
<DescriptorEditor
enableUploadImg
uploadEnabled
editorState={editorState}
onEditorStateChange={(newEditorState) => {
const previousHTML = draftJSEditorStateToHtml(editorState);
Expand Down

0 comments on commit ca8607f

Please sign in to comment.