Comments (4)
@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.
@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.
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.
@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)
- Creating custom buttons for version 0.3.6 HOT 1
- [idea] CI to publish on npm HOT 2
- bubble editor
- Custom Buttons for version 11.0.0.
- Event on blur HOT 1
- Use with validators HOT 1
- hide toolbar and change styles HOT 4
- configure it uses only tags I decide HOT 4
- Where is version 12 of the npm package? HOT 3
- Angular 13 support HOT 4
- Custom dropdown
- Remove legacy code HOT 1
- <br> tag left after textarea clear HOT 5
- Improve documentation about custom buttons. HOT 5
- Application error when custom button does not set `styleClass`
- Angular 14 support HOT 3
- Migrate to ESLint HOT 7
- npm package public version is still 13.2.6 HOT 1
- Angular 15 support HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-wig.