Hello,

About convert element:

We can select a text and converted to <b> for exemple.
<b> is an element without parameter.
I realised that we can not convert text to an element within attributes.

See the exemple of xhtml:

--<command name="xhtml.convertToLink">
    <macro>
      <sequence>
        <command name="convert" parameter="a" />
        <command name="putAttribute" parameter="%*" />
      </sequence>
    </macro>
---</command>

it uses a method "xhtml.convertToLink". It works well.

How could I convert a text to an element within attributes ?
I tried:

--<command name="myConvertToLink">
    <macro>
      <sequence>
        <command name="convert" parameter="a" />
        <command name="putAttribute" parameter="%*" />
      </sequence>
    </macro>
---</command>


--- <button toolTip="Convert to link" icon="../icons2/link_menu.gif">
      <menu>
        <item label="a[externe link]" command="myConvertToLink"
              parameter="href http://XXX.YYY"; />
        <item label="a[interne link]" command="myConvertToLink"
              parameter="href urn:XXX:YYY" />
      </menu>
---</button>


my element <a> is not the same as the one declared with XHTML!!

It does not work :O)
First : can I do it, is it possible ?
If not, is there a way ?

Thanks,


        Tahia

Reply via email to