content.js 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. /**
  2. * @fileoverview 用于测试的 html 内容
  3. */
  4. module.exports = `<title>富文本示例</title>
  5. <div>
  6. <section style="text-align: center; margin: 0px auto;">
  7. <section style="border-radius: 4px; border: 1px solid #757576; display: inline-block; padding: 5px 20px;">
  8. <span style="font-size: 18px; color: #595959;">表格</span>
  9. </section>
  10. </section>
  11. <section style="margin-top: 1.5em;">
  12. <table width="100%" cellspacing="0" cellpadding="5">
  13. <thead>
  14. <tr>
  15. <th>标题 1</th>
  16. <th>标题 2</th>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. <tr>
  21. <td align="center">内容 1</td>
  22. <td align="center">内容 2</td>
  23. </tr>
  24. <tr style="background-color: #f6f8fa;">
  25. <td align="center">内容 3</td>
  26. <td align="center"><a>链接</a></td>
  27. </tr>
  28. <tr>
  29. <td align="center">内容 5</td>
  30. <td align="center">内容 6</td>
  31. </tr>
  32. </tbody>
  33. </table>
  34. <div style="font-size: 12px; color: gray; text-align: center; margin-top: 5px;">普通表格</div>
  35. </section>
  36. <section style="margin-top: 1.5em;">
  37. <table width="500px" cellspacing="0" cellpadding="5">
  38. <thead>
  39. <tr>
  40. <th>标题 1</th>
  41. <th>标题 2</th>
  42. <th>标题 3</th>
  43. <th>标题 4</th>
  44. <th>标题 5</th>
  45. </tr>
  46. </thead>
  47. <tbody>
  48. <tr>
  49. <td align="center">内容 1</td>
  50. <td align="center">内容 2</td>
  51. <td align="center">内容 3</td>
  52. <td align="center">内容 4</td>
  53. <td align="center">内容 5</td>
  54. </tr>
  55. <tr style="background-color: #f6f8fa;">
  56. <td align="center"><a>链接</a></td>
  57. <td align="center">内容 7</td>
  58. <td align="center">内容 8</td>
  59. <td align="center">内容 9</td>
  60. <td align="center">内容 10</td>
  61. </tr>
  62. <tr>
  63. <td align="center">内容 11</td>
  64. <td align="center">内容 12</td>
  65. <td align="center">内容 13</td>
  66. <td align="center">内容 14</td>
  67. <td align="center">内容 15</td>
  68. </tr>
  69. </tbody>
  70. </table>
  71. <div style="font-size: 12px; color: gray; text-align: center; margin-top: 5px;">长表格,可以单独横向滚动</div>
  72. </section>
  73. <section style="margin-top: 1.5em;">
  74. <table width="100%" cellspacing="0" cellpadding="5">
  75. <thead>
  76. <tr>
  77. <th align="center">标题 1</th>
  78. <th align="center">标题 2</th>
  79. <th align="center">标题 3</th>
  80. </tr>
  81. </thead>
  82. <tbody>
  83. <tr>
  84. <td align="center" colspan="2">内容 1</td>
  85. <td align="center" rowspan="2">内容 2</td>
  86. </tr>
  87. <tr>
  88. <td align="center" rowspan="2">内容 3</td>
  89. <td align="center">内容 4</td>
  90. </tr>
  91. <tr>
  92. <td align="center" colspan="2">内容 5</td>
  93. </tr>
  94. <tr>
  95. <td align="center">内容 6</td>
  96. <td align="center">内容 7</td>
  97. <td align="center"><a>链接</a></td>
  98. </tr>
  99. </tbody>
  100. </table>
  101. <div style="font-size: 12px; color: gray; text-align: center; margin-top: 5px;">含有合并单元格的表格</div>
  102. </section>
  103. <section id="list" style="text-align: center; margin: 0px auto; margin-top: 2em">
  104. <section style="border-radius: 4px; border: 1px solid #757576; display: inline-block; padding: 5px 20px;">
  105. <span style="font-size: 18px; color: #595959;">列表</span>
  106. </section>
  107. </section>
  108. <section style="margin-top: 1.5em;">
  109. <ol style="margin-bottom: 1.5em;">
  110. <li>这是第一条列表项</li>
  111. <li>这是第二条列表项</li>
  112. <li>这是第三条 <a>链接</a></li>
  113. </ol>
  114. <ol type="A" style="margin-bottom: 1.5em;">
  115. <li>这是第一条列表项</li>
  116. <li>这是第二条列表项</li>
  117. <li>这是第三条 <a>链接</a></li>
  118. </ol>
  119. <ol type="I" style="margin-bottom: 1.5em;">
  120. <li>这是第一条列表项</li>
  121. <li>这是第二条列表项</li>
  122. <li>这是第三条 <a>链接</a></li>
  123. </ol>
  124. <ul>
  125. <li>第一级无序列表</li>
  126. <li>第一级无序列表
  127. <ul>
  128. <li>第二级无序列表</li>
  129. <li>第二级无序列表
  130. <ul>
  131. <li>第三级无序列表</li>
  132. <li>第三级 <a>链接</a></li>
  133. </ul>
  134. </li>
  135. </ul>
  136. </li>
  137. </ul>
  138. </section>
  139. <section style="text-align: center; margin: 0px auto; margin-top: 2em">
  140. <section style="border-radius: 4px; border: 1px solid #757576; display: inline-block; padding: 5px 20px;">
  141. <span style="font-size: 18px; color: #595959;">文本</span>
  142. </section>
  143. </section>
  144. <section style="margin-top: 1.5em;">
  145. <p style="margin-bottom: 1em;">
  146. <ruby>
  147. 拼<rp>(</rp><rt>pin</rt><rp>)</rp>
  148. 音<rp>(</rp><rt>yin</rt><rp>)</rp>
  149. </ruby>
  150. &nbsp;&nbsp;<i>斜体</i>
  151. &nbsp;&nbsp;<b>粗体</b>
  152. &nbsp;&nbsp;上标<sup>1</sup>
  153. &nbsp;&nbsp;下标<sub>2</sub>
  154. </p>
  155. <p style="margin-bottom: 1em;">
  156. <span style="text-decoration: overline;">上划线</span>
  157. &nbsp;&nbsp;<s>中划线</s>
  158. &nbsp;&nbsp;<u>下划线</u>
  159. </p>
  160. <p>
  161. <big>大一号</big>
  162. &nbsp;&nbsp;<span>正常</span>
  163. &nbsp;&nbsp;<small>小一号</small>
  164. </p>
  165. <h2 style="margin-top: 0.5em;">大标题</h2>
  166. <h3 style="margin-top: 0.5em;">中标题</h3>
  167. <h4 style="margin-top: 0.5em;">小标题</h4>
  168. </section>
  169. <section style="text-align: center; margin: 0px auto; margin-top: 2em">
  170. <section style="border-radius: 4px; border: 1px solid #757576; display: inline-block; padding: 5px 20px;">
  171. <span style="font-size: 18px; color: #595959;">链接</span>
  172. </section>
  173. </section>
  174. <section style="margin-top: 1.5em; text-align: center;">
  175. <a href="#">跳转到顶部</a>&nbsp;&nbsp;&nbsp;<a href="#list">跳转到列表</a>
  176. <div style="font-size: 12px; color: gray; margin-top: 5px;">锚点链接,将滚动到对应位置</div>
  177. </section>
  178. <section style="margin-top: 1.5em; text-align: center;">
  179. <a href="https://github.com/jin-yufeng/mp-html">外部链接</a>
  180. <div style="font-size: 12px; color: gray; margin-top: 5px;">外部链接,将复制链接</div>
  181. </section>
  182. <section style="margin-top: 1.5em; text-align: center;">
  183. <a href="/pages/componentsB/parse/jump">内部链接</a>
  184. <div style="font-size: 12px; color: gray; margin-top: 5px;">内部链接,将跳转页面</div>
  185. </section>
  186. <section style="text-align: center; margin: 0px auto; margin-top: 2em">
  187. <section style="border-radius: 4px; border: 1px solid #757576; display: inline-block; padding: 5px 20px;">
  188. <span style="font-size: 18px; color: #595959;">图片</span>
  189. </section>
  190. </section>
  191. <section style="margin-top: 1.5em; text-align: center;">
  192. <img src="/demo-thumb.jpg?sign=91b3e495d16f96a0df3d263c9ff95821&t=1609059235" original-src="/demo.jpg?sign=af7082bed28711177bd952dbab67373e&t=1609059255">
  193. <div style="font-size: 12px; color: gray; margin-top: 5px;">点击预览高清图</div>
  194. </section>
  195. <section style="margin-top: 1.5em; text-align: center;">
  196. <svg width="40px" height="40px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;">
  197. <path fill="#000" d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z">
  198. <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite"/>
  199. </path>
  200. </svg>
  201. <div style="font-size: 12px; color: gray; margin-top: 5px;">svg 动画</div>
  202. </section>
  203. </div>`