将图片上传到tinyMCE

时间:2014-03-12 12:21:57

标签: javascript node.js angularjs mongodb tinymce

我正在使用AngularJS,NodeJS,mongoose,mongoDB等技术编写此网页。 在这个网页中,我有一个tinyMCE文本编辑器。现在我发现这个编辑器能够拥有图像。我已经阅读过有关IMCE和iBrowser的内容,前者似乎只能在Drupal中运行,后者到目前为止我无法安装,因为当他们说“tinyMCE init code”时我不知道他们指的是什么。

我的问题是:有没有更好的方法将图片上传到tinyMCE?或者本指南中提到的“tincMCE初始化代码”是什么:http://netwizards.co.uk/installing-ibrowser-in-tinymce/

1 个答案:

答案 0 :(得分:4)

" tinyMCE初始化代码"是tinyMCE初始化的代码,即设置要使用的插件的位置,编辑器属性等。有关更多信息,请参阅此链接:

http://www.tinymce.com/wiki.php/Installation

在将图片上传到编辑器本身时,tinyMCE网站解释说:

How can I upload image files from my local computer?

Short answer: You can't!

Long answer: TinyMCE is just an editor to output (X)HTML code. It is by no means     
comparable to web editing desktop software such as Adobe Dreamweaver, Go Live! or     
Microsoft Web Expressions and the like. It runs on a user's browser (client-side) and     
not on a server. If you want to upload pictures to a server then you need a server-side  
component to process your image files. TinyMCE can't do that on its own since it doesn't 
run on the server but on the user's browser.

你可以尝试一下Froala WYSIWYG: http://editor.froala.com/

此外,这是stackoverflow的另一个问题: https://stackoverflow.com/questions/4438043/need-a-simple-wysiwyg-editor-with-image-upload

祝你好运