我正在研究CKEditor中的一个插件,该插件的目标是隐藏或显示元素,具体取决于我的哪个复选框被选中。我定义的那些元素:在CKEditor的对话框中隐藏文本输入
contents :
[
{
id : 'tab1',
label : 'Configuration Basique',
elements :
[
{
type : 'checkbox',
id : 'check',
label : 'Vers une page web',
'default' : 'unchecked',
onClick : function(){
}
},
{
type : 'text',
id : 'title',
label : 'Explanation',
}
]
},
{
id : 'tab2',
label : 'Advanced Settings',
elements :
[
{
type : 'text',
id : 'id',
label : 'Id'
}
]
}
],
所以现在我想要做的就是躲无可禁用带标签的文本输入并打印出来,只有当被选中的复选框。所以我看到了,我应该使用类似的东西:
onLoad : function(){
this.getContentElement('tab1','title').disable();
},
但事情是我不想禁用它我想隐藏,然后打印,如果用户选中复选框(这就是为什么我在我的复选框中放置了一个onClick函数)。我尝试使用hide()函数,但它不工作,也是setAttribute('style','display:none;') Tia :)
谢谢男人:d它的工作:)的的onClick THIG我发现在这里http://docs.cksource.com/ckeditor_api/symbols/ CKEDITOR.dialog.definition.checkbox.html我想它是depricated – ponayz