Server Side Script Tags
Server side script tags are parsed out of the layout for processing and removed from the content returned to the browser.
At this time, server side script tags do not support the SRC attribute for referencing external scripts. SRC attributes will simply be ignored. A future release will likely add support for linked scripts using the SRC attribute.
There are three types of server side script tags. The script type is defined by the value of the TYPE attribute on the script tag itself. The following values are supported:
- text/vnd.editme.js.pre - Pre-press script
- text/vnd.editme.js - Inline script
- text/vnd.editme.js.post - Post-press script
<script type="text/vnd.editme.js.pre"><![CDATA[ // script goes here ]]></script>
Inline scripts are processed in the order that they appear in the layout XML. Layout commads that appear before an inline script will have been processed before the inline script is processed. Likewise, an inline script will be processed before any layout commands that follow it. Inline scripts are what should be used to house code in scripted pages.
<p editme="text 'runs before the inline script'"></p> <script type="text/vnd.editme.js"><![CDATA[ // script goes here ]]></script> <p editme="text 'runs after the inline script'"></p>
Post-press scripts run after EditMe has processed all layout commands, regardless of the placement of the script tag.
<script type="text/vnd.editme.js.post"><![CDATA[ // script goes here ]]></script>