spechars.html 5.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <title>插入特殊字符</title>
  6. <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
  7. <style type="text/css">
  8. html,body{overflow:hidden;}
  9. #specharsTab{width: 600px;height: 100%;font-size: 12px;position: relative;}
  10. #tabHeads{position: relative;z-index: 10}
  11. #tabHeads span{display:inline-block;width: 65px;height:26px;text-align: center; cursor: pointer; line-height: 26px; border: 1px solid #ccc; border-bottom: 0 solid #ddd; margin-left: 2px; }
  12. #tabHeads span.focus{ border-bottom: none; height: 27px;background-color: #fff;}
  13. #tabBodys {width: 600px;height:440px;border: 1px solid #ddd;margin-left: 2px;position: relative;top:-1px}
  14. #tabBodys span{ margin: 5px 3px;text-align: center;display:inline-block;width: 40px;height:16px;cursor: pointer;line-height: 22px; }
  15. </style>
  16. </head>
  17. <body>
  18. <div id="specharsTab">
  19. <div id="tabHeads"></div><div id="tabBodys"></div>
  20. </div>
  21. <script type="text/javascript" src="../internal.js"></script>
  22. <script type="text/javascript">
  23. var charsContent = [
  24. { name:"tsfh",title:"特殊符号", content:toArray("、,。,·,ˉ,ˇ,¨,〃,々,—,~,‖,…,‘,’,“,”,〔,〕,〈,〉,《,》,「,」,『,』,〖,〗,【,】,±,×,÷,∶,∧,∨,∑,∏,∪,∩,∈,∷,√,⊥,∥,∠,⌒,⊙,∫,∮,≡,≌,≈,∽,∝,≠,≮,≯,≤,≥,∞,∵,∴,♂,♀,°,′,″,℃,$,¤,¢,£,‰,§,№,☆,★,○,●,◎,◇,◆,□,■,△,▲,※,→,←,↑,↓,〓,〡,〢,〣,〤,〥,〦,〧,〨,〩,㊣,㎎,㎏,㎜,㎝,㎞,㎡,㏄,㏎,㏑,㏒,㏕,︰,¬,¦,,℡,ˊ,ˋ,˙,–,―,‥,‵,℅,℉,↖,↗,↘,↙,∕,∟,∣,≒,≦,≧,⊿,═,║,╒,╓,╔,╕,╖,╗,╘,╙,╚,╛,╜,╝,╞,╟,╠,╡,╢,╣,╤,╥,╦,╧,╨,╩,╪,╫,╬,╭,╮,╯,╰,╱,╲,╳,▁,▂,▃,▄,▅,▆,▇,�,█,▉,▊,▋,▌,▍,▎,▏,▓,▔,▕,▼,▽,◢,◣,◤,◥,☉,⊕,〒,〝,〞")},
  25. { name:"lmsz",title:"罗马数字", content:toArray("ⅰ,ⅱ,ⅲ,ⅳ,ⅴ,ⅵ,ⅶ,ⅷ,ⅸ,ⅹ,Ⅰ,Ⅱ,Ⅲ,Ⅳ,Ⅴ,Ⅵ,Ⅶ,Ⅷ,Ⅸ,Ⅹ,Ⅺ,Ⅻ")},
  26. { name:"szfh",title:"数字符号", content:toArray("⒈,⒉,⒊,⒋,⒌,⒍,⒎,⒏,⒐,⒑,⒒,⒓,⒔,⒕,⒖,⒗,⒘,⒙,⒚,⒛,⑴,⑵,⑶,⑷,⑸,⑹,⑺,⑻,⑼,⑽,⑾,⑿,⒀,⒁,⒂,⒃,⒄,⒅,⒆,⒇,①,②,③,④,⑤,⑥,⑦,⑧,⑨,⑩,㈠,㈡,㈢,㈣,㈤,㈥,㈦,㈧,㈨,㈩")},
  27. { name:"rwfh",title:"日文符号", content:toArray("ぁ,あ,ぃ,い,ぅ,う,ぇ,え,ぉ,お,か,が,き,ぎ,く,ぐ,け,げ,こ,ご,さ,ざ,し,じ,す,ず,せ,ぜ,そ,ぞ,た,だ,ち,ぢ,っ,つ,づ,て,で,と,ど,な,に,ぬ,ね,の,は,ば,ぱ,ひ,び,ぴ,ふ,ぶ,ぷ,へ,べ,ぺ,ほ,ぼ,ぽ,ま,み,む,め,も,ゃ,や,ゅ,ゆ,ょ,よ,ら,り,る,れ,ろ,ゎ,わ,ゐ,ゑ,を,ん,ァ,ア,ィ,イ,ゥ,ウ,ェ,エ,ォ,オ,カ,ガ,キ,ギ,ク,グ,ケ,ゲ,コ,ゴ,サ,ザ,シ,ジ,ス,ズ,セ,ゼ,ソ,ゾ,タ,ダ,チ,ヂ,ッ,ツ,ヅ,テ,デ,ト,ド,ナ,ニ,ヌ,ネ,ノ,ハ,バ,パ,ヒ,ビ,ピ,フ,ブ,プ,ヘ,ベ,ペ,ホ,ボ,ポ,マ,ミ,ム,メ,モ,ャ,ヤ,ュ,ユ,ョ,ヨ,ラ,リ,ル,レ,ロ,ヮ,ワ,ヰ,ヱ,ヲ,ン,ヴ,ヵ,ヶ")},
  28. { name:"xlzm",title:"希腊字母", content:toArray("Α,Β,Γ,Δ,Ε,Ζ,Η,Θ,Ι,Κ,Λ,Μ,Ν,Ξ,Ο,Π,Ρ,Σ,Τ,Υ,Φ,Χ,Ψ,Ω,α,β,γ,δ,ε,ζ,η,θ,ι,κ,λ,μ,ν,ξ,ο,π,ρ,σ,τ,υ,φ,χ,ψ,ω")},
  29. { name:"ewzm",title:"俄文字母", content:toArray("А,Б,В,Г,Д,Е,Ё,Ж,З,И,Й,К,Л,М,Н,О,П,Р,С,Т,У,Ф,Х,Ц,Ч,Ш,Щ,Ъ,Ы,Ь,Э,Ю,Я,а,б,в,г,д,е,ё,ж,з,и,й,к,л,м,н,о,п,р,с,т,у,ф,х,ц,ч,ш,щ,ъ,ы,ь,э,ю,я")},
  30. { name:"pyzm",title:"拼音字母", content:toArray("ā,á,ǎ,à,ē,é,ě,è,ī,í,ǐ,ì,ō,ó,ǒ,ò,ū,ú,ǔ,ù,ǖ,ǘ,ǚ,ǜ,ü")},
  31. { name:"zyzf",title:"注音及其他", content:toArray("ㄅ,ㄆ,ㄇ,ㄈ,ㄉ,ㄊ,ㄋ,ㄌ,ㄍ,ㄎ,ㄏ,ㄐ,ㄑ,ㄒ,ㄓ,ㄔ,ㄕ,ㄖ,ㄗ,ㄘ,ㄙ,ㄚ,ㄛ,ㄜ,ㄝ,ㄞ,ㄟ,ㄠ,ㄡ,ㄢ,ㄣ,ㄤ,ㄥ,ㄦ,ㄧ,ㄨ")}
  32. ];
  33. (function createTab(content){
  34. for(var i =0,ci;ci = content[i++];){
  35. var span = document.createElement("span");
  36. span.setAttribute("tabSrc",ci.name);
  37. span.innerHTML = ci.title;
  38. if(i==1)span.className = "focus";
  39. domUtils.on(span,"click",function(){
  40. var tmps = $G("tabHeads").children;
  41. for(var k = 0,sk;sk = tmps[k++];){
  42. sk.className = "";
  43. }
  44. tmps = $G("tabBodys").children;
  45. for(var k = 0,sk;sk = tmps[k++];){
  46. sk.style.display = "none";
  47. }
  48. this.className = "focus";
  49. $G(this.getAttribute("tabSrc")).style.display = "";
  50. });
  51. $G("tabHeads").appendChild(span);
  52. var div = document.createElement("div");
  53. div.id = ci.name;
  54. div.style.display = (i==1) ? "" :"none";
  55. var cons = ci.content;
  56. for(var j = 0,con;con=cons[j++];){
  57. var charSpan = document.createElement("span");
  58. charSpan.innerHTML = con;
  59. domUtils.on(charSpan,"click",function(){
  60. editor.execCommand("insertHTML",this.innerHTML);
  61. dialog.close();
  62. });
  63. div.appendChild(charSpan);
  64. }
  65. $G("tabBodys").appendChild(div);
  66. }
  67. })(charsContent);
  68. function toArray(str){return str.split(",");}
  69. </script>
  70. </body>
  71. </html>