๐จ The ultimate agentic social media scheduling tool ๐ค
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
'use client';
import { FC, useCallback } from 'react';
import { Editor, Transforms } from 'slate';
import { ReactEditor } from 'slate-react';
const originalMap = {
a: '๐ฎ',
b: '๐ฏ',
c: '๐ฐ',
d: '๐ฑ',
e: '๐ฒ',
f: '๐ณ',
g: '๐ด',
h: '๐ต',
i: '๐ถ',
j: '๐ท',
k: '๐ธ',
l: '๐น',
m: '๐บ',
n: '๐ป',
o: '๐ผ',
p: '๐ฝ',
q: '๐พ',
r: '๐ฟ',
s: '๐',
t: '๐',
u: '๐',
v: '๐',
w: '๐',
x: '๐
',
y: '๐',
z: '๐',
A: '๐',
B: '๐',
C: '๐',
D: '๐',
E: '๐',
F: '๐',
G: '๐',
H: '๐',
I: '๐',
J: '๐',
K: '๐',
L: '๐',
M: '๐ ',
N: '๐ก',
O: '๐ข',
P: '๐ฃ',
Q: '๐ค',
R: '๐ฅ',
S: '๐ฆ',
T: '๐ง',
U: '๐จ',
V: '๐ฉ',
W: '๐ช',
X: '๐ซ',
Y: '๐ฌ',
Z: '๐ญ',
'1': '๐ญ',
'2': '๐ฎ',
'3': '๐ฏ',
'4': '๐ฐ',
'5': '๐ฑ',
'6': '๐ฒ',
'7': '๐ณ',
'8': '๐ด',
'9': '๐ต',
'0': '๐ฌ',
};
const reverseMap = Object.fromEntries(
Object.entries(originalMap).map(([key, value]) => [value, key])
);
export const BoldText: FC<{
editor: any;
currentValue: string;
}> = ({ editor }) => {
const mark = () => {
editor?.commands?.unsetUnderline();
editor?.commands?.toggleBold();
editor?.commands?.focus();
};
return (
<div
data-tooltip-id="tooltip"
data-tooltip-content="Bold Text"
onClick={mark}
className="select-none cursor-pointer rounded-[6px] mobile:rounded-[8px] w-[30px] h-[30px] mobile:w-[40px] mobile:h-[40px] bg-newColColor mobile:bg-newSettings flex justify-center items-center"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
className="mobile:w-[20px] mobile:h-[20px]"
viewBox="0 0 16 16"
fill="none"
>
<path
d="M4 8.00033H9.33333C10.8061 8.00033 12 6.80642 12 5.33366C12 3.8609 10.8061 2.66699 9.33333 2.66699H4V8.00033ZM4 8.00033H10C11.4728 8.00033 12.6667 9.19423 12.6667 10.667C12.6667 12.1398 11.4728 13.3337 10 13.3337H4V8.00033Z"
stroke="currentColor"
strokeWidth="1.2"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
</div>
);
};