showcase_supported_html.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>HTML Test File</title>
  5. <link rel="stylesheet" type="text/css" href="examples.css">
  6. <style>
  7. table,td {
  8. border: 1px solid silver;
  9. border-collapse: collapse
  10. }
  11. td {
  12. padding: .5em
  13. }
  14. #table-list-styles td {
  15. vertical-align: top;
  16. }
  17. .page-break {
  18. page-break-before: always;
  19. }
  20. </style>
  21. </head>
  22. <body>
  23. <div style='position: absolute; left: 0; top: 0; bottom: 0; overflow: auto; width: 400px'>
  24. <h1>HTML Test File</h1>
  25. This page showcases all HTML supported features.
  26. <hr>
  27. <h1>Headings</h1>
  28. <h1>Heading 1</h1>
  29. <h2>Heading 2</h2>
  30. <h3>Heading 3</h3>
  31. <h4>Heading 4</h4>
  32. <h5>Heading 5</h5>
  33. <h6>Heading 6</h6>
  34. <hr>
  35. <h1>
  36. <a id="colors" class="mce-item-anchor"></a>Colors
  37. </h1>
  38. <p>
  39. <span style="color: #ff0000; background-color: #00ff00;" data-mce-style="color: #ff0000; background-color: #00ff00;">Red Text With Green Background</span>
  40. </p>
  41. <hr>
  42. <h1 class='page-break'>
  43. <a id="font-sizes" class="mce-item-anchor"></a>Font Sizes
  44. </h1>
  45. <p>
  46. <span style="font-size: 12pt;" data-mce-style="font-size: 12pt;">12 Point</span>
  47. </p>
  48. <p>
  49. <span style="font-size: 24pt;" data-mce-style="font-size: 24pt;">24 Point</span>
  50. </p>
  51. <hr>
  52. <h1>
  53. <a id="fonts" class="mce-item-anchor"></a>Fonts
  54. </h1>
  55. <p>
  56. <span style="font-size: 24pt; font-family: arial, helvetica, sans-serif;" data-mce-style="font-size: 24pt; font-family: arial, helvetica, sans-serif;">Arial</span>
  57. </p>
  58. <p>
  59. <span style="font-size: 24pt; font-family: georgia, palatino;" data-mce-style="font-size: 24pt; font-family: georgia, palatino;">Georgia</span>
  60. </p>
  61. <p>
  62. <span style="font-size: 24pt; font-family: terminal, monaco;" data-mce-style="font-size: 24pt; font-family: terminal, monaco;">Terminal</span>
  63. </p>
  64. <p>
  65. <span style="font-size: 24pt; font-family: 'times new roman', times;" data-mce-style="font-size: 24pt; font-family: 'times new roman', times;">Times</span>
  66. </p>
  67. <hr>
  68. <h1 class='page-break'>
  69. <a id="tables" class="mce-item-anchor"></a>Tables
  70. </h1>
  71. <table class="mce-item-table">
  72. <tbody>
  73. <tr>
  74. <td>Number</td>
  75. <td>English</td>
  76. <td>Spanish</td>
  77. </tr>
  78. <tr>
  79. <td>1</td>
  80. <td>one</td>
  81. <td>uno</td>
  82. </tr>
  83. <tr>
  84. <td>2</td>
  85. <td>two</td>
  86. <td>dos</td>
  87. </tr>
  88. <tr>
  89. <td>3</td>
  90. <td>three</td>
  91. <td>tres</td>
  92. </tr>
  93. </tbody>
  94. </table>
  95. <h1>Images</h1>
  96. Images are subject to CORS restrictions an may only show up in a production environment.
  97. When testing, we start Chrome with the '--allow-file-access-from-files' flag...
  98. <img src="images/favicon.png" height="100" />
  99. <h1 class='page-break'>Lists</h1>
  100. <table id='table-list-styles'>
  101. <tr>
  102. <td>
  103. <p>Default</p>
  104. <ul>
  105. <li>Milk</li>
  106. <li>Eggs</li>
  107. <li>Cheese</li>
  108. </ul>
  109. <p>Circle</p>
  110. <ul style="list-style-type: circle;" data-mce-style="list-style-type: circle;">
  111. <li>Milk</li>
  112. <li>Eggs</li>
  113. <li>Cheese</li>
  114. </ul>
  115. <p>Disk</p>
  116. <ul style="list-style-type: disc;" data-mce-style="list-style-type: disc;">
  117. <li>Milk</li>
  118. <li>Eggs</li>
  119. <li>Cheese</li>
  120. </ul>
  121. <p>Square</p>
  122. <ul style="list-style-type: square;" data-mce-style="list-style-type: square;">
  123. <li>Milk</li>
  124. <li>Eggs</li>
  125. <li>Cheese</li>
  126. </ul>
  127. </td>
  128. <td>
  129. <p>Default</p>
  130. <ol>
  131. <li>Milk</li>
  132. <li>Eggs</li>
  133. <li>Cheese</li>
  134. </ol>
  135. <p>Lower Alpha</p>
  136. <ol style="list-style-type: lower-alpha;" data-mce-style="list-style-type: lower-alpha;">
  137. <li>Milk</li>
  138. <li>Eggs</li>
  139. <li>Cheese</li>
  140. </ol>
  141. <p>Upper Alpha</p>
  142. <ol style="list-style-type: upper-alpha;" data-mce-style="list-style-type: upper-alpha;">
  143. <li>Milk</li>
  144. <li>Eggs</li>
  145. <li>Cheese</li>
  146. </ol>
  147. </td>
  148. <td>
  149. <p>Lower&nbsp;Roman</p>
  150. <ol style="list-style-type: lower-roman;" data-mce-style="list-style-type: lower-roman;">
  151. <li>Milk</li>
  152. <li>Eggs</li>
  153. <li>Cheese</li>
  154. </ol>
  155. <p>Upper&nbsp;Roman</p>
  156. <ol style="list-style-type: upper-roman;" data-mce-style="list-style-type: upper-roman;">
  157. <li>Milk</li>
  158. <li>Eggs</li>
  159. <li>Cheese</li>
  160. </ol>
  161. <p>Lower&nbsp;Greek</p>
  162. <ol style="list-style-type: lower-greek;" data-mce-style="list-style-type: lower-greek;">
  163. <li>Milk</li>
  164. <li>Eggs</li>
  165. <li>Cheese</li>
  166. </ol>
  167. <p>Upper&nbsp;Greek</p>
  168. <ol style="list-style-type: upper-greek;" data-mce-style="list-style-type: upper-greek;">
  169. <li>Milk</li>
  170. <li>Eggs</li>
  171. <li>Cheese</li>
  172. </ol>
  173. </td>
  174. </tr>
  175. </table>
  176. <h1 class='page-break'>Hyperlinks</h1>
  177. <h2>Internal</h2>
  178. <p>
  179. <a href="#colors" data-mce-href="#colors">Colors</a>
  180. </p>
  181. <p>
  182. <a href="#font-sizes" data-mce-href="#font-sizes">Font Sizes</a>
  183. </p>
  184. <p>
  185. <a href="#fonts" data-mce-href="#fonts">Fonts</a>
  186. </p>
  187. <p>
  188. <a href="#tables" data-mce-href="#tables">Tables</a>
  189. </p>
  190. <h2>External</h2>
  191. <p>
  192. <a href="http://www.twelvetone.tv" data-mce-href="http://www.twelvetone.tv">www.twelvetone.tv</a>
  193. </p>
  194. </div>
  195. <script src='../../dist/jspdf.debug.js'></script>
  196. <script src='../../libs/html2pdf.js'></script>
  197. <script>
  198. var pdf = new jsPDF('p', 'pt', 'letter');
  199. pdf.canvas.height = 72 * 11;
  200. pdf.canvas.width = 72 * 8.5;
  201. html2pdf(document.body, pdf, function(pdf){
  202. var iframe = document.createElement('iframe');
  203. iframe.setAttribute('style','position:absolute;right:0; top:0; bottom:0; height:100%; width:500px');
  204. document.body.appendChild(iframe);
  205. iframe.src = pdf.output('datauristring');
  206. });
  207. </script>
  208. </body>
  209. </html>