Add function "Modify with a prompt" to AI CKEditor

Created on 28 March 2025, 28 days ago

In addition to the default options of AI CKEditor it would be greate to have "Modify with a prompt" functionality.

It should work as follows:

  1. User selects text
  2. User selects option "Modify with a prompt"
  3. Dialog opens in which user can enter a custom prompt (similar to option "Generate with AI") and the selected text is shown (similar to option "Tone")
  4. User enters prompt and click on "Modify" button
  5. Text is modified
โœจ Feature request
Status

Active

Version

1.1

Component

AI CKEditor

Created by

๐Ÿ‡ฉ๐Ÿ‡ชGermany breidert

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

Merge Requests

Comments & Activities

  • Issue created by @breidert
  • Merge request !5323516023 Add feature: Modify with a prompt โ†’ (Merged) created by breidert
  • Pipeline finished with Failed
    27 days ago
    Total: 354s
    #459704
  • Pipeline finished with Failed
    27 days ago
    Total: 217s
    #459714
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany breidert

    Screenshots of new functionality provided in MRs:

  • Pipeline finished with Failed
    27 days ago
    Total: 242s
    #459730
  • Pipeline finished with Failed
    27 days ago
    Total: 229s
    #459777
  • Pipeline finished with Success
    27 days ago
    Total: 243s
    #459789
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany breidert
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom MrDaleSmith

    Works fine, applies cleaning, but I don't think the update hook should assume that all users want this enabling by default. I think it would be more appropriate to add it as disabled and show a message in the update hook to advise it is available if needed.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany breidert

    Good point Dale!

    If it is enabled by default via update_hook, people see the new functionality and can turn it off. I guess it is the maintainer to decide :-)

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany a.dmitriiev

    a.dmitriiev โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany a.dmitriiev

    I have update MR with hook_post_update instead of updating all editor instances in the same hook_update. I have also noticed that individual plugins do not have schema definition. I have added the config schema for the plugin from this MR, but also added for all existing plugins.

  • Pipeline finished with Failed
    17 days ago
    Total: 224s
    #468138
  • Pipeline finished with Success
    17 days ago
    Total: 217s
    #468140
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia snehal-chibde

    I have checked this on Drupal version 11.1.6, with updb got two hook updates ie hook_update_n and post-update.
    I am getting error on click of save config under admin/config/content/formats/manage/full_html, under the 'Modify with a prompt'.
    Added screenshot of the same for reference.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany a.dmitriiev

    Yes @snehal-chibde, you are right. Thank you for the feedback and finding this bug. I have updated the MR with the fix. Please review again.

  • Pipeline finished with Success
    11 days ago
    Total: 300s
    #472887
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia snehal-chibde

    hello @a.dmitriiev, I have checked the latest MR on local and this is working as expected now.
    Added below screenshot for reference.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany a.dmitriiev
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany marcus_johansson

    The code looks good, but I agree with Paul here. We should not enable this by default. Site builders have taken a deliberate choice with what plugins they enabled here, the same should be true for this.

    As soon as this is removed, I will merge it.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany a.dmitriiev

    I have updated the post update hook, so the plugin is not enabled by default.

  • Pipeline finished with Success
    9 days ago
    Total: 254s
    #474873
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany marcus_johansson

    Thank you all, with the minor change this is getting merged.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany a.dmitriiev
Production build 0.71.5 2024