Styling text with <span class='...'>?

"Jules" <[email protected]>
Newsgroups gmane.comp.mozilla.devel.editor
Message-ID <[email protected]>
Does anyone know how I could apply a style to the current selection using a 
<span> element with a class attribute?  I'd be looking for some kind of 
script that works analogously to document.execCommand ("bold", false, ""), 
ideally with a query function that returns whether or not it is applied to 
the current selection.  Any ideas?  Has anyone implemented this?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.