Generated text is appended instead of replaced on multiple generations

Created on 2 December 2024, 5 months ago

Problem/Motivation

When using the AI integration in CKEditor, clicking "Generate" the first time correctly inserts the AI-generated content into the field. However, if the "Generate" button is clicked again, the newly generated text is appended to the existing text rather than replacing it.

This behavior can lead to confusion for the user, as they expect the AI to overwrite the previously generated content instead of concatenating it.

The issue needs to ensure that on subsequent "Generate" actions, the field is cleared before adding the new content.

Steps to reproduce

Generate anything with ai ckeditor, click again on "generate" you'll see generate content is added after the first generation and does not overwritte it.

Proposed resolution

Clear output field before generating content when user click on "generate"

πŸ› Bug report
Status

Active

Version

1.0

Component

AI CKEditor

Created by

πŸ‡§πŸ‡ͺBelgium arwillame Belgium πŸ‡§πŸ‡ͺ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024