Opened 10 years ago
Last modified 10 years ago
#12524 confirmed New Feature
[Widgets] Support multiple nested editables of the same name
Reported by: | Piotrek Koszuliński | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | UI : Widgets | Version: | 4.3 Beta |
Keywords: | Cc: |
Description ¶
It would be useful if it was possible to initialise many nested editables using just one name:
editables: { label: { selector: '.someClass' }, },
More details about the current behaviour and reasons: http://ckeditor.com/forums/Support/Editable-fields-in-widget#comment-134623
Workaround - using widget.initEditable with dynamically generated names and selectors.

Change History (3)
comment:1 Changed 10 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 10 years ago by
Type: | Bug → New Feature |
---|
comment:3 Changed 10 years ago by

Motivated by PR#195 I started thinking how this feature could be now added to the editor.
First thing to notice is that any changes here cannot blow up existing implementations. Therefore, this feature should be opt-in:
This will make sure that existing implementations are safe.
The next thing is how editables should be stored in widget.editables. I think that the most natural way is that in an array. However, we must remember that we must not break existing implementations. So singular editables should not be wrapped in an array.
Finally, how to find an instance of editable from DOM. I think that the way proposed in PR#195 is ok, so in case of a multi-editable we need additional attribute. I would call it
data-cke-editable-index
, because proposed "id" conflicts with existing concept of editable names.These changes mean that we need a new methods and changes in existing ones: