/EQT_V2/EQT/EQTWebApp/fckeditor/_samples/html/sample04.html

http://sgsoft-las.googlecode.com/ · HTML · 95 lines · 50 code · 3 blank · 42 comment · 0 complexity · 5fb67e0ca04fb511975a75aab8d0fa3e MD5 · raw file

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  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. <html xmlns="http://www.w3.org/1999/xhtml">
  25. <head>
  26. <title>FCKeditor - Sample</title>
  27. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  28. <meta name="robots" content="noindex, nofollow" />
  29. <link href="../sample.css" rel="stylesheet" type="text/css" />
  30. <script type="text/javascript" src="../../fckeditor.js"></script>
  31. <script type="text/javascript">
  32. function FCKeditor_OnComplete( editorInstance )
  33. {
  34. var oCombo = document.getElementById( 'cmbToolbars' ) ;
  35. oCombo.value = editorInstance.ToolbarSet.Name ;
  36. oCombo.style.visibility = '' ;
  37. }
  38. function ChangeLanguage( languageCode )
  39. {
  40. document.location.href = document.location.href.replace( /\?.*$/, '' ) + "?" + languageCode ;
  41. }
  42. </script>
  43. </head>
  44. <body>
  45. <h1>
  46. FCKeditor - JavaScript - Sample 4</h1>
  47. <div>
  48. This sample shows how to change the editor toolbar.
  49. </div>
  50. <hr />
  51. <table cellpadding="0" cellspacing="0" border="0">
  52. <tr>
  53. <td>
  54. Select the toolbar to load:&nbsp;
  55. </td>
  56. <td>
  57. <select id="cmbToolbars" onchange="ChangeLanguage(this.value);" style="visibility: hidden">
  58. <option value="Default" selected="selected">Default</option>
  59. <option value="Basic">Basic</option>
  60. </select>
  61. </td>
  62. </tr>
  63. </table>
  64. <br />
  65. <form action="../php/sampleposteddata.php" method="post" target="_blank">
  66. <script type="text/javascript">
  67. <!--
  68. // Automatically calculates the editor base path based on the _samples directory.
  69. // This is usefull only for these samples. A real application should use something like this:
  70. // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
  71. var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ;
  72. // Get the toolbar from the URL.
  73. var sToolbar ;
  74. if ( document.location.search.length > 1 )
  75. sToolbar = document.location.search.substr(1) ;
  76. var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
  77. oFCKeditor.BasePath = sBasePath ;
  78. if ( sToolbar != null )
  79. oFCKeditor.ToolbarSet = sToolbar ;
  80. oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ;
  81. oFCKeditor.Create() ;
  82. //-->
  83. </script>
  84. <br />
  85. <input type="submit" value="Submit" />
  86. </form>
  87. </body>
  88. </html>