img configs for tiny

This commit is contained in:
Niels Lyngsø
2019-09-19 08:21:06 +02:00
parent fa3f5287c1
commit ec2e27dd07

View File

@@ -205,7 +205,7 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s
editor.on('SetContent', function (e) {
console.log("setcontent", e)
console.log("> setcontent", e)
var content = e.content;
@@ -357,10 +357,13 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s
};
//if (tinyMceConfig.pasteTidying) {
plugins.splice(plugins.indexOf("paste"), 1);
plugins.push("umbpaste");
console.log("plugins:", plugins)
// We keep spans here, cause removing spans here also removes b-tags inside of them, instead we strip them out later.
var validElements = "-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody,img,ul,ol,li"
var validElements = "-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody,img[src|alt|width|height],ul,ol,li"
// add valid elements from styleFormats.
var style, i = 0;