ckeditor / ckeditor4

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

Make contents of CKEditor dialogs more dynamic #930

Open jswiderski opened 6 years ago

jswiderski commented 6 years ago

Are you reporting a feature request or a bug?

Feature

Check if the issue is already reported

Provide detailed reproduction steps (if any)

One of our users has asked about possibility to change editor dialog contents based on values entered in other fields.

  1. Go to https://codepen.io/ankagar/pen/LzVdVa and open Link dialog and type some text in custom input filed.
  2. Based on text entered options in custom dropdown should change.

Expected result

Actual result

CKEditor doesn't support changing dialog contents dynamically. While it is possible to e.g. add new fields to the dialog https://codepen.io/j_swiderski/pen/NvOaqd there is no API to change contents of complex fields like select or to easily attach listeners to newly created fields.

Dialog structure is quite static at the moment and even in dialogs like Link where content seems to be changing dynamically (e.g. target tab), the reality is that whole template for every possible case needs to be predefined: https://github.com/ckeditor/ckeditor-dev/blob/major/plugins/link/dialogs/link.js#L555-L561 https://github.com/ckeditor/ckeditor-dev/blob/major/plugins/link/dialogs/link.js#L593-L724

Other details

clarknelson commented 5 years ago

Thank you for reporting this