zoukankan      html  css  js  c++  java
  • MVC ueditor的使用(实现上传图片功能)

    之前使用ckeditor不能实现上传图片功能,只要是我不知道怎么使用啦o( ̄ε ̄*),然后就换了ueditor~~,可以实现上传图片功能啦~(≧▽≦)/~~

    下面是我的步骤:去官网下载最新版ueditor,解压缩后放到文件目录下,如下:

    <script src="~/Content/ueditor/ueditor.all.js"></script>
    <script src="~/Content/ueditor/ueditor.all.min.js"></script>
    <script src="~/Content/ueditor/ueditor.config.js"></script>
    <link href="~/Content/ueditor/themes/iframe.css" rel="stylesheet" />
    <script type="text/javascript" >
        var editor = new baidu.editor.ui.Editor({
            UEDITOR_HOME_URL: '/Content/ueditor/',//配置编辑器路径
            iframeCssUrl: '/Content/ueditor/themes/iframe.css',//样式路径
            initialContent: '欢迎使用ueditor',//初始化编辑器内容
            autoHeightEnabled: true,//高度自动增长
            minFrameHeight: 500//最小高度
        });
        editor.render('Text');
    </script>
    <style>


     <td>内容:</td>
    <td>
     <textarea cols="80" id="content" name="Text" rows="10"></textarea>
    </td>

     

    在文件夹里面新增文件夹upload,image

    做好这几步后,就可以实现上传图片功能了。但是我出现了下面这种问题:

    调试后是这种错误:

    百度无果,然后发现是这个ueditor文件夹没有完全包含在项目里面,然后作如下操作就可以了:

  • 相关阅读:
    LeetCode 简单等级
    破解滑动验证码
    python的日志配置
    http/https协议
    Linux通配符和关机命令
    Linux-Shell基础(变量,字符串,数组)
    tf-tensorboard的一些注意事项
    dilated convolution 详解
    论文解读《Understanding the Effective Receptive Field in Deep Convolutional Neural Networks》
    感知域的一些理解
  • 原文地址:https://www.cnblogs.com/miaoying/p/4937644.html
Copyright © 2011-2022 走看看