Quick intro: Hi, I am part of the team that will be migrating old front end of the web application (js, written in 2012) to Angular framework. We've been suggested to use NativeScript because the app will be used both on desktop and mobile devices and it would be nice to provide native app experience to users.
To the point: One of the functionalities of the app is to edit pages using WYSWIG editor. Currently we use CK Editor for that. I know there is CKEditor support for Angular. But there obviously is no "native" control for this in NativeScript. The idea that I've been thinking of to provide this functionality is to use WebView control of NativeScript and bind editor events using nativescript-webview-interface. From what I've researched so far it appreas that it would be possible to use javascript CKEDitor for example inside plain (not angular template) html file.
But I would highly prefer to be consistent and use CKEditor angular component for both the web view and mobile view.
Question: Would it be possible to reuse angular html based component containing CKEditor inside of WebView? Or in general is it possible to instantiate (and interact wtih) Angular html components inside of NS' WebView? Is Angular 6+ Elements support applicable here?
Thank you in advance.
As you already mentioned, you may host CKEditor inside WebView and listen to it's events using the webview-interface plugin.
In nutshell, NativeScript allows you to build native app with your existing web development skills. Your UI is totally native, you are given 100% access to native apis and you still use JavaScript / Angular / Vue to write your business logic.
WebView is a native component and anything that is hosted inside WebView will be totally out of context to NativeScript runtime / the Angular that is controlling your native UI. So if you prefer to use CKEditor's angular component then you must compile it as an standalone Angular app Or at least as an Angular element and then host it into the WebView.