Giter Site home page Giter Site logo

Comments (6)

alfredalfie avatar alfredalfie commented on May 14, 2024 1

Actually I tried the webpack guideline.

...
import "froala-editor/js/froala_editor.pkgd.min.js";
import { FroalaEditorModule, FroalaViewModule } from 'angular2-froala-wysiwyg';
...

@NgModule({
imports: [
CommonModule,
HttpModule,
TransferHttpModule,
FroalaEditorModule.forRoot(),
FroalaViewModule.forRoot(),
RouterModule.forRoot([
{ path: '', component: HomeView, pathMatch: 'full'},
{ path: 'lazy', loadChildren: './+lazy/lazy.module#LazyModule'}
])
],
declarations: [ AppComponent, HomeView ],
exports: [ AppComponent ]
})

and the error occurs:

WEBPACK_AMD_DEFINE_RESULT !== undefined && (module.exports = WEBPACK_AMD_DEFINE_RESULT)):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c)}:a(window.jQuery)}(function(a){var b=function(c,d){this.id=++a.FE.ID,this.opts=a.extend(!0,{},a.extend({},b.DEFAULTS,"object"==typeof d&&d));var e=JSON.stringify(this.opts);a.FE.OPTS_MAPPING[e]=a.FE.OPTS_MAPPING[e]||this.id,this.sid=a.FE.OPTS_MAPPING[e],a.FE.SHARED[this.sid]=a.FE.SHARED[this.sid]||{},this.shared=a.FE.SHARED[this.sid],this.shared.count=(this.shared.count||0)+1,this.$oel=a(c),this.$oel.data("froala.editor",this),this.o_doc=c.ownerDocument,this.o_win="defaultView"in this.o_doc?this.o_doc.defaultView:this.o_doc.parentWindow;var f=a(this.o_win).scrollTop();this.$oel.on("froala.doInit",a.proxy(function(){this.$oel.off("froala.doInit"),this.doc=this.$el.get(0).ownerDocument,th

TypeError: Cannot set property 'froalaEditor' of undefined
at Object. (/home/alfred/workspace/ng-universal-demo/dist/server.js:123122:5421)
at d.id (/home/alfred/workspace/ng-universal-demo/dist/server.js:123121:37)
at Object. (/home/alfred/workspace/ng-universal-demo/dist/server.js:123122:283)
at webpack_require (/home/alfred/workspace/ng-universal-demo/dist/server.js:26:30)
at Object. (/home/alfred/workspace/ng-universal-demo/dist/server.js:86774:101)
at webpack_require (/home/alfred/workspace/ng-universal-demo/dist/server.js:26:30)
at Object. (/home/alfred/workspace/ng-universal-demo/dist/server.js:49842:70)
at webpack_require (/home/alfred/workspace/ng-universal-demo/dist/server.js:26:30)
at Object. (/home/alfred/workspace/ng-universal-demo/dist/server.js:86875:81)
at Object. (/home/alfred/workspace/ng-universal-demo/dist/server.js:86927:30)
at webpack_require (/home/alfred/workspace/ng-universal-demo/dist/server.js:26:30)
at /home/alfred/workspace/ng-universal-demo/dist/server.js:94:18
at Object. (/home/alfred/workspace/ng-universal-demo/dist/server.js:97:10)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)

from angular-froala-wysiwyg.

gouthamsaie avatar gouthamsaie commented on May 14, 2024 1

@alfredalfie, Have you solved the above proble..? If yes please let me know how to overcome this error.

from angular-froala-wysiwyg.

stefanneculai avatar stefanneculai commented on May 14, 2024

It looks you are using webpack, so please follow the steps for webpack integration: https://github.com/froala/angular2-froala-wysiwyg#use-with-webpack.

from angular-froala-wysiwyg.

stefanneculai avatar stefanneculai commented on May 14, 2024

@gouthamsaie I believe you should change the import for the editor to:

import * as FroalaEditor from 'froala-editor/js/froala_editor.pkgd.min';

from angular-froala-wysiwyg.

stadja avatar stadja commented on May 14, 2024

Yes @alfredalfie ... did you fixed this problem ? If yes, how did you do that ?

from angular-froala-wysiwyg.

jainankit102 avatar jainankit102 commented on May 14, 2024

@gouthamsaie Thanks for suggestion, but its not working for me.

Can you please tell me the full syntax.

thanks in advance.

from angular-froala-wysiwyg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.