Skip to content

๐Ÿ“จ The ultimate agentic social media scheduling tool ๐Ÿค–

2.2 KB
Raw Blame
'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>
  );
};