The onShow stuff works fine, but when I hit "OK" after editing an existing "gallery" element, nothing changes about the <gallery> tag. (According to Firebug, there's no Javascript errors involved at any point.)
What am I doing wrong? Spent ages trying absolutely anything, but nothing works..
What am I doing wrong? Spent ages trying absolutely anything, but nothing works..
title: 'Gallery Properties', minWidth: 400, minHeight: 100, contents : [ { id : 'tab1', label : 'Basic Settings', elements : [ { type : 'text', id : 'cols', label : 'cols', setup : function( element ) { this.setValue( element.getAttribute( "cols" ) ); }, commit : function( element ) { element.setAttribute( "cols", this.getValue() ); } }, { type : 'text', id : 'height', label : 'height', setup : function( element ) { this.setValue( element.getAttribute( "height" ) ); }, commit : function( element ) { element.setAttribute( "height", this.getValue() ); } } ] } ], onShow : function() { delete this.element; var editor = this.getParentEditor(); var fake = editor.getSelection().getSelectedElement(); var element = editor.restoreRealElement(fake); if (element) { this.insertMode = false; } else { element = editor.document.createElement('gallery'); this.insertMode = true; } this.element = element; this.setupContent(element); }, onOk : function() { var editor = this.getParentEditor(); if (this.insertMode) editor.insertElement(this.element); this.commitContent(this.element); }
Re: My plugin just *won't* commit
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Re: My plugin just *won't* commit
Yes. The button appears in the menu, the editing window pops up, the "cols" and "height" fields appear as they should.![:(](http://b.cksource.com/a/2/img/smilies/icon_e_sad.gif)
The only thing that doesn't work is the OK button.
Re: My plugin just *won't* commit
Re: My plugin just *won't* commit
Only thing I'm still messing with is how to make the fake image element non-resizable.
Re: My plugin just *won't* commit
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Re: My plugin just *won't* commit