noembed.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Noembed plugin | Trumbowyg</title>
  6. <script src="../js/loader.js"></script>
  7. <link href='https://fonts.googleapis.com/css?family=Open+Sans:300,400' rel='stylesheet' type='text/css'>
  8. <link rel="stylesheet" href="../../css/main.css">
  9. </head>
  10. <body class="documentation-body">
  11. <div class="main main-demo-inner">
  12. <section class="wrapper section">
  13. <h2 class="section-title">Noembed plugin</h2>
  14. <div class="feature">
  15. <h3>Basic usage</h3>
  16. <p>
  17. You can insert embeded content via an embed proxy.
  18. Plugin uses <a href="//noembed.com">noembed</a> by default.
  19. </p>
  20. <a href="../../documentation/plugins/#plugin-noembed" class="button button-demo">Read noembed plugin documentation</a>
  21. <div id="editor">
  22. <h2>Embed Content!</h2>
  23. <p>
  24. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Possimus, aliquam, minima fugiat placeat provident
  25. optio nam reiciendis eius beatae quibusdam!
  26. </p>
  27. <iframe width="100%" height="400" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?visual=true&amp;url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F342548257&amp;show_artwork=true"></iframe>
  28. <p>
  29. The text is derived from Cicero's De Finibus Bonorum et Malorum (On the Ends of Goods and Evils, or
  30. alternatively [About] The Purposes of Good and Evil ). The original passage began: Neque porro quisquam est
  31. qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit (Translation: &quot;Neither is there
  32. anyone who loves grief itself since it is grief and thus wants to obtain it&quot;).
  33. </p>
  34. </div>
  35. <h4>The code</h4>
  36. <pre><code class="js-code-to-eval javascript">
  37. $('#editor')
  38. .trumbowyg({
  39. btns: ['noembed']
  40. });
  41. </code></pre>
  42. </div>
  43. <div class="feature">
  44. <h3>Put in dropdown</h3>
  45. <div id="editor-dropdown">
  46. <h2>Embed content through image dropdown!</h2>
  47. <p>
  48. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Possimus, aliquam, minima fugiat placeat provident
  49. optio nam reiciendis eius beatae quibusdam!
  50. </p>
  51. <p>
  52. The text is derived from Cicero's De Finibus Bonorum et Malorum (On the Ends of Goods and Evils, or
  53. alternatively [About] The Purposes of Good and Evil ). The original passage began: Neque porro quisquam est
  54. qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit (Translation: &quot;Neither is there
  55. anyone who loves grief itself since it is grief and thus wants to obtain it&quot;).
  56. </p>
  57. </div>
  58. <h4>The code</h4>
  59. <pre><code class="js-code-to-eval javascript">
  60. $('#editor-dropdown')
  61. .trumbowyg({
  62. btnsDef: {
  63. // Create a new dropdown
  64. image: {
  65. dropdown: ['insertImage', 'noembed'],
  66. ico: 'insertImage'
  67. }
  68. },
  69. // Redefine the button pane
  70. btns: [
  71. ['viewHTML'],
  72. ['formatting'],
  73. ['strong', 'em', 'del'],
  74. ['superscript', 'subscript'],
  75. ['link'],
  76. ['image'], // Our fresh created dropdown
  77. ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
  78. ['unorderedList', 'orderedList'],
  79. ['horizontalRule'],
  80. ['removeformat'],
  81. ['fullscreen']
  82. ]
  83. });
  84. </code></pre>
  85. </div>
  86. <div class="feature">
  87. <h3>Setup</h3>
  88. <h4>In head tag</h4>
  89. <pre><code class="html loading-head">
  90. </code></pre>
  91. <h4>At the end of body</h4>
  92. <pre><code class="html loading-body">
  93. &lt;!-- Import jQuery -->
  94. &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js">&lt;/script>
  95. &lt;script>window.jQuery || document.write('&lt;script src="js/vendor/jquery-3.2.1.min.js">&lt;\/script>')&lt;/script>
  96. </code></pre>
  97. </div>
  98. </section>
  99. </div>
  100. <!-- Import jQuery -->
  101. <script src="//ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  102. <script>window.jQuery || document.write('<script src="../../js/vendor/jquery-3.2.1.min.js"><\/script>')</script>
  103. <!-- DO NOT COPY THIS LINES IN YOUR PROJECT, THEY ARE THERE JUST FOR THE EXAMPLE PAGE PRUPOSE -->
  104. <script src="../js/loader.js"></script>
  105. <script>
  106. loadStyle('dist/ui/trumbowyg.css');
  107. loadScript('dist/trumbowyg.js', 'Import Trumbowyg');
  108. loadScript('dist/plugins/noembed/trumbowyg.noembed.js', 'Import all plugins you want AFTER importing jQuery and Trumbowyg');
  109. </script>
  110. <script src="../js/runExampleCode.js"></script>
  111. <script src="../js/highlight.js"></script>
  112. </body>
  113. </html>