Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

图片上传的问题 #184

Closed
star7th opened this issue Dec 4, 2015 · 10 comments
Closed

图片上传的问题 #184

star7th opened this issue Dec 4, 2015 · 10 comments

Comments

@star7th
Copy link

star7th commented Dec 4, 2015

我集成到一个web程序里后,编辑器初始化正常,点击插入标题这些按钮可以用,但点击添加图片的时候,则提示“Uncaught TypeError: Cannot set property 'imageDialog' of undefined”。编辑器初始化的时候已经添加了配置“
imageUpload : true,
imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp"],
imageUploadURL : "ImgUpload",

不过错误依旧。这有可能是什么引起的?
unnamed qq screenshot20151204115509

@star7th
Copy link
Author

star7th commented Dec 4, 2015

初始化编辑器的代码是:

  editormd = editormd("editormd", {
      width   : "90%",
      height  : 1000,
      syncScrolling : "single",
      path    : DocConfig.pubile + "/editor.md/lib/" ,
      placeholder : "本编辑器支持Markdown编辑,左边编写,右边预览",
      imageUpload : true,
      imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp"],
      imageUploadURL : "ImgUpload",

  });

@star7th
Copy link
Author

star7th commented Dec 7, 2015

这个问题有解了吗

@xyzget
Copy link
Contributor

xyzget commented Dec 9, 2015

path    : DocConfig.pubile + "/editor.md/lib/" ,

你确定是publie?没有乒协错误?

@star7th
Copy link
Author

star7th commented Dec 9, 2015

DocConfig.pubile 这是我前文定义的一个对象。按理说它是没问题的,因为编辑器的确能初始化,只是某些按钮不能用。像插入一级二级标题这些倒能用

@star7th star7th closed this as completed Dec 26, 2015
@fengjx
Copy link

fengjx commented May 4, 2016

我也碰到这个错误,解决没有呢?

@fengjx
Copy link

fengjx commented May 4, 2016

知道了,定义的editormd变量不能用”editormd“,与全局变量editormd冲突

@Ryongyon
Copy link

imageUploadURL : "ImgUpload"
这里这个ImgUpload是什么?不应该是“./php/upload.php”么?

@zhenqicai
Copy link

@star7th 你这个问题解决了吗?我也遇到类似的问题:
90421

@star7th
Copy link
Author

star7th commented Dec 15, 2017

@zhenqicai 手动引入插件的js。应该是自动引入出错了所以要手动。

@le011
Copy link

le011 commented Sep 7, 2018

你好,我也遇到相同问题:如何解决呢??
2w 2ji 6t6 phc_cqc7gx1i

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants