mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-31 00:10:22 +08:00
fix(TextFilePreview): make editor read-only but can be copied (#10499)
* fix(TextFilePreview): make editor read-only but can be copied
* feat: add table auto-wrap feature for notes
* Revert "feat: add table auto-wrap feature for notes"
This reverts commit 7785f480b1.
This commit is contained in:
parent
2aedbf5702
commit
a436ab1d78
@ -1,3 +1,4 @@
|
||||
import { EditorState } from '@codemirror/state'
|
||||
import { Modal } from 'antd'
|
||||
import { useState } from 'react'
|
||||
import styled from 'styled-components'
|
||||
@ -55,12 +56,12 @@ const PopupContainer: React.FC<Props> = ({ text, title, extension, resolve }) =>
|
||||
footer={null}>
|
||||
{extension !== undefined ? (
|
||||
<Editor
|
||||
editable={false}
|
||||
expanded={false}
|
||||
height="100%"
|
||||
style={{ height: '100%' }}
|
||||
value={text}
|
||||
language={extension}
|
||||
extensions={[EditorState.readOnly.of(true)]}
|
||||
/>
|
||||
) : (
|
||||
<Text>{text}</Text>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user