Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Froala editor doesn't work for Angular 4 with typescript

I using angular 4 with type script and I installed ng2-froala-editor and when I want to npm start occurs error

[at-loader] ./node_modules/ng2-froala-editor/ng2-froala-editor.d.ts:1:1 
TS6053: File './node_modules/typings/globals/core-js/index.d.ts' not found.
errors @ client?0fb1:119
sock.onmessage @ socket.js?e5d0:37
EventTarget.dispatchEvent @ eventtarget.js?3e89:51
(anonymous) @ main.js?45b8:274
SockJS._transportMessage @ main.js?45b8:272
EventEmitter.emit @ emitter.js?927b:50
WebSocketTransport.ws.onmessage @ websocket.js?c17e:35
wrapFn @ zone.js?fad3:1075
ZoneDelegate.invokeTask @ zone.js?fad3:424
Zone.runTask @ zone.js?fad3:191
ZoneTask.invokeTask @ zone.js?fad3:498
invokeTask @ zone.js?fad3:1370
globalZoneAwareCallback @ zone.js?fad3:1388

I imported this:

import {FroalaEditorModule} from 'ng2-froala-editor/ng2-froala-editor';

into module.ts and this into component

import {FroalaEditorComponent} from 'ng2-froala-editor/ng2-froala-editor';

Anyone know how to solve this error?

like image 456
Mateusz Sobczak Avatar asked Aug 30 '26 14:08

Mateusz Sobczak


1 Answers

You can use angular-froala-wysiwyg (i am using it in my project)

install it via

npm install angular-froala-wysiwyg

and import in app.module.ts

import { FroalaEditorModule, FroalaViewModule } from 'angular-froala-wysiwyg';

and also import in @ngModule decorator

FroalaEditorModule.forRoot(), FroalaViewModule.forRoot() 

hope I will solve your issue

like image 62
deepak singh papola Avatar answered Sep 02 '26 03:09

deepak singh papola



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!