CKEditor粘贴保留Word格式

CKEDITOR.cleanWord = function(h, i) {
		return h;
		if (CKEDITOR.env.gecko)
			h = h.replace(
					/(([\S\s]*?))/gi,
					'$1$2$3');
		var j = new g(), k = j.dataFilter;
		k.addRules(CKEDITOR.plugins.pastefromword.getRules(i));
		i.fire('beforeCleanWord', {
			filter : k
		});
		try {
			h = j.toHtml(h, false);
		} catch (l) {
			alert(i.lang.pastefromword.error);
		}
		h = h.replace(/cke:.*?".*?"/g, '');
		h = h.replace(/style=""/g, '');
		h = h.replace(//g, '');
		return h;
	};
})();

 代码位置:ckeditor\plugins\pastefromword\filter下的default.js

以上代码为替换,不是追加!

注意:浏览器我去年买了个表的缓存

你可能感兴趣的:(CKEditor粘贴保留Word格式)