--- /dev/null
+<%\r
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net\r
+ * Copyright (C) 2003-2008 Frederico Caldeira Knabben\r
+ *\r
+ * == BEGIN LICENSE ==\r
+ *\r
+ * Licensed under the terms of any of the following licenses at your\r
+ * choice:\r
+ *\r
+ * - GNU General Public License Version 2 or later (the "GPL")\r
+ * http://www.gnu.org/licenses/gpl.html\r
+ *\r
+ * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")\r
+ * http://www.gnu.org/licenses/lgpl.html\r
+ *\r
+ * - Mozilla Public License Version 1.1 or later (the "MPL")\r
+ * http://www.mozilla.org/MPL/MPL-1.1.html\r
+ *\r
+ * == END LICENSE ==\r
+ *\r
+ * This page is a basic Sample for FCKeditor integration in the AFP script language (www.afpages.de)\r
+ *\r
+%>\r
+\r
+<html>\r
+ <head>\r
+ <title>FCKeditor - AFP Sample 3</title>\r
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r
+ <meta name="robots" content="noindex, nofollow">\r
+ <link href="../sample.css" rel="stylesheet" type="text/css" />\r
+\r
+ <script type="text/javascript">\r
+ function FCKeditor_OnComplete( editorInstance )\r
+ {\r
+ var oCombo = document.getElementById( 'cmbToolbars' ) ;\r
+ oCombo.value = editorInstance.ToolbarSet.Name ;\r
+ oCombo.style.visibility = '' ;\r
+ }\r
+\r
+ function ChangeToolbar( toolbarName )\r
+ {\r
+ window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ;\r
+ }\r
+ </script>\r
+ </head>\r
+ <body>\r
+ <h1>FCKeditor - AFP - Sample 3</h1>\r
+ This sample shows how to change the editor toolbar.\r
+ <hr>\r
+ <table cellpadding="0" cellspacing="0" border="0">\r
+ <tr>\r
+ <td>\r
+ Select the toolbar to load: \r
+ </td>\r
+ <td>\r
+ <select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden">\r
+ <option value="Default" selected>Default</option>\r
+ <option value="Basic">Basic</option>\r
+ </select>\r
+ </td>\r
+ </tr>\r
+ </table>\r
+ <br>\r
+ <form action="sampleposteddata.afp" method="post" target="_blank">\r
+<%\r
+\r
+ sBasePath="../../../fckeditor/" && Change this to your local path\r
+\r
+ oFCKeditor = CREATEOBJECT("FCKeditor")\r
+ oFCKeditor.fckeditor("FCKeditor1")\r
+\r
+ lcToolbar=request.querystring("Toolbar") && Request Parameter\r
+ lcToolbar=oFCKeditor.StripAttacks(lcToolbar) && Remove special escape characters\r
+ IF !EMPTY(lcToolbar)\r
+ oFCKeditor.ToolbarSet=lcToolbar\r
+ ENDIF\r
+\r
+ lcText=[<p>This is some <strong>sample text</strong>. You are using ]\r
+ lcText=lcText+[<a href='http://www.fckeditor.net/'>FCKeditor</a>.]\r
+\r
+ oFCKeditor.BasePath = sBasePath\r
+ oFCKeditor.cValue = lcText\r
+\r
+ ? oFCKeditor.Create()\r
+\r
+%>\r
+ <br>\r
+ <input type="submit" value="Submit">\r
+ </form>\r
+ </body>\r
+</html>\r