mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-16 14:00:56 +02:00
fix: Paste clipboard contents into unbound text elements (#5849)
* Fix #5848. * Add test. * some tweaks Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
This commit is contained in:
@@ -290,17 +290,14 @@ export const textWysiwyg = ({
|
||||
fontSize: app.state.currentItemFontSize,
|
||||
fontFamily: app.state.currentItemFontFamily,
|
||||
});
|
||||
const wrappedText = container
|
||||
? wrapText(data, font, getMaxContainerWidth(container))
|
||||
: data;
|
||||
|
||||
const wrappedText = wrapText(
|
||||
data,
|
||||
font,
|
||||
getMaxContainerWidth(container!),
|
||||
);
|
||||
const dimensions = measureText(wrappedText, font);
|
||||
editable.style.height = `${dimensions.height}px`;
|
||||
if (data) {
|
||||
onChange(wrappedText);
|
||||
}
|
||||
|
||||
onChange(wrappedText);
|
||||
};
|
||||
editable.oninput = () => {
|
||||
const updatedTextElement = Scene.getScene(element)?.getElement(
|
||||
|
Reference in New Issue
Block a user