UNPKG

angular-rich-text-editor

Version:

A lightweight, configurable rich-text editor component for Angular applications.

259 lines (204 loc) โ€ข 27.3 kB
RTE_DefaultConfig.plugin_insertemoji = RTE_Plugin_InsertEmoji; function RTE_Plugin_InsertEmoji() { function CharToHTMLCode(ch) { if (ch.length > 2) return ch; if (ch.length == 1 || ch.charCodeAt(1) == 0xfe0f) return "&#" + ch.charCodeAt(0) + ";" if (ch.charCodeAt(1) == 0xfe0f) { return "&#" + ch.charCodeAt(0) + ";" } var offset = ch.charCodeAt(0) - 0xd83c; if (offset < 0 && offset > 3)//not support return ch; var second = ch.charCodeAt(1) - 0xdc04; var f = offset * 0x400 + second + 0x1f004; return "&#x" + f.toString(16) + ";" } var groupnames = ["smileys", "people", "animals", "food", "travel", "activities", "objects", "symbols"] 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"] var emojidata = null; function MakeEmojiData() { if (emojidata) return; emojidata = []; for (var groupindex = 0; groupindex < groupnames.length; groupindex++) { var emojiitems = []; var emojigroup = { index: groupindex, name: groupnames[groupindex], items: emojiitems }; var emojiarr = emojistrs[groupindex].split('|'); for (var ei = 0; ei < emojiarr.length; ei++) { var emojistr = emojiarr[ei]; var pair = emojistr.split('#') emojiitems.push({ emoji: pair[0], keyword: pair[1] }); } emojidata.push(emojigroup); } //console.log(emojidata); } var obj = this; var config, editor; obj.PluginName = "InsertEmoji"; obj.InitConfig = function (argconfig) { config = argconfig; } obj.InitEditor = function (argeditor) { editor = argeditor; editor.toolbarFactoryMap["insertemoji"] = function (cmd) { return editor.createToolbarItemDropDownPanel(cmd, function (panel) { MakeEmojiData() panel.style.width = "360px"; panel.style.height = "420px"; panel.style.display = "flex"; panel.style.flexDirection = "column"; panel.onclick = function (e) { if (e.target.nodeName == "GSPAN") { editor.closeCurrentPopup(); var htmlcode = e.target.getAttribute("htmlcode"); console.log("insert emoji", htmlcode) editor.insertHTML(htmlcode); editor.collapse(false); editor.focus(); } } var selecteditem = null; var toselectitem = null; function clear_selecteditem() { if (selecteditem != null) { selecteditem.style.backgroundColor = ""; selecteditem = null; } } function set_selecteditem() { clear_selecteditem(); selecteditem = toselectitem; selecteditem.style.backgroundColor = "#e6e6e6"; toselectitem = null; } var tid_sel = 0; panel.onmouseover = function (e) { for (var node = e.target; node != panel; node = node.parentNode) { if (node.nodeName == "GITEM") { if (node == toselectitem) return; toselectitem = node; clearTimeout(tid_sel); tid_sel = setTimeout(set_selecteditem, 10); return; } } } panel.onmouseout = function () { clearTimeout(tid_sel); tid_sel = setTimeout(clear_selecteditem, 10) } var searchbar = __Append(panel, "label", "margin:5px;position:relative;"); searchbar.setAttribute("id", "emojis_searchbar"); var searchbox = __Append(searchbar, "input", "width:100%;padding:5px 20px;border:solid 1px #ccc;border-radius:5px;"); searchbox.setAttribute("placeholder", editor.getLangText("searchemojis")); var tid_key = 0; searchbox.onchange = searchbox.onkeyup = searchbox.onkeypress = searchbox.onpaste = function () { clearTimeout(tid_key); tid_key = setTimeout(show_result, 100); } function show_result() { var keyword = searchbox.value.trim().toLowerCase(); if (!keyword) { tabpanel.style.display = grouppanel.style.display = ""; resultpanel.style.display = "none"; return; } tabpanel.style.display = grouppanel.style.display = "none"; resultpanel.style.display = "flex"; resultpanel.innerHTML = ""; var resultline = __Append(resultpanel, "div", "width:100%;padding:3px;margin-top:5px;color:darkblue;text-align:center;"); var itemindex = 0; for (var gi = 0; gi < emojidata.length; gi++) { var group = emojidata[gi]; for (var ii = 0; ii < group.items.length; ii++) { var item = group.items[ii]; if (!item.keyword || item.keyword.indexOf(keyword) == -1) continue; itemindex++; //if (itemindex > 20)break; var gitem = __Append(resultpanel, "gitem", "width:32px;height:32px;margin:2px", "rte-flex-column-center") var gspan = __Append(gitem, "gspan", ""); var htmlcode = CharToHTMLCode(item.emoji); gspan.setAttribute("title", item.emoji + " " + item.keyword) gspan.setAttribute("htmlcode", htmlcode) gspan.innerHTML = htmlcode; } } resultline.innerText = itemindex + " items"; } searchbox.focus(); panel.setAttribute("id", "emoji-picker"); var tabpanel = __Append(panel, "div"); var resultpanel = __Append(panel, "div", "display:none;flex-direction:row;flex-wrap:wrap;overflow-y:scroll;padding-bottom:55px"); var grouppanel = __Append(panel, "div", "overflow-y:scroll;padding-bottom:55px;flex:999"); var groupdivs = []; for (var gi = 0; gi < emojidata.length; gi++) { var group = emojidata[gi]; var gdiv = __Append(grouppanel, "div", "padding:3px;margin-top:5px;color:darkblue;"); groupdivs.push(gdiv); gdiv.innerText = group.name[0].toUpperCase() + group.name.substring(1); gdiv = __Append(grouppanel, "div", "display:flex;flex-direction:row;flex-wrap:wrap;"); for (var itemindex = 0; itemindex < group.items.length; itemindex++) { var item = group.items[itemindex]; //if (itemindex > 20)break; var gitem = __Append(gdiv, "gitem", "width:32px;height:32px;margin:2px", "rte-flex-column-center") var gspan = __Append(gitem, "gspan", ""); var htmlcode = CharToHTMLCode(item.emoji); gspan.setAttribute("title", item.emoji + " " + item.keyword) gspan.setAttribute("htmlcode", htmlcode) gspan.innerHTML = htmlcode; } } var tabui = __Append(tabpanel, "rte-tabui"); tabui.setAttribute("id", "emoji-picker"); var tabuitoolbar = __Append(tabui, "rte-tabui-toolbar"); var tabuibtns = []; function CreateTabBtn(group) { var btn = __Append(tabuitoolbar, "rte-tabui-toolbar-button", "width:32px;text-align:center;margin:4px") tabuibtns.push(btn); btn.setAttribute("title", group.name); btn.innerHTML = group.items[0].emoji btn.onclick = function () { grouppanel.scrollTop = groupdivs[group.index].getBoundingClientRect().top - grouppanel.getBoundingClientRect().top + grouppanel.scrollTop; grouppanel.onscroll(); } btn.group = group; } for (var gi = 0; gi < emojidata.length; gi++) { var group = emojidata[gi]; CreateTabBtn(group) } var lastactivebtn = null; grouppanel.onscroll = function () { var ptop = grouppanel.getBoundingClientRect().top; console.log(ptop); if (lastactivebtn) lastactivebtn.className = ""; for (var bi = 0; bi < tabuibtns.length; bi++) { var btn = tabuibtns[bi]; var gdiv = groupdivs[btn.group.index]; if (gdiv.getBoundingClientRect().top > ptop) { lastactivebtn = tabuibtns[btn.group.index - 1] || btn; lastactivebtn.className = "rte-ui-active"; return; } } lastactivebtn = tabuibtns[tabuibtns.length - 1]; lastactivebtn.className = "rte-ui-active"; } grouppanel.onscroll(); }) }; } function __Append(parent, tagname, csstext, cssclass) { var tag = parent.ownerDocument.createElement(tagname); if (csstext) tag.style.cssText = csstext; if (cssclass) tag.className = cssclass; parent.appendChild(tag); return tag; } }