var tagstrings=[];
for (var ix=0;ix<tags.length;ix++) {
tagstrings.push({name:tags[ix],element:'span',attributes:{'class':tags[ix]}});
}
/* tagstrings is now an array of objects to put into the Styles menu. I'm only using spans here, but definitely read the Styles page ([url]http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Styles[/url]) to see how to style different types of objects. */
// counteditor is a global variable. dirty, but guarantees uniqueness
counteditor++;
CKEDITOR.config.stylesCombo_stylesSet = 'default'+counteditor;
CKEDITOR.stylesSet.add( 'default'+counteditor,tagstrings);
Tue, 07/27/2010 - 19:53
#1
