ComunicWeb/assets/3rdparty/sceditor/plugins/plaintext.js
2018-12-27 14:02:01 +01:00

3 lines
517 B
JavaScript

/* SCEditor v2.1.3 | (C) 2017, Sam Clarke | sceditor.com/license */
!function(t){"use strict";var i=t.utils.extend;t.plugins.plaintext=function(){var e=!0;this.init=function(){var t=this.commands,n=this.opts;n&&n.plaintext&&n.plaintext.addButton&&(e=n.plaintext.enabled,t.pastetext=i(t.pastetext||{},{state:function(){return e?1:0},exec:function(){e=!e}}))},this.signalPasteRaw=function(t){if(e){if(t.html&&!t.text){var n=document.createElement("div");n.innerHTML=t.html,t.text=n.innerText}t.html=null}}}}(sceditor);