froala/aurelia-froala-editor

Typescript support

gp-slick-coder opened this issue · 4 comments

Hi guys,

is there some typescript support? I'm not able to get the 'import' to work. froala.default(); is always undefined.

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

...

froala.default();

best regards

I got this working by doing following:

import 'font-awesome/css/font-awesome.css!'
import 'froala-editor/css/froala_editor.pkgd.min.css!'
import froala = require('froala-editor/js/froala_editor.pkgd.min')
froala() //or: froala(jQuery)


...
//froala.default() <-- not working/not needed?
aurelia.use.plugin('aurelia-froala-editor')

does that above fix works for JSPM installation too?

Yes, jspm/typescript

i tried the above solution but in main.ts it still cant find the path.. i am getting TS2307 error.

image