mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: more copyText fixes (#5016)
This commit is contained in:
parent
89471094ce
commit
77d789ed8e
5 changed files with 33 additions and 17 deletions
|
@ -11,7 +11,7 @@ import {
|
|||
actionCopy,
|
||||
actionCopyAsPng,
|
||||
actionCopyAsSvg,
|
||||
copyAllTextNodesAsText,
|
||||
copyText,
|
||||
actionCopyStyles,
|
||||
actionCut,
|
||||
actionDeleteSelected,
|
||||
|
@ -5490,8 +5490,12 @@ class App extends React.Component<AppProps, AppState> {
|
|||
options.push(actionCopyAsSvg);
|
||||
}
|
||||
|
||||
if (probablySupportsClipboardWriteText && selectedElements.length > 0) {
|
||||
options.push(copyAllTextNodesAsText);
|
||||
if (
|
||||
type === "element" &&
|
||||
copyText.contextItemPredicate(elements, this.state) &&
|
||||
probablySupportsClipboardWriteText
|
||||
) {
|
||||
options.push(copyText);
|
||||
}
|
||||
if (type === "canvas") {
|
||||
const viewModeOptions = [
|
||||
|
@ -5538,7 +5542,7 @@ class App extends React.Component<AppProps, AppState> {
|
|||
actionCopyAsSvg,
|
||||
probablySupportsClipboardWriteText &&
|
||||
selectedElements.length > 0 &&
|
||||
copyAllTextNodesAsText,
|
||||
copyText,
|
||||
((probablySupportsClipboardBlob && elements.length > 0) ||
|
||||
(probablySupportsClipboardWriteText && elements.length > 0)) &&
|
||||
separator,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue