Opened 11 years ago
Last modified 11 years ago
#11108 confirmed Task
Widget's documentation : data object
Reported by: | Franck Valentin | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Documentation & Samples | Version: | |
Keywords: | Cc: |
Description
In the widget's documentation (http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget) the field 'data' is described as a readonly object that can only be set by using the setData method but in the tutorial (the simplebox widget) is is described as a function executed every time the widget data is changed.
You confused widget#data property with widget.definition#data. The first is an object, the second can be set to a function which will be executed each time data change.
I understand that this can be confusing, so I'll take look if we can clarify this more in the widgets guide.