[1575] | 1 | [//lasso
|
---|
| 2 | /*
|
---|
| 3 | * FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
---|
| 4 | * Copyright (C) 2003-2009 Frederico Caldeira Knabben
|
---|
| 5 | *
|
---|
| 6 | * == BEGIN LICENSE ==
|
---|
| 7 | *
|
---|
| 8 | * Licensed under the terms of any of the following licenses at your
|
---|
| 9 | * choice:
|
---|
| 10 | *
|
---|
| 11 | * - GNU General Public License Version 2 or later (the "GPL")
|
---|
| 12 | * http://www.gnu.org/licenses/gpl.html
|
---|
| 13 | *
|
---|
| 14 | * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
---|
| 15 | * http://www.gnu.org/licenses/lgpl.html
|
---|
| 16 | *
|
---|
| 17 | * - Mozilla Public License Version 1.1 or later (the "MPL")
|
---|
| 18 | * http://www.mozilla.org/MPL/MPL-1.1.html
|
---|
| 19 | *
|
---|
| 20 | * == END LICENSE ==
|
---|
| 21 | *
|
---|
| 22 | * Sample page.
|
---|
| 23 | */
|
---|
| 24 | ]
|
---|
| 25 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
| 26 | <html>
|
---|
| 27 | <head>
|
---|
| 28 | <title>FCKeditor - Sample</title>
|
---|
| 29 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
---|
| 30 | <meta name="robots" content="noindex, nofollow">
|
---|
| 31 | <link href="../sample.css" rel="stylesheet" type="text/css" />
|
---|
| 32 | <script type="text/javascript">
|
---|
| 33 | <!--
|
---|
| 34 | function FCKeditor_OnComplete( editorInstance )
|
---|
| 35 | {
|
---|
| 36 | var oCombo = document.getElementById( 'cmbLanguages' ) ;
|
---|
| 37 | for ( code in editorInstance.Language.AvailableLanguages )
|
---|
| 38 | {
|
---|
| 39 | AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
|
---|
| 40 | }
|
---|
| 41 | oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
|
---|
| 42 | }
|
---|
| 43 |
|
---|
| 44 | function AddComboOption(combo, optionText, optionValue)
|
---|
| 45 | {
|
---|
| 46 | var oOption = document.createElement("OPTION") ;
|
---|
| 47 |
|
---|
| 48 | combo.options.add(oOption) ;
|
---|
| 49 |
|
---|
| 50 | oOption.innerHTML = optionText ;
|
---|
| 51 | oOption.value = optionValue ;
|
---|
| 52 |
|
---|
| 53 | return oOption ;
|
---|
| 54 | }
|
---|
| 55 |
|
---|
| 56 | function ChangeLanguage( languageCode )
|
---|
| 57 | {
|
---|
| 58 | window.location.href = window.location.pathname + "?Lang=" + languageCode ;
|
---|
| 59 | }
|
---|
| 60 | //-->
|
---|
| 61 | </script>
|
---|
| 62 | </head>
|
---|
| 63 | <body>
|
---|
| 64 | <h1>FCKeditor - Lasso - Sample 2</h1>
|
---|
| 65 | This sample shows the editor in all its available languages.
|
---|
| 66 | <hr>
|
---|
| 67 | <table cellpadding="0" cellspacing="0" border="0">
|
---|
| 68 | <tr>
|
---|
| 69 | <td>
|
---|
| 70 | Select a language:
|
---|
| 71 | </td>
|
---|
| 72 | <td>
|
---|
| 73 | <select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
|
---|
| 74 | </select>
|
---|
| 75 | </td>
|
---|
| 76 | </tr>
|
---|
| 77 | </table>
|
---|
| 78 | <br>
|
---|
| 79 | <form action="sampleposteddata.lasso" method="post" target="_blank">
|
---|
| 80 | [//lasso
|
---|
| 81 | include('../../fckeditor.lasso');
|
---|
| 82 | var('basepath') = response_filepath->split('_samples')->get(1);
|
---|
| 83 |
|
---|
| 84 | if(action_param('Lang'));
|
---|
| 85 | var('config') = array(
|
---|
| 86 | 'AutoDetectLanguage' = 'false',
|
---|
| 87 | 'DefaultLanguage' = (String_ReplaceRegExp: action_param('Lang'), -find='[^a-z\-]', -replace='')
|
---|
| 88 | );
|
---|
| 89 | else;
|
---|
| 90 | var('config') = array(
|
---|
| 91 | 'AutoDetectLanguage' = 'true',
|
---|
| 92 | 'DefaultLanguage' = 'en'
|
---|
| 93 | );
|
---|
| 94 | /if;
|
---|
| 95 |
|
---|
| 96 | var('myeditor') = fck_editor(
|
---|
| 97 | -instancename='FCKeditor1',
|
---|
| 98 | -basepath=$basepath,
|
---|
| 99 | -config=$config,
|
---|
| 100 | -initialvalue='<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>'
|
---|
| 101 | );
|
---|
| 102 |
|
---|
| 103 | $myeditor->create;
|
---|
| 104 | ]
|
---|
| 105 | <br>
|
---|
| 106 | <input type="submit" value="Submit">
|
---|
| 107 | </form>
|
---|
| 108 | </body>
|
---|
| 109 | </html>
|
---|