Skip to content
This repository was archived by the owner on Apr 29, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ var PLUGIN_FILES = [
'plugins/table/table.js',
'plugins/template/template.js',
'plugins/wordpaste/wordpaste.js',
'plugins/fixtoolbar/fixtoolbar.js'
'plugins/fixtoolbar/fixtoolbar.js',
'plugins/symbol/symbol.js'
];

var pkg = grunt.file.readJSON('package.json');
Expand Down
1 change: 1 addition & 0 deletions lang/ar.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ KindEditor.lang({
unlink : 'إزالة الرابط',
fullscreen : 'محرر ملئ الشاشة',
about : 'حول',
symbol:'الأحرف الخاصة',
print : 'طباعة',
filemanager : 'مدير الملفات',
code : 'إدراج نص برمجي',
Expand Down
1 change: 1 addition & 0 deletions lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ KindEditor.lang({
unlink : 'Unlink',
fullscreen : 'Toggle fullscreen mode',
about : 'About',
symbol : 'Symbol',
print : 'Print',
filemanager : 'File Manager',
code : 'Insert code',
Expand Down
1 change: 1 addition & 0 deletions lang/ko.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ KindEditor.lang({
unlink : '링크 제거',
fullscreen : '전체 화면 모드',
about : '이 에디터는...',
symbol : '특수 문자',
print : '인쇄',
filemanager : '파일 관리자',
code : '코드 추가',
Expand Down
1 change: 1 addition & 0 deletions lang/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ KindEditor.lang({
link : '超级链接',
unlink : '取消超级链接',
fullscreen : '全屏显示',
symbol : '特殊字符',
about : '关于',
print : '打印(Ctrl+P)',
filemanager : '文件空间',
Expand Down
1 change: 1 addition & 0 deletions lang/zh-TW.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ KindEditor.lang({
unlink : '移除超連結',
fullscreen : '最大化',
about : '關於',
symbol : '特殊字符',
print : '列印(Ctrl+P)',
filemanager : '瀏覽伺服器',
code : '插入程式代碼',
Expand Down
113 changes: 113 additions & 0 deletions plugins/symbol/symbol.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2018 kindsoft.net
*
* @author Yuewen
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
*******************************************************************************/

KindEditor.plugin('symbol', function (K) {

var self = this,
name = 'symbol';
self.plugin.symbolDialog = function (options) {

var charsContent = [{
name: "tsfh",
title: "特殊符号",
content: "、,。,·,ˉ,ˇ,¨,〃,々,—,~,‖,…,‘,’,“,”,〔,〕,〈,〉,《,》,「,」,『,』,〖,〗,【,】,±,×,÷,∶,∧,∨,∑,∏,∪,∩,∈,∷,√,⊥,∥,∠,⌒,⊙,∫,∮,≡,≌,≈,∽,∝,≠,≮,≯,≤,≥,∞,∵,∴,♂,♀,°,′,″,℃,$,¤,¢,£,‰,§,№,☆,★,○,●,◎,◇,◆,□,■,△,▲,※,→,←,↑,↓,〓,〡,〢,〣,〤,〥,〦,〧,〨,〩,㊣,㎎,㎏,㎜,㎝,㎞,㎡,㏄,㏎,㏑,㏒,㏕,︰,¬,¦,℡,ˊ,ˋ,˙,–,―,‥,‵,℅,℉,↖,↗,↘,↙,∕,∟,∣,≒,≦,≧,⊿,═,║,╒,╓,╔,╕,╖,╗,╘,╙,╚,╛,╜,╝,╞,╟,╠,╡,╢,╣,╤,╥,╦,╧,╨,╩,╪,╫,╬,╭,╮,╯,╰,╱,╲,╳,▁,▂,▃,▄,▅,▆,▇,�,█,▉,▊,▋,▌,▍,▎,▏,▓,▔,▕,▼,▽,◢,◣,◤,◥,☉,⊕,〒,〝,〞"
},
{
name: "lmsz",
title: "罗马数字",
content: "ⅰ,ⅱ,ⅲ,ⅳ,ⅴ,ⅵ,ⅶ,ⅷ,ⅸ,ⅹ,Ⅰ,Ⅱ,Ⅲ,Ⅳ,Ⅴ,Ⅵ,Ⅶ,Ⅷ,Ⅸ,Ⅹ,Ⅺ,Ⅻ"
},
{
name: "szfh",
title: "数字符号",
content: "⒈,⒉,⒊,⒋,⒌,⒍,⒎,⒏,⒐,⒑,⒒,⒓,⒔,⒕,⒖,⒗,⒘,⒙,⒚,⒛,⑴,⑵,⑶,⑷,⑸,⑹,⑺,⑻,⑼,⑽,⑾,⑿,⒀,⒁,⒂,⒃,⒄,⒅,⒆,⒇,①,②,③,④,⑤,⑥,⑦,⑧,⑨,⑩,㈠,㈡,㈢,㈣,㈤,㈥,㈦,㈧,㈨,㈩"
},
{
name: "xlzm",
title: "希腊字母",
content: "Α,Β,Γ,Δ,Ε,Ζ,Η,Θ,Ι,Κ,Λ,Μ,Ν,Ξ,Ο,Π,Ρ,Σ,Τ,Υ,Φ,Χ,Ψ,Ω,α,β,γ,δ,ε,ζ,η,θ,ι,κ,λ,μ,ν,ξ,ο,π,ρ,σ,τ,υ,φ,χ,ψ,ω"
},
{
name: "rwfh",
title: "日文符号",
content: "ぁ,あ,ぃ,い,ぅ,う,ぇ,え,ぉ,お,か,が,き,ぎ,く,ぐ,け,げ,こ,ご,さ,ざ,し,じ,す,ず,せ,ぜ,そ,ぞ,た,だ,ち,ぢ,っ,つ,づ,て,で,と,ど,な,に,ぬ,ね,の,は,ば,ぱ,ひ,び,ぴ,ふ,ぶ,ぷ,へ,べ,ぺ,ほ,ぼ,ぽ,ま,み,む,め,も,ゃ,や,ゅ,ゆ,ょ,よ,ら,り,る,れ,ろ,ゎ,わ,ゐ,ゑ,を,ん,ァ,ア,ィ,イ,ゥ,ウ,ェ,エ,ォ,オ,カ,ガ,キ,ギ,ク,グ,ケ,ゲ,コ,ゴ,サ,ザ,シ,ジ,ス,ズ,セ,ゼ,ソ,ゾ,タ,ダ,チ,ヂ,ッ,ツ,ヅ,テ,デ,ト,ド,ナ,ニ,ヌ,ネ,ノ,ハ,バ,パ,ヒ,ビ,ピ,フ,ブ,プ,ヘ,ベ,ペ,ホ,ボ,ポ,マ,ミ,ム,メ,モ,ャ,ヤ,ュ,ユ,ョ,ヨ,ラ,リ,ル,レ,ロ,ヮ,ワ,ヰ,ヱ,ヲ,ン,ヴ,ヵ,ヶ"
},
{
name: "ewzm",
title: "俄文字母",
content: "А,Б,В,Г,Д,Е,Ё,Ж,З,И,Й,К,Л,М,Н,О,П,Р,С,Т,У,Ф,Х,Ц,Ч,Ш,Щ,Ъ,Ы,Ь,Э,Ю,Я,а,б,в,г,д,е,ё,ж,з,и,й,к,л,м,н,о,п,р,с,т,у,ф,х,ц,ч,ш,щ,ъ,ы,ь,э,ю,я"
},
{
name: "pyzm",
title: "拼音字母",
content: "ā,á,ǎ,à,ē,é,ě,è,ī,í,ǐ,ì,ō,ó,ǒ,ò,ū,ú,ǔ,ù,ǖ,ǘ,ǚ,ǜ,ü"
},
{
name: "yyyb",
title: "英语英标",
content: "i:,i,e,æ,ʌ,ə:,ə,u:,u,ɔ:,ɔ,a:,ei,ai,ɔi,əu,au,iə,εə,uə,p,t,k,b,d,g,f,s,ʃ,θ,h,v,z,ʒ,ð,tʃ,tr,ts,dʒ,dr,dz,m,n,ŋ,l,r,w,j,"
},
{
name: "zyzf",
title: "其他",
content: "ㄅ,ㄆ,ㄇ,ㄈ,ㄉ,ㄊ,ㄋ,ㄌ,ㄍ,ㄎ,ㄏ,ㄐ,ㄑ,ㄒ,ㄓ,ㄔ,ㄕ,ㄖ,ㄗ,ㄘ,ㄙ,ㄚ,ㄛ,ㄜ,ㄝ,ㄞ,ㄟ,ㄠ,ㄡ,ㄢ,ㄣ,ㄤ,ㄥ,ㄦ,ㄧ,ㄨ"
}
];

var html = '<div class="ke-plugin-symbol">';
html += '<div class="tabs"></div>';
for (var i = 0; i < charsContent.length; i++) {
html += '<div class="tab' + i + '">';
var chars = charsContent[i].content.split(',');
for (var k = 0; k < chars.length; k++) {
html += '<span class="ke-cell">' + chars[k] + '</span>';
}
html += '</div>';
}
html += '</div>';

var dialogWidth = 900,
dialogHeight = 350;
var dialog = self.createDialog({
name: name,
width: dialogWidth,
height: dialogHeight,
title: "特殊字符",
body: html
}),
div = dialog.div;


var tabs = K.tabs({
src: K('.tabs', div),
afterSelect: function (i) {}
});

for (var i = 0; i < charsContent.length; i++) {
html += '<div class="tab' + i + '"></div>';
tabs.add({
title: charsContent[i].title,
panel: K('.tab' + i + '', div)
})
}

tabs.select(0);

K('.ke-cell', div).click(function (e) {
self.insertHtml(e.target.innerHTML).hideDialog().focus();
e.stop();
});

return dialog;
};

self.clickToolbar(name, self.plugin.symbolDialog);


});
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ K.options = {
'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage',
'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
'anchor', 'link', 'unlink', '|', 'about'
'anchor', 'link', 'unlink', 'symbol','|', 'about'
],
noDisableItems : ['source', 'fullscreen'],
colorTable : [
Expand Down
24 changes: 23 additions & 1 deletion themes/default/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,12 @@
height: 16px;
}
.ke-icon-emoticons {
background-position: 0px -608px;
background-position: 0px -609px;
width: 16px;
height: 16px;
}
.ke-icon-symbol {
background-position: 0px -1216px;
width: 16px;
height: 16px;
}
Expand Down Expand Up @@ -1060,6 +1065,7 @@
padding: 0;
border: 0;
}

.ke-plugin-emoticons .ke-page {
text-align: right;
margin: 5px;
Expand All @@ -1069,6 +1075,22 @@
color: #333;
text-decoration: none;
}

.ke-plugin-symbol{
padding:20px;
}
.ke-plugin-symbol .ke-cell{
display:inline-block;width:30px;height:30px;
text-align: center;
line-height: 30px;
border: 1px solid white;
cursor: pointer;
}
.ke-plugin-symbol .ke-cell:hover{
border: 1px solid #5690D2;
background-color: #E9EFF6;
}

.ke-plugin-plainpaste-textarea,
.ke-plugin-wordpaste-iframe {
display: block;
Expand Down