Hi all! I just started using trying CKEditor. I'm following the widget tutorial and created a widget with a checkbox and text field (input type="text") inside. However I'm facing the following issues:
- On Chrome the checkbox cannot be checked
- On Firefox, IE and Chrome I cannot type in the text field. On Firefox and Chrome I can't even focus it, on IE the focus disappears immediately after it has been focused
Is there a way to implement a widget with such fields where the user can input data?
Here is my code:
CKEDITOR.plugins.add('simplebox', {
requires: 'widget',
icons: 'simplebox',
init: function( editor ) {
editor.widgets.add( 'simplebox', {
button: 'Create a simple box',
template:
'<div class="simplebox">' +
'<h2 class="simplebox-title">Title</h2>' +
'<div class="simplebox-content"><p>Content...</p><input type="checkbox" />fasfasf<input type="text" /></div>' +
'</div>'
} );
}
});

It is possible to have inputs
It is possible to have inputs inside widget, but it's very complicated. There could be problems with focus, clicking (as you mentioned), etc. So it's recommended to move the editing UIs to dialogs, of course except nested editables.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Unfortunately I cannot move
Unfortunately I cannot move the input elements in dialogs. I have a requirement to create form elements inputs + buttons that the user can use to update data on the server using ajax requests and this should be available when the document is in edint mode (the html editor is active).
Could you explain me more deeply about the focus, clicking issues? Is it a misbehavior of the browser or that isn't supported by the browsers at all?