Reply To: Add a new HTML tag to Weblair’s Toolbar

Product Compare Forums Multi-Edit Support Add a new HTML tag to Weblair’s Toolbar Reply To: Add a new HTML tag to Weblair’s Toolbar

Clay Martin

I use the SPAN tag all the time with various CSS defs to alter text display. I noticed that span was missing from the HTML tags context menu, etc. So I just set up some templates. Here is one for a highlight class:
<-GETBLOCK><SPAN class="highlite"><-PUTBLOCK><-CUR></SPAN>
This allows you to grab some text and invoke the template and bam you have and enclosed bit if text. Now something you may want to consider. I don’t use automatic template expansion in html, as to many template keywords are also words you might type into a page. I access the templates with Alt-F9. This brings up a pop-up. Now if I keep typeing (after the pop-up pops up) something like “sp” the list in the pop up moves down to the first template with a name that starts with “sp”. So at that point I can adjust the selected template to be the one I want, and hit enter. Here’s the hint. I named my span highlight template SPAN HIGHLIGHT, another span template is named SPAN CURSOR POS. Now since the ability to select from that list is related to the templates name. If I had named the highlight template SPH or SPHL SPAN HIGHLIGHT, then to select the span highlight template from among the 10 or so span temlates I have, I could of: Selected the text, hit Alt-F9, typed “sph” and hit enter, and bam I would have received
blah blah <SPAN CLASS="highlight">important text,<\SPAN>blah blah [/code:36xt5qcz]
in my edit window. So what I’m taking forever to say, :) is it’s the template name not the keyword that matters. So for max functionality, name the template well.

One more point, I don’t know what you use the SPAN tag for, but given I use it to assign a particlular class to some text, templates are much more usefull than getting a standard SPAN tag and then having to edit it to add the class keyword etc. Here is a template I use for changing the color of text.
<-GETBLOCK><SPAN class="<-CUR>`value`"><-PUTBLOCK></SPAN>
When invoked the selected text is surounded by the SPAN tag, the `value` is selected and all I need to do is type red, blue, or dkgreenb, and I get
blah blah <SPAN CLASS="dkgreenbt">dark green bold text,<\SPAN>blah blah [/code:36xt5qcz]