Ticket #3758 (closed New Feature: fixed)
Add support to change the dialog definition in selected editor
| Reported by: | wwalc | Owned by: | martinkou |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 3.0 |
| Component: | UI : Dialogs | Version: | |
| Keywords: | Confirmed Review+ Doc | Cc: |
Description
When the dialogDefinition event is fired it is possible to change the global dialog definition, but it is not possible to change the dialog definition just for the selected editor instance.
Attachments
Change History
Changed 4 years ago by wwalc
- Attachment 3758.patch added
comment:2 Changed 4 years ago by martinkou
- Status changed from new to assigned
- Owner set to martinkou
comment:3 Changed 4 years ago by fredck
- Keywords Review- added; Review? removed
- The cloning logic is broken. It doesn't handle null properties. (The table dialog doesn't work)
- At this point, we should instead enhance the CKEDITOR.tools.clone function to make it support arrays, using it instead of custom local functions.
- Please ensure you have things tested before the new patch. This is a drastic change, which needs much attention.
comment:5 Changed 4 years ago by martinkou
After this patch, only the following types will be allowed in a dialog definition:
- undefined
- null
- Number
- Boolean
- String
- Date
- Function
- Array
- Literal Object
Things outside of the types listed above, e.g. regex objects and DOM objects, will result in cloning errors.
comment:7 Changed 4 years ago by garry.yao
- Keywords Review- added; Review? removed
The cloning logic could be further simplified, it's using a lot of 'instanceof' operator and inner function, and it's not necessary for split array and object iteration.
comment:8 Changed 4 years ago by martinkou
- Keywords Review? added; Review- removed
Simplified the patch with Fred's suggestions.
comment:10 Changed 4 years ago by martinkou
- Status changed from assigned to closed
- Resolution set to fixed
Fixed with [3704].
Click here for more info about our SVN system.
Note: See
TracTickets for help on using
tickets.

Patch added by Martin in #3673