@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.
@@ -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
- var selecteditem = null;
82
- var toselectitem = null;
83
- function clear_selecteditem() {
84
- if (selecteditem != null) {
85
- selecteditem.style.backgroundColor = "";
86
- selecteditem = null;
87
- }
88
- }
89
- function set_selecteditem() {
90
- clear_selecteditem();
91
- selecteditem = toselectitem; selecteditem.style.backgroundColor = "#e6e6e6";
92
- toselectitem = null;
93
- }
94
- var tid_sel = 0;
95
-
96
- panel.onmouseover = function (e) {
97
- for (var node = e.target; node != panel; node = node.parentNode) {
98
- if (node.nodeName == "GITEM") {
99
- if (node == toselectitem)
100
- return;
101
- toselectitem = node;
102
- clearTimeout(tid_sel);
103
- tid_sel = setTimeout(set_selecteditem, 10);
104
- return;
105
- }
106
- }
107
- }
108
- panel.onmouseout = function () {
109
- clearTimeout(tid_sel);
110
- tid_sel = setTimeout(clear_selecteditem, 10)
111
- }
112
-
113
- var searchbar = __Append(panel, "label", "margin:5px;position:relative;");
114
- searchbar.setAttribute("id", "emojis_searchbar");
115
- var searchbox = __Append(searchbar, "input", "width:100%;padding:5px 20px;border:solid 1px #ccc;border-radius:5px;");
116
- searchbox.setAttribute("placeholder", editor.getLangText("searchemojis"));
117
-
118
- var tid_key = 0;
119
- searchbox.onchange = searchbox.onkeyup = searchbox.onkeypress = searchbox.onpaste = function () {
120
- clearTimeout(tid_key);
121
- tid_key = setTimeout(show_result, 100);
122
- }
123
- // 2026-05-11 quick-load rewrite: bulk-build via innerHTML and
124
- // only render the active category. Previous version eagerly
125
- // built ~4000 DOM nodes for 1,037 emojis on every panel open,
126
- // noticeably slow on low-end machines. New flow:
127
- // - panel opens โ†’ render first category only (~125 nodes)
128
- // - tab click โ†’ swap to that category's HTML
129
- // - search โ†’ bulk innerHTML build of filtered results
130
- function buildCategoryHTML(group) {
131
- var parts = [];
132
- parts.push('<div style="padding:3px;margin-top:5px;color:darkblue;">' + group.name[0].toUpperCase() + group.name.substring(1) + '</div>');
133
- parts.push('<div style="display:flex;flex-direction:row;flex-wrap:wrap;">');
134
- for (var i = 0; i < group.items.length; i++) {
135
- var item = group.items[i];
136
- var htmlcode = CharToHTMLCode(item.emoji);
137
- parts.push('<gitem class="rte-flex-column-center" style="width:32px;height:32px;margin:2px"><gspan htmlcode="' + htmlcode + '" title="' + item.emoji + ' ' + (item.keyword || '').replace(/"/g, '') + '">' + htmlcode + '</gspan></gitem>');
138
- }
139
- parts.push('</div>');
140
- return parts.join('');
141
- }
142
-
143
- function show_result() {
144
- var keyword = searchbox.value.trim().toLowerCase();
145
- if (!keyword) {
146
- tabpanel.style.display =
147
- grouppanel.style.display = "";
148
- resultpanel.style.display = "none";
149
- return;
150
- }
151
-
152
- tabpanel.style.display =
153
- grouppanel.style.display = "none";
154
- resultpanel.style.display = "flex";
155
-
156
- var hitsHtml = [];
157
- var itemindex = 0;
158
- for (var gi = 0; gi < emojidata.length; gi++) {
159
- var group = emojidata[gi];
160
- for (var ii = 0; ii < group.items.length; ii++) {
161
- var item = group.items[ii];
162
- if (!item.keyword || item.keyword.indexOf(keyword) == -1)
163
- continue;
164
- itemindex++;
165
- var htmlcode = CharToHTMLCode(item.emoji);
166
- hitsHtml.push('<gitem class="rte-flex-column-center" style="width:32px;height:32px;margin:2px"><gspan htmlcode="' + htmlcode + '" title="' + item.emoji + ' ' + (item.keyword || '').replace(/"/g, '') + '">' + htmlcode + '</gspan></gitem>');
167
- }
168
- }
169
- resultpanel.innerHTML = '<div style="width:100%;padding:3px;margin-top:5px;color:darkblue;text-align:center;">' + itemindex + ' items</div>' + hitsHtml.join('');
170
- }
171
-
172
- panel.setAttribute("id", "emoji-picker");
173
-
174
- var tabpanel = __Append(panel, "div");
175
-
176
- var resultpanel = __Append(panel, "div", "display:none;flex-direction:row;flex-wrap:wrap;overflow-y:scroll;padding-bottom:55px");
177
-
178
- var grouppanel = __Append(panel, "div", "overflow-y:scroll;padding-bottom:55px;flex:999");
179
-
180
- // Lazy-render: only build the active category. Each tab click swaps the html.
181
- var activeGroupIndex = 0;
182
- function renderCategory(gi) {
183
- activeGroupIndex = gi;
184
- grouppanel.innerHTML = buildCategoryHTML(emojidata[gi]);
185
- grouppanel.scrollTop = 0;
186
- for (var bi = 0; bi < tabuibtns.length; bi++) {
187
- tabuibtns[bi].className = bi === gi ? "rte-ui-active" : "";
188
- }
189
- }
190
-
191
- var tabui = __Append(tabpanel, "rte-tabui");
192
- tabui.setAttribute("id", "emoji-picker");
193
- var tabuitoolbar = __Append(tabui, "rte-tabui-toolbar");
194
- var tabuibtns = [];
195
- for (var gi = 0; gi < emojidata.length; gi++) {
196
- (function (group) {
197
- var btn = __Append(tabuitoolbar, "rte-tabui-toolbar-button", "width:32px;text-align:center;margin:4px");
198
- btn.setAttribute("title", group.name);
199
- btn.innerHTML = group.items[0].emoji;
200
- btn.onclick = function () { renderCategory(group.index); };
201
- tabuibtns.push(btn);
202
- })(emojidata[gi]);
203
- }
204
-
205
- // Initial render: just the first category (~125 emojis instead of all 1037).
206
- renderCategory(0);
207
-
208
- searchbox.focus();
209
-
210
-
211
- })
212
- };
213
-
214
- }
215
-
216
- function __Append(parent, tagname, csstext, cssclass) {
217
- var tag = parent.ownerDocument.createElement(tagname);
218
- if (csstext) tag.style.cssText = csstext;
219
- if (cssclass) tag.className = cssclass;
220
- parent.appendChild(tag);
221
- return tag;
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
+