source: trunk/plugins/InsertSnippet2/readme.html @ 1055

Last change on this file since 1055 was 1051, checked in by ray, 12 years ago

#1224 sevenbitclean / ghost cursor error with html mode toggle

File size: 2.7 KB
1<!DOCTYPE html
2     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3    "">
4<html><head>  <title>InsertSnippet for Xinha</title> <style type="text/css">
5  body { font-family: sans-serif; }
6  pre {border: dotted grey thin; background-color:LightYellow;padding:10px }
7  p { width:500px }
8  </style>
9  </head>
10  <body>
11    <h1>InsertSnippet2 for Xinha</h1>
12    <p>Insert HTML fragments or template variables in your document.</p>
13    <h2>Features</h2>
14    <ul>
15      <li>Categorization to organize your snippets if you have a lot  (optional)</li>
16      <li>Search for name</li>
17      <li>Insert as literal text/html or variable (optional)&nbsp;</li>
18      <li>XML data format<br /></li>
19    </ul>
20    <h2>Usage</h2>
21    <p>
22In order to use your own snippets you have to add a parameter to your xinha_config:
24    <pre>xinha_config.InsertSnippet2.snippets = "/path/to/your/snippets.xml";
26    <p>This path should point to a XML file that has the following format:</p>
27    <pre>&lt;snXML&gt;
28 &lt;categories&gt;
29    &lt;c n="the name" /&gt;
30  &lt;/categories&gt;
31  &lt;snippets&gt;
32        &lt;s n="the name" v="optional variable name to be inserted" c="the category"&gt;
33            &amp;lt;p&amp;gt;some text or HTML, please entize HTML tags&amp;lt;/p&amp;gt;
34        &lt;/s&gt;
35        &lt;s n="another"&gt;
36            &lt;![CDATA[
37               &lt;p&gt;or put HTML in a CDATA section&lt;/p&gt;
38            ]]&gt;
39        &lt;/s&gt;
40  &lt;/snipptes&gt;
43    <p> </p>
44    <h3>&nbsp;Tags</h3>
45    <dl><dt>&lt;snXML&gt;&lt;/snXML&gt;</dt><dd>&nbsp;The root tag</dd><dt>&lt;categories&gt;&lt;/categories&gt;<br /></dt><dd>&nbsp;This tag contains the categories (optional)<br /></dd><dt>&nbsp;&lt;c /&gt;</dt><dd>&nbsp;Each category <br /></dd><dt>&nbsp;&lt;snippets&gt;&lt;/snippets&gt;</dt><dd> This tag contains the actual snippet. As this is XML, you cannot put HTML here literally. You have to either entize the &lt;,&gt;, and &amp; characters or wrap the contents in a CDATA section<br /></dd></dl>
46    <h3>Attributes</h3>
47    <dl><dt>&nbsp;n</dt><dd>&nbsp;The name of one snippet or category. It is obligatory for both.<br /></dd><dt>&nbsp;v</dt><dd> If this attribute is present in a snippet tag, there is a button in the UI that allows to insert this variable instead of the textual content of the snippet. <br /></dd><dt> c<br /></dt><dd>&nbsp;The category<br /></dd></dl>
48    <p>Inside the plugin's directory, there is a sample XML file and PHP script that shows how to create the XML dynamically.<br /></p>
49    <p style="font-size: 80%;">3 October 2008 Raimund Meyer (</p>
50  </body>
Note: See TracBrowser for help on using the repository browser.