blob: 59d87c08ff3ac57d604833cb72c3cba8a4da0bc5 [file] [log] [blame]
<?xml version='1.0' encoding='UTF-8'?>
<!--
Copyright 2002-2005 The Apache Software Foundation or its licensors,
as applicable.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<configuration name="Forrest Common"
xsi:schemaLocation="http://www.xmlmind.com/xmleditor/schema/configuration
../xxe_config_pack/config/xsd/configuration.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.xmlmind.com/xmleditor/schema/configuration"
xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration">
<include location="toolBar.xml" />
<documentResources>
<resource path="//img/@src"/>
<resource path="//figure/@src"/>
<resource path="//icon/@src"/>
</documentResources>
<elementTemplate xmlns="" name="tableHeaded">
<table>
<tr>
<th>Column 1</th>
<th>Column 2</th>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</table>
</elementTemplate>
<elementTemplate xmlns="" name="tableUnheaded">
<table>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</table>
</elementTemplate>
<elementTemplate xmlns="" name="tableRow">
<tr>
<td></td>
<td></td>
</tr>
</elementTemplate>
<!-- Bindings =========================================================== -->
<!-- modified from xhtml & docbook config files =============== -->
<!-- attempt to behave like a word-processor. -->
<binding>
<keyPressed code="ENTER" />
<command name="forrest.splitOrInsertNewLine" />
</binding>
<binding>
<keyPressed code="DELETE" />
<command name="forrest.joinOrDeleteChar" />
</binding>
<binding>
<keyPressed code="BACK_SPACE" />
<command name="forrest.joinOrDeleteChar" parameter="backwards" />
</binding>
<command name="forrest.splitOrInsertNewLine">
<macro trace="false">
<choice>
<command name="insertControlChar" parameter="\n" />
<sequence>
<command name="selectNode" parameter="ancestorOrSelf[implicitElement] p td th li" />
<command name="split" />
</sequence>
</choice>
</macro>
</command>
<command name="forrest.joinOrDeleteChar">
<macro trace="false">
<choice>
<sequence>
<test expression="($dot/ancestor::p or $dot/ancestor::li or $dot/ancestor::td or $dot/ancestor::th) and not($selected) and not($mark)" />
<command name="deleteSelectionOrJoinOrDeleteChar" parameter="%0" />
</sequence>
<command name="deleteSelectionOrDeleteChar" parameter="%0" />
</choice>
</macro>
</command>
<!-- An easy way to insert a table row -->
<binding>
<keyPressed code="ENTER" modifiers="mod"/>
<command name="add" parameter="after[implicitElement] #template(tr,tableRow)" />
</binding>
<!-- An easy way to insert a br -->
<binding>
<keyPressed code="ENTER" modifiers="shift" />
<command name="forrest.insertLineBreak" />
</binding>
<command name="forrest.insertLineBreak">
<macro>
<sequence>
<command name="insert" parameter="into br" />
<!-- harmless if macro fails starting from here -->
<command name="insertNode" parameter="textAfter" />
<command name="cancelSelection" />
</sequence>
</macro>
</command>
<command name="forrest.tableEdit">
<class>com.xmlmind.xmleditext.xhtml.table.HTMLTableEdit</class>
</command>
<!-- Menu =========================================================== -->
<!-- modified from xhtml config files ============================= -->
<menu label="Forrest" mnemonic="F">
<item label="Insert Table With heading row"
command="add"
parameter="after[implicitElement] #template(table,tableHeaded)" />
<item label="Insert Table Without heading row"
command="add"
parameter="after[implicitElement] #template(table,tableUnheaded)" />
<separator />
<item label="Insert Column _Before"
icon="xxe-config:common/icons/insertColumnBefore.png"
command="forrest.tableEdit"
parameter="insertColumnBefore"/>
<item label="Insert Column _After"
icon="xxe-config:common/icons/insertColumnAfter.png"
command="forrest.tableEdit"
parameter="insertColumnAfter"/>
<item label="_Delete Column"
icon="xxe-config:common/icons/deleteColumn.png"
command="forrest.tableEdit"
parameter="deleteColumn"/>
<separator />
<item label="_Insert Row Before"
icon="xxe-config:common/icons/insertRowBefore.png"
command="forrest.tableEdit"
parameter="insertRowBefore"/>
<item label="I_nsert Row After"
icon="xxe-config:common/icons/insertRowAfter.png"
command="forrest.tableEdit"
parameter="insertRowAfter"/>
<item label="D_elete Row"
icon="xxe-config:common/icons/deleteRow.png"
command="forrest.tableEdit"
parameter="deleteRow"/>
</menu>
</configuration>