36
|
1 <!doctype html>
|
|
2 <html>
|
|
3 <head>
|
|
4 <meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5 <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sceditor@3/minified/themes/default.min.css" />
|
|
6 <style>
|
|
7 xtextarea {
|
|
8 width: 100%;
|
|
9 height: 200px;
|
|
10 }
|
|
11 </style>
|
|
12 <script src="https://cdn.jsdelivr.net/npm/sceditor@3/minified/sceditor.min.js"></script>
|
|
13 <script src="https://cdn.jsdelivr.net/npm/sceditor@3/minified/formats/bbcode.min.js"></script>
|
|
14 <script src="https://cdn.jsdelivr.net/npm/sceditor@3/minified/icons/monocons.min.js"></script>
|
|
15 <script src="https://cdn.jsdelivr.net/npm/sceditor@3/minified/icons/material.min.js"></script>
|
|
16 <script>
|
|
17 sceditor.icons.material.icons.strike = '<path d="M23,12V14H18.61C19.61,16.14 19.56,22 12.38,22C4.05,22.05 4.37,15.5 4.37,15.5L8.34,15.55C8.37,18.92 11.5,18.92 12.12,18.88C12.76,18.83 15.15,18.84 15.34,16.5C15.42,15.41 14.32,14.58 13.12,14H1V12H23M19.41,7.89L15.43,7.86C15.43,7.86 15.6,5.09 12.15,5.08C8.7,5.06 9,7.28 9,7.56C9.04,7.84 9.34,9.22 12,9.88H5.71C5.71,9.88 2.22,3.15 10.74,2C19.45,0.8 19.43,7.91 19.41,7.89Z" />';
|
|
18
|
|
19 function init() {
|
|
20 let textarea = document.querySelector('textarea');
|
|
21 sceditor.create(textarea, {
|
|
22 style: 'https://cdn.jsdelivr.net/npm/sceditor@3/minified/themes/content/default.min.css',
|
|
23 format: 'bbcode',
|
|
24 toolbar: 'source|link,image,youtube|code,bold,italic,underline,strike,superscript,size,color|quote,orderedlist,bulletlist',
|
|
25 autoExpand: true,
|
|
26 resizeMaxHeight: -1,
|
|
27 resizeEnabled: false,
|
|
28 width: '100%',
|
|
29 height: 100,
|
|
30 emoticonsEnabled: false,
|
|
31 icons: 'material',
|
|
32 });
|
|
33 }
|
|
34 </script>
|
|
35 </head>
|
|
36 <body onload="init()">
|
|
37 <p>
|
|
38 <a href="https://www.sceditor.com/">SCEditor</a>
|
|
39 </p>
|
|
40 <textarea></textarea>
|
|
41 </body>
|
|
42 </html>
|