Bill Fenner wrote:
> On 3/8/07, Hussein Shafie <hussein at xmlmind.com> wrote:
>> Bill Fenner wrote:
>> > *::attribute(anchor) {
>> >        attribute-content-left: "[a:";
>> >        attribute-content-middle: text-field(attribute, anchor, columns,
>> > 10);
>> >        attribute-content-right: "] ";
>> >        show-attribute: when-added;
>> >        font-size: 80%;
>> > }
>> >
>> > I would like to have a small button to add an anchor to an element
>> > when it's missing
>>
>> What about replacing:
>>
>> attribute-content-right: "] ";
>>
>> by:
>>
>> attribute-content-right: "] "
>>     command-button(icon, icon(plus),
>>                    command, "putAttribute",
>>                    parameters, '[id] anchor');
>>
> 
> Sorry for being unclear in my question.  I don't want the [a: or the
> value-editor or the ] in the view when there's no anchor, since it can
> go on every single element and it would be a lot of clutter since most
> elements won't have anchors.  So when there is no anchor, I want the
> equivalent of
> 
>>     command-button(icon, icon(plus),
>>                    command, "putAttribute",
>>                    parameters, '[id] anchor');
> 
> but when there is an anchor, I want the value editor (and no putAttribute).

I don't see anything other than:

----
*:after {
    display: inline;
    content: " " command-button(icon, icon(right-target),
                                command, "putAttribute",
                                parameters, "[id] anchor");
}

*[anchor]:after {
    display: inline;
    content: " [a:" text-field(attribute, anchor, columns, 10) "]";
    font-size: 80%;
}
----

( Predefined icons listed here
http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/icon.html )


Reply via email to