mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: text content with tab characters act different in view/edit (#8336)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
parent
7b2bee9746
commit
f7b3befd0a
2 changed files with 12 additions and 2 deletions
|
@ -332,6 +332,7 @@ import {
|
|||
isMeasureTextSupported,
|
||||
isValidTextContainer,
|
||||
measureText,
|
||||
normalizeText,
|
||||
wrapText,
|
||||
} from "../element/textElement";
|
||||
import {
|
||||
|
@ -3412,7 +3413,7 @@ class App extends React.Component<AppProps, AppState> {
|
|||
const lines = isPlainPaste ? [text] : text.split("\n");
|
||||
const textElements = lines.reduce(
|
||||
(acc: ExcalidrawTextElement[], line, idx) => {
|
||||
const originalText = line.trim();
|
||||
const originalText = normalizeText(line).trim();
|
||||
if (originalText.length) {
|
||||
const topLayerFrame = this.getTopLayerFrameAtSceneCoords({
|
||||
x,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue