admin管理员组文章数量:1386669
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
本文标签: javascriptHow to make input readonly in ckeditor dialogStack Overflow
版权声明:本文标题:javascript - How to make input readonly in ckeditor dialog - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744557681a2612575.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论