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

can't clear all <p>br<p> #871

Open
webnoble opened this issue Jan 15, 2023 · 7 comments
Open

can't clear all <p>br<p> #871

webnoble opened this issue Jan 15, 2023 · 7 comments

Comments

@webnoble
Copy link

Select All and delete will leave

br

@windguos
Copy link

windguos commented Feb 6, 2023

I would also like to ask how to solve this problem

@5tausend
Copy link

Have you Example? Screenshot?

@abhinav1602
Copy link

Select All and delete will leave

br

Everyone who came here knows this is the problem. what is the solution?

@5tausend
Copy link

5tausend commented Mar 1, 2023

Unfortunately, there was no screenshot until now, so I would like to propose a solution that I use.The following example works very well for us. It's probably not the most elegant solution, but it solves the 'br' bug.

<QuillTextEditor theme="snow" placeholder={'STRING'} value={value.replace(/�/g, '<br>')} onChange={(event) =>...} />

@alexkrolick alexkrolick pinned this issue Sep 15, 2023
@DanyloStr
Copy link

i have this issue to and have some picture for you
on this picture I selected a empty lines contains <p><br></p> and i cant delete it with Backspace button
Screenshot 2024-02-08 at 13 48 49

@mdodge-ecgrow
Copy link

Unfortunately, there was no screenshot until now, so I would like to propose a solution that I use.The following example works very well for us. It's probably not the most elegant solution, but it solves the 'br' bug.
<QuillTextEditor theme="snow" placeholder={'STRING'} value={value.replace(/�/g, '<br>')} onChange={(event) =>...} />

I cannot make that solution work. What is that question mark character between the slashes?

@mdodge-ecgrow
Copy link

Here is my hacky solution, if it helps anyone:

const updateNotes = (e) => {
	console.log({e});
	const newNotes = e === '<p><br></p>' ? '' : e;
	setEditingPriceList({
		...editingPriceList,
		notes: newNotes
	});
};

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

6 participants