PSML document editing
This article describes how to use the <editing>
element in the PSML document-config.xml
file to configure custom PSML editors.
The element has the following structure:
<editing [override="true"]> <editor ... />* </editing>
For further information on how to configure the editing environment, see document template.
Behavior
By default, the editing configuration extends the default configuration so that editors defined here are added to the base editors. To override the editing configuration, use the @override
boolean attribute.
If the <editing>
element is not specified or the document-config.xml
doesn’t exist, then the editors are automatically inherited from the default configuration.
Details
Each <editor>
element can define the following:
Attribute | Description |
---|---|
name | The name of the editor to use. Built-in editors include ck , psmlxrefs , psmlproperties , psmllabelvalues , plain (v5 UI only) |
mediatype | To specify the media type the editor applies to (v5 UI only, required) |
format | To bind a specific fragment element to a different editor (fragment , properties-fragment , xref-fragment , media-fragment ) (v5 UI only) |
fragmenttype | To bind a specific fragment type to a different editor |
The following parameters can be sent to the editing software using the <options>
element under <editor>.
Attribute | Description |
---|---|
html | true – for sending HTML through to PageSeeder (v5 UI only) |
tidy | true – to filter the HTML through Tidy, requires html=true (v5 UI only) |
editnote | With the following allowable values:
|
Default
This is the default editor configuration:
<editing> <editor name="psmlxrefs" mediatype="application/vnd.pageseeder.psml+xml" format="xref-fragment"> <options tidy="true" html="true"/> </editor> <editor name="psmlproperties" mediatype="application/vnd.pageseeder.psml+xml" format="properties-fragment"> <options tidy="true" html="true"/> </editor> <editor name="ck" mediatype="application/vnd.pageseeder.psml+xml"> <options tidy="true" html="true"/> </editor> <editor name="plain" mediatype="text/plain" format="media-fragment"/> </editing>
Examples
Bind the psmllabelvalues
editor for <fragment type="mytype">
.
<editing> <editor name="psmllabelvalues" mediatype="application/vnd.pageseeder.psml+xml" fragmenttype="mytype"> <options tidy="true" html="true"/> </editor> </editing>
Require an edit note every time a fragment is edited.
- Copy the default editors and add
<options editnote="required"/>
to all. - Set
<editing override="true">
.
<editing override="true"> <editor name="psmlxrefs" mediatype="application/vnd.pageseeder.psml+xml" format="xref-fragment"> <options tidy="true" html="true" editnote="required"/> </editor> <editor name="psmlproperties" mediatype="application/vnd.pageseeder.psml+xml" format="properties-fragment"> <options tidy="true" html="true" editnote="required"/> </editor> <editor name="ck" mediatype="application/vnd.pageseeder.psml+xml"> <options tidy="true" html="true" editnote="required"/> </editor> <editor name="plain" mediatype="text/plain" format="media-fragment"> <options editnote="required"/> </editor> </editing>