/EQT_V2/EQT/EQTWebApp/fckeditor/_samples/lasso/sample02.lasso

http://sgsoft-las.googlecode.com/ · Unknown · 109 lines · 101 code · 8 blank · 0 comment · 0 complexity · 69f37659414175ca422a45a468b1722d MD5 · raw file

  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. function AddComboOption(combo, optionText, optionValue)
  44. {
  45. var oOption = document.createElement("OPTION") ;
  46. combo.options.add(oOption) ;
  47. oOption.innerHTML = optionText ;
  48. oOption.value = optionValue ;
  49. return oOption ;
  50. }
  51. function ChangeLanguage( languageCode )
  52. {
  53. window.location.href = window.location.pathname + "?Lang=" + languageCode ;
  54. }
  55. //-->
  56. </script>
  57. </head>
  58. <body>
  59. <h1>FCKeditor - Lasso - Sample 2</h1>
  60. This sample shows the editor in all its available languages.
  61. <hr>
  62. <table cellpadding="0" cellspacing="0" border="0">
  63. <tr>
  64. <td>
  65. Select a language:&nbsp;
  66. </td>
  67. <td>
  68. <select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
  69. </select>
  70. </td>
  71. </tr>
  72. </table>
  73. <br>
  74. <form action="sampleposteddata.lasso" method="post" target="_blank">
  75. [//lasso
  76. include('../../fckeditor.lasso');
  77. var('basepath') = response_filepath->split('_samples')->get(1);
  78. if(action_param('Lang'));
  79. var('config') = array(
  80. 'AutoDetectLanguage' = 'false',
  81. 'DefaultLanguage' = action_param('Lang')
  82. );
  83. else;
  84. var('config') = array(
  85. 'AutoDetectLanguage' = 'true',
  86. 'DefaultLanguage' = 'en'
  87. );
  88. /if;
  89. var('myeditor') = fck_editor(
  90. -instancename='FCKeditor1',
  91. -basepath=$basepath,
  92. -config=$config,
  93. -initialvalue='<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>'
  94. );
  95. $myeditor->create;
  96. ]
  97. <br>
  98. <input type="submit" value="Submit">
  99. </form>
  100. </body>
  101. </html>