Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy paste empty lines from google docs #4577

Open
Pizza1 opened this issue Jan 26, 2025 · 1 comment
Open

Copy paste empty lines from google docs #4577

Pizza1 opened this issue Jan 26, 2025 · 1 comment

Comments

@Pizza1
Copy link

Pizza1 commented Jan 26, 2025

I'm trying to copy paste text from google docs into a quill.js editor, but whenever I copy paste, it removes almost all empty lines (i.e empty paragraphs). Is there a way to fix this?

For example,

In google docs:

Text1

Text2

Text3

Then after copy pasting into quill.js editor, it appears as

Text1
Text2
Text3

When copy pasting from notepad it preserves the empty lines.

@Anthonyyp
Copy link

hey - based on a similar concern i'd had in the past - are you sure this is missing lines vs missing spacing? i imagine you can edit your css for the editors content to match what you typically see on the web. So I added the following -

.ql-editor p,
.ql-editor ol,
.ql-editor pre,
.ql-editor blockquote,
.ql-editor h1,
.ql-editor h2,
.ql-editor h3,
.ql-editor h4,
.ql-editor h5,
.ql-editor h6 {
margin: 0.5em; /* Reset to browser's default margin /
padding: 0.4em; /
Reset to browser's default padding */
}

you may want to make adjustments i actually had the margin commented out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants