[英]How to upload a file from Tinymce in a angular application?
我已經使用 Angular 4 和 Material Design 開始了一個項目。 在項目中我想用TinyMce 4 來寫“新聞”。
我試圖按照這個例子https://www.tinymce.com/docs/demo/file-picker/但在線閱讀時出錯
const file = this.files[0];
錯誤看起來像:
Property 'files' does not exist on type 'HTMLElement'
我是 javascript 新手,所以我真的很感激一些幫助。
//lg
終於找到問題了。
const file = this.files[0];
應該
const file = input.files[0];
我不知道為什么它在上面提到的例子中有效,但這個改變對我來說是成功的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.