sample04.lasso 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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( 'cmbSkins' ) ;
  37. // Get the active skin.
  38. var sSkin = editorInstance.Config['SkinPath'] ;
  39. sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
  40. oCombo.value = sSkin ;
  41. oCombo.style.visibility = '' ;
  42. }
  43. function ChangeSkin( skinName )
  44. {
  45. window.location.href = window.location.pathname + "?Skin=" + skinName ;
  46. }
  47. //-->
  48. </script>
  49. </head>
  50. <body>
  51. <h1>FCKeditor - Lasso - Sample 4</h1>
  52. This sample shows how to change the editor skin.
  53. <hr>
  54. <table cellpadding="0" cellspacing="0" border="0">
  55. <tr>
  56. <td>
  57. Select the skin to load:&nbsp;
  58. </td>
  59. <td>
  60. <select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden">
  61. <option value="default" selected>Default</option>
  62. <option value="office2003">Office 2003</option>
  63. <option value="silver">Silver</option>
  64. </select>
  65. </td>
  66. </tr>
  67. </table>
  68. <br>
  69. <form action="sampleposteddata.lasso" method="post" target="_blank">
  70. [//lasso
  71. include('../../fckeditor.lasso');
  72. var('basepath') = response_filepath->split('_samples')->get(1);
  73. var('myeditor') = fck_editor(
  74. -instancename='FCKeditor1',
  75. -basepath=$basepath,
  76. -initialvalue='<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>'
  77. );
  78. if(action_param('Skin'));
  79. $myeditor->config = array('SkinPath' = $basepath + 'editor/skins/' + action_param('Skin') + '/');
  80. /if;
  81. $myeditor->create;
  82. ]
  83. <br>
  84. <input type="submit" value="Submit">
  85. </form>
  86. </body>
  87. </html>