Missing attributes?  And how to extend attributes for tags?
Posted: 02 November 2010 01:42 PM   [ Ignore ]
Newbie
Rank
Total Posts:  30
Joined  2008-10-28

I was wondering why my input tag does not offer the “size” attribute.

I looked in the HTML-XML sugar > CodeSenseLibraries > HTML-attributes.xml and I see

<set name="com.macrabbit.html.tag.input.attributes">
        <
completion string="accept" />
        <
completion string="alt" />
        <
completion string="checked" />
        <
completion string="disabled" />
        <
completion string="maxlength" />
        <
completion string="name" />
        <
completion string="readonly" />
        <
completion string="size" />
        <
completion string="src" />
        <
completion string="type" />
        <
completion string="value" />
    </
set

So I see “size”.  But it’s not offered (see attached screen shot).

Also, somewhat related, where would I extend a tag to add additional attributes (such as “class” for input tags)?

Image Attachments
Screen shot 2010-11-02 at 1.42.21 PM.jpg
 Signature 

Macbook Pro, Snow Leopard 10.6.4

Profile
 
 
Posted: 02 November 2010 02:48 PM   [ Ignore ]   [ # 1 ]
Moderator
RankRankRankRank
Total Posts:  1252
Joined  2008-10-28

Based on the attributes in your screenshot, it looks like you have the HTML5.sugar installed, and it is the one populating CodeSense.  There is a bug in the shipping version of the XML+HTML.sugar that prevents CodeSense from triggering for self-closing tags like input.  You can fix the problem by overriding the XML+HTML.sugar:

http://wiki.macrabbit.com/index/Override_default_sugars/

And then popping open Syntaxes/HTMLSyntax.xml and changing line 157 from:

<zone name="tag.self-closing.html"

To:

<zone name="tag.self-closing.open.html"

That should cause the CodeSenseProviders to kick in for self-closing tags.

 Signature 

Ian Beck
MacRabbit Support

Follow us on Twitter, or try my custom themes: Quiet Light & Earthworm

Profile
 
 
Posted: 02 November 2010 03:48 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  30
Joined  2008-10-28

That fixed it, thanks.

 Signature 

Macbook Pro, Snow Leopard 10.6.4

Profile