/source/Plug-in/kind/examples/multi-language.html

http://prosporous.googlecode.com/ · HTML · 45 lines · 45 code · 0 blank · 0 comment · 0 complexity · 0ef4d522c7b4836621a7b281b2441cab MD5 · raw file

  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. <script charset="utf-8" src="../kindeditor-min.js"></script>
  15. <script>
  16. var editor;
  17. KindEditor.ready(function(K) {
  18. K('select[name=lang]').change(function() {
  19. if (editor) {
  20. editor.remove();
  21. editor = null;
  22. }
  23. editor = K.create('textarea[name="content"]', {
  24. langType : this.value
  25. });
  26. });
  27. K('select[name=lang]').change();
  28. });
  29. </script>
  30. </head>
  31. <body>
  32. <h3>Multi Language</h3>
  33. <form>
  34. <p>
  35. <select name="lang">
  36. <option value="en">English</option>
  37. <option value="zh_CN">????</option>
  38. <option value="zh_TW">????</option>
  39. <option value="ar">Arabic</option>
  40. </select>
  41. </p>
  42. <textarea name="content" style="width:800px;height:200px;"></textarea>
  43. </form>
  44. </body>
  45. </html>