ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

Customize the link jump logic in the editor

Open CatsAndMice opened this issue 2 years ago • 1 comments

📝 Provide a description of the new feature

After using the ckeditor5-link plugin to add links, when users trigger link jumps, they hope to get the jumped links and then stitch them for a while before the developer decides how to jump them, but this is not possible now

What is the expected behavior of the proposed feature?

ClassicEditor
    .create( document.querySelector( '#editor' ), {
        toolbar: {
            items: [
                'link',
                // More toolbar items. 
                // ...
            ],
        },
        link: {
          //If the openLink function is configured, it is called every time a link jump is triggered, and it is up to the developer to decide how the link jumps
          openLink:function(url){
                //..
           }
           //...
        }
    } )
    .then( /* ... */ )
    .catch( /* ... */ );

In the place circled in the red box in the figure below, make a judgment to determine whether openLink exists in the configuration, and call it if it exists; If it does not exist, the default jump method is used image The file is https://github.com/CatsAndMice/ckeditor5/blob/master/packages/ckeditor5-link/src/linkediting.ts

If you'd like to see this feature implemented, add a 👍 reaction to this post.

CatsAndMice avatar Feb 19 '23 08:02 CatsAndMice

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot avatar Feb 20 '24 03:02 CKEditorBot

We've closed your issue due to inactivity. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).

CKEditorBot avatar Mar 21 '24 03:03 CKEditorBot