vue-froala-wysiwyg icon indicating copy to clipboard operation
vue-froala-wysiwyg copied to clipboard

Trim is not a function error when initialize Froala

Open yellow1912 opened this issue 4 years ago • 1 comments

I'm getting this error as soon as I try to include froala inside my vuejs project.

Vue froala version: 3.0.6 Froala version: 3.0.6 Vue version: 2.6.10

I followed the instruction on the readme:

// Import and use Vue Froala lib.
import VueFroala from 'vue-froala-wysiwyg'
Vue.use(VueFroala)

I also loaded 'froala-editor/js/froala_editor.pkgd.min.js' (separately).

The code I used to initialize froala component is:

<froala :tag="'textarea'" :config="config" v-model="form.nilead_content.description"></froala>

The error I get is:

froala_editor.min.js:7 Uncaught TypeError: (t || "").trim is not a function
    at Object.set (froala_editor.min.js:7)
    at n (vue-froala.js:111)
    at v.Bootstrap.<anonymous> (vue-froala.js:121)
    at v.Bootstrap.currentConfig.events.initialized (vue-froala.js:260)
    at Object.g [as trigger] (froala_editor.min.js:7)
    at v.Bootstrap.b (froala_editor.min.js:7)
set @ froala_editor.min.js:7
n @ vue-froala.js:111
(anonymous) @ vue-froala.js:121
currentConfig.events.initialized @ vue-froala.js:260
g @ froala_editor.min.js:7
b @ froala_editor.min.js:7
setTimeout (async)
(anonymous) @ froala_editor.min.js:7
(anonymous) @ froala_editor.min.js:7
v.Bootstrap._init @ froala_editor.min.js:7
v.Bootstrap @ froala_editor.min.js:7
t @ froala_editor.min.js:7
createEditor @ vue-froala.js:89
mounted @ vue-froala.js:43
invokeWithErrorHandling @ vue.js:1863
callHook @ vue.js:4214
insert @ vue.js:3146
invokeInsertHook @ vue.js:6335
patch @ vue.js:6552
Vue._update @ vue.js:3940
updateComponent @ vue.js:4061
get @ vue.js:4472
Watcher @ vue.js:4461
mountComponent @ vue.js:4068
Vue.$mount @ vue.js:9038
Vue.$mount @ vue.js:11923
Vue._init @ vue.js:5006
Vue @ vue.js:5072
(anonymous) @ vue.js:107
n @ bootstrap:19
(anonymous) @ bootstrap:83
(anonymous) @ main.min.js?ts=1571316526:4

yellow1912 avatar Oct 17 '19 13:10 yellow1912

This issue is still present.

rcheung9 avatar Apr 04 '20 00:04 rcheung9