[WEB-1974] fix: images getting replaced on resize (#5233)

* fix: image resizer error

* refactor: created common function to get the active image element

* fix: build errors
This commit is contained in:
Aaryan Khandelwal 2024-07-30 14:58:40 +05:30 committed by GitHub
parent 6bb534dabc
commit 518327e380
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 129 additions and 88 deletions

View file

@ -118,6 +118,7 @@ export const IssueDescriptionInput: FC<IssueDescriptionInputProps> = observer((p
/>
) : (
<RichTextReadOnlyEditor
id={issueId}
initialValue={localIssueDescription.description_html ?? ""}
containerClassName={containerClassName}
/>

View file

@ -143,6 +143,7 @@ export const IssueCommentCard: FC<TIssueCommentCard> = observer((props) => {
projectId={projectId}
workspaceSlug={workspaceSlug}
ref={editorRef}
id={comment.id}
initialValue={watch("comment_html") ?? ""}
value={null}
onChange={(comment_json, comment_html) => setValue("comment_html", comment_html)}
@ -190,7 +191,7 @@ export const IssueCommentCard: FC<TIssueCommentCard> = observer((props) => {
)}
</div>
)}
<LiteTextReadOnlyEditor ref={showEditorRef} initialValue={comment.comment_html ?? ""} />
<LiteTextReadOnlyEditor ref={showEditorRef} id={comment.id} initialValue={comment.comment_html ?? ""} />
<IssueCommentReaction
workspaceSlug={workspaceSlug}

View file

@ -460,6 +460,7 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
control={control}
render={({ field: { value, onChange } }) => (
<RichTextEditor
id="issue-modal-editor"
initialValue={value ?? ""}
value={data.description_html}
workspaceSlug={workspaceSlug?.toString() as string}