Giter VIP home page Giter VIP logo

Comments (4)

rd0rnot avatar rd0rnot commented on June 16, 2024 1

@stevermeister thanks for the detailed investigation. It's interesting that this issue is shared amongst several other rich text editors.

To answer your question, this is not a critical issue for us. We observe it mainly as an anomaly with the required field status we assign to our ngx-wig control, and only when the user does a ctrl-a + delete sequence.

If there is a lightweight solution you can think to apply we would gladly take it, though we certainly wouldn't ask you to make changes that break the control or make it unwieldy to maintain.

Best regards.

from ngx-wig.

stevermeister avatar stevermeister commented on June 16, 2024

@rd0rnot thank you for the detailed report.
I think it's not about ngx-wig or Angular, but about WYSIWYG itself.
Could you please create a sandbox? I'll look and try to find a lightweight solution for it.

from ngx-wig.

rd0rnot avatar rd0rnot commented on June 16, 2024

Thanks @stevermeister for the reply.

I've had issues getting a sandbox with the exact versions of angular and ngx-wig to work. More on that in a moment.

I do have a sandbox based off of one of your demos using an older version of angular and ngx-wig that seems to mostly replicate the issue:

Editor: https://stackblitz.com/edit/ngx-wig-sample-plugins-p4svlr?file=src/app.ts
App: https://ngx-wig-sample-plugins-p4svlr.stackblitz.io/

If I use my example in the original bug report in the stackblitz app preview, it retains the <br> tag after the ctrl-A + delete sequence. If I run the app in it's own window, I'll see the tags kept as per my report, but the <p> tag has an extra attribute on it. Basically, in both scenarios an app would see non-empty field contents which could thwart a custom "is field modified" check.

As for getting a sandbox with the exact versions of Angular and ngx-wig I was using in my custom application (9.1.12 and 9.0.0), I encountered the following console error and I'm not sure why this is:

Error: this.ngxWigEditable is undefined

Here's the sandbox used with the newer Angular and ngx-wig versions:
Editor: https://stackblitz.com/edit/ngx-wig-sample-plugins-r3xntr?file=src/main.ts
App: https://ngx-wig-sample-plugins-r3xntr.stackblitz.io

Any idea why this issue is occurring?

from ngx-wig.

stevermeister avatar stevermeister commented on June 16, 2024

@rd0rnot thank you for providing the example!
I understood the problem.
Basically it ctrl-A does not select everything.
And if you do ctrl-A -> delete -> backspace (to cleanup the rest) - you will have empty HTML

I checked several WYSIWYG editors which provide source code option:
https://www.tiny.cloud/
https://summernote.org/
they have the same behavior.

I also found one that does not have this issue:
https://froala.com/wysiwyg-editor/
but froala is a pretty heavy editor. I would like to keep ngx-wig as light as possible.

What the criticality of this issue for your project?

from ngx-wig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.