2 Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3 For licensing, see LICENSE.md or http://ckeditor.com/license
5 CKEDITOR.dialog.add("hiddenfield", function(d) {
7 title: d.lang.forms.hidden.title,
12 delete this.hiddenField;
13 var a = this.getParentEditor(),
15 c = b.getSelectedElement();
16 c && c.data("cke-real-element-type") && "hiddenfield" == c.data("cke-real-element-type") && (this.hiddenField = c, c = a.restoreRealElement(this.hiddenField), this.setupContent(c), b.selectElement(this.hiddenField))
19 var a = this.getValueOf("info", "_cke_saved_name"),
20 b = this.getParentEditor(),
21 a = CKEDITOR.env.ie && 8 > CKEDITOR.document.$.documentMode ? b.document.createElement('\x3cinput name\x3d"' + CKEDITOR.tools.htmlEncode(a) + '"\x3e') : b.document.createElement("input");
22 a.setAttribute("type", "hidden");
23 this.commitContent(a);
24 a = b.createFakeElement(a, "cke_hidden", "hiddenfield");
25 this.hiddenField ? (a.replace(this.hiddenField), b.getSelection().selectElement(a)) : b.insertElement(a);
30 label: d.lang.forms.hidden.title,
31 title: d.lang.forms.hidden.title,
33 id: "_cke_saved_name",
35 label: d.lang.forms.hidden.name,
39 this.setValue(a.data("cke-saved-name") || a.getAttribute("name") || "")
42 this.getValue() ? a.setAttribute("name", this.getValue()) : a.removeAttribute("name")
47 label: d.lang.forms.hidden.value,
51 this.setValue(a.getAttribute("value") || "")
54 this.getValue() ? a.setAttribute("value", this.getValue()) : a.removeAttribute("value")