textarea replace editor

This commit is contained in:
hamid zarghami
2025-08-02 15:09:58 +03:30
parent 0b79f870ee
commit 2b19dc5a71
4 changed files with 23 additions and 18 deletions
@@ -2,10 +2,10 @@ import Button from '@/components/Button';
import { Add, AlignBottom, AlignHorizontally, AlignLeft, AlignRight, AlignTop, AlignVertically, Edit, Trash } from 'iconsax-react';
import { FC, useState, useEffect } from 'react'
import { useTranslation } from 'react-i18next'
import ReactQuill from 'react-quill-new';
import { usePersonalityStore } from '../store/Store';
import ColorPicker from '@/components/ColorPicker';
import { HorizontalAlignment, VerticalAlignment, ElementType } from '../types/Types';
import Textarea from '@/components/Textarea';
const TextSidebar: FC = () => {
@@ -66,10 +66,6 @@ const TextSidebar: FC = () => {
}
}, [selectedElement, isEditMode, data]);
const handleChange = (value: string) => {
setValue(value);
}
const handleAddText = () => {
if (value.trim()) {
addTextToActiveItem({
@@ -136,7 +132,7 @@ const TextSidebar: FC = () => {
</div>
<div className='mt-8'>
<ReactQuill
{/* <ReactQuill
modules={{
toolbar: [
[{ header: '1' }, { header: '2' }, { font: [] }],
@@ -152,6 +148,12 @@ const TextSidebar: FC = () => {
onChange={handleChange}
style={{ minHeight: '120px' }}
className='text-sm'
/> */}
<Textarea
placeholder={t('setting.text')}
value={value}
onChange={(e) => setValue(e.target.value)}
className='text-sm border border-border'
/>
</div>