sibiraj-s / ngx-editor

🖋️ Rich Text Editor for angular using ProseMirror
https://sibiraj-s.github.io/ngx-editor/
MIT License
424 stars 183 forks source link

ngx editor with angular reactive forms #148

Closed arikbidny closed 5 years ago

arikbidny commented 5 years ago

I'm submitting a

Description

_A feature: Hey, I'm trying to use the editor with angular reactive forms, Is it possible? I want to add to [app-ngx-editor formContolName="content"] thanks for your help

Version Information

ngx-editor: 3.3.0 angular: 6.0



### Browser

- [x] Chrome - x.x.x
- [ ]  Mozilla Firefox - x.x.x
- [ ] Opera - x.x.x
- [ ] Microsoft Edge - x.x.x
john-md86 commented 5 years ago

I'm starting to test, just with reactive forms. Apparently, it works normally.

I just didn't understand the "translate" setting.

arikbidny commented 5 years ago

@jmdmao You just added the formControlName to [app-ngx-editor] and it works ?

sibiraj-s commented 5 years ago

@jmdmao .sorry for the delayed response. yes that is how it should be. are you facing any problems

_A feature: Hey, I'm trying to use the editor with angular reactive forms, Is it possible?

The feature is already there, released in verison v3.1.0

I recommend using the latest version though in angular 5

arikbidny commented 5 years ago

@Sibiraj-S I can use it in normal way with formControlName ?

sibiraj-s commented 5 years ago

yes. it should work

john-md86 commented 5 years ago

@arikbidny Yes. Just like that.

image

image

john-md86 commented 5 years ago

@Sibiraj-S Reactive form worked for me. What I did not understand is the "translate" function, which is in the editor configuration documentation.

sibiraj-s commented 5 years ago

Hi @jmdmao . I forgot to reply to ur comment.

The translate is nothing but an HTML5 attribute. Check out more information here

sibiraj-s commented 5 years ago

Currently it is experimental and not supported by any browsers out there. I just added it, as may be supported in future and may come handy.

john-md86 commented 5 years ago

Ah ok. Thanks for information! And thanks for the good job. If I may, a suggestion: put in the readme how to use the dependency of fontawsome 4.7. It will save a lot of people time. Do you have plans to upgrade to fontawesome 5, now that they have official version for angular 6?

sibiraj-s commented 5 years ago

I would love to work on this editor . But I am stuck with work I cannot find time to work on this. Already I started migrating this to Angular6 and it was half way done and I am occupied. It too stuck

If I may, a suggestion: put in the readme how to use the dependency of fontawsome 4.7

I do gave a link to the stackblitz(where it has the implementation) which I thought would be enough, but I can see someone are facing troubles. Soon I will give steps to use fontawesome. where it will include three different methods to do it

The upcoming tasks I have are

  1. removing font awesome and replace with svg's or any better solution I come up at that time
  2. removing all sort of dependencies to other libs
  3. Angular 6
john-md86 commented 5 years ago

I'm using nfx-editor with angle 6, and it's working normally. On the icons, I had to install 4.7 beyond the 5, which I already use in my app. But this is not a problem. Again, thank you for your work. Good luck! (ps: I will not increase the topic anymore)

arikbidny commented 5 years ago

@jmdmao @Sibiraj-S thanks you both for replies its very helpful.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in the thread.