Mercurial Hosting > freedit
comparison src/test/sceditor.html.luan @ 39:3354d4ac89f8
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 15 Aug 2022 13:49:57 -0600 |
parents | 19269d18b949 |
children |
comparison
equal
deleted
inserted
replaced
38:19269d18b949 | 39:3354d4ac89f8 |
---|---|
13 <html> | 13 <html> |
14 <head> | 14 <head> |
15 <meta name="viewport" content="width=device-width, initial-scale=1"> | 15 <meta name="viewport" content="width=device-width, initial-scale=1"> |
16 <link rel="stylesheet" href="<%=base_url%>/themes/default.css" /> | 16 <link rel="stylesheet" href="<%=base_url%>/themes/default.css" /> |
17 <style> | 17 <style> |
18 xtextarea { | |
19 width: 100%; | |
20 height: 200px; | |
21 } | |
22 div.sceditor-container input[type="text"] { | 18 div.sceditor-container input[type="text"] { |
23 width: 300px; | 19 width: 300px; |
24 } | 20 } |
25 </style> | 21 </style> |
26 <script src="<%=base_url%>/sceditor.js"></script> | 22 <script src="<%=base_url%>/sceditor.js"></script> |
27 <script src="<%=base_url%>/formats/bbcode.js"></script> | 23 <script src="<%=base_url%>/formats/bbcode.js"></script> |
28 <script src="<%=base_url%>/icons/monocons.js"></script> | |
29 <script src="<%=base_url%>/icons/material.js"></script> | 24 <script src="<%=base_url%>/icons/material.js"></script> |
30 <script> | 25 <script> |
31 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" />'; | 26 sceditor.icons.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" />'; |
32 | 27 |
33 function init() { | 28 function init() { |
34 let textarea = document.querySelector('textarea'); | 29 sceditor.create('textarea', { |
35 sceditor.create(textarea, { | |
36 //style: '<%=base_url%>/themes/content/default.css', | |
37 format: 'bbcode', | |
38 toolbar: 'source|link,image,youtube|code,bold,italic,underline,strike,superscript,size,color|quote,orderedlist,bulletlist', | 30 toolbar: 'source|link,image,youtube|code,bold,italic,underline,strike,superscript,size,color|quote,orderedlist,bulletlist', |
39 autoExpand: true, | 31 autoExpand: true, |
40 resizeMaxHeight: -1, | 32 resizeMaxHeight: -1, |
41 //resizeEnabled: false, | 33 //resizeEnabled: false, |
42 width: '100%', | 34 width: '100%', |
43 height: 100, | 35 height: 100, |
44 //emoticonsEnabled: false, | 36 //emoticonsEnabled: false, |
45 icons: 'material', | |
46 }); | 37 }); |
47 } | 38 } |
48 </script> | 39 </script> |
49 </head> | 40 </head> |
50 <body onload="init()"> | 41 <body onload="init()"> |