Thank you for your reading.
I have 2 question. Who can give me the answer, please.
1,
look the code below(in my plug-ins exec function)
Formater.HandleTable=function()
{
var children=FCK.EditorDocument.body.getElementsByTagName("TABLE");
for(var i=0;i<children.length;i++)
{
children[i].setAttribute("border","1");
children[i].setAttribute("align","center");
children[i].setAttribute("cellspacing","0");
children[i].setAttribute("cellpadding","0");
children[i].setAttribute("bgcolor","BDE3A5");
children[i].style.fontSize ="10.5pt";
}
}
After it run, the HTML source code is changed, but the shown table is using the wrong style. After some event, the new style will effective.(Change to source view,and change back,the style is effective)
I think FCK designate a special style to table, how can I use my own style, immediately?
2,
I want change the toolbar the items list, dynamically, after editor init. But I don't know how to do. Who can kindly give me a demo?
I have 2 question. Who can give me the answer, please.
1,
look the code below(in my plug-ins exec function)
Formater.HandleTable=function()
{
var children=FCK.EditorDocument.body.getElementsByTagName("TABLE");
for(var i=0;i<children.length;i++)
{
children[i].setAttribute("border","1");
children[i].setAttribute("align","center");
children[i].setAttribute("cellspacing","0");
children[i].setAttribute("cellpadding","0");
children[i].setAttribute("bgcolor","BDE3A5");
children[i].style.fontSize ="10.5pt";
}
}
After it run, the HTML source code is changed, but the shown table is using the wrong style. After some event, the new style will effective.(Change to source view,and change back,the style is effective)
I think FCK designate a special style to table, how can I use my own style, immediately?
2,
I want change the toolbar the items list, dynamically, after editor init. But I don't know how to do. Who can kindly give me a demo?
Re: 2 questions.Auto change style and dynamic toolbar
thanks a lot
WW
Re: 2 questions.Auto change style and dynamic toolbar
Are you attempting to modify the presence/absence of toolbar buttons? Or are you attempting to update the contents of a plug-in combo box list?