@richscripts/richtexteditor 2.4.1 โ 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -2
- package/richtexteditor/all_plugins.js +2861 -935
- package/richtexteditor/all_plugins.min.js +58 -58
- package/richtexteditor/plugins/accessibilitychecker.js +186 -1
- package/richtexteditor/plugins/aitoolkit.js +1 -1
- package/richtexteditor/plugins/all_plugins.js +2861 -935
- package/richtexteditor/plugins/all_plugins.min.js +58 -58
- package/richtexteditor/plugins/crdt-engine.js +2201 -198
- package/richtexteditor/plugins/crdt-engine.min.js +5 -5
- package/richtexteditor/plugins/gapcursor.js +365 -0
- package/richtexteditor/plugins/imageeditor.js +30 -3
- package/richtexteditor/plugins/importstyles.js +312 -0
- package/richtexteditor/plugins/insertcode.js +81 -4
- package/richtexteditor/plugins/insertemoji.js +302 -229
- package/richtexteditor/plugins/insertgallery.js +34 -6
- package/richtexteditor/plugins/keyboarda11y.js +27 -1
- package/richtexteditor/plugins/multiroot.js +269 -0
- package/richtexteditor/plugins/revisionhistory.js +5 -0
- package/richtexteditor/plugins/sanitizer.js +24 -0
- package/richtexteditor/plugins/textpartlanguage.js +504 -0
- package/richtexteditor/plugins/trackedchanges.js +716 -689
- package/richtexteditor/plugins/wordexport.js +1 -1
- package/richtexteditor/rte-config.js +2 -2
- package/richtexteditor/rte.js +55 -51
- package/richtexteditor/rte_theme_default.css +151 -83
|
@@ -1,229 +1,302 @@
|
|
|
1
|
-
|
|
2
|
-
RTE_DefaultConfig.plugin_insertemoji = RTE_Plugin_InsertEmoji;
|
|
3
|
-
|
|
4
|
-
function RTE_Plugin_InsertEmoji() {
|
|
5
|
-
|
|
6
|
-
function CharToHTMLCode(ch) {
|
|
7
|
-
if (ch.length > 2)
|
|
8
|
-
return ch;
|
|
9
|
-
|
|
10
|
-
if (ch.length == 1 || ch.charCodeAt(1) == 0xfe0f)
|
|
11
|
-
return "&#" + ch.charCodeAt(0) + ";"
|
|
12
|
-
|
|
13
|
-
if (ch.charCodeAt(1) == 0xfe0f) {
|
|
14
|
-
return "&#" + ch.charCodeAt(0) + ";"
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
var offset = ch.charCodeAt(0) - 0xd83c;
|
|
18
|
-
if (offset < 0 && offset > 3)//not support
|
|
19
|
-
return ch;
|
|
20
|
-
|
|
21
|
-
var second = ch.charCodeAt(1) - 0xdc04;
|
|
22
|
-
var f = offset * 0x400 + second + 0x1f004;
|
|
23
|
-
return "&#x" + f.toString(16) + ";"
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
var groupnames = ["smileys", "people", "animals", "food", "travel", "activities", "objects", "symbols"]
|
|
28
|
-
var emojistrs = ["๐#grinning face|๐#grinning face with big eyes|๐#grinning face with smiling eyes|๐#beaming face with smiling eyes|๐#grinning squinting face|๐
#grinning face with sweat|๐คฃ#rolling on the floor laughing|๐#face with tears of joy|๐#slightly smiling face|๐#upside-down face|๐#winking face|๐#smiling face with smiling eyes|๐#smiling face with halo|๐#smiling face with heart-eyes|๐คฉ#star-struck|๐#face blowing a kiss|๐#kissing face|๐#kissing face with closed eyes|๐#kissing face with smiling eyes|๐#face savoring food|๐#face with tongue|๐#winking face with tongue|๐คช#zany face|๐#squinting face with tongue|๐ค#money-mouth face|๐ค#hugging face|๐คญ#face with hand over mouth|๐คซ#shushing face|๐ค#thinking face|๐ค#zipper-mouth face|๐คจ#face with raised eyebrow|๐#neutral face|๐#expressionless face|๐ถ#face without mouth|๐#smirking face|๐#unamused face|๐#face with rolling eyes|๐ฌ#grimacing face|๐คฅ#lying face|๐#relieved face|๐#pensive face|๐ช#sleepy face|๐คค#drooling face|๐ด#sleeping face|๐ท#face with medical mask|๐ค#face with thermometer|๐ค#face with head-bandage|๐คข#nauseated face|๐คฎ#face vomiting|๐คง#sneezing face|๐ต#dizzy face|๐คฏ#exploding head|๐ค #cowboy hat face|๐#smiling face with sunglasses|๐ค#nerd face|๐ง#face with monocle|๐#confused face|๐#worried face|๐#slightly frowning face|โน๏ธ#frowning face|๐ฎ#face with open mouth|๐ฏ#hushed face|๐ฒ#astonished face|๐ณ#flushed face|๐ฆ#frowning face with open mouth|๐ง#anguished face|๐จ#fearful face|๐ฐ#anxious face with sweat|๐ฅ#sad but relieved face|๐ข#crying face|๐ญ#loudly crying face|๐ฑ#face screaming in fear|๐#confounded face|๐ฃ#persevering face|๐#disappointed face|๐#downcast face with sweat|๐ฉ#weary face|๐ซ#tired face|๐ค#face with steam from nose|๐ก#pouting face|๐ #angry face|๐คฌ#face with symbols on mouth|๐#smiling face with horns|๐ฟ#angry face with horns|๐#skull|โ ๏ธ#skull and crossbones|๐ฉ#pile of poo|๐คก#clown face|๐น#ogre|๐บ#goblin|๐ป#ghost|๐ฝ#alien|๐พ#alien monster|๐ค#robot|๐บ#grinning cat|๐ธ#grinning cat with smiling eyes|๐น#cat with tears of joy|๐ป#smiling cat with heart-eyes|๐ผ#cat with wry smile|๐ฝ#kissing cat|๐#weary cat|๐ฟ#crying cat|๐พ#pouting cat|๐#see-no-evil monkey|๐#hear-no-evil monkey|๐#speak-no-evil monkey|๐#kiss mark|๐#love letter|๐#heart with arrow|๐#heart with ribbon|๐#sparkling heart|๐#growing heart|๐#beating heart|๐#revolving hearts|๐#two hearts|๐#heart decoration|โฃ๏ธ#heart exclamation|๐#broken heart|โค๏ธ#red heart|๐งก#orange heart|๐#yellow heart|๐#green heart|๐#blue heart|๐#purple heart|๐ค#black heart|๐ฏ#hundred points|๐ข#anger symbol|๐ฅ#collision|๐ซ#dizzy|๐ฆ#sweat droplets|๐จ#dashing away|๐ฃ#bomb|๐ฌ#speech balloon|๐ญ#thought balloon|๐ค#zzz", "๐#waving hand|๐ค#raised back of hand|โ#raised hand|๐#vulcan salute|๐#OK hand|โ๏ธ#victory hand|๐ค#crossed fingers|๐ค#love-you gesture|๐ค#sign of the horns|๐ค#call me hand|๐#backhand index pointing left|๐#backhand index pointing right|๐#backhand index pointing up|๐#middle finger|๐#backhand index pointing down|โ๏ธ#index pointing up|๐#thumbs up|๐#thumbs down|โ#raised fist|๐#oncoming fist|๐ค#left-facing fist|๐ค#right-facing fist|๐#clapping hands|๐#raising hands|๐#open hands|๐คฒ#palms up together|๐ค#handshake|๐#folded hands|โ๏ธ#writing hand|๐
#nail polish|๐คณ#selfie|๐ช#flexed biceps|๐#ear|๐#nose|๐ง #brain|๐#eyes|๐
#tongue|๐#mouth|๐ถ#baby|๐ง#child|๐ฆ#boy|๐ง#girl|๐ง#person|๐ฑ#person with blond hair|๐จ#man|๐ง#man with beard|๐ฉ#woman|๐ง#older person|๐ด#old man|๐ต#old woman|๐#person frowning|๐#person pouting|๐
#person gesturing NO|๐#person gesturing OK|๐#person tipping hand|๐#person raising hand|๐#person bowing|๐คฆ#person facepalming|๐คท#person shrugging|๐ฎ#police officer|๐#guard|๐ท#construction worker|๐คด#prince|๐ธ#princess|๐ณ#person wearing turban|๐ฒ#person with skullcap|๐ง#woman with headscarf|๐คต#person in tuxedo|๐ฐ#person with veil|๐คฐ#pregnant woman|๐คฑ#breast-feeding|๐ผ#baby angel|๐
#Santa Claus|๐คถ#Mrs. Claus|๐ง#mage|๐ง#fairy|๐ง#vampire|๐ง#merperson|๐ง#elf|๐ง#genie|๐ง#zombie|๐#person getting massage|๐#person getting haircut|๐ถ#person walking|๐#person running|๐#woman dancing|๐บ#man dancing|๐ฏ#people with bunny ears|๐ง#person in steamy room|๐ง#person climbing|๐คบ#person fencing|๐#horse racing|โท๏ธ#skier|๐#snowboarder|๐#person surfing|๐ฃ#person rowing boat|๐#person swimming|โน๏ธ#person bouncing ball|๐ด#person biking|๐ต#person mountain biking|๐คธ#person cartwheeling|๐คผ#people wrestling|๐คฝ#person playing water polo|๐คพ#person playing handball|๐คน#person juggling|๐ง#person in lotus position|๐#person taking bath|๐#person in bed|๐ญ#women holding hands|๐ซ#woman and man holding hands|๐ฌ#men holding hands|๐#kiss|๐#couple with heart|๐ช#family|๐ค#bust in silhouette|๐ฅ#busts in silhouette|๐ฃ#footprints", "๐ต#monkey face|๐#monkey|๐ฆ#gorilla|๐ถ#dog face|๐#dog|๐ฉ#poodle|๐บ#wolf|๐ฆ#fox|๐ฑ#cat face|๐#cat|๐ฆ#lion|๐ฏ#tiger face|๐
#tiger|๐#leopard|๐ด#horse face|๐#horse|๐ฆ#unicorn|๐ฆ#zebra|๐ฆ#deer|๐ฎ#cow face|๐#ox|๐#water buffalo|๐#cow|๐ท#pig face|๐#pig|๐#boar|๐ฝ#pig nose|๐#ram|๐#ewe|๐#goat|๐ช#camel|๐ซ#two-hump camel|๐ฆ#giraffe|๐#elephant|๐ฆ#rhinoceros|๐ญ#mouse face|๐#mouse|๐#rat|๐น#hamster|๐ฐ#rabbit face|๐#rabbit|๐ฆ#hedgehog|๐ฆ#bat|๐ป#bear|๐จ#koala|๐ผ#panda|๐พ#paw prints|๐ฆ#turkey|๐#chicken|๐#rooster|๐ฃ#hatching chick|๐ค#baby chick|๐ฅ#front-facing baby chick|๐ฆ#bird|๐ง#penguin|๐ฆ
#eagle|๐ฆ#duck|๐ฆ#owl|๐ธ#frog|๐#crocodile|๐ข#turtle|๐ฆ#lizard|๐#snake|๐ฒ#dragon face|๐#dragon|๐ฆ#sauropod|๐ฆ#T-Rex|๐ณ#spouting whale|๐#whale|๐ฌ#dolphin|๐#fish|๐ #tropical fish|๐ก#blowfish|๐ฆ#shark|๐#octopus|๐#spiral shell|๐#snail|๐ฆ#butterfly|๐#bug|๐#ant|๐#honeybee|๐#lady beetle|๐ฆ#cricket|๐ฆ#scorpion|๐#bouquet|๐ธ#cherry blossom|๐ฎ#white flower|๐น#rose|๐ฅ#wilted flower|๐บ#hibiscus|๐ป#sunflower|๐ผ#blossom|๐ท#tulip|๐ฑ#seedling|๐ฒ#evergreen tree|๐ณ#deciduous tree|๐ด#palm tree|๐ต#cactus|๐พ#sheaf of rice|๐ฟ#herb|โ๏ธ#shamrock|๐#four leaf clover|๐#maple leaf|๐#fallen leaf|๐#leaf fluttering in wind", "๐#grapes|๐#melon|๐#watermelon|๐#tangerine|๐#lemon|๐#banana|๐#pineapple|๐#red apple|๐#green apple|๐#pear|๐#peach|๐#cherries|๐#strawberry|๐ฅ#kiwi fruit|๐
#tomato|๐ฅฅ#coconut|๐ฅ#avocado|๐#eggplant|๐ฅ#potato|๐ฅ#carrot|๐ฝ#ear of corn|๐ฅ#cucumber|๐ฅฆ#broccoli|๐#mushroom|๐ฅ#peanuts|๐ฐ#chestnut|๐#bread|๐ฅ#croissant|๐ฅ#baguette bread|๐ฅจ#pretzel|๐ฅ#pancakes|๐ง#cheese wedge|๐#meat on bone|๐#poultry leg|๐ฅฉ#cut of meat|๐ฅ#bacon|๐#hamburger|๐#french fries|๐#pizza|๐ญ#hot dog|๐ฅช#sandwich|๐ฎ#taco|๐ฏ#burrito|๐ฅ#stuffed flatbread|๐ฅ#egg|๐ณ#cooking|๐ฅ#shallow pan of food|๐ฒ#pot of food|๐ฅฃ#bowl with spoon|๐ฅ#green salad|๐ฟ#popcorn|๐ฅซ#canned food|๐ฑ#bento box|๐#rice cracker|๐#rice ball|๐#cooked rice|๐#curry rice|๐#steaming bowl|๐#spaghetti|๐ #roasted sweet potato|๐ข#oden|๐ฃ#sushi|๐ค#fried shrimp|๐ฅ#fish cake with swirl|๐ก#dango|๐ฅ#dumpling|๐ฅ #fortune cookie|๐ฅก#takeout box|๐ฆ#crab|๐ฆ#shrimp|๐ฆ#squid|๐ฆ#soft ice cream|๐ง#shaved ice|๐จ#ice cream|๐ฉ#doughnut|๐ช#cookie|๐#birthday cake|๐ฐ#shortcake|๐ฅง#pie|๐ซ#chocolate bar|๐ฌ#candy|๐ญ#lollipop|๐ฎ#custard|๐ฏ#honey pot|๐ผ#baby bottle|๐ฅ#glass of milk|โ#hot beverage|๐ต#teacup without handle|๐ถ#sake|๐พ#bottle with popping cork|๐ท#wine glass|๐ธ#cocktail glass|๐น#tropical drink|๐บ#beer mug|๐ป#clinking beer mugs|๐ฅ#clinking glasses|๐ฅ#tumbler glass|๐ฅค#cup with straw|๐ฅข#chopsticks|๐ด#fork and knife|๐ฅ#spoon|๐ช#kitchen knife|๐บ#amphora", "๐#globe showing Europe-Africa|๐#globe showing Americas|๐#globe showing Asia-Australia|๐#globe with meridians|๐พ#map of Japan|โฐ๏ธ#mountain|๐#volcano|๐ป#mount fuji|๐ #house|๐ก#house with garden|๐ข#office building|๐ฃ#Japanese post office|๐ค#post office|๐ฅ#hospital|๐ฆ#bank|๐จ#hotel|๐ฉ#love hotel|๐ช#convenience store|๐ซ#school|๐ฌ#department store|๐ญ#factory|๐ฏ#Japanese castle|๐ฐ#castle|๐#wedding|๐ผ#Tokyo tower|๐ฝ#Statue of Liberty|โช#church|๐#mosque|๐#synagogue|โฉ๏ธ#shinto shrine|๐#kaaba|โฒ#fountain|โบ#tent|๐#foggy|๐#night with stars|๐#sunrise over mountains|๐
#sunrise|๐#cityscape at dusk|๐#sunset|๐#bridge at night|โจ๏ธ#hot springs|๐ #carousel horse|๐ก#ferris wheel|๐ข#roller coaster|๐#barber pole|๐ช#circus tent|๐#locomotive|๐#railway car|๐#high-speed train|๐
#bullet train|๐#train|๐#metro|๐#light rail|๐#station|๐#tram|๐#monorail|๐#mountain railway|๐#tram car|๐#bus|๐#oncoming bus|๐#trolleybus|๐#minibus|๐#ambulance|๐#fire engine|๐#police car|๐#oncoming police car|๐#taxi|๐#oncoming taxi|๐#automobile|๐#oncoming automobile|๐#sport utility vehicle|๐#delivery truck|๐#articulated lorry|๐#tractor|๐ต#motor scooter|๐ฒ#bicycle|๐ด#kick scooter|๐#bus stop|โฝ#fuel pump|๐จ#police car light|๐ฅ#horizontal traffic light|๐ฆ#vertical traffic light|๐#stop sign|๐ง#construction|โ#anchor|โต#sailboat|๐ถ#canoe|๐ค#speedboat|โด๏ธ#ferry|๐ข#ship|โ๏ธ#airplane|๐ซ#airplane departure|๐ฌ#airplane arrival|๐บ#seat|๐#helicopter|๐#suspension railway|๐ #mountain cableway|๐ก#aerial tramway|๐#rocket|๐ธ#flying saucer|โ#hourglass done|โณ#hourglass not done|โ#watch|โฐ#alarm clock|โฑ๏ธ#stopwatch|โฒ๏ธ#timer clock|๐#twelve oโclock|๐ง#twelve-thirty|๐#one oโclock|๐#one-thirty|๐#two oโclock|๐#two-thirty|๐#three oโclock|๐#three-thirty|๐#four oโclock|๐#four-thirty|๐#five oโclock|๐ #five-thirty|๐#six oโclock|๐ก#six-thirty|๐#seven oโclock|๐ข#seven-thirty|๐#eight oโclock|๐ฃ#eight-thirty|๐#nine oโclock|๐ค#nine-thirty|๐#ten oโclock|๐ฅ#ten-thirty|๐#eleven oโclock|๐ฆ#eleven-thirty|๐#new moon|๐#waxing crescent moon|๐#first quarter moon|๐#waxing gibbous moon|๐#full moon|๐#waning gibbous moon|๐#last quarter moon|๐#waning crescent moon|๐#crescent moon|๐#new moon face|๐#first quarter moon face|๐#last quarter moon face|โ๏ธ#sun|๐#full moon face|๐#sun with face|โญ#star|๐#glowing star|๐ #shooting star|๐#milky way|โ๏ธ#cloud|โ
#sun behind cloud|โ๏ธ#cloud with lightning and rain|๐#cyclone|๐#rainbow|๐#closed umbrella|โ๏ธ#umbrella|โ#umbrella with rain drops|โฑ๏ธ#umbrella on ground|โก#high voltage|โ๏ธ#snowflake|โ๏ธ#snowman|โ#snowman without snow|โ๏ธ#comet|๐ฅ#fire|๐ง#droplet|๐#water wave", "๐#jack-o-lantern|๐#Christmas tree|๐#fireworks|๐#sparkler|โจ#sparkles|๐#balloon|๐#party popper|๐#confetti ball|๐#tanabata tree|๐#pine decoration|๐#Japanese dolls|๐#carp streamer|๐#wind chime|๐#moon viewing ceremony|๐#ribbon|๐#wrapped gift|๐ซ#ticket|๐#trophy|๐
#sports medal|๐ฅ#1st place medal|๐ฅ#2nd place medal|๐ฅ#3rd place medal|โฝ#soccer ball|โพ#baseball|๐#basketball|๐#volleyball|๐#american football|๐#rugby football|๐พ#tennis|๐ณ#bowling|๐#cricket game|๐#field hockey|๐#ice hockey|๐#ping pong|๐ธ#badminton|๐ฅ#boxing glove|๐ฅ#martial arts uniform|๐ฅ
#goal net|โณ#flag in hole|โธ๏ธ#ice skate|๐ฃ#fishing pole|๐ฝ#running shirt|๐ฟ#skis|๐ท#sled|๐ฅ#curling stone|๐ฏ#direct hit|๐ฑ#pool 8 ball|๐ฎ#crystal ball|๐ฎ#video game|๐ฐ#slot machine|๐ฒ#game die|โ ๏ธ#spade suit|โฅ๏ธ#heart suit|โฆ๏ธ#diamond suit|โฃ๏ธ#club suit|๐#joker|๐#mahjong red dragon|๐ด#flower playing cards|๐ญ#performing arts|๐จ#artist palette", "๐#glasses|๐#necktie|๐#t-shirt|๐#jeans|๐งฃ#scarf|๐งค#gloves|๐งฅ#coat|๐งฆ#socks|๐#dress|๐#kimono|๐#bikini|๐#womanโs clothes|๐#purse|๐#handbag|๐#clutch bag|๐#backpack|๐#manโs shoe|๐#running shoe|๐ #high-heeled shoe|๐ก#womanโs sandal|๐ข#womanโs boot|๐#crown|๐#womanโs hat|๐ฉ#top hat|๐#graduation cap|๐งข#billed cap|โ๏ธ#rescue workerโs helmet|๐ฟ#prayer beads|๐#lipstick|๐#ring|๐#gem stone|๐#muted speaker|๐#speaker low volume|๐#speaker medium volume|๐#speaker high volume|๐ข#loudspeaker|๐ฃ#megaphone|๐ฏ#postal horn|๐#bell|๐#bell with slash|๐ผ#musical score|๐ต#musical note|๐ถ#musical notes|๐ค#microphone|๐ง#headphone|๐ป#radio|๐ท#saxophone|๐ธ#guitar|๐น#musical keyboard|๐บ#trumpet|๐ป#violin|๐ฅ#drum|๐ฑ#mobile phone|๐ฒ#mobile phone with arrow|โ๏ธ#telephone|๐#telephone receiver|๐#pager|๐ #fax machine|๐#battery|๐#electric plug|๐ป#laptop|โจ๏ธ#keyboard|๐ฝ#computer disk|๐พ#floppy disk|๐ฟ#optical disk|๐#dvd|๐ฅ#movie camera|๐ฌ#clapper board|๐บ#television|๐ท#camera|๐ธ#camera with flash|๐น#video camera|๐ผ#videocassette|๐#magnifying glass tilted left|๐#magnifying glass tilted right|๐ก#light bulb|๐ฆ#flashlight|๐ฎ#red paper lantern|๐#notebook with decorative cover|๐#closed book|๐#open book|๐#green book|๐#blue book|๐#orange book|๐#books|๐#notebook|๐#ledger|๐#page with curl|๐#scroll|๐#page facing up|๐ฐ#newspaper|๐#bookmark tabs|๐#bookmark|๐ฐ#money bag|๐ด#yen banknote|๐ต#dollar banknote|๐ถ#euro banknote|๐ท#pound banknote|๐ธ#money with wings|๐ณ#credit card|๐น#chart increasing with yen|โ๏ธ#envelope|๐ง#e-mail|๐จ#incoming envelope|๐ฉ#envelope with arrow|๐ค#outbox tray|๐ฅ#inbox tray|๐ฆ#package|๐ซ#closed mailbox with raised flag|๐ช#closed mailbox with lowered flag|๐ฌ#open mailbox with raised flag|๐ญ#open mailbox with lowered flag|๐ฎ#postbox|โ๏ธ#pencil|โ๏ธ#black nib|๐#memo|๐ผ#briefcase|๐#file folder|๐#open file folder|๐
#calendar|๐#tear-off calendar|๐#card index|๐#chart increasing|๐#chart decreasing|๐#bar chart|๐#clipboard|๐#pushpin|๐#round pushpin|๐#paperclip|๐#straight ruler|๐#triangular ruler|โ๏ธ#scissors|๐#locked|๐#unlocked|๐#locked with pen|๐#locked with key|๐#key|๐จ#hammer|โ๏ธ#pick|โ๏ธ#hammer and pick|โ๏ธ#crossed swords|๐ซ#pistol|๐น#bow and arrow|๐ง#wrench|๐ฉ#nut and bolt|โ๏ธ#gear|โ๏ธ#balance scale|๐#link|โ๏ธ#chains|โ๏ธ#alembic|๐ฌ#microscope|๐ญ#telescope|๐ก#satellite antenna|๐#syringe|๐#pill|๐ช#door|๐ฝ#toilet|๐ฟ#shower|๐#bathtub|๐#shopping cart|๐ฌ#cigarette|โฐ๏ธ#coffin|โฑ๏ธ#funeral urn|๐ฟ#moai", "๐ง#ATM sign|๐ฎ#litter in bin sign|๐ฐ#potable water|โฟ#wheelchair symbol|๐น#menโs room|๐บ#womenโs room|๐ป#restroom|๐ผ#baby symbol|๐พ#water closet|๐#passport control|๐#customs|๐#baggage claim|๐
#left luggage|โ ๏ธ#warning|๐ธ#children crossing|โ#no entry|๐ซ#prohibited|๐ณ#no bicycles|๐ญ#no smoking|๐ฏ#no littering|๐ฑ#non-potable water|๐ท#no pedestrians|๐ต#no mobile phones|๐#no one under eighteen|โข๏ธ#radioactive|โฃ๏ธ#biohazard|โฌ๏ธ#up arrow|โ๏ธ#up-right arrow|โก๏ธ#right arrow|โ๏ธ#down-right arrow|โฌ๏ธ#down arrow|โ๏ธ#down-left arrow|โฌ
๏ธ#left arrow|โ๏ธ#up-left arrow|โ๏ธ#up-down arrow|โ๏ธ#left-right arrow|โฉ๏ธ#right arrow curving left|โช๏ธ#left arrow curving right|โคด๏ธ#right arrow curving up|โคต๏ธ#right arrow curving down|๐#clockwise vertical arrows|๐#counterclockwise arrows button|๐#BACK arrow|๐#END arrow|๐#ON! arrow|๐#SOON arrow|๐#TOP arrow|๐#place of worship|โ๏ธ#atom symbol|โก๏ธ#star of David|โธ๏ธ#wheel of dharma|โฏ๏ธ#yin yang|โ๏ธ#latin cross|โฆ๏ธ#orthodox cross|โช๏ธ#star and crescent|โฎ๏ธ#peace symbol|๐#menorah|๐ฏ#dotted six-pointed star|โ#Aries|โ#Taurus|โ#Gemini|โ#Cancer|โ#Leo|โ#Virgo|โ#Libra|โ#Scorpio|โ#Sagittarius|โ#Capricorn|โ#Aquarius|โ#Pisces|โ#Ophiuchus|๐#shuffle tracks button|๐#repeat button|๐#repeat single button|โถ๏ธ#play button|โฉ#fast-forward button|โญ๏ธ#next track button|โฏ๏ธ#play or pause button|โ๏ธ#reverse button|โช#fast reverse button|โฎ๏ธ#last track button|๐ผ#upwards button|โซ#fast up button|๐ฝ#downwards button|โฌ#fast down button|โธ๏ธ#pause button|โน๏ธ#stop button|โบ๏ธ#record button|โ๏ธ#eject button|๐ฆ#cinema|๐
#dim button|๐#bright button|๐ถ#antenna bars|๐ณ#vibration mode|๐ด#mobile phone off|โ๏ธ#female sign|โ๏ธ#male sign|โ๏ธ#multiply|โ#plus|โ#minus|โ#divide|โผ๏ธ#double exclamation mark|โ๏ธ#exclamation question mark|โ#question mark|โ#white question mark|โ#white exclamation mark|โ#exclamation mark|ใฐ๏ธ#wavy dash|๐ฑ#currency exchange|๐ฒ#heavy dollar sign|โ๏ธ#medical symbol|โป๏ธ#recycling symbol|โ๏ธ#fleur-de-lis|๐ฑ#trident emblem|๐#name badge|๐ฐ#Japanese symbol for beginner|โญ#hollow red circle|โ
#check mark button|โ๏ธ#check box with check|โ๏ธ#check mark|โ#cross mark|โ#cross mark button|โฐ#curly loop|โฟ#double curly loop|ใฝ๏ธ#part alternation mark|โณ๏ธ#eight-spoked asterisk|โด๏ธ#eight-pointed star|โ๏ธ#sparkle|ยฉ๏ธ#copyright|ยฎ๏ธ#registered|โข๏ธ#trade mark|๐#keycap: 10|๐ #input latin uppercase|๐ก#input latin lowercase|๐ข#input numbers|๐ฃ#input symbols|๐ค#input latin letters|๐#AB button (blood type)|๐#CL button|๐#COOL button|๐#FREE button|โน๏ธ#information|๐#ID button|โ๏ธ#circled M|๐#NEW button|๐#NG button|๐#OK button|๐#SOS button|๐#UP! button|๐#VS button|๐#Japanese โhereโ button|๐ถ#Japanese โnot free of chargeโ button|๐ฏ#Japanese โreservedโ button|๐#Japanese โbargainโ button|๐น#Japanese โdiscountโ button|๐#Japanese โfree of chargeโ button|๐ฒ#Japanese โprohibitedโ button|๐#Japanese โacceptableโ button|๐ธ#Japanese โapplicationโ button|๐ด#Japanese โpassing gradeโ button|๐ณ#Japanese โvacancyโ button|ใ๏ธ#Japanese โcongratulationsโ button|ใ๏ธ#Japanese โsecretโ button|๐บ#Japanese โopen for businessโ button|๐ต#Japanese โno vacancyโ button|๐ด#red circle|๐ต#blue circle|โซ#black circle|โช#white circle|โฌ#black large square|โฌ#white large square|โผ๏ธ#black medium square|โป๏ธ#white medium square|โพ#black medium-small square|โฝ#white medium-small square|โช๏ธ#black small square|โซ๏ธ#white small square|๐ถ#large orange diamond|๐ท#large blue diamond|๐ธ#small orange diamond|๐น#small blue diamond|๐บ#red triangle pointed up|๐ป#red triangle pointed down|๐ #diamond with a dot|๐#radio button|๐ณ#white square button|๐ฒ#black square button"]
|
|
29
|
-
var emojidata = null;
|
|
30
|
-
|
|
31
|
-
function MakeEmojiData() {
|
|
32
|
-
if (emojidata)
|
|
33
|
-
return;
|
|
34
|
-
emojidata = [];
|
|
35
|
-
for (var groupindex = 0; groupindex < groupnames.length; groupindex++) {
|
|
36
|
-
var emojiitems = [];
|
|
37
|
-
var emojigroup = { index: groupindex, name: groupnames[groupindex], items: emojiitems };
|
|
38
|
-
var emojiarr = emojistrs[groupindex].split('|');
|
|
39
|
-
for (var ei = 0; ei < emojiarr.length; ei++) {
|
|
40
|
-
var emojistr = emojiarr[ei];
|
|
41
|
-
var pair = emojistr.split('#')
|
|
42
|
-
emojiitems.push({ emoji: pair[0], keyword: pair[1] });
|
|
43
|
-
}
|
|
44
|
-
emojidata.push(emojigroup);
|
|
45
|
-
}
|
|
46
|
-
//console.log(emojidata);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
var obj = this;
|
|
50
|
-
|
|
51
|
-
var config, editor;
|
|
52
|
-
|
|
53
|
-
obj.PluginName = "InsertEmoji";
|
|
54
|
-
|
|
55
|
-
obj.InitConfig = function (argconfig) {
|
|
56
|
-
config = argconfig;
|
|
57
|
-
}
|
|
58
|
-
obj.InitEditor = function (argeditor) {
|
|
59
|
-
editor = argeditor;
|
|
60
|
-
|
|
61
|
-
editor.toolbarFactoryMap["insertemoji"] = function (cmd) {
|
|
62
|
-
return editor.createToolbarItemDropDownPanel(cmd, function (panel) {
|
|
63
|
-
|
|
64
|
-
MakeEmojiData()
|
|
65
|
-
|
|
66
|
-
panel.style.width = "360px";
|
|
67
|
-
panel.style.height = "420px";
|
|
68
|
-
panel.style.display = "flex";
|
|
69
|
-
panel.style.flexDirection = "column";
|
|
70
|
-
|
|
71
|
-
panel.onclick = function (e) {
|
|
72
|
-
if (e.target.nodeName == "GSPAN") {
|
|
73
|
-
editor.closeCurrentPopup();
|
|
74
|
-
var htmlcode = e.target.getAttribute("htmlcode");
|
|
75
|
-
editor.insertHTML(htmlcode);
|
|
76
|
-
editor.collapse(false);
|
|
77
|
-
editor.focus();
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
var
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
1
|
+
|
|
2
|
+
RTE_DefaultConfig.plugin_insertemoji = RTE_Plugin_InsertEmoji;
|
|
3
|
+
|
|
4
|
+
function RTE_Plugin_InsertEmoji() {
|
|
5
|
+
|
|
6
|
+
function CharToHTMLCode(ch) {
|
|
7
|
+
if (ch.length > 2)
|
|
8
|
+
return ch;
|
|
9
|
+
|
|
10
|
+
if (ch.length == 1 || ch.charCodeAt(1) == 0xfe0f)
|
|
11
|
+
return "&#" + ch.charCodeAt(0) + ";"
|
|
12
|
+
|
|
13
|
+
if (ch.charCodeAt(1) == 0xfe0f) {
|
|
14
|
+
return "&#" + ch.charCodeAt(0) + ";"
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
var offset = ch.charCodeAt(0) - 0xd83c;
|
|
18
|
+
if (offset < 0 && offset > 3)//not support
|
|
19
|
+
return ch;
|
|
20
|
+
|
|
21
|
+
var second = ch.charCodeAt(1) - 0xdc04;
|
|
22
|
+
var f = offset * 0x400 + second + 0x1f004;
|
|
23
|
+
return "&#x" + f.toString(16) + ";"
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
var groupnames = ["smileys", "people", "animals", "food", "travel", "activities", "objects", "symbols"]
|
|
28
|
+
var emojistrs = ["๐#grinning face|๐#grinning face with big eyes|๐#grinning face with smiling eyes|๐#beaming face with smiling eyes|๐#grinning squinting face|๐
#grinning face with sweat|๐คฃ#rolling on the floor laughing|๐#face with tears of joy|๐#slightly smiling face|๐#upside-down face|๐#winking face|๐#smiling face with smiling eyes|๐#smiling face with halo|๐#smiling face with heart-eyes|๐คฉ#star-struck|๐#face blowing a kiss|๐#kissing face|๐#kissing face with closed eyes|๐#kissing face with smiling eyes|๐#face savoring food|๐#face with tongue|๐#winking face with tongue|๐คช#zany face|๐#squinting face with tongue|๐ค#money-mouth face|๐ค#hugging face|๐คญ#face with hand over mouth|๐คซ#shushing face|๐ค#thinking face|๐ค#zipper-mouth face|๐คจ#face with raised eyebrow|๐#neutral face|๐#expressionless face|๐ถ#face without mouth|๐#smirking face|๐#unamused face|๐#face with rolling eyes|๐ฌ#grimacing face|๐คฅ#lying face|๐#relieved face|๐#pensive face|๐ช#sleepy face|๐คค#drooling face|๐ด#sleeping face|๐ท#face with medical mask|๐ค#face with thermometer|๐ค#face with head-bandage|๐คข#nauseated face|๐คฎ#face vomiting|๐คง#sneezing face|๐ต#dizzy face|๐คฏ#exploding head|๐ค #cowboy hat face|๐#smiling face with sunglasses|๐ค#nerd face|๐ง#face with monocle|๐#confused face|๐#worried face|๐#slightly frowning face|โน๏ธ#frowning face|๐ฎ#face with open mouth|๐ฏ#hushed face|๐ฒ#astonished face|๐ณ#flushed face|๐ฆ#frowning face with open mouth|๐ง#anguished face|๐จ#fearful face|๐ฐ#anxious face with sweat|๐ฅ#sad but relieved face|๐ข#crying face|๐ญ#loudly crying face|๐ฑ#face screaming in fear|๐#confounded face|๐ฃ#persevering face|๐#disappointed face|๐#downcast face with sweat|๐ฉ#weary face|๐ซ#tired face|๐ค#face with steam from nose|๐ก#pouting face|๐ #angry face|๐คฌ#face with symbols on mouth|๐#smiling face with horns|๐ฟ#angry face with horns|๐#skull|โ ๏ธ#skull and crossbones|๐ฉ#pile of poo|๐คก#clown face|๐น#ogre|๐บ#goblin|๐ป#ghost|๐ฝ#alien|๐พ#alien monster|๐ค#robot|๐บ#grinning cat|๐ธ#grinning cat with smiling eyes|๐น#cat with tears of joy|๐ป#smiling cat with heart-eyes|๐ผ#cat with wry smile|๐ฝ#kissing cat|๐#weary cat|๐ฟ#crying cat|๐พ#pouting cat|๐#see-no-evil monkey|๐#hear-no-evil monkey|๐#speak-no-evil monkey|๐#kiss mark|๐#love letter|๐#heart with arrow|๐#heart with ribbon|๐#sparkling heart|๐#growing heart|๐#beating heart|๐#revolving hearts|๐#two hearts|๐#heart decoration|โฃ๏ธ#heart exclamation|๐#broken heart|โค๏ธ#red heart|๐งก#orange heart|๐#yellow heart|๐#green heart|๐#blue heart|๐#purple heart|๐ค#black heart|๐ฏ#hundred points|๐ข#anger symbol|๐ฅ#collision|๐ซ#dizzy|๐ฆ#sweat droplets|๐จ#dashing away|๐ฃ#bomb|๐ฌ#speech balloon|๐ญ#thought balloon|๐ค#zzz", "๐#waving hand|๐ค#raised back of hand|โ#raised hand|๐#vulcan salute|๐#OK hand|โ๏ธ#victory hand|๐ค#crossed fingers|๐ค#love-you gesture|๐ค#sign of the horns|๐ค#call me hand|๐#backhand index pointing left|๐#backhand index pointing right|๐#backhand index pointing up|๐#middle finger|๐#backhand index pointing down|โ๏ธ#index pointing up|๐#thumbs up|๐#thumbs down|โ#raised fist|๐#oncoming fist|๐ค#left-facing fist|๐ค#right-facing fist|๐#clapping hands|๐#raising hands|๐#open hands|๐คฒ#palms up together|๐ค#handshake|๐#folded hands|โ๏ธ#writing hand|๐
#nail polish|๐คณ#selfie|๐ช#flexed biceps|๐#ear|๐#nose|๐ง #brain|๐#eyes|๐
#tongue|๐#mouth|๐ถ#baby|๐ง#child|๐ฆ#boy|๐ง#girl|๐ง#person|๐ฑ#person with blond hair|๐จ#man|๐ง#man with beard|๐ฉ#woman|๐ง#older person|๐ด#old man|๐ต#old woman|๐#person frowning|๐#person pouting|๐
#person gesturing NO|๐#person gesturing OK|๐#person tipping hand|๐#person raising hand|๐#person bowing|๐คฆ#person facepalming|๐คท#person shrugging|๐ฎ#police officer|๐#guard|๐ท#construction worker|๐คด#prince|๐ธ#princess|๐ณ#person wearing turban|๐ฒ#person with skullcap|๐ง#woman with headscarf|๐คต#person in tuxedo|๐ฐ#person with veil|๐คฐ#pregnant woman|๐คฑ#breast-feeding|๐ผ#baby angel|๐
#Santa Claus|๐คถ#Mrs. Claus|๐ง#mage|๐ง#fairy|๐ง#vampire|๐ง#merperson|๐ง#elf|๐ง#genie|๐ง#zombie|๐#person getting massage|๐#person getting haircut|๐ถ#person walking|๐#person running|๐#woman dancing|๐บ#man dancing|๐ฏ#people with bunny ears|๐ง#person in steamy room|๐ง#person climbing|๐คบ#person fencing|๐#horse racing|โท๏ธ#skier|๐#snowboarder|๐#person surfing|๐ฃ#person rowing boat|๐#person swimming|โน๏ธ#person bouncing ball|๐ด#person biking|๐ต#person mountain biking|๐คธ#person cartwheeling|๐คผ#people wrestling|๐คฝ#person playing water polo|๐คพ#person playing handball|๐คน#person juggling|๐ง#person in lotus position|๐#person taking bath|๐#person in bed|๐ญ#women holding hands|๐ซ#woman and man holding hands|๐ฌ#men holding hands|๐#kiss|๐#couple with heart|๐ช#family|๐ค#bust in silhouette|๐ฅ#busts in silhouette|๐ฃ#footprints", "๐ต#monkey face|๐#monkey|๐ฆ#gorilla|๐ถ#dog face|๐#dog|๐ฉ#poodle|๐บ#wolf|๐ฆ#fox|๐ฑ#cat face|๐#cat|๐ฆ#lion|๐ฏ#tiger face|๐
#tiger|๐#leopard|๐ด#horse face|๐#horse|๐ฆ#unicorn|๐ฆ#zebra|๐ฆ#deer|๐ฎ#cow face|๐#ox|๐#water buffalo|๐#cow|๐ท#pig face|๐#pig|๐#boar|๐ฝ#pig nose|๐#ram|๐#ewe|๐#goat|๐ช#camel|๐ซ#two-hump camel|๐ฆ#giraffe|๐#elephant|๐ฆ#rhinoceros|๐ญ#mouse face|๐#mouse|๐#rat|๐น#hamster|๐ฐ#rabbit face|๐#rabbit|๐ฆ#hedgehog|๐ฆ#bat|๐ป#bear|๐จ#koala|๐ผ#panda|๐พ#paw prints|๐ฆ#turkey|๐#chicken|๐#rooster|๐ฃ#hatching chick|๐ค#baby chick|๐ฅ#front-facing baby chick|๐ฆ#bird|๐ง#penguin|๐ฆ
#eagle|๐ฆ#duck|๐ฆ#owl|๐ธ#frog|๐#crocodile|๐ข#turtle|๐ฆ#lizard|๐#snake|๐ฒ#dragon face|๐#dragon|๐ฆ#sauropod|๐ฆ#T-Rex|๐ณ#spouting whale|๐#whale|๐ฌ#dolphin|๐#fish|๐ #tropical fish|๐ก#blowfish|๐ฆ#shark|๐#octopus|๐#spiral shell|๐#snail|๐ฆ#butterfly|๐#bug|๐#ant|๐#honeybee|๐#lady beetle|๐ฆ#cricket|๐ฆ#scorpion|๐#bouquet|๐ธ#cherry blossom|๐ฎ#white flower|๐น#rose|๐ฅ#wilted flower|๐บ#hibiscus|๐ป#sunflower|๐ผ#blossom|๐ท#tulip|๐ฑ#seedling|๐ฒ#evergreen tree|๐ณ#deciduous tree|๐ด#palm tree|๐ต#cactus|๐พ#sheaf of rice|๐ฟ#herb|โ๏ธ#shamrock|๐#four leaf clover|๐#maple leaf|๐#fallen leaf|๐#leaf fluttering in wind", "๐#grapes|๐#melon|๐#watermelon|๐#tangerine|๐#lemon|๐#banana|๐#pineapple|๐#red apple|๐#green apple|๐#pear|๐#peach|๐#cherries|๐#strawberry|๐ฅ#kiwi fruit|๐
#tomato|๐ฅฅ#coconut|๐ฅ#avocado|๐#eggplant|๐ฅ#potato|๐ฅ#carrot|๐ฝ#ear of corn|๐ฅ#cucumber|๐ฅฆ#broccoli|๐#mushroom|๐ฅ#peanuts|๐ฐ#chestnut|๐#bread|๐ฅ#croissant|๐ฅ#baguette bread|๐ฅจ#pretzel|๐ฅ#pancakes|๐ง#cheese wedge|๐#meat on bone|๐#poultry leg|๐ฅฉ#cut of meat|๐ฅ#bacon|๐#hamburger|๐#french fries|๐#pizza|๐ญ#hot dog|๐ฅช#sandwich|๐ฎ#taco|๐ฏ#burrito|๐ฅ#stuffed flatbread|๐ฅ#egg|๐ณ#cooking|๐ฅ#shallow pan of food|๐ฒ#pot of food|๐ฅฃ#bowl with spoon|๐ฅ#green salad|๐ฟ#popcorn|๐ฅซ#canned food|๐ฑ#bento box|๐#rice cracker|๐#rice ball|๐#cooked rice|๐#curry rice|๐#steaming bowl|๐#spaghetti|๐ #roasted sweet potato|๐ข#oden|๐ฃ#sushi|๐ค#fried shrimp|๐ฅ#fish cake with swirl|๐ก#dango|๐ฅ#dumpling|๐ฅ #fortune cookie|๐ฅก#takeout box|๐ฆ#crab|๐ฆ#shrimp|๐ฆ#squid|๐ฆ#soft ice cream|๐ง#shaved ice|๐จ#ice cream|๐ฉ#doughnut|๐ช#cookie|๐#birthday cake|๐ฐ#shortcake|๐ฅง#pie|๐ซ#chocolate bar|๐ฌ#candy|๐ญ#lollipop|๐ฎ#custard|๐ฏ#honey pot|๐ผ#baby bottle|๐ฅ#glass of milk|โ#hot beverage|๐ต#teacup without handle|๐ถ#sake|๐พ#bottle with popping cork|๐ท#wine glass|๐ธ#cocktail glass|๐น#tropical drink|๐บ#beer mug|๐ป#clinking beer mugs|๐ฅ#clinking glasses|๐ฅ#tumbler glass|๐ฅค#cup with straw|๐ฅข#chopsticks|๐ด#fork and knife|๐ฅ#spoon|๐ช#kitchen knife|๐บ#amphora", "๐#globe showing Europe-Africa|๐#globe showing Americas|๐#globe showing Asia-Australia|๐#globe with meridians|๐พ#map of Japan|โฐ๏ธ#mountain|๐#volcano|๐ป#mount fuji|๐ #house|๐ก#house with garden|๐ข#office building|๐ฃ#Japanese post office|๐ค#post office|๐ฅ#hospital|๐ฆ#bank|๐จ#hotel|๐ฉ#love hotel|๐ช#convenience store|๐ซ#school|๐ฌ#department store|๐ญ#factory|๐ฏ#Japanese castle|๐ฐ#castle|๐#wedding|๐ผ#Tokyo tower|๐ฝ#Statue of Liberty|โช#church|๐#mosque|๐#synagogue|โฉ๏ธ#shinto shrine|๐#kaaba|โฒ#fountain|โบ#tent|๐#foggy|๐#night with stars|๐#sunrise over mountains|๐
#sunrise|๐#cityscape at dusk|๐#sunset|๐#bridge at night|โจ๏ธ#hot springs|๐ #carousel horse|๐ก#ferris wheel|๐ข#roller coaster|๐#barber pole|๐ช#circus tent|๐#locomotive|๐#railway car|๐#high-speed train|๐
#bullet train|๐#train|๐#metro|๐#light rail|๐#station|๐#tram|๐#monorail|๐#mountain railway|๐#tram car|๐#bus|๐#oncoming bus|๐#trolleybus|๐#minibus|๐#ambulance|๐#fire engine|๐#police car|๐#oncoming police car|๐#taxi|๐#oncoming taxi|๐#automobile|๐#oncoming automobile|๐#sport utility vehicle|๐#delivery truck|๐#articulated lorry|๐#tractor|๐ต#motor scooter|๐ฒ#bicycle|๐ด#kick scooter|๐#bus stop|โฝ#fuel pump|๐จ#police car light|๐ฅ#horizontal traffic light|๐ฆ#vertical traffic light|๐#stop sign|๐ง#construction|โ#anchor|โต#sailboat|๐ถ#canoe|๐ค#speedboat|โด๏ธ#ferry|๐ข#ship|โ๏ธ#airplane|๐ซ#airplane departure|๐ฌ#airplane arrival|๐บ#seat|๐#helicopter|๐#suspension railway|๐ #mountain cableway|๐ก#aerial tramway|๐#rocket|๐ธ#flying saucer|โ#hourglass done|โณ#hourglass not done|โ#watch|โฐ#alarm clock|โฑ๏ธ#stopwatch|โฒ๏ธ#timer clock|๐#twelve oโclock|๐ง#twelve-thirty|๐#one oโclock|๐#one-thirty|๐#two oโclock|๐#two-thirty|๐#three oโclock|๐#three-thirty|๐#four oโclock|๐#four-thirty|๐#five oโclock|๐ #five-thirty|๐#six oโclock|๐ก#six-thirty|๐#seven oโclock|๐ข#seven-thirty|๐#eight oโclock|๐ฃ#eight-thirty|๐#nine oโclock|๐ค#nine-thirty|๐#ten oโclock|๐ฅ#ten-thirty|๐#eleven oโclock|๐ฆ#eleven-thirty|๐#new moon|๐#waxing crescent moon|๐#first quarter moon|๐#waxing gibbous moon|๐#full moon|๐#waning gibbous moon|๐#last quarter moon|๐#waning crescent moon|๐#crescent moon|๐#new moon face|๐#first quarter moon face|๐#last quarter moon face|โ๏ธ#sun|๐#full moon face|๐#sun with face|โญ#star|๐#glowing star|๐ #shooting star|๐#milky way|โ๏ธ#cloud|โ
#sun behind cloud|โ๏ธ#cloud with lightning and rain|๐#cyclone|๐#rainbow|๐#closed umbrella|โ๏ธ#umbrella|โ#umbrella with rain drops|โฑ๏ธ#umbrella on ground|โก#high voltage|โ๏ธ#snowflake|โ๏ธ#snowman|โ#snowman without snow|โ๏ธ#comet|๐ฅ#fire|๐ง#droplet|๐#water wave", "๐#jack-o-lantern|๐#Christmas tree|๐#fireworks|๐#sparkler|โจ#sparkles|๐#balloon|๐#party popper|๐#confetti ball|๐#tanabata tree|๐#pine decoration|๐#Japanese dolls|๐#carp streamer|๐#wind chime|๐#moon viewing ceremony|๐#ribbon|๐#wrapped gift|๐ซ#ticket|๐#trophy|๐
#sports medal|๐ฅ#1st place medal|๐ฅ#2nd place medal|๐ฅ#3rd place medal|โฝ#soccer ball|โพ#baseball|๐#basketball|๐#volleyball|๐#american football|๐#rugby football|๐พ#tennis|๐ณ#bowling|๐#cricket game|๐#field hockey|๐#ice hockey|๐#ping pong|๐ธ#badminton|๐ฅ#boxing glove|๐ฅ#martial arts uniform|๐ฅ
#goal net|โณ#flag in hole|โธ๏ธ#ice skate|๐ฃ#fishing pole|๐ฝ#running shirt|๐ฟ#skis|๐ท#sled|๐ฅ#curling stone|๐ฏ#direct hit|๐ฑ#pool 8 ball|๐ฎ#crystal ball|๐ฎ#video game|๐ฐ#slot machine|๐ฒ#game die|โ ๏ธ#spade suit|โฅ๏ธ#heart suit|โฆ๏ธ#diamond suit|โฃ๏ธ#club suit|๐#joker|๐#mahjong red dragon|๐ด#flower playing cards|๐ญ#performing arts|๐จ#artist palette", "๐#glasses|๐#necktie|๐#t-shirt|๐#jeans|๐งฃ#scarf|๐งค#gloves|๐งฅ#coat|๐งฆ#socks|๐#dress|๐#kimono|๐#bikini|๐#womanโs clothes|๐#purse|๐#handbag|๐#clutch bag|๐#backpack|๐#manโs shoe|๐#running shoe|๐ #high-heeled shoe|๐ก#womanโs sandal|๐ข#womanโs boot|๐#crown|๐#womanโs hat|๐ฉ#top hat|๐#graduation cap|๐งข#billed cap|โ๏ธ#rescue workerโs helmet|๐ฟ#prayer beads|๐#lipstick|๐#ring|๐#gem stone|๐#muted speaker|๐#speaker low volume|๐#speaker medium volume|๐#speaker high volume|๐ข#loudspeaker|๐ฃ#megaphone|๐ฏ#postal horn|๐#bell|๐#bell with slash|๐ผ#musical score|๐ต#musical note|๐ถ#musical notes|๐ค#microphone|๐ง#headphone|๐ป#radio|๐ท#saxophone|๐ธ#guitar|๐น#musical keyboard|๐บ#trumpet|๐ป#violin|๐ฅ#drum|๐ฑ#mobile phone|๐ฒ#mobile phone with arrow|โ๏ธ#telephone|๐#telephone receiver|๐#pager|๐ #fax machine|๐#battery|๐#electric plug|๐ป#laptop|โจ๏ธ#keyboard|๐ฝ#computer disk|๐พ#floppy disk|๐ฟ#optical disk|๐#dvd|๐ฅ#movie camera|๐ฌ#clapper board|๐บ#television|๐ท#camera|๐ธ#camera with flash|๐น#video camera|๐ผ#videocassette|๐#magnifying glass tilted left|๐#magnifying glass tilted right|๐ก#light bulb|๐ฆ#flashlight|๐ฎ#red paper lantern|๐#notebook with decorative cover|๐#closed book|๐#open book|๐#green book|๐#blue book|๐#orange book|๐#books|๐#notebook|๐#ledger|๐#page with curl|๐#scroll|๐#page facing up|๐ฐ#newspaper|๐#bookmark tabs|๐#bookmark|๐ฐ#money bag|๐ด#yen banknote|๐ต#dollar banknote|๐ถ#euro banknote|๐ท#pound banknote|๐ธ#money with wings|๐ณ#credit card|๐น#chart increasing with yen|โ๏ธ#envelope|๐ง#e-mail|๐จ#incoming envelope|๐ฉ#envelope with arrow|๐ค#outbox tray|๐ฅ#inbox tray|๐ฆ#package|๐ซ#closed mailbox with raised flag|๐ช#closed mailbox with lowered flag|๐ฌ#open mailbox with raised flag|๐ญ#open mailbox with lowered flag|๐ฎ#postbox|โ๏ธ#pencil|โ๏ธ#black nib|๐#memo|๐ผ#briefcase|๐#file folder|๐#open file folder|๐
#calendar|๐#tear-off calendar|๐#card index|๐#chart increasing|๐#chart decreasing|๐#bar chart|๐#clipboard|๐#pushpin|๐#round pushpin|๐#paperclip|๐#straight ruler|๐#triangular ruler|โ๏ธ#scissors|๐#locked|๐#unlocked|๐#locked with pen|๐#locked with key|๐#key|๐จ#hammer|โ๏ธ#pick|โ๏ธ#hammer and pick|โ๏ธ#crossed swords|๐ซ#pistol|๐น#bow and arrow|๐ง#wrench|๐ฉ#nut and bolt|โ๏ธ#gear|โ๏ธ#balance scale|๐#link|โ๏ธ#chains|โ๏ธ#alembic|๐ฌ#microscope|๐ญ#telescope|๐ก#satellite antenna|๐#syringe|๐#pill|๐ช#door|๐ฝ#toilet|๐ฟ#shower|๐#bathtub|๐#shopping cart|๐ฌ#cigarette|โฐ๏ธ#coffin|โฑ๏ธ#funeral urn|๐ฟ#moai", "๐ง#ATM sign|๐ฎ#litter in bin sign|๐ฐ#potable water|โฟ#wheelchair symbol|๐น#menโs room|๐บ#womenโs room|๐ป#restroom|๐ผ#baby symbol|๐พ#water closet|๐#passport control|๐#customs|๐#baggage claim|๐
#left luggage|โ ๏ธ#warning|๐ธ#children crossing|โ#no entry|๐ซ#prohibited|๐ณ#no bicycles|๐ญ#no smoking|๐ฏ#no littering|๐ฑ#non-potable water|๐ท#no pedestrians|๐ต#no mobile phones|๐#no one under eighteen|โข๏ธ#radioactive|โฃ๏ธ#biohazard|โฌ๏ธ#up arrow|โ๏ธ#up-right arrow|โก๏ธ#right arrow|โ๏ธ#down-right arrow|โฌ๏ธ#down arrow|โ๏ธ#down-left arrow|โฌ
๏ธ#left arrow|โ๏ธ#up-left arrow|โ๏ธ#up-down arrow|โ๏ธ#left-right arrow|โฉ๏ธ#right arrow curving left|โช๏ธ#left arrow curving right|โคด๏ธ#right arrow curving up|โคต๏ธ#right arrow curving down|๐#clockwise vertical arrows|๐#counterclockwise arrows button|๐#BACK arrow|๐#END arrow|๐#ON! arrow|๐#SOON arrow|๐#TOP arrow|๐#place of worship|โ๏ธ#atom symbol|โก๏ธ#star of David|โธ๏ธ#wheel of dharma|โฏ๏ธ#yin yang|โ๏ธ#latin cross|โฆ๏ธ#orthodox cross|โช๏ธ#star and crescent|โฎ๏ธ#peace symbol|๐#menorah|๐ฏ#dotted six-pointed star|โ#Aries|โ#Taurus|โ#Gemini|โ#Cancer|โ#Leo|โ#Virgo|โ#Libra|โ#Scorpio|โ#Sagittarius|โ#Capricorn|โ#Aquarius|โ#Pisces|โ#Ophiuchus|๐#shuffle tracks button|๐#repeat button|๐#repeat single button|โถ๏ธ#play button|โฉ#fast-forward button|โญ๏ธ#next track button|โฏ๏ธ#play or pause button|โ๏ธ#reverse button|โช#fast reverse button|โฎ๏ธ#last track button|๐ผ#upwards button|โซ#fast up button|๐ฝ#downwards button|โฌ#fast down button|โธ๏ธ#pause button|โน๏ธ#stop button|โบ๏ธ#record button|โ๏ธ#eject button|๐ฆ#cinema|๐
#dim button|๐#bright button|๐ถ#antenna bars|๐ณ#vibration mode|๐ด#mobile phone off|โ๏ธ#female sign|โ๏ธ#male sign|โ๏ธ#multiply|โ#plus|โ#minus|โ#divide|โผ๏ธ#double exclamation mark|โ๏ธ#exclamation question mark|โ#question mark|โ#white question mark|โ#white exclamation mark|โ#exclamation mark|ใฐ๏ธ#wavy dash|๐ฑ#currency exchange|๐ฒ#heavy dollar sign|โ๏ธ#medical symbol|โป๏ธ#recycling symbol|โ๏ธ#fleur-de-lis|๐ฑ#trident emblem|๐#name badge|๐ฐ#Japanese symbol for beginner|โญ#hollow red circle|โ
#check mark button|โ๏ธ#check box with check|โ๏ธ#check mark|โ#cross mark|โ#cross mark button|โฐ#curly loop|โฟ#double curly loop|ใฝ๏ธ#part alternation mark|โณ๏ธ#eight-spoked asterisk|โด๏ธ#eight-pointed star|โ๏ธ#sparkle|ยฉ๏ธ#copyright|ยฎ๏ธ#registered|โข๏ธ#trade mark|๐#keycap: 10|๐ #input latin uppercase|๐ก#input latin lowercase|๐ข#input numbers|๐ฃ#input symbols|๐ค#input latin letters|๐#AB button (blood type)|๐#CL button|๐#COOL button|๐#FREE button|โน๏ธ#information|๐#ID button|โ๏ธ#circled M|๐#NEW button|๐#NG button|๐#OK button|๐#SOS button|๐#UP! button|๐#VS button|๐#Japanese โhereโ button|๐ถ#Japanese โnot free of chargeโ button|๐ฏ#Japanese โreservedโ button|๐#Japanese โbargainโ button|๐น#Japanese โdiscountโ button|๐#Japanese โfree of chargeโ button|๐ฒ#Japanese โprohibitedโ button|๐#Japanese โacceptableโ button|๐ธ#Japanese โapplicationโ button|๐ด#Japanese โpassing gradeโ button|๐ณ#Japanese โvacancyโ button|ใ๏ธ#Japanese โcongratulationsโ button|ใ๏ธ#Japanese โsecretโ button|๐บ#Japanese โopen for businessโ button|๐ต#Japanese โno vacancyโ button|๐ด#red circle|๐ต#blue circle|โซ#black circle|โช#white circle|โฌ#black large square|โฌ#white large square|โผ๏ธ#black medium square|โป๏ธ#white medium square|โพ#black medium-small square|โฝ#white medium-small square|โช๏ธ#black small square|โซ๏ธ#white small square|๐ถ#large orange diamond|๐ท#large blue diamond|๐ธ#small orange diamond|๐น#small blue diamond|๐บ#red triangle pointed up|๐ป#red triangle pointed down|๐ #diamond with a dot|๐#radio button|๐ณ#white square button|๐ฒ#black square button"]
|
|
29
|
+
var emojidata = null;
|
|
30
|
+
|
|
31
|
+
function MakeEmojiData() {
|
|
32
|
+
if (emojidata)
|
|
33
|
+
return;
|
|
34
|
+
emojidata = [];
|
|
35
|
+
for (var groupindex = 0; groupindex < groupnames.length; groupindex++) {
|
|
36
|
+
var emojiitems = [];
|
|
37
|
+
var emojigroup = { index: groupindex, name: groupnames[groupindex], items: emojiitems };
|
|
38
|
+
var emojiarr = emojistrs[groupindex].split('|');
|
|
39
|
+
for (var ei = 0; ei < emojiarr.length; ei++) {
|
|
40
|
+
var emojistr = emojiarr[ei];
|
|
41
|
+
var pair = emojistr.split('#')
|
|
42
|
+
emojiitems.push({ emoji: pair[0], keyword: pair[1] });
|
|
43
|
+
}
|
|
44
|
+
emojidata.push(emojigroup);
|
|
45
|
+
}
|
|
46
|
+
//console.log(emojidata);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
var obj = this;
|
|
50
|
+
|
|
51
|
+
var config, editor;
|
|
52
|
+
|
|
53
|
+
obj.PluginName = "InsertEmoji";
|
|
54
|
+
|
|
55
|
+
obj.InitConfig = function (argconfig) {
|
|
56
|
+
config = argconfig;
|
|
57
|
+
}
|
|
58
|
+
obj.InitEditor = function (argeditor) {
|
|
59
|
+
editor = argeditor;
|
|
60
|
+
|
|
61
|
+
editor.toolbarFactoryMap["insertemoji"] = function (cmd) {
|
|
62
|
+
return editor.createToolbarItemDropDownPanel(cmd, function (panel) {
|
|
63
|
+
|
|
64
|
+
MakeEmojiData()
|
|
65
|
+
|
|
66
|
+
panel.style.width = "360px";
|
|
67
|
+
panel.style.height = "420px";
|
|
68
|
+
panel.style.display = "flex";
|
|
69
|
+
panel.style.flexDirection = "column";
|
|
70
|
+
|
|
71
|
+
panel.onclick = function (e) {
|
|
72
|
+
if (e.target.nodeName == "GSPAN") {
|
|
73
|
+
editor.closeCurrentPopup();
|
|
74
|
+
var htmlcode = e.target.getAttribute("htmlcode");
|
|
75
|
+
editor.insertHTML(htmlcode);
|
|
76
|
+
editor.collapse(false);
|
|
77
|
+
editor.focus();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Keyboard access for the emoji grid.
|
|
82
|
+
//
|
|
83
|
+
// The grid is <gspan> cells, which no browser makes focusable and
|
|
84
|
+
// which the editor's own keyboard layer does not recognise (it
|
|
85
|
+
// finds menu items by tag name, and these are not on that list).
|
|
86
|
+
// Until the cells were given a role and a tab stop, the only
|
|
87
|
+
// keyboard-reachable thing in this whole panel was the search box:
|
|
88
|
+
// the picker announced itself as a menu and then could not be
|
|
89
|
+
// operated without a mouse.
|
|
90
|
+
function cells() {
|
|
91
|
+
var visible = resultpanel.style.display !== "none" ? resultpanel : grouppanel;
|
|
92
|
+
return [].slice.call(visible.querySelectorAll("gspan"));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// The grid wraps, so "up" and "down" mean the nearest cell on the
|
|
96
|
+
// adjacent visual row โ computed from geometry rather than assuming
|
|
97
|
+
// a fixed column count, which changes with the panel width.
|
|
98
|
+
function step(list, from, dir) {
|
|
99
|
+
var here = from.getBoundingClientRect();
|
|
100
|
+
var candidates = list.filter(function (c) {
|
|
101
|
+
var r = c.getBoundingClientRect();
|
|
102
|
+
return dir < 0 ? r.bottom <= here.top + 1 : r.top >= here.bottom - 1;
|
|
103
|
+
});
|
|
104
|
+
if (!candidates.length) return null;
|
|
105
|
+
var rowEdge = null;
|
|
106
|
+
candidates.forEach(function (c) {
|
|
107
|
+
var r = c.getBoundingClientRect();
|
|
108
|
+
if (rowEdge === null) rowEdge = r.top;
|
|
109
|
+
else if (dir < 0 ? r.top > rowEdge : r.top < rowEdge) rowEdge = r.top;
|
|
110
|
+
});
|
|
111
|
+
var row = candidates.filter(function (c) {
|
|
112
|
+
return Math.abs(c.getBoundingClientRect().top - rowEdge) < 2;
|
|
113
|
+
});
|
|
114
|
+
var best = row[0], bestDx = Infinity;
|
|
115
|
+
row.forEach(function (c) {
|
|
116
|
+
var dx = Math.abs(c.getBoundingClientRect().left - here.left);
|
|
117
|
+
if (dx < bestDx) { bestDx = dx; best = c; }
|
|
118
|
+
});
|
|
119
|
+
return best;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
panel.addEventListener("keydown", function (e) {
|
|
123
|
+
var target = e.target;
|
|
124
|
+
if (!target || target.nodeName !== "GSPAN") return;
|
|
125
|
+
var list = cells();
|
|
126
|
+
var at = list.indexOf(target);
|
|
127
|
+
var next = null;
|
|
128
|
+
|
|
129
|
+
if (e.key === "ArrowRight") next = list[at + 1];
|
|
130
|
+
else if (e.key === "ArrowLeft") next = list[at - 1];
|
|
131
|
+
else if (e.key === "ArrowDown") next = step(list, target, 1);
|
|
132
|
+
else if (e.key === "ArrowUp") next = step(list, target, -1);
|
|
133
|
+
else if (e.key === "Home") next = list[0];
|
|
134
|
+
else if (e.key === "End") next = list[list.length - 1];
|
|
135
|
+
else if (e.key === "Enter" || e.key === " " || e.key === "Spacebar") {
|
|
136
|
+
e.preventDefault();
|
|
137
|
+
e.stopPropagation();
|
|
138
|
+
target.click();
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
else if (e.key === "Escape") {
|
|
142
|
+
e.preventDefault();
|
|
143
|
+
e.stopPropagation();
|
|
144
|
+
editor.closeCurrentPopup();
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
else return;
|
|
148
|
+
|
|
149
|
+
e.preventDefault();
|
|
150
|
+
e.stopPropagation();
|
|
151
|
+
if (next) next.focus();
|
|
152
|
+
}, true);
|
|
153
|
+
|
|
154
|
+
var selecteditem = null;
|
|
155
|
+
var toselectitem = null;
|
|
156
|
+
function clear_selecteditem() {
|
|
157
|
+
if (selecteditem != null) {
|
|
158
|
+
selecteditem.style.backgroundColor = "";
|
|
159
|
+
selecteditem = null;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
function set_selecteditem() {
|
|
163
|
+
clear_selecteditem();
|
|
164
|
+
selecteditem = toselectitem; selecteditem.style.backgroundColor = "#e6e6e6";
|
|
165
|
+
toselectitem = null;
|
|
166
|
+
}
|
|
167
|
+
var tid_sel = 0;
|
|
168
|
+
|
|
169
|
+
panel.onmouseover = function (e) {
|
|
170
|
+
for (var node = e.target; node != panel; node = node.parentNode) {
|
|
171
|
+
if (node.nodeName == "GITEM") {
|
|
172
|
+
if (node == toselectitem)
|
|
173
|
+
return;
|
|
174
|
+
toselectitem = node;
|
|
175
|
+
clearTimeout(tid_sel);
|
|
176
|
+
tid_sel = setTimeout(set_selecteditem, 10);
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
panel.onmouseout = function () {
|
|
182
|
+
clearTimeout(tid_sel);
|
|
183
|
+
tid_sel = setTimeout(clear_selecteditem, 10)
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
var searchbar = __Append(panel, "label", "margin:5px;position:relative;");
|
|
187
|
+
searchbar.setAttribute("id", "emojis_searchbar");
|
|
188
|
+
var searchbox = __Append(searchbar, "input", "width:100%;padding:5px 20px;border:solid 1px #ccc;border-radius:5px;");
|
|
189
|
+
searchbox.setAttribute("placeholder", editor.getLangText("searchemojis"));
|
|
190
|
+
|
|
191
|
+
var tid_key = 0;
|
|
192
|
+
searchbox.onchange = searchbox.onkeyup = searchbox.onkeypress = searchbox.onpaste = function () {
|
|
193
|
+
clearTimeout(tid_key);
|
|
194
|
+
tid_key = setTimeout(show_result, 100);
|
|
195
|
+
}
|
|
196
|
+
// 2026-05-11 quick-load rewrite: bulk-build via innerHTML and
|
|
197
|
+
// only render the active category. Previous version eagerly
|
|
198
|
+
// built ~4000 DOM nodes for 1,037 emojis on every panel open,
|
|
199
|
+
// noticeably slow on low-end machines. New flow:
|
|
200
|
+
// - panel opens โ render first category only (~125 nodes)
|
|
201
|
+
// - tab click โ swap to that category's HTML
|
|
202
|
+
// - search โ bulk innerHTML build of filtered results
|
|
203
|
+
function buildCategoryHTML(group) {
|
|
204
|
+
var parts = [];
|
|
205
|
+
parts.push('<div style="padding:3px;margin-top:5px;color:darkblue;">' + group.name[0].toUpperCase() + group.name.substring(1) + '</div>');
|
|
206
|
+
parts.push('<div style="display:flex;flex-direction:row;flex-wrap:wrap;">');
|
|
207
|
+
for (var i = 0; i < group.items.length; i++) {
|
|
208
|
+
var item = group.items[i];
|
|
209
|
+
var htmlcode = CharToHTMLCode(item.emoji);
|
|
210
|
+
parts.push('<gitem class="rte-flex-column-center" style="width:32px;height:32px;margin:2px"><gspan role="menuitem" tabindex="0" aria-label="' + (item.keyword || item.emoji).replace(/"/g, '') + '" htmlcode="' + htmlcode + '" title="' + item.emoji + ' ' + (item.keyword || '').replace(/"/g, '') + '">' + htmlcode + '</gspan></gitem>');
|
|
211
|
+
}
|
|
212
|
+
parts.push('</div>');
|
|
213
|
+
return parts.join('');
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
function show_result() {
|
|
217
|
+
var keyword = searchbox.value.trim().toLowerCase();
|
|
218
|
+
if (!keyword) {
|
|
219
|
+
tabpanel.style.display =
|
|
220
|
+
grouppanel.style.display = "";
|
|
221
|
+
resultpanel.style.display = "none";
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
tabpanel.style.display =
|
|
226
|
+
grouppanel.style.display = "none";
|
|
227
|
+
resultpanel.style.display = "flex";
|
|
228
|
+
|
|
229
|
+
var hitsHtml = [];
|
|
230
|
+
var itemindex = 0;
|
|
231
|
+
for (var gi = 0; gi < emojidata.length; gi++) {
|
|
232
|
+
var group = emojidata[gi];
|
|
233
|
+
for (var ii = 0; ii < group.items.length; ii++) {
|
|
234
|
+
var item = group.items[ii];
|
|
235
|
+
if (!item.keyword || item.keyword.indexOf(keyword) == -1)
|
|
236
|
+
continue;
|
|
237
|
+
itemindex++;
|
|
238
|
+
var htmlcode = CharToHTMLCode(item.emoji);
|
|
239
|
+
hitsHtml.push('<gitem class="rte-flex-column-center" style="width:32px;height:32px;margin:2px"><gspan role="menuitem" tabindex="0" aria-label="' + (item.keyword || item.emoji).replace(/"/g, '') + '" htmlcode="' + htmlcode + '" title="' + item.emoji + ' ' + (item.keyword || '').replace(/"/g, '') + '">' + htmlcode + '</gspan></gitem>');
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
resultpanel.innerHTML = '<div style="width:100%;padding:3px;margin-top:5px;color:darkblue;text-align:center;">' + itemindex + ' items</div>' + hitsHtml.join('');
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
panel.setAttribute("id", "emoji-picker");
|
|
246
|
+
|
|
247
|
+
var tabpanel = __Append(panel, "div");
|
|
248
|
+
|
|
249
|
+
var resultpanel = __Append(panel, "div", "display:none;flex-direction:row;flex-wrap:wrap;overflow-y:scroll;padding-bottom:55px");
|
|
250
|
+
|
|
251
|
+
var grouppanel = __Append(panel, "div", "overflow-y:scroll;padding-bottom:55px;flex:999");
|
|
252
|
+
|
|
253
|
+
// Lazy-render: only build the active category. Each tab click swaps the html.
|
|
254
|
+
var activeGroupIndex = 0;
|
|
255
|
+
function renderCategory(gi) {
|
|
256
|
+
activeGroupIndex = gi;
|
|
257
|
+
grouppanel.innerHTML = buildCategoryHTML(emojidata[gi]);
|
|
258
|
+
grouppanel.scrollTop = 0;
|
|
259
|
+
for (var bi = 0; bi < tabuibtns.length; bi++) {
|
|
260
|
+
tabuibtns[bi].className = bi === gi ? "rte-ui-active" : "";
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
var tabui = __Append(tabpanel, "rte-tabui");
|
|
265
|
+
tabui.setAttribute("id", "emoji-picker");
|
|
266
|
+
var tabuitoolbar = __Append(tabui, "rte-tabui-toolbar");
|
|
267
|
+
var tabuibtns = [];
|
|
268
|
+
for (var gi = 0; gi < emojidata.length; gi++) {
|
|
269
|
+
(function (group) {
|
|
270
|
+
var btn = __Append(tabuitoolbar, "rte-tabui-toolbar-button", "width:32px;text-align:center;margin:4px");
|
|
271
|
+
btn.setAttribute("title", group.name);
|
|
272
|
+
btn.innerHTML = group.items[0].emoji;
|
|
273
|
+
btn.onclick = function () { renderCategory(group.index); };
|
|
274
|
+
tabuibtns.push(btn);
|
|
275
|
+
})(emojidata[gi]);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// Initial render: just the first category (~125 emojis instead of all 1037).
|
|
279
|
+
renderCategory(0);
|
|
280
|
+
|
|
281
|
+
searchbox.focus();
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
})
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
function __Append(parent, tagname, csstext, cssclass) {
|
|
290
|
+
var tag = parent.ownerDocument.createElement(tagname);
|
|
291
|
+
if (csstext) tag.style.cssText = csstext;
|
|
292
|
+
if (cssclass) tag.className = cssclass;
|
|
293
|
+
parent.appendChild(tag);
|
|
294
|
+
return tag;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|