代码分享
<p style="box-sizing: inherit; margin: 1em 0px; color: rgb(34, 34, 34); font-family: "Open Sans", sans-serif; font-size: 18px; background-color: rgb(244, 247, 250);">This the minimal code to transform a simple div into the amazing WYSIWYG editor which is Trumbowyg.</p><pre style="box-sizing: inherit; margin-top: 1em; margin-bottom: 1em; font-family: "JetBrains Mono", monospace; font-size: 15px; text-wrap-mode: wrap; overflow-wrap: break-word; line-height: 1.5; color: rgb(34, 34, 34); background-color: rgb(244, 247, 250);"><code class="javascript hljs language-javascript" style="box-sizing: inherit; font-family: "JetBrains Mono", monospace; font-size: 15px; line-height: 1.5; color: rgb(36, 41, 46); background: rgb(255, 255, 255); padding: 0px 1.5em; display: block; overflow-x: auto; border-radius: 8px; box-shadow: rgba(0, 0, 0, 0.02) 0px 4px 16px;"> $(<span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98);">'#trumbowyg-demo'</span>).<span class="hljs-title function_" style="box-sizing: inherit; color: rgb(111, 66, 193);">trumbowyg</span>(); </code></pre><p style="box-sizing: inherit; margin: 1em 0px; color: rgb(34, 34, 34); font-family: "Open Sans", sans-serif; font-size: 18px; background-color: rgb(244, 247, 250);">If you want to set options to Trumbowyg, add an object which contains your options as parameters.</p><pre style="box-sizing: inherit; margin-top: 1em; margin-bottom: 1em; font-family: "JetBrains Mono", monospace; font-size: 15px; text-wrap-mode: wrap; overflow-wrap: break-word; line-height: 1.5; color: rgb(34, 34, 34); background-color: rgb(244, 247, 250);"><code class="javascript hljs language-javascript" style="box-sizing: inherit; font-family: "JetBrains Mono", monospace; font-size: 15px; line-height: 1.5; color: rgb(36, 41, 46); background: rgb(255, 255, 255); padding: 0px 1.5em; display: block; overflow-x: auto; border-radius: 8px; box-shadow: rgba(0, 0, 0, 0.02) 0px 4px 16px;"> $(<span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98);">'#trumbowyg-demo'</span>).<span class="hljs-title function_" style="box-sizing: inherit; color: rgb(111, 66, 193);">trumbowyg</span>({ <span class="hljs-attr" style="box-sizing: inherit; color: rgb(0, 92, 197);">btns</span>: [[<span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98);">'strong'</span>, <span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98);">'em'</span>,], [<span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98);">'insertImage'</span>]], <span class="hljs-attr" style="box-sizing: inherit; color: rgb(0, 92, 197);">autogrow</span>: <span class="hljs-literal" style="box-sizing: inherit; color: rgb(0, 92, 197);">true</span> }); </code></pre>
预览访问网络应用
World Time Clock: online calculation of time difference between two time zones, including local time and date.
预览访问