easyimagealt.js 800 B

12345
  1. /*
  2. Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
  3. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. CKEDITOR.dialog.add("easyimageAlt",function(t){return{title:t.lang.easyimage.commands.altText,minWidth:200,minHeight:30,getModel:function(){var e=t.widgets.focused;return e&&"easyimage"==e.name?e:null},onOk:function(){var e=CKEDITOR.tools.trim(this.getValueOf("info","txtAlt")),a=this.getModel(t);a&&a.parts.image.setAttribute("alt",e)},onShow:function(){var e=this.getContentElement("info","txtAlt"),a=this.getModel(t);a&&e.setValue(a.parts.image.getAttribute("alt")),e.focus()},contents:[{id:"info",label:t.lang.easyimage.commands.altText,accessKey:"I",elements:[{type:"text",id:"txtAlt",label:t.lang.easyimage.commands.altText}]}]}});