multi-language.html 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>Multi Language Examples</title>
  6. <style>
  7. form {
  8. margin: 0;
  9. }
  10. textarea {
  11. display: block;
  12. }
  13. </style>
  14. <link rel="stylesheet" href="../themes/default/default.css" />
  15. <script charset="utf-8" src="../kindeditor-min.js"></script>
  16. <script>
  17. var editor;
  18. KindEditor.ready(function(K) {
  19. K('select[name=lang]').change(function() {
  20. if (editor) {
  21. editor.remove();
  22. editor = null;
  23. }
  24. editor = K.create('textarea[name="content"]', {
  25. langType : this.value
  26. });
  27. });
  28. K('select[name=lang]').change();
  29. });
  30. </script>
  31. </head>
  32. <body>
  33. <h3>Multi Language</h3>
  34. <form>
  35. <p>
  36. <select name="lang">
  37. <option value="en">English</option>
  38. <option value="zh_CN">简体中文</option>
  39. <option value="zh_TW">繁體中文</option>
  40. <option value="ko">Korean</option>
  41. <option value="ar">Arabic</option>
  42. </select>
  43. </p>
  44. <textarea name="content" style="width:800px;height:200px;"></textarea>
  45. </form>
  46. </body>
  47. </html>