Andy Black wrote:
> Being able to define elementTemplates and having them show up in the
> Edit tool is a marvelous feature.
>
> For one configuration I working on, however, it actually would be nice
> to have the default, plain element *not* show up in the Edit tool. I'd
> like only the (italic) elementTemplates for that element to be listed.
> That's because the elementTemplates all come with predefined
> sub-elements and or attributes that the plain element, of course, does
> not have. If the user never sees the plain element items, they'll be
> better off. Their life is so much easier when they use one of the
> pre-canned elementTemplates.
>
> Is this possible? Is there a way to have XXE *not* show an element in
> the Edit tool, but still show only the elementTemplates for that element?
>
Yes. With a little twist.
You need to specify selectable="override" for *one* of your
elementTemplates.
For the user, it will appear as if it was the plain element but in fact,
it will be one of your template.
This is for example the case of XHTML tables:
---
<elementTemplate name="simple" selectable="override">
<table xmlns="" border="1">
<tr>
<td></td><td></td>
</tr>
<tr>
<td></td><td></td>
</tr>
</table>
</elementTemplate>
<elementTemplate name="head_row">
<table xmlns="" frame="box" rules="all">
<thead align="center">
<tr>
<th></th><th></th>
</tr>
</thead>
<tbody>
<tr>
<td></td><td></td>
</tr>
<tr>
<td></td><td></td>
</tr>
</tbody>
</table>
</elementTemplate>
<elementTemplate name="head_column">
<table xmlns="" frame="box" rules="all">
<col align="center" span="1" />
<tbody>
<tr>
<th></th><td></td>
</tr>
<tr>
<th></th><td></td>
</tr>
<tr>
<th></th><td></td>
</tr>
</tbody>
</table>
</elementTemplate>
<elementTemplate name="head_row_column">
<table xmlns="" frame="box" rules="all">
<col align="center" span="1" />
<thead align="center">
<tr>
<th></th><th></th>
</tr>
</thead>
<tbody>
<tr>
<th></th><td></td>
</tr>
<tr>
<th></th><td></td>
</tr>
<tr>
<th></th><td></td>
</tr>
</tbody>
</table>
</elementTemplate>
---
This means that the user can never insert a ``plain table'' (single row,
single cell).