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

Editor empty value contains formattings #4843

Closed
ssi-hu-tasi-norbert opened this issue Jan 17, 2018 · 0 comments
Closed

Editor empty value contains formattings #4843

ssi-hu-tasi-norbert opened this issue Jan 17, 2018 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@ssi-hu-tasi-norbert
Copy link

ssi-hu-tasi-norbert commented Jan 17, 2018

I'm submitting a ... (check one with "x")

[ x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior

  1. type something into an empty editor
  2. choose formatting like bold. Don't type anything
  3. delete back the typed content

the value is: <p><strong><span class="ql-cursor"></span></strong></p>

Expected behavior

Value should be null.

Suggestion:
let text = this.quill.getText().trim();
if (!text) {
html = null;
}

Many Thanks!

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • Angular version: 5.2.0
  • PrimeNG version: 5.0.2
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Language: [all | TypeScript X.X | ES6/7 | ES5]

  • Node (for AoT issues): node --version =

@cagataycivici cagataycivici self-assigned this Mar 26, 2018
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Mar 26, 2018
@cagataycivici cagataycivici added this to the 5.2.4 milestone Mar 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants