3 m.is && m.getCustomData("block_processed") || (m.is && CKEDITOR.dom.element.setMarker(r, m, "block_processed", !0), a.push(m))
8 this.foreach(function(a) {
9 /^(?!vbox|hbox)/.test(a.type) && (a.setup || (a.setup = function(c) {
10 a.setValue(c.getAttribute(a.id) || "", 1)
11 }), a.commit || (a.commit = function(c) {
12 var g = this.getValue();
13 if ("dir" != a.id || c.getComputedStyle("direction") != g) g ? c.setAttribute(a.id, g) : c.removeAttribute(a.id)
18 var f = CKEDITOR.tools.extend({},
19 CKEDITOR.dtd.$blockLimit);
20 a.config.div_wrapTable && (delete f.td, delete f.th);
27 title: a.lang.div.title,
32 label: a.lang.common.generalTab,
33 title: a.lang.common.generalTab,
36 widths: ["50%", "50%"],
40 style: "width: 100%;",
41 label: a.lang.div.styleSelectLabel,
44 [a.lang.common.notSet, ""]
46 onChange: function() {
47 var f = ["info:elementStyle", "info:class",
48 "advanced:dir", "advanced:style"
51 g = c._element && c._element.clone() || new CKEDITOR.dom.element("div", a.document);
53 for (var f = [].concat(f), b = f.length, k, e = 0; e < b; e++)(k = c.getContentElement.apply(c, f[e].split(":"))) && k.setup && k.setup(g, !0)
56 for (var c in n) n[c].checkElementRemovable(f, !0, a) && this.setValue(c, 1)
60 (c = this.getValue()) ? n[c].applyToObject(f, a): f.removeAttribute("style")
65 requiredContent: "div(cke-xyz)",
66 label: a.lang.common.cssClass,
72 label: a.lang.common.advancedTab,
73 title: a.lang.common.advancedTab,
79 widths: ["50%", "50%"],
83 requiredContent: "div[id]",
84 label: a.lang.common.id,
89 requiredContent: "div[lang]",
90 label: a.lang.common.langCode,
98 requiredContent: "div{cke-xyz}",
99 style: "width: 100%;",
100 label: a.lang.common.cssStyle,
102 commit: function(a) {
103 a.setAttribute("style", this.getValue())
111 requiredContent: "div[title]",
112 style: "width: 100%;",
113 label: a.lang.common.advisoryTitle,
119 requiredContent: "div[dir]",
120 style: "width: 100%;",
121 label: a.lang.common.langDir,
124 [a.lang.common.notSet, ""],
125 [a.lang.common.langDirLtr, "ltr"],
126 [a.lang.common.langDirRtl, "rtl"]
134 c = this.getContentElement("info",
136 a.getStylesSet(function(g) {
139 for (var e = 0; e < g.length; e++) k = g[e], k.element && "div" == k.element && (b = k.name, n[b] = k = new CKEDITOR.style(k), a.filter.check(k) && (c.items.push([b, b]), c.add(b, b)));
140 c[1 < c.items.length ? "enable" : "disable"]();
141 setTimeout(function() {
142 f._element && c.setup(f._element)
147 "editdiv" == m && this.setupContent(this._element = CKEDITOR.plugins.div.getSurroundDiv(a))
150 if ("editdiv" == m) p = [this._element];
155 b, k = a.getSelection(),
157 n = k.createBookmarks(),
159 for (h = 0; h < e.length; h++)
160 for (l = e[h].createIterator(); b = l.getNextParagraph();)
161 if (b.getName() in q && !b.isReadOnly()) {
162 var d = b.getChildren();
163 for (b = 0; b < d.count(); b++) t(g, d.getItem(b), c)
165 for (; !u[b.getName()] && !b.equals(e[h].root);) b = b.getParent();
168 CKEDITOR.dom.element.clearAllMarkers(c);
171 for (l = 0; l < g.length; l++) b = g[l], d = a.elementPath(b).blockLimit, d.isReadOnly() && (d = d.getParent()), a.config.div_wrapTable && d.is(["td", "th"]) && (d = a.elementPath(d.getParent()).blockLimit),
172 d.equals(h) || (h = d, e.push([])), b.getParent() && e[e.length - 1].push(b);
173 for (h = 0; h < e.length; h++)
177 for (b = 1; b < e[h].length; b++) g = g.getCommonAncestor(e[h][b]);
178 g || (g = a.editable());
179 l = new CKEDITOR.dom.element("div", a.document);
180 for (b = 0; b < e[h].length; b++) {
181 for (d = e[h][b]; d.getParent() && !d.getParent().equals(g);) d = d.getParent();
184 for (b = 0; b < e[h].length; b++) d = e[h][b], d.getCustomData && d.getCustomData("block_processed") || (d.is && CKEDITOR.dom.element.setMarker(c, d, "block_processed", !0), b || l.insertBefore(d), l.append(d));
185 CKEDITOR.dom.element.clearAllMarkers(c);
188 k.selectBookmarks(n);
192 for (c = 0; c < f; c++) this.commitContent(p[c]), !p[c].getAttribute("style") && p[c].removeAttribute("style");
196 "editdiv" == m && this._element.removeCustomData("elementStyle");
201 CKEDITOR.dialog.add("creatediv", function(a) {
202 return q(a, "creatediv")
204 CKEDITOR.dialog.add("editdiv", function(a) {
205 return q(a, "editdiv")