<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <tuple>
        <global name="File" module="OFS.Image"/>
        <tuple/>
      </tuple>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>_Cacheable__manager_id</string> </key>
            <value> <string>http_cache</string> </value>
        </item>
        <item>
            <key> <string>_EtagSupport__etag</string> </key>
            <value> <string>ts45749399.57</string> </value>
        </item>
        <item>
            <key> <string>__name__</string> </key>
            <value> <string>fckplugin.js</string> </value>
        </item>
        <item>
            <key> <string>content_type</string> </key>
            <value> <string>application/javascript</string> </value>
        </item>
        <item>
            <key> <string>data</string> </key>
            <value> <string encoding="cdata"><![CDATA[

﻿/*\r\n
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net\r\n
 * Copyright (C) 2003-2009 Frederico Caldeira Knabben\r\n
 *\r\n
 * == BEGIN LICENSE ==\r\n
 *\r\n
 * Licensed under the terms of any of the following licenses at your\r\n
 * choice:\r\n
 *\r\n
 *  - GNU General Public License Version 2 or later (the "GPL")\r\n
 *    http://www.gnu.org/licenses/gpl.html\r\n
 *\r\n
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")\r\n
 *    http://www.gnu.org/licenses/lgpl.html\r\n
 *\r\n
 *  - Mozilla Public License Version 1.1 or later (the "MPL")\r\n
 *    http://www.mozilla.org/MPL/MPL-1.1.html\r\n
 *\r\n
 * == END LICENSE ==\r\n
 *\r\n
 * This is a sample implementation for a custom Data Processor for basic BBCode.\r\n
 */\r\n
\r\n
FCK.DataProcessor =\r\n
{\r\n
\t/*\r\n
\t * Returns a string representing the HTML format of "data". The returned\r\n
\t * value will be loaded in the editor.\r\n
\t * The HTML must be from <html> to </html>, eventually including\r\n
\t * the DOCTYPE.\r\n
\t *     @param {String} data The data to be converted in the\r\n
\t *            DataProcessor specific format.\r\n
\t */\r\n
\tConvertToHtml : function( data )\r\n
\t{\r\n
\t\t// Convert < and > to their HTML entities.\r\n
        data = data.replace( /</g, \'&lt;\' ) ;\r\n
        data = data.replace( />/g, \'&gt;\' ) ;\r\n
\r\n
        // Convert line breaks to <br>.\r\n
        data = data.replace( /(?:\\r\\n|\\n|\\r)/g, \'<br>\' ) ;\r\n
\r\n
        // [url]\r\n
        data = data.replace( /\\[url\\](.+?)\\[\\/url]/gi, \'<a href="$1">$1</a>\' ) ;\r\n
        data = data.replace( /\\[url\\=([^\\]]+)](.+?)\\[\\/url]/gi, \'<a href="$1">$2</a>\' ) ;\r\n
\r\n
        // [b]\r\n
        data = data.replace( /\\[b\\](.+?)\\[\\/b]/gi, \'<b>$1</b>\' ) ;\r\n
\r\n
        // [i]\r\n
        data = data.replace( /\\[i\\](.+?)\\[\\/i]/gi, \'<i>$1</i>\' ) ;\r\n
\r\n
        // [u]\r\n
        data = data.replace( /\\[u\\](.+?)\\[\\/u]/gi, \'<u>$1</u>\' ) ;\r\n
\r\n
\t\treturn \'<html><head><title></title></head><body>\' + data + \'</body></html>\' ;\r\n
\t},\r\n
\r\n
\t/*\r\n
\t * Converts a DOM (sub-)tree to a string in the data format.\r\n
\t *     @param {Object} rootNode The node that contains the DOM tree to be\r\n
\t *            converted to the data format.\r\n
\t *     @param {Boolean} excludeRoot Indicates that the root node must not\r\n
\t *            be included in the conversion, only its children.\r\n
\t *     @param {Boolean} format Indicates that the data must be formatted\r\n
\t *            for human reading. Not all Data Processors may provide it.\r\n
\t */\r\n
\tConvertToDataFormat : function( rootNode, excludeRoot, ignoreIfEmptyParagraph, format )\r\n
\t{\r\n
\t\tvar data = rootNode.innerHTML ;\r\n
\r\n
\t\t// Convert <br> to line breaks.\r\n
\t\tdata = data.replace( /<br(?=[ \\/>]).*?>/gi, \'\\r\\n\') ;\r\n
\r\n
\t\t// [url]\r\n
\t\tdata = data.replace( /<a .*?href=(["\'])(.+?)\\1.*?>(.+?)<\\/a>/gi, \'[url=$2]$3[/url]\') ;\r\n
\r\n
\t\t// [b]\r\n
\t\tdata = data.replace( /<(?:b|strong)>/gi, \'[b]\') ;\r\n
\t\tdata = data.replace( /<\\/(?:b|strong)>/gi, \'[/b]\') ;\r\n
\r\n
\t\t// [i]\r\n
\t\tdata = data.replace( /<(?:i|em)>/gi, \'[i]\') ;\r\n
\t\tdata = data.replace( /<\\/(?:i|em)>/gi, \'[/i]\') ;\r\n
\r\n
\t\t// [u]\r\n
\t\tdata = data.replace( /<u>/gi, \'[u]\') ;\r\n
\t\tdata = data.replace( /<\\/u>/gi, \'[/u]\') ;\r\n
\r\n
\t\t// Remove remaining tags.\r\n
\t\tdata = data.replace( /<[^>]+>/g, \'\') ;\r\n
\r\n
\t\treturn data ;\r\n
\t},\r\n
\r\n
\t/*\r\n
\t * Makes any necessary changes to a piece of HTML for insertion in the\r\n
\t * editor selection position.\r\n
\t *     @param {String} html The HTML to be fixed.\r\n
\t */\r\n
\tFixHtml : function( html )\r\n
\t{\r\n
\t\treturn html ;\r\n
\t}\r\n
} ;\r\n
\r\n
// This Data Processor doesn\'t support <p>, so let\'s use <br>.\r\n
FCKConfig.EnterMode = \'br\' ;\r\n
\r\n
// To avoid pasting invalid markup (which is discarded in any case), let\'s\r\n
// force pasting to plain text.\r\n
FCKConfig.ForcePasteAsPlainText\t= true ;\r\n
\r\n
// Rename the "Source" buttom to "BBCode".\r\n
FCKToolbarItems.RegisterItem( \'Source\', new FCKToolbarButton( \'Source\', \'BBCode\', null, FCK_TOOLBARITEM_ICONTEXT, true, true, 1 ) ) ;\r\n
\r\n
// Let\'s enforce the toolbar to the limits of this Data Processor. A custom\r\n
// toolbar set may be defined in the configuration file with more or less entries.\r\n
FCKConfig.ToolbarSets["Default"] = [\r\n
\t[\'Source\'],\r\n
\t[\'Bold\',\'Italic\',\'Underline\',\'-\',\'Link\'],\r\n
\t[\'About\']\r\n
] ;\r\n


]]></string> </value>
        </item>
        <item>
            <key> <string>precondition</string> </key>
            <value> <string></string> </value>
        </item>
        <item>
            <key> <string>size</string> </key>
            <value> <long>4066</long> </value>
        </item>
        <item>
            <key> <string>title</string> </key>
            <value> <string></string> </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
