zoukankan      html  css  js  c++  java
  • 开发备忘录

    在家玩了几天,

    完全忘记上班的时候写的代码了,但是也怪我基本上都是百度了,感觉可以了也没有记下来

    开始做小程序后台了,后台前端用的AceAdmin

    这次用了好半天总算搜到了,哎又是搜到的

    一个表格插件

    Bootstrap Table 挺好看的,感觉配置起来也不复杂

    富文本编辑器

    TinyMCE

    把我的配置记下来,做个备忘

     tinymce.init({
                    selector: '#ArticleContent',
                    language: 'zh_CN',
                    height: 650,
                    min_height: 500,
                    object_resizing: false,
                    setup: function (editor) {
                        editor.on('change', function () {
                            editor.save();
                        });
                    },
                    convert_urls: false, // 图片路径 ,设置成false后可以防止生成相对路径
    
    
                    plugins: ' preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template importcss code codesample table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern help emoticons autosave   autoresize  axupimgs',
                    toolbar: 'styleselect code undo redo restoredraft | cut copy paste pastetext | forecolor backcolor bold italic underline strikethrough link anchor | alignleft aligncenter alignright alignjustify outdent indent | 
                                                             styleselect formatselect fontselect fontsizeselect | bullist numlist | blockquote subscript superscript removeformat | 
                                                             table image media charmap emoticons hr pagebreak insertdatetime  preview | fullscreen |  axupimgs',
                    //content_css: "../Content/tinymce/global.css",
                    images_upload_handler: function (blobInfo, succFun, failFun) {
                        var xhr, formData;
                        var file = blobInfo.blob();//转化为易于理解的file对象
                        xhr = new XMLHttpRequest();
                        xhr.withCredentials = false;
                        xhr.open('POST', '/Article/Upload');
                        xhr.onload = function () {
                            var json;
                            if (xhr.status != 200) {
                                console.log('HTTP Error: ' + xhr.status);
                                return;
                            }
                            json = JSON.parse(xhr.responseText);
                            //if (!json || typeof json.location != 'string') {
                            //    console.log('Invalid JSON: ' + xhr.responseText);
                            //    return;
                            //}
                            if (json.status == false) {
                                console.log('Invalid JSON: ' + xhr.responseText);
                                return;
                            }
                            succFun(json.url);
                        };
                        formData = new FormData();
                        formData.append('file', file, file.name);
                        xhr.send(formData);
                    }
                });
  • 相关阅读:
    [转]Nvidia 的Shadow 文章收集
    [转]Linear Depth Buffer(线性深度缓冲区)
    [转]ParallelSplit Shadow Maps on Programmable GPUs
    [转]Learning to Love your Zbuffer.
    SQL SERVER存储过程中使用事务
    VS2005+SQL2005 Reporting Service动态绑定报表(Web)
    Sql批量删除/插入
    存储过程中执行动态Sql语句
    存储过程中使用事务
    真正的全动态报表:RDLC+ReportViewer
  • 原文地址:https://www.cnblogs.com/wu-xin/p/12248984.html
Copyright © 2011-2022 走看看