How to make readonly input in ckeditor dialog

I am trying to find a way to input input in the ckeditor dialog readonly.

I initialized the following elements:

type: 'hbox',
widths: ['25%', '75%'],
children:
    [{
        type: 'text',
        id: 'moduleId',
        label: 'Module',

Looking in the documentation I assume that the only way to apply some CSS style for input?

+3
source share
2 answers

I found a solution in the ckeditor source code. Just add this to the element initialization

onLoad : function()
{
    this.getInputElement().setAttribute( 'readOnly', true );
}
+3
source

I'm not sure that you can set the item as disabled in the definition, but you can get the item after the dialog has been loaded and disable it: http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.ui.dialog .uiElement.html # disable

+1
source

All Articles