ckeditor / ckeditor4

The best enterprise-grade WYSIWYG editor. Fully customizable with countless features and plugins.
https://ckeditor.com/ckeditor-4
Other
5.8k stars 2.48k forks source link

Add others config option in plugin link to define items in dropdown of link type and protocol #4402

Open xillibit opened 4 years ago

xillibit commented 4 years ago

Type of report

Feature request

Provide description of the new feature

In the plugin link it will be usefull to have two new settings with lists to define the items that we can found by default in link type and protocol

image

f1ames commented 4 years ago

Hello @xillibit,

Thanks for reporting :+1: I agree such feature would make sense. However, since we have other priorities I can't tell if and when we can proceed with it. Feel free to propose a PR though!

As a workaround, one may also use dialogDefinition event to adjust those values on the fly when dialog is created - so the above is already doable but will require custom code.

xillibit commented 4 years ago

I have looked the code of link plugins but for the lang like linkLang.other which is here : https://github.com/ckeditor/ckeditor4/blob/major/plugins/link/dialogs/link.js#L291

It's undefined in the CKEDITOR.tools.extend( CKEDITOR.config, { } ); in https://github.com/ckeditor/ckeditor4/blob/major/plugins/link/plugin.js so what is the equivalent of linkLang.other for the config ?

f1ames commented 4 years ago

I have looked the code of link plugins but for the lang like linkLang.other which is here : https://github.com/ckeditor/ckeditor4/blob/major/plugins/link/dialogs/link.js#L291

This is a language string which changes depending on editor language. You can access it like editor.lang.link.other (where editor is current CKEditor instance).