-
-
- {COLORS.map((c) => (
-
+ {/* Text Color Picker & Custom HEX */}
+
+
+
+ {showColorPicker && (
+
+
رنگهای پیشنهادی:
+
+ {PRESET_COLORS.map((c) => (
+
+
+
+ {
+ setCustomColor(e.target.value);
+ exec('foreColor', e.target.value);
+ }}
+ className="w-8 h-8 rounded-lg cursor-pointer border-none bg-transparent"
+ />
+ {
+ setCustomColor(e.target.value);
+ exec('foreColor', e.target.value);
+ }}
+ placeholder="#111827"
+ className="w-full text-xs font-mono font-bold px-2 py-1 border border-gray-200 rounded-lg outline-none uppercase"
+ dir="ltr"
+ />
+
+
+ )}
+
+
+ {/* Background Color Picker & Custom HEX */}
+
+
+
+ {showBgColorPicker && (
+
+
رنگهای هایلایت:
+
+ {PRESET_BG_COLORS.map((c) => (
+
+
+
+ {
+ setCustomBgColor(e.target.value);
+ exec('hiliteColor', e.target.value);
+ }}
+ className="w-8 h-8 rounded-lg cursor-pointer border-none bg-transparent"
+ />
+ {
+ setCustomBgColor(e.target.value);
+ exec('hiliteColor', e.target.value);
+ }}
+ placeholder="#fef08a"
+ className="w-full text-xs font-mono font-bold px-2 py-1 border border-gray-200 rounded-lg outline-none uppercase"
+ dir="ltr"
+ />
+
+
+ )}
+
+
+ {/* HTML Code View vs Visual */}
+
+
{/* Undo / Redo */}