Open eghernqvist opened 2 years ago
+1
My marketing team is also experiencing this issue on a Windows 11 laptop, however I don't experience this issue if I copy/paste via my Macbook. A related issue I get is all line breaks are doubled when pasting resulting in tons of extra whitespace without manual cleanup
@sanity/cli (global) 3.1.2 (latest: 3.1.4)
@sanity/asset-utils 1.3.0 (up to date)
@sanity/dashboard 3.0.0 (latest: 3.1.2)
@sanity/image-url 1.0.1 (up to date)
@sanity/preview-kit 1.2.10 (latest: 1.2.18)
@sanity/table 1.0.1 (up to date)
@sanity/vision 3.0.1 (latest: 3.1.4)
sanity 3.1.4 (up to date)
Our users are having trouble pasting text from another document into our PortableText fields. Namely copying from a Google Docs document either with or without formatting.
When pasting with formatting everything just goes bold. This would be okay if pasting without formatting gave didn't make it so everything is a single text block. Meaning if we change one line of text to for example
Heading 1
the whole text changes. The only way to work around this that I've found is to remove line breaks and recreate them, which is a bit too big of a hassle for large documents.The issue is best shown with images:
From a
.docx
file in Google Docs. Also tried from a normal Google Docs doc to no avail:Into Sanity portable text:
To Reproduce
Heading 1
Heading 1
Expected behavior
Expecting either pasting with formatting to work, straight up, or if that's a technical issue, pasting without formatting to not have an issue with linebreaks.
Which versions of Sanity are you using?
What operating system are you using?
Windows 10/MacOS
Which versions of Node.js / npm are you running?