12345 |
- /*
- Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
- For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
- */
- !function(){CKEDITOR.plugins.add("selectall",{lang:"af,ar,az,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,es-mx,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,oc,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn",icons:"selectall",hidpi:!0,init:function(e){e.addCommand("selectAll",{modes:{wysiwyg:1,source:1},exec:function(e){var l=e.editable();if(l.is("textarea"))e=l.$,CKEDITOR.env.ie&&e.createTextRange?e.createTextRange().execCommand("SelectAll"):(e.selectionStart=0,e.selectionEnd=e.value.length),e.focus();else{if(l.is("body"))e.document.$.execCommand("SelectAll",!1,null);else{var t=e.createRange();t.selectNodeContents(l),t.select()}e.forceNextSelectionCheck(),e.selectionChange()}},canUndo:!1}),e.ui.addButton&&e.ui.addButton("SelectAll",{label:e.lang.selectall.toolbar,command:"selectAll",toolbar:"selection,10"})}})}();
|