react-text-editor-kit
Version:
React Text Editor Kit is a customizable rich text editor component for React applications. It provides a flexible and easy-to-use interface for users to create and edit content with various formatting options. And also easy to integrate in react applicati
166 lines (163 loc) • 2.24 kB
JSX
import React from "react";
import Styles from "../css/style.module.css";
export default function SpecialChars({ handleCharSelect }) {
const specialCharacters = [
"★",
"❤",
"☀",
"✈",
"♪",
"✔",
"⇧",
"⇩",
"♠",
"♣",
"♥",
"♦",
"♪",
"♫",
"☎",
"✉",
"☂",
"☔",
"☕",
"⚓",
"⚡",
"⚠",
"⚽",
"⚾",
"✂",
"✏",
"✒",
"✨",
"❄",
"❅",
"❆",
"❇",
"❈",
"❉",
"❊",
"❋",
"❌",
"❍",
"❎",
"❏",
"❐",
"❑",
"❒",
"⚪",
"⚫",
"◆",
"◇",
"◈",
"◉",
"◊",
"○",
"◌",
"◍",
"◎",
"●",
"◐",
"◑",
"◒",
"◓",
"◔",
"◕",
"◖",
"◗",
"◘",
"◙",
"◚",
"◛",
"◜",
"◝",
"◞",
"◟",
"◠",
"◡",
"◢",
"◣",
"◤",
"◥",
"◦",
"◧",
"◨",
"◩",
"◪",
"◫",
"◬",
"◭",
"◮",
"◯",
"❘",
"❙",
"❚",
"❛",
"❜",
"❝",
"❞",
"❟",
"❠",
"⚀",
"⚁",
"⚂",
"⚃",
"⚄",
"⚅",
"⚆",
"⚇",
"⚈",
"⚉",
"⚘",
"⚙",
"⚚",
"⚛",
"⚜",
"⚝",
"€",
"¥",
"£",
"₪",
"₩",
"₱",
"₲",
"₳",
"₴",
"₵",
"₦",
"₭",
"₮",
"₯",
"₨",
"₰",
"&",
"<",
">",
'"',
"'",
"¢",
"£",
"¥",
"€",
"©",
"®",
"™",
"§",
"×",
"÷",
// Add more special characters as needed
];
return (
<div className={Styles.specialCharBox}>
{specialCharacters.map((char, index) => (
<div
key={`key${index}`}
onClick={(e) => handleCharSelect(e, char)}
className={Styles.specialChar}
>
{char}
</div>
))}
</div>
);
}