Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Simple TinyMce抛出“o不是构造函数”和“属性onload of null”_Javascript_Angularjs_Tinymce_Tinymce 4_Angular Ui Tinymce - Fatal编程技术网

Javascript Simple TinyMce抛出“o不是构造函数”和“属性onload of null”

Javascript Simple TinyMce抛出“o不是构造函数”和“属性onload of null”,javascript,angularjs,tinymce,tinymce-4,angular-ui-tinymce,Javascript,Angularjs,Tinymce,Tinymce 4,Angular Ui Tinymce,跟随图坦卡蒙并设置TinyMce,我在加载TinyMce站点时遇到了麻烦 未捕获的TypeError:o不是构造函数 更改到其他站点会引发 TypeError:无法将属性“onload”设置为null 重定向到发生错误的点 function et() { var e = !0 , n = this; this.debugEnabled = function(n) { return y(n) ? (e = n, this) : e

跟随图坦卡蒙并设置TinyMce,我在加载TinyMce站点时遇到了麻烦 未捕获的TypeError:o不是构造函数 更改到其他站点会引发 TypeError:无法将属性“onload”设置为null 重定向到发生错误的点

function et() {
    var e = !0
      , n = this;
    this.debugEnabled = function(n) {
        return y(n) ? (e = n,
        this) : e
    }
    ,
    this.$get = ["$window", function(t) {
        function l(e) {
            return e instanceof Error && (e.stack ? e = e.message && e.stack.indexOf(e.message) === -1 ? "Error: " + e.message + "\n" + e.stack : e.stack : e.sourceURL && (e = e.message + "\n" + e.sourceURL + ":" + e.line)),
            e
        }
        function i(e) {
            var n = t.console || {}
              , i = n[e] || n.log || p
              , o = !1;
            try {
                o = !!i.apply
            } catch (e) {}
            return o ? function() {
                var e = [];
                return r(arguments, function(n) {
                    e.push(l(n))
                }),
                i.apply(n, e)// Errors here
            }
            : function(e, n) {
                i(e, null == n ? "" : n)
            }
        }
        return {
            log: i("log"),
            info: i("info"),
            warn: i("warn"),
            error: i("error"),
            debug: function() {
                var t = i("debug");
                return function() {
                    e && t.apply(n, arguments)
                }
            }()
        }
    }
    ]
}
设置

.html    
<td>
 <textarea ui-tinymce='tinymceOptionsRead' ng-model='originalText' ></textarea>
</td>
.js 
   class HtmlvalueComponent {
        constructor($scope) {
          this.$scope.tinymceOptionsRead = {
            menubar: false,
            theme: 'modern',
            plugins: '',
            toolbar: false,
            readonly: true,
            statusbar: false,
            height: 170,
          };
        }
因为错误日志中没有更多的信息,谷歌也没有给出解决方案,所以我需要帮助

如果我在.js文件中添加注释,TinymceOptions将被读出,而不是在.html中设置,因为它仍然会抛出这两个错误。 如果我只把这件小事说出来 然后错误消失了,所以问题就出现了。 网站上的其他一切都在工作,比如按钮、积垢等等 我已安装最新版本: TinyMce:4.5.2 ui TinyMce:0.0.18
Angular:1.5.8

将jquery.min.js文件放在任何脚本上方的页面标题部分下。这个技巧对我很有效。

在TinyMce软件包的原始文件中输出minifier。错误直接出现在那里。只是显示了它,所以也许它暗示了问题可能在哪里。我今天一直在和tinymce玩。我只想提到$scope不应该包含在构造函数中,因此在this.tinymceOptions中。只是看起来不太对劲。我有一些类似的东西,但没有$scope,我得到了一个错误:uncaughttypeerror:Theme不是一个构造函数,这是一个TS错误。@luliaMihet我让它工作了。问题是它是在开发中工作的,而不是在生产中。问题是,TinyMCE所需的包装目前没有通过捆绑发货的方式包括在内。也许这和你遇到的问题是一样的?不,我只是尝试访问tinymceOptions,但它不起作用,但那是因为我没有将它们正确地添加到textarea元素中的ui tinymce。