I'm trying to find a way to make input in ckeditor dialog readonly.
I have initialized elements like this:
type: 'hbox',
widths: ['25%', '75%'],
children:
[{
type: 'text',
id: 'moduleId',
label: 'Module',
Looking in documentation I guess the only way is to apply some css style to input?
I'm trying to find a way to make input in ckeditor dialog readonly.
I have initialized elements like this:
type: 'hbox',
widths: ['25%', '75%'],
children:
[{
type: 'text',
id: 'moduleId',
label: 'Module',
Looking in documentation I guess the only way is to apply some css style to input?
Share Improve this question edited Apr 17, 2012 at 11:40 Rory McCrossan 338k41 gold badges320 silver badges351 bronze badges asked Apr 17, 2012 at 11:36 rushegorushego 3053 silver badges11 bronze badges 2- cksource./forums/viewtopic.php?t=15659 – LeonardChallis Commented Apr 17, 2012 at 11:40
- @LeonardChallis that will make the entire CKEditor instance readonly - the OP wants to make 1 input field on a dialog readonly. – Rory McCrossan Commented Apr 17, 2012 at 11:41
2 Answers
Reset to default 5I have found a solution in ckeditor source code. Just need to add this to element initialization
onLoad : function()
{
this.getInputElement().setAttribute( 'readOnly', true );
}
I'm not sure if you can set an element as disabled on the definition, but you can get the element after the dialog has been loaded and disable it: http://docs.cksource./ckeditor_api/symbols/CKEDITOR.ui.dialog.uiElement.html#disable