public/plugins/wxeditor/ueditor/ueditor.all.js

(开头部分) 1.24MB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*!
 * UEditor
 * version: ueditor
 * build: Wed Aug 10 2016 11:06:02 GMT+0800 (CST)
 */

(function () {

    var __version = 10019;

// editor.js
// 初始化编辑器配置

    function getUEBasePath(docUrl, confUrl) {
        return getBasePath(docUrl || self.document.URL || self.location.href, confUrl || getConfigFilePath());
    }

    function getConfigFilePath() {
        var configPath = document.getElementsByTagName('script');
        return configPath[configPath.length - 1].src;
    }

    function getBasePath(docUrl, confUrl) {
        var basePath = confUrl;
        if (/^(\/|\\\\)/.test(confUrl)) {
            basePath = /^.+?\w(\/|\\\\)/.exec(docUrl)[0] + confUrl.replace(/^(\/|\\\\)/, '');
        } else if (!/^[a-z]+:/i.test(confUrl)) {
            docUrl = docUrl.split("#")[0].split("?")[0].replace(/[^\\\/]+$/, '');
            basePath = docUrl + "" + confUrl;
        }
        return optimizationPath(basePath);
    }

    function optimizationPath(path) {
        var protocol = /^[a-z]+:\/\//.exec(path)[0],
            tmp = null,
            res = [];
        path = path.replace(protocol, "").split("?")[0].split("#")[0];
        path = path.replace(/\\/g, '/').split(/\//);
        path[0] = "";
        path[path.length - 1] = "";
        while (path.length) {
            if ((tmp = path.shift()) === "..") {
                res.pop();
            } else if (tmp !== ".") {
                res.push(tmp);
            }
        }
        return res.join("/");
    }

    var URL = window.UEDITOR_HOME_URL || getUEBasePath();

    var UEDITOR_CONFIG = window.UEDITOR_CONFIG || {
        //为编辑器实例添加一个路径,这个不能被注释
        UEDITOR_HOME_URL: URL,
        iframeCssUrl: URL + '/themes/iframe.css?v=' + __version, //给编辑区域的iframe引入一个css文件
    };
    var __IframeUrlMap = {};

后面还有 6526+ 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。