multiple.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  6. <script src="dist/cdtexteditor.min.js"></script>
  7. <link rel="stylesheet" href="dist/cdtexteditor.min.css">
  8. <title>CDTextEditor Demo (Multiple editors)</title>
  9. </head>
  10. <body>
  11. <h1>CDTextEditor: Multiple editors test</h1>
  12. <h2>Note: jQuery and jQueryUI are not preloaded on this page. Also the following editors have same dictionaries.<br/>See console log and Network activity log.</h2>
  13. <h3>Test editor 1: {spellchecking: en_US, predictive: en_phrases.txt, flex: true}</h3>
  14. <div id="workbench" style="width: 800px; height: 400px;"></div>
  15. <h3>Test editor 2: {spellchecking: [en_US, de_DE], predictive: en_phrases.txt, resizable: true, flex: true, autopreview: true, maxSize: [900, 500]}</h3>
  16. <div id="workbench1" style="width: 100px; height: 100px;"></div>
  17. <h3>Test editor 3: {spellchecking: de_DE, draggable: true}</h3>
  18. <div id="workbench2" style="width: 700px; height: 350px;"></div>
  19. <script>
  20. CDTextEditor.create([
  21. {
  22. id: "workbench",
  23. options: {
  24. predictive: "./dist/assets/dict/en_phrases.txt",
  25. flex: true,
  26. spellchecking: {
  27. url: "./dict/",
  28. loc: [
  29. "en_US"
  30. ]
  31. }
  32. }
  33. },
  34. {
  35. id: "workbench1",
  36. options: {
  37. autoPreview: true,
  38. predictive: "./dist/assets/dict/en_phrases.txt",
  39. resizable: true,
  40. flex: true,
  41. maxSize: {
  42. w: 900,
  43. h: 500
  44. },
  45. spellchecking: {
  46. url: "./dict/",
  47. loc: [
  48. "en_US",
  49. "de_DE"
  50. ]
  51. }
  52. }
  53. },
  54. {
  55. id: "workbench2",
  56. options: {
  57. draggable: true,
  58. spellchecking: {
  59. url: "./dict/",
  60. loc: [
  61. "de_DE"
  62. ]
  63. }
  64. }
  65. }
  66. ]);
  67. </script>
  68. </body>
  69. </html>