Editor.md编辑器新增Unicode表情符号

This commit is contained in:
yangjian 2021-03-06 21:12:05 +08:00
parent 6a1e6dc283
commit dd427bf232
16 changed files with 10 additions and 22 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -19,19 +19,6 @@
var emojiData = [];
var selecteds = [];
var logoPrefix = "editormd-logo";
var logos = [
logoPrefix,
logoPrefix + "-1x",
logoPrefix + "-2x",
logoPrefix + "-3x",
logoPrefix + "-4x",
logoPrefix + "-5x",
logoPrefix + "-6x",
logoPrefix + "-7x",
logoPrefix + "-8x"
];
var langs = {
"zh-cn" : {
toolbar : {
@ -139,7 +126,7 @@
});
}
var category = ["Github emoji", "Twemoji", "Font awesome", "Editor.md logo"];
var category = ["Github emoji", "Twemoji", "Font awesome", "Unicode emoji"];
var tab = dialog.find("." + classPrefix + "tab");
if (tab.html() === "")
@ -169,7 +156,7 @@
}
var tabBoxs = tab.find("." + classPrefix + "tab-box");
var emojiCategories = ["github-emoji", "twemoji", "font-awesome", logoPrefix];
var emojiCategories = ["github-emoji", "twemoji", "font-awesome", "unicode-emoji"];
var drawTable = function() {
var cname = emojiCategories[emojiTabIndex];
@ -219,11 +206,10 @@
icon = "<i class=\"fa fa-" + emoji + " fa-emoji\" title=\"" + emoji + "\"></i>";
row += "<a href=\"javascript:;\" value=\":fa-" + emoji + ":\" title=\":fa-" + emoji + ":\" class=\"" + classPrefix + "emoji-btn\">" + icon + "</a>";
}
else if (type === "editormd-logo")
{
icon = "<i class=\"" + emoji + "\" title=\"Editor.md logo (" + emoji + ")\"></i>";
row += "<a href=\"javascript:;\" value=\":" + emoji + ":\" title=\":" + emoji + ":\" style=\"width:20%;\" class=\"" + classPrefix + "emoji-btn\">" + icon + "</a>";
}
else if(type === 'unicode-emoji'){
icon = unescape(emoji)
row += "<a href=\"javascript:;\" value=\"" + emoji + "\" style=\"width:5%;\" class=\"" + classPrefix + "emoji-btn\">" + icon + "</a>";
}
}
else
{
@ -278,7 +264,6 @@
}
emojiData = json;
emojiData[logoPrefix] = logos;
drawTable();
});
}

File diff suppressed because one or more lines are too long