]>
git.immae.eu Git - perso/Immae/Projets/packagist/ludivine-ckeditor-component.git/blob - sources/plugins/widget/dev/assets/simplebox/dialogs/simplebox.js
45a150c2f0bc291c8a86fd1556b21044135b9a71
1 // Note: This automatic widget to dialog window binding (the fact that every field is set up from the widget
2 // and is committed to the widget) is only possible when the dialog is opened by the Widgets System
3 // (i.e. the widgetDef.dialog property is set).
4 // When you are opening the dialog window by yourself, you need to take care of this by yourself too.
6 CKEDITOR
.dialog
.add( 'simplebox', function( editor
) {
8 title: 'Edit Simple Box',
20 [ editor
.lang
.common
.notSet
, '' ],
21 [ editor
.lang
.common
.alignLeft
, 'left' ],
22 [ editor
.lang
.common
.alignRight
, 'right' ],
23 [ editor
.lang
.common
.alignCenter
, 'center' ]
25 // When setting up this field, set its value to the "align" value from widget data.
26 // Note: Align values used in the widget need to be the same as those defined in the "items" array above.
27 setup: function( widget
) {
28 this.setValue( widget
.data
.align
);
30 // When committing (saving) this field, set its value to the widget data.
31 commit: function( widget
) {
32 widget
.setData( 'align', this.getValue() );
40 setup: function( widget
) {
41 this.setValue( widget
.data
.width
);
43 commit: function( widget
) {
44 widget
.setData( 'width', this.getValue() );