I'm developing a plugin for a docbook-like schema. My first step in
creating the customized editor is to implement text bolding. The schema
I'm working with denotes bold text with:
<EmphasizedText emphasisType="b">bolded text</EmphasizedText>
where Docbook uses:
<emphasis role="bold">bolded text</EmphasizedText>
I adapted the code used in the Docbook plugin. However, the menu item
is always greyed out. Can anyone please provide any guidance on where
I'm going wrong.
<command name="convertWithAttribute">
<macro repeatable="true" undoable="true">
<sequence>
<choice>
<command name="selectNode"
parameter="self[implicitElement] %0" />
<command name="convert"
parameter="[implicitElement] %0" />
</choice>
<command name="putAttribute" parameter="%1 %2" />
</sequence>
</macro>
</command>
<menu label="Format">
<item label="Toggle Bold" command="convertWithAttribute"
parameter="EmphasizedText emphasisType b"/>
</menu>