Hi everyone.
I have to get 3 new unordered lists in my toolbar that use a particular css class.
I created a new plugin.
I have my 3 different icons in my toolbar.
I created a new FCKCommand function to implement the diffrences between my lists and Fred's UnOrderedLists.
At this point, when I have a part of the text as a list, the 4 icons are selected in the toolbar (my 3 list icons and Fred's one).
But now, I just whant to insert a particular tag (the class="My1stClass") in the generated <li> tag (generated by the browser, because Fred use execCommand to manage them).
I see 2 things to do (maybie i'm wrong) :
1) MyCommand.GetState : only if queryCommand ('InsertUnorderedList') = true AND TheCssClassOfThe<li>Tag = 'My1stClass' (and My2ndClass and so on).
=> This, in order to highlight the correct toolbar icon when the cursor is positioned on the list.
2) MyCommand.prototype.Execute :
FCK.ExecuteNamedCommand( 'InsertUnorderedList' ) ;
AND InsertTheCssClassInThe<li>Tag... (or RemoveIt)
=> This in order to put the correct Css Class against the clicked toolbar list icon.
Do you see how I can do that ?
Thanks for your precious help.
Franck.
I have to get 3 new unordered lists in my toolbar that use a particular css class.
I created a new plugin.
I have my 3 different icons in my toolbar.
I created a new FCKCommand function to implement the diffrences between my lists and Fred's UnOrderedLists.
At this point, when I have a part of the text as a list, the 4 icons are selected in the toolbar (my 3 list icons and Fred's one).
But now, I just whant to insert a particular tag (the class="My1stClass") in the generated <li> tag (generated by the browser, because Fred use execCommand to manage them).
I see 2 things to do (maybie i'm wrong) :
1) MyCommand.GetState : only if queryCommand ('InsertUnorderedList') = true AND TheCssClassOfThe<li>Tag = 'My1stClass' (and My2ndClass and so on).
=> This, in order to highlight the correct toolbar icon when the cursor is positioned on the list.
2) MyCommand.prototype.Execute :
FCK.ExecuteNamedCommand( 'InsertUnorderedList' ) ;
AND InsertTheCssClassInThe<li>Tag... (or RemoveIt)
=> This in order to put the correct Css Class against the clicked toolbar list icon.
Do you see how I can do that ?
Thanks for your precious help.
Franck.