+
-
-
- editor.chain().focus().toggleItalic().run()}
- disabled={!editor.can().chain().focus().toggleItalic().run()}
- sx={{
- color: editor.isActive('italic')
- ? theme.palette.text.primary
- : theme.palette.text.secondary,
- padding: 'revert',
- }}
- >
-
-
- editor.chain().focus().toggleStrike().run()}
- disabled={!editor.can().chain().focus().toggleStrike().run()}
- sx={{
- color: editor.isActive('strike')
- ? theme.palette.text.primary
- : theme.palette.text.secondary,
- padding: 'revert',
- }}
- >
-
-
- editor.chain().focus().toggleCode().run()}
- disabled={!editor.can().chain().focus().toggleCode().run()}
- sx={{
- color: editor.isActive('code')
- ? theme.palette.text.primary
- : theme.palette.text.secondary,
- padding: 'revert',
- }}
- >
-
-
- editor.chain().focus().unsetAllMarks().run()}
- sx={{
- color:
- editor.isActive('bold') ||
- editor.isActive('italic') ||
- editor.isActive('strike') ||
- editor.isActive('code')
+ editor.chain().focus().toggleBold().run()}
+ disabled={!editor.can().chain().focus().toggleBold().run()}
+ sx={{
+ color: editor.isActive('bold')
? theme.palette.text.primary
: theme.palette.text.secondary,
- padding: 'revert',
- }}
- >
-
-
- editor.chain().focus().toggleBulletList().run()}
- sx={{
- color: editor.isActive('bulletList')
- ? theme.palette.text.primary
- : theme.palette.text.secondary,
- padding: 'revert',
- }}
- >
-
-
- editor.chain().focus().toggleOrderedList().run()}
- sx={{
- color: editor.isActive('orderedList')
- ? theme.palette.text.primary
- : theme.palette.text.secondary,
- padding: 'revert',
- }}
- >
-
-
- editor.chain().focus().toggleCodeBlock().run()}
- sx={{
- color: editor.isActive('codeBlock')
- ? theme.palette.text.primary
- : theme.palette.text.secondary,
- padding: 'revert',
- }}
- >
-
-
- editor.chain().focus().toggleBlockquote().run()}
- sx={{
- color: editor.isActive('blockquote')
- ? theme.palette.text.primary
- : theme.palette.text.secondary,
- padding: 'revert',
- }}
- >
-
-
- editor.chain().focus().setHorizontalRule().run()}
- disabled={!editor.can().chain().focus().setHorizontalRule().run()}
- sx={{ color: 'gray', padding: 'revert' }}
- >
-
-
-
- editor.chain().focus().toggleHeading({ level: 1 }).run()
- }
- sx={{
- color: editor.isActive('heading', { level: 1 })
- ? theme.palette.text.primary
- : theme.palette.text.secondary,
- padding: 'revert',
- }}
- >
-
-
- editor.chain().focus().undo().run()}
- disabled={!editor.can().chain().focus().undo().run()}
- sx={{ color: 'gray', padding: 'revert' }}
- >
-
-
- editor.chain().focus().redo().run()}
- disabled={!editor.can().chain().focus().redo().run()}
- sx={{ color: 'gray' }}
- >
-
-
- {isChat && (
- {
- setIsDisabledEditorEnter(!isDisabledEditorEnter);
+ padding: 'revert',
}}
>
-
+
+ editor.chain().focus().toggleItalic().run()}
+ disabled={!editor.can().chain().focus().toggleItalic().run()}
+ sx={{
+ color: editor.isActive('italic')
+ ? theme.palette.text.primary
+ : theme.palette.text.secondary,
+ padding: 'revert',
+ }}
+ >
+
+
+ editor.chain().focus().toggleStrike().run()}
+ disabled={!editor.can().chain().focus().toggleStrike().run()}
+ sx={{
+ color: editor.isActive('strike')
+ ? theme.palette.text.primary
+ : theme.palette.text.secondary,
+ padding: 'revert',
+ }}
+ >
+
+
+ editor.chain().focus().toggleCode().run()}
+ disabled={!editor.can().chain().focus().toggleCode().run()}
+ sx={{
+ color: editor.isActive('code')
+ ? theme.palette.text.primary
+ : theme.palette.text.secondary,
+ padding: 'revert',
+ }}
+ >
+
+
+ editor.chain().focus().unsetAllMarks().run()}
+ sx={{
+ color:
+ editor.isActive('bold') ||
+ editor.isActive('italic') ||
+ editor.isActive('strike') ||
+ editor.isActive('code')
+ ? theme.palette.text.primary
+ : theme.palette.text.secondary,
+ padding: 'revert',
+ }}
+ >
+
+
+ editor.chain().focus().toggleBulletList().run()}
+ sx={{
+ color: editor.isActive('bulletList')
+ ? theme.palette.text.primary
+ : theme.palette.text.secondary,
+ padding: 'revert',
+ }}
+ >
+
+
+ editor.chain().focus().toggleOrderedList().run()}
+ sx={{
+ color: editor.isActive('orderedList')
+ ? theme.palette.text.primary
+ : theme.palette.text.secondary,
+ padding: 'revert',
+ }}
+ >
+
+
+ editor.chain().focus().toggleCodeBlock().run()}
+ sx={{
+ color: editor.isActive('codeBlock')
+ ? theme.palette.text.primary
+ : theme.palette.text.secondary,
+ padding: 'revert',
+ }}
+ >
+
+
+ editor.chain().focus().toggleBlockquote().run()}
+ sx={{
+ color: editor.isActive('blockquote')
+ ? theme.palette.text.primary
+ : theme.palette.text.secondary,
+ padding: 'revert',
+ }}
+ >
+
+
+ editor.chain().focus().setHorizontalRule().run()}
+ disabled={!editor.can().chain().focus().setHorizontalRule().run()}
+ sx={{ color: 'gray', padding: 'revert' }}
+ >
+
+
+
+ editor.chain().focus().toggleHeading({ level: 1 }).run()
+ }
+ sx={{
+ color: editor.isActive('heading', { level: 1 })
+ ? theme.palette.text.primary
+ : theme.palette.text.secondary,
+ padding: 'revert',
+ }}
+ >
+
+
+ editor.chain().focus().undo().run()}
+ disabled={!editor.can().chain().focus().undo().run()}
+ sx={{ color: 'gray', padding: 'revert' }}
+ >
+
+
+ editor.chain().focus().redo().run()}
+ disabled={!editor.can().chain().focus().redo().run()}
+ sx={{ color: 'gray' }}
+ >
+
+
+ {isChat && (
+
- {
+ setIsDisabledEditorEnter(!isDisabledEditorEnter);
}}
>
- disable enter
-
-
- )}
- {!isChat && (
- <>
-
-
-
- handleImageUpload(event.target.files[0])}
- accept="image/*"
- />
- >
- )}
+
+
+ disable enter
+
+
+ )}
+ {!isChat && (
+ <>
+
+
+
+ handleImageUpload(event.target.files[0])}
+ accept="image/*"
+ />
+ >
+ )}
+
-