fix(stock/editor/zibal): fix stock zero display in app, resolve admin rich text editor cursor jumping, optimize zibal queue parser
Deploy Canina / deploy (push) Successful in 1m38s

This commit is contained in:
parsa committed 2026-08-24 00:55:25 +03:30
1 parent d1e3daf992
commit 44e1f915f4
207 files changed
+254318 -117167

No files matched your search

@@ -42,6 +42,19 @@ export default function RichTextEditor({
}: RichTextEditorProps) {
const editorRef = useRef<HTMLDivElement>(null);
const isMountedRef = useRef(false);
useEffect(() => {
if (editorRef.current) {
if (!isMountedRef.current) {
editorRef.current.innerHTML = value || '';
isMountedRef.current = true;
} else if (editorRef.current.innerHTML !== (value || '')) {
editorRef.current.innerHTML = value || '';
}
}
}, [value]);
const exec = (command: string, val: string | undefined = undefined) => {
document.execCommand(command, false, val);
if (editorRef.current) {
@@ -229,7 +242,6 @@ export default function RichTextEditor({
ref={editorRef}
contentEditable
onInput={handleInput}
dangerouslySetInnerHTML={{ __html: value }}
data-placeholder={placeholder}
className="p-4 min-h-[140px] max-h-[350px] overflow-y-auto outline-none text-xs leading-relaxed text-gray-800 font-vazir empty:before:content-[attr(data-placeholder)] empty:before:text-gray-400"
dir="rtl"