Best Practices

Welcome

Login to contribute. Register if you haven't yet.

Support Options

1. Search this site.
2. Make or vote for a Suggestion.
3. Post to Community Support.
3. Contact EditMe Support staff.

Stay Informed

Keep informed of product changes, tutorials and tips via EditMe's Blog and monthly newsletter.

Use Libraries For Shared Code

If you find your self reusing code to do things, put it into a library that can be included in other scripts. Here's how this might look:

Library Page named MyLibrary:

<script type="text/vnd.editme.js"><![CDATA[
function MyClass()  {
   // some code here
}
]]></script>

Page Using the Library (note the check to avoid multiple nested inclusion; the text ' ' is just to keep the script tag from turning into <script/>, which browsers don't like): 

<div>
<script editme="if this.MyClass==undefined ;; process 'MyLibrary' ;; text ' ' "></script>
<script type="text/vnd.editme.js"><![CDATA[
  var myobject = new MyClass();
]]></script>
</div>