Problem/Motivation
When we install the "smart linker AI" plugin in the CKEditor and use that plugin with any content, then generating a result and clicking "Save changes to editor," the originally selected text disappears instead of being replaced with the modified content. This disrupts user expectations and results in data loss within the editor.
Steps to reproduce
1. Enable the SmartLinker AI Module plugin in CKEditor
2. Choose the AI provider and save the configuration
3. Open a CKEditor field in the content
4. Select any portion of text.
5. Click the "Generate Internal Links" plugin under AI Assistant.
6. In the modal, add a keyword or a number of links
7. Click on the generate button
8. Once the result is displayed in the "Result" field, click "Save changes to editor".
9. Observe that the original selected text disappears, and no replacement is inserted.
Please check the Video link for reference:
Link : https://www.loom.com/share/a3971de7e05a40ccbe8400ba417eb89c
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | beforefix.gif | 1.3 MB | anjaliprasannan |
| #4 | afterfix.gif | 473.94 KB | anjaliprasannan |
Issue fork smartlinker_ai-3526692
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3526692-unable-to-save
changes, plain diff MR !3
Comments
Comment #3
ishani patel commentedHello,
I've created MR,
Kindly review.
Thank you!
Comment #4
anjaliprasannan commentedReviewed the fix and it works fine. Keeping in Needs review for code review. Attaching before and after screencast
Comment #5
anjaliprasannan commentedI have checked the code and LGTM
Comment #7
zeeshan_khan commentedThank you for fixing the bug!
@ishani patel