How to integrate angular2-froala-wysiwyg npm plugin with Nativescript Angular2 app?


#1

Hi,

I need to provide rich text editor UI in my Nativescript Angular2 app.

I have searched and got the followed link. Is it possible to integrate angular2-froala-wysiwyg npm plugin with Nativescript Angular2 app?

Thanks in advance.


#2

Judging by the readme alone, you can’t use it in your NativeScript app, because it uses the browser DOM’s window, and jQuery, which are browser-specific.

Please note - MOST UI npm modules won’t work in NativeScript for various reasons, the most important being is that NativeScript does not execute in a webview (embedded browser).

Now, if you still need a WYSIWYG editor in your app you should consider using Android/iOS plugins, which you can then access using JavaScript. Here are just a few I found using Google:
https://github.com/paulmach/Text-Edit-for-Android (Additionally, consider just using the Google Drive’s docs plugin - ‘com.google.android.gms:play-services-drive:8.3.0’)
https://github.com/nnhubbard/ZSSRichTextEditor


#3

Thank you for reply @Pete.K. Now i understood about browser specific plugins and webview (embedded browser).

Yes. I need rich text editor in my app. As you told, i should implement the native plugins and access them via javascript. But i am new to this framework. Can you please suggest how to configure and access native plugins in nativescript with clear concept?