liquid_feedback_frontend
diff static/wysihtml/wysihtml.all-commands.js @ 1309:32cc544d5a5b
Cumulative patch for upcoming frontend version 4
author | bsw/jbe |
---|---|
date | Sun Jul 15 14:07:29 2018 +0200 (2018-07-15) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/static/wysihtml/wysihtml.all-commands.js Sun Jul 15 14:07:29 2018 +0200 1.3 @@ -0,0 +1,630 @@ 1.4 +wysihtml.commands.alignCenterStyle = (function() { 1.5 + var nodeOptions = { 1.6 + styleProperty: "textAlign", 1.7 + styleValue: "center", 1.8 + toggle: true 1.9 + }; 1.10 + 1.11 + return { 1.12 + exec: function(composer, command) { 1.13 + return wysihtml.commands.formatBlock.exec(composer, "formatBlock", nodeOptions); 1.14 + }, 1.15 + 1.16 + state: function(composer, command) { 1.17 + return wysihtml.commands.formatBlock.state(composer, "formatBlock", nodeOptions); 1.18 + } 1.19 + }; 1.20 +})(); 1.21 + 1.22 +wysihtml.commands.alignJustifyStyle = (function() { 1.23 + var nodeOptions = { 1.24 + styleProperty: "textAlign", 1.25 + styleValue: "justify", 1.26 + toggle: true 1.27 + }; 1.28 + 1.29 + return { 1.30 + exec: function(composer, command) { 1.31 + return wysihtml.commands.formatBlock.exec(composer, "formatBlock", nodeOptions); 1.32 + }, 1.33 + 1.34 + state: function(composer, command) { 1.35 + return wysihtml.commands.formatBlock.state(composer, "formatBlock", nodeOptions); 1.36 + } 1.37 + }; 1.38 +})(); 1.39 + 1.40 +wysihtml.commands.alignLeftStyle = (function() { 1.41 + var nodeOptions = { 1.42 + styleProperty: "textAlign", 1.43 + styleValue: "left", 1.44 + toggle: true 1.45 + }; 1.46 + 1.47 + return { 1.48 + exec: function(composer, command) { 1.49 + return wysihtml.commands.formatBlock.exec(composer, "formatBlock", nodeOptions); 1.50 + }, 1.51 + 1.52 + state: function(composer, command) { 1.53 + return wysihtml.commands.formatBlock.state(composer, "formatBlock", nodeOptions); 1.54 + } 1.55 + }; 1.56 +})(); 1.57 + 1.58 +wysihtml.commands.alignRightStyle = (function() { 1.59 + var nodeOptions = { 1.60 + styleProperty: "textAlign", 1.61 + styleValue: "right", 1.62 + toggle: true 1.63 + }; 1.64 + 1.65 + return { 1.66 + exec: function(composer, command) { 1.67 + return wysihtml.commands.formatBlock.exec(composer, "formatBlock", nodeOptions); 1.68 + }, 1.69 + 1.70 + state: function(composer, command) { 1.71 + return wysihtml.commands.formatBlock.state(composer, "formatBlock", nodeOptions); 1.72 + } 1.73 + }; 1.74 +})(); 1.75 + 1.76 +/* Sets text background color by inline styles */ 1.77 +wysihtml.commands.bgColorStyle = (function() { 1.78 + return { 1.79 + exec: function(composer, command, color) { 1.80 + var colorVals = wysihtml.quirks.styleParser.parseColor("background-color:" + (color.color || color), "background-color"), 1.81 + colString; 1.82 + 1.83 + if (colorVals) { 1.84 + colString = (colorVals[3] === 1 ? "rgb(" + [colorVals[0], colorVals[1], colorVals[2]].join(', ') : "rgba(" + colorVals.join(', ')) + ')'; 1.85 + wysihtml.commands.formatInline.exec(composer, command, {styleProperty: 'backgroundColor', styleValue: colString}); 1.86 + } 1.87 + }, 1.88 + 1.89 + state: function(composer, command, color) { 1.90 + var colorVals = color ? wysihtml.quirks.styleParser.parseColor("background-color:" + (color.color || color), "background-color") : null, 1.91 + colString; 1.92 + 1.93 + if (colorVals) { 1.94 + colString = (colorVals[3] === 1 ? "rgb(" + [colorVals[0], colorVals[1], colorVals[2]].join(', ') : "rgba(" + colorVals.join(', ')) + ')'; 1.95 + } 1.96 + 1.97 + return wysihtml.commands.formatInline.state(composer, command, {styleProperty: 'backgroundColor', styleValue: colString}); 1.98 + }, 1.99 + 1.100 + remove: function(composer, command) { 1.101 + return wysihtml.commands.formatInline.remove(composer, command, {styleProperty: 'backgroundColor'}); 1.102 + }, 1.103 + 1.104 + stateValue: function(composer, command, props) { 1.105 + var st = this.state(composer, command), 1.106 + colorStr, 1.107 + val = false; 1.108 + 1.109 + if (st && wysihtml.lang.object(st).isArray()) { 1.110 + st = st[0]; 1.111 + } 1.112 + 1.113 + if (st) { 1.114 + colorStr = st.getAttribute('style'); 1.115 + if (colorStr) { 1.116 + val = wysihtml.quirks.styleParser.parseColor(colorStr, "background-color"); 1.117 + return wysihtml.quirks.styleParser.unparseColor(val, props); 1.118 + } 1.119 + } 1.120 + return false; 1.121 + } 1.122 + }; 1.123 +})(); 1.124 + 1.125 +wysihtml.commands.bold = (function() { 1.126 + var nodeOptions = { 1.127 + nodeName: "B", 1.128 + toggle: true 1.129 + }; 1.130 + 1.131 + return { 1.132 + exec: function(composer, command) { 1.133 + wysihtml.commands.formatInline.exec(composer, command, nodeOptions); 1.134 + }, 1.135 + 1.136 + state: function(composer, command) { 1.137 + return wysihtml.commands.formatInline.state(composer, command, nodeOptions); 1.138 + } 1.139 + }; 1.140 +})(); 1.141 + 1.142 +/* Formats block for as a <pre><code class="classname"></code></pre> block 1.143 + * Useful in conjuction for sytax highlight utility: highlight.js 1.144 + * 1.145 + * Usage: 1.146 + * 1.147 + * editorInstance.composer.commands.exec("formatCode", "language-html"); 1.148 +*/ 1.149 +wysihtml.commands.formatCode = (function() { 1.150 + return { 1.151 + exec: function(composer, command, classname) { 1.152 + var pre = this.state(composer)[0], 1.153 + code, range, selectedNodes; 1.154 + 1.155 + if (pre) { 1.156 + // caret is already within a <pre><code>...</code></pre> 1.157 + composer.selection.executeAndRestore(function() { 1.158 + code = pre.querySelector("code"); 1.159 + wysihtml.dom.replaceWithChildNodes(pre); 1.160 + if (code) { 1.161 + wysihtml.dom.replaceWithChildNodes(code); 1.162 + } 1.163 + }); 1.164 + } else { 1.165 + // Wrap in <pre><code>...</code></pre> 1.166 + range = composer.selection.getRange(); 1.167 + selectedNodes = range.extractContents(); 1.168 + pre = composer.doc.createElement("pre"); 1.169 + code = composer.doc.createElement("code"); 1.170 + 1.171 + if (classname) { 1.172 + code.className = classname; 1.173 + } 1.174 + 1.175 + pre.appendChild(code); 1.176 + code.appendChild(selectedNodes); 1.177 + range.insertNode(pre); 1.178 + composer.selection.selectNode(pre); 1.179 + } 1.180 + }, 1.181 + 1.182 + state: function(composer) { 1.183 + var selectedNode = composer.selection.getSelectedNode(), node; 1.184 + if (selectedNode && selectedNode.nodeName && selectedNode.nodeName == "PRE"&& 1.185 + selectedNode.firstChild && selectedNode.firstChild.nodeName && selectedNode.firstChild.nodeName == "CODE") { 1.186 + return [selectedNode]; 1.187 + } else { 1.188 + node = wysihtml.dom.getParentElement(selectedNode, { query: "pre code" }); 1.189 + return node ? [node.parentNode] : false; 1.190 + } 1.191 + } 1.192 + }; 1.193 +})(); 1.194 + 1.195 +/** 1.196 + * Inserts an <img> 1.197 + * If selection is already an image link, it removes it 1.198 + * 1.199 + * @example 1.200 + * // either ... 1.201 + * wysihtml.commands.insertImage.exec(composer, "insertImage", "http://www.google.de/logo.jpg"); 1.202 + * // ... or ... 1.203 + * wysihtml.commands.insertImage.exec(composer, "insertImage", { src: "http://www.google.de/logo.jpg", title: "foo" }); 1.204 + */ 1.205 +wysihtml.commands.insertImage = (function() { 1.206 + var NODE_NAME = "IMG"; 1.207 + return { 1.208 + exec: function(composer, command, value) { 1.209 + value = typeof(value) === "object" ? value : { src: value }; 1.210 + 1.211 + var doc = composer.doc, 1.212 + image = this.state(composer), 1.213 + textNode, 1.214 + parent; 1.215 + 1.216 + // If image is selected and src ie empty, set the caret before it and delete the image 1.217 + if (image && !value.src) { 1.218 + composer.selection.setBefore(image); 1.219 + parent = image.parentNode; 1.220 + parent.removeChild(image); 1.221 + 1.222 + // and it's parent <a> too if it hasn't got any other relevant child nodes 1.223 + wysihtml.dom.removeEmptyTextNodes(parent); 1.224 + if (parent.nodeName === "A" && !parent.firstChild) { 1.225 + composer.selection.setAfter(parent); 1.226 + parent.parentNode.removeChild(parent); 1.227 + } 1.228 + 1.229 + // firefox and ie sometimes don't remove the image handles, even though the image got removed 1.230 + wysihtml.quirks.redraw(composer.element); 1.231 + return; 1.232 + } 1.233 + 1.234 + // If image selected change attributes accordingly 1.235 + if (image) { 1.236 + for (var key in value) { 1.237 + if (value.hasOwnProperty(key)) { 1.238 + image.setAttribute(key === "className" ? "class" : key, value[key]); 1.239 + } 1.240 + } 1.241 + return; 1.242 + } 1.243 + 1.244 + // Otherwise lets create the image 1.245 + image = doc.createElement(NODE_NAME); 1.246 + 1.247 + for (var i in value) { 1.248 + image.setAttribute(i === "className" ? "class" : i, value[i]); 1.249 + } 1.250 + 1.251 + composer.selection.insertNode(image); 1.252 + if (wysihtml.browser.hasProblemsSettingCaretAfterImg()) { 1.253 + textNode = doc.createTextNode(wysihtml.INVISIBLE_SPACE); 1.254 + composer.selection.insertNode(textNode); 1.255 + composer.selection.setAfter(textNode); 1.256 + } else { 1.257 + composer.selection.setAfter(image); 1.258 + } 1.259 + }, 1.260 + 1.261 + state: function(composer) { 1.262 + var doc = composer.doc, 1.263 + selectedNode, 1.264 + text, 1.265 + imagesInSelection; 1.266 + 1.267 + if (!wysihtml.dom.hasElementWithTagName(doc, NODE_NAME)) { 1.268 + return false; 1.269 + } 1.270 + 1.271 + selectedNode = composer.selection.getSelectedNode(); 1.272 + if (!selectedNode) { 1.273 + return false; 1.274 + } 1.275 + 1.276 + if (selectedNode.nodeName === NODE_NAME) { 1.277 + // This works perfectly in IE 1.278 + return selectedNode; 1.279 + } 1.280 + 1.281 + if (selectedNode.nodeType !== wysihtml.ELEMENT_NODE) { 1.282 + return false; 1.283 + } 1.284 + 1.285 + text = composer.selection.getText(); 1.286 + text = wysihtml.lang.string(text).trim(); 1.287 + if (text) { 1.288 + return false; 1.289 + } 1.290 + 1.291 + imagesInSelection = composer.selection.getNodes(wysihtml.ELEMENT_NODE, function(node) { 1.292 + return node.nodeName === "IMG"; 1.293 + }); 1.294 + 1.295 + if (imagesInSelection.length !== 1) { 1.296 + return false; 1.297 + } 1.298 + 1.299 + return imagesInSelection[0]; 1.300 + } 1.301 + }; 1.302 +})(); 1.303 + 1.304 +wysihtml.commands.fontSize = (function() { 1.305 + var REG_EXP = /wysiwyg-font-size-[0-9a-z\-]+/g; 1.306 + 1.307 + return { 1.308 + exec: function(composer, command, size) { 1.309 + wysihtml.commands.formatInline.exec(composer, command, {className: "wysiwyg-font-size-" + size, classRegExp: REG_EXP, toggle: true}); 1.310 + }, 1.311 + 1.312 + state: function(composer, command, size) { 1.313 + return wysihtml.commands.formatInline.state(composer, command, {className: "wysiwyg-font-size-" + size}); 1.314 + } 1.315 + }; 1.316 +})(); 1.317 + 1.318 +/* Set font size by inline style */ 1.319 +wysihtml.commands.fontSizeStyle = (function() { 1.320 + return { 1.321 + exec: function(composer, command, size) { 1.322 + size = size.size || size; 1.323 + if (!(/^\s*$/).test(size)) { 1.324 + wysihtml.commands.formatInline.exec(composer, command, {styleProperty: "fontSize", styleValue: size, toggle: false}); 1.325 + } 1.326 + }, 1.327 + 1.328 + state: function(composer, command, size) { 1.329 + return wysihtml.commands.formatInline.state(composer, command, {styleProperty: "fontSize", styleValue: size || undefined}); 1.330 + }, 1.331 + 1.332 + remove: function(composer, command) { 1.333 + return wysihtml.commands.formatInline.remove(composer, command, {styleProperty: "fontSize"}); 1.334 + }, 1.335 + 1.336 + stateValue: function(composer, command) { 1.337 + var styleStr, 1.338 + st = this.state(composer, command); 1.339 + 1.340 + if (st && wysihtml.lang.object(st).isArray()) { 1.341 + st = st[0]; 1.342 + } 1.343 + if (st) { 1.344 + styleStr = st.getAttribute("style"); 1.345 + if (styleStr) { 1.346 + return wysihtml.quirks.styleParser.parseFontSize(styleStr); 1.347 + } 1.348 + } 1.349 + return false; 1.350 + } 1.351 + }; 1.352 +})(); 1.353 + 1.354 +wysihtml.commands.foreColor = (function() { 1.355 + var REG_EXP = /wysiwyg-color-[0-9a-z]+/g; 1.356 + 1.357 + return { 1.358 + exec: function(composer, command, color) { 1.359 + wysihtml.commands.formatInline.exec(composer, command, {className: "wysiwyg-color-" + color, classRegExp: REG_EXP, toggle: true}); 1.360 + }, 1.361 + 1.362 + state: function(composer, command, color) { 1.363 + return wysihtml.commands.formatInline.state(composer, command, {className: "wysiwyg-color-" + color}); 1.364 + } 1.365 + }; 1.366 +})(); 1.367 + 1.368 +/* Sets text color by inline styles */ 1.369 +wysihtml.commands.foreColorStyle = (function() { 1.370 + return { 1.371 + exec: function(composer, command, color) { 1.372 + var colorVals, colString; 1.373 + 1.374 + if (!color) { return; } 1.375 + 1.376 + colorVals = wysihtml.quirks.styleParser.parseColor("color:" + (color.color || color), "color"); 1.377 + 1.378 + if (colorVals) { 1.379 + colString = (colorVals[3] === 1 ? "rgb(" + [colorVals[0], colorVals[1], colorVals[2]].join(", ") : "rgba(" + colorVals.join(', ')) + ')'; 1.380 + wysihtml.commands.formatInline.exec(composer, command, {styleProperty: "color", styleValue: colString}); 1.381 + } 1.382 + }, 1.383 + 1.384 + state: function(composer, command, color) { 1.385 + var colorVals = color ? wysihtml.quirks.styleParser.parseColor("color:" + (color.color || color), "color") : null, 1.386 + colString; 1.387 + 1.388 + 1.389 + if (colorVals) { 1.390 + colString = (colorVals[3] === 1 ? "rgb(" + [colorVals[0], colorVals[1], colorVals[2]].join(", ") : "rgba(" + colorVals.join(', ')) + ')'; 1.391 + } 1.392 + 1.393 + return wysihtml.commands.formatInline.state(composer, command, {styleProperty: "color", styleValue: colString}); 1.394 + }, 1.395 + 1.396 + remove: function(composer, command) { 1.397 + return wysihtml.commands.formatInline.remove(composer, command, {styleProperty: "color"}); 1.398 + }, 1.399 + 1.400 + stateValue: function(composer, command, props) { 1.401 + var st = this.state(composer, command), 1.402 + colorStr, 1.403 + val = false; 1.404 + 1.405 + if (st && wysihtml.lang.object(st).isArray()) { 1.406 + st = st[0]; 1.407 + } 1.408 + 1.409 + if (st) { 1.410 + colorStr = st.getAttribute("style"); 1.411 + if (colorStr) { 1.412 + val = wysihtml.quirks.styleParser.parseColor(colorStr, "color"); 1.413 + return wysihtml.quirks.styleParser.unparseColor(val, props); 1.414 + } 1.415 + } 1.416 + return false; 1.417 + } 1.418 + }; 1.419 +})(); 1.420 + 1.421 +wysihtml.commands.insertBlockQuote = (function() { 1.422 + var nodeOptions = { 1.423 + nodeName: "BLOCKQUOTE", 1.424 + toggle: true 1.425 + }; 1.426 + 1.427 + return { 1.428 + exec: function(composer, command) { 1.429 + return wysihtml.commands.formatBlock.exec(composer, "formatBlock", nodeOptions); 1.430 + }, 1.431 + 1.432 + state: function(composer, command) { 1.433 + return wysihtml.commands.formatBlock.state(composer, "formatBlock", nodeOptions); 1.434 + } 1.435 + }; 1.436 +})(); 1.437 + 1.438 +wysihtml.commands.insertHorizontalRule = (function() { 1.439 + return { 1.440 + exec: function(composer) { 1.441 + var node = composer.selection.getSelectedNode(), 1.442 + phrasingOnlyParent = wysihtml.dom.getParentElement(node, { query: wysihtml.PERMITTED_PHRASING_CONTENT_ONLY }, null, composer.editableArea), 1.443 + elem = document.createElement('hr'), 1.444 + range, idx; 1.445 + 1.446 + // HR is not allowed into some elements (where only phrasing content is allowed) 1.447 + // thus the HR insertion must break out of those https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories 1.448 + if (phrasingOnlyParent) { 1.449 + composer.selection.splitElementAtCaret(phrasingOnlyParent, elem); 1.450 + } else { 1.451 + composer.selection.insertNode(elem); 1.452 + } 1.453 + 1.454 + if (elem.nextSibling) { 1.455 + composer.selection.setBefore(elem.nextSibling); 1.456 + } else { 1.457 + composer.selection.setAfter(elem); 1.458 + } 1.459 + }, 1.460 + state: function() { 1.461 + return false; // :( 1.462 + } 1.463 + }; 1.464 +})(); 1.465 + 1.466 +wysihtml.commands.insertOrderedList = (function() { 1.467 + return { 1.468 + exec: function(composer, command) { 1.469 + wysihtml.commands.insertList.exec(composer, command, "OL"); 1.470 + }, 1.471 + 1.472 + state: function(composer, command) { 1.473 + return wysihtml.commands.insertList.state(composer, command, "OL"); 1.474 + } 1.475 + }; 1.476 +})(); 1.477 + 1.478 +wysihtml.commands.insertUnorderedList = (function() { 1.479 + return { 1.480 + exec: function(composer, command) { 1.481 + wysihtml.commands.insertList.exec(composer, command, "UL"); 1.482 + }, 1.483 + 1.484 + state: function(composer, command) { 1.485 + return wysihtml.commands.insertList.state(composer, command, "UL"); 1.486 + } 1.487 + }; 1.488 +})(); 1.489 + 1.490 +wysihtml.commands.italic = (function() { 1.491 + var nodeOptions = { 1.492 + nodeName: "I", 1.493 + toggle: true 1.494 + }; 1.495 + 1.496 + return { 1.497 + exec: function(composer, command) { 1.498 + wysihtml.commands.formatInline.exec(composer, command, nodeOptions); 1.499 + }, 1.500 + 1.501 + state: function(composer, command) { 1.502 + return wysihtml.commands.formatInline.state(composer, command, nodeOptions); 1.503 + } 1.504 + }; 1.505 + 1.506 +})(); 1.507 + 1.508 +wysihtml.commands.justifyCenter = (function() { 1.509 + var nodeOptions = { 1.510 + className: "wysiwyg-text-align-center", 1.511 + classRegExp: /wysiwyg-text-align-[0-9a-z]+/g, 1.512 + toggle: true 1.513 + }; 1.514 + 1.515 + return { 1.516 + exec: function(composer, command) { 1.517 + return wysihtml.commands.formatBlock.exec(composer, "formatBlock", nodeOptions); 1.518 + }, 1.519 + 1.520 + state: function(composer, command) { 1.521 + return wysihtml.commands.formatBlock.state(composer, "formatBlock", nodeOptions); 1.522 + } 1.523 + }; 1.524 + 1.525 +})(); 1.526 + 1.527 +wysihtml.commands.justifyFull = (function() { 1.528 + var nodeOptions = { 1.529 + className: "wysiwyg-text-align-justify", 1.530 + classRegExp: /wysiwyg-text-align-[0-9a-z]+/g, 1.531 + toggle: true 1.532 + }; 1.533 + 1.534 + return { 1.535 + exec: function(composer, command) { 1.536 + return wysihtml.commands.formatBlock.exec(composer, "formatBlock", nodeOptions); 1.537 + }, 1.538 + 1.539 + state: function(composer, command) { 1.540 + return wysihtml.commands.formatBlock.state(composer, "formatBlock", nodeOptions); 1.541 + } 1.542 + }; 1.543 +})(); 1.544 + 1.545 +wysihtml.commands.justifyLeft = (function() { 1.546 + var nodeOptions = { 1.547 + className: "wysiwyg-text-align-left", 1.548 + classRegExp: /wysiwyg-text-align-[0-9a-z]+/g, 1.549 + toggle: true 1.550 + }; 1.551 + 1.552 + return { 1.553 + exec: function(composer, command) { 1.554 + return wysihtml.commands.formatBlock.exec(composer, "formatBlock", nodeOptions); 1.555 + }, 1.556 + 1.557 + state: function(composer, command) { 1.558 + return wysihtml.commands.formatBlock.state(composer, "formatBlock", nodeOptions); 1.559 + } 1.560 + }; 1.561 +})(); 1.562 + 1.563 +wysihtml.commands.justifyRight = (function() { 1.564 + var nodeOptions = { 1.565 + className: "wysiwyg-text-align-right", 1.566 + classRegExp: /wysiwyg-text-align-[0-9a-z]+/g, 1.567 + toggle: true 1.568 + }; 1.569 + 1.570 + return { 1.571 + exec: function(composer, command) { 1.572 + return wysihtml.commands.formatBlock.exec(composer, "formatBlock", nodeOptions); 1.573 + }, 1.574 + 1.575 + state: function(composer, command) { 1.576 + return wysihtml.commands.formatBlock.state(composer, "formatBlock", nodeOptions); 1.577 + } 1.578 + }; 1.579 +})(); 1.580 + 1.581 +wysihtml.commands.subscript = (function() { 1.582 + var nodeOptions = { 1.583 + nodeName: "SUB", 1.584 + toggle: true 1.585 + }; 1.586 + 1.587 + return { 1.588 + exec: function(composer, command) { 1.589 + wysihtml.commands.formatInline.exec(composer, command, nodeOptions); 1.590 + }, 1.591 + 1.592 + state: function(composer, command) { 1.593 + return wysihtml.commands.formatInline.state(composer, command, nodeOptions); 1.594 + } 1.595 + }; 1.596 + 1.597 +})(); 1.598 + 1.599 +wysihtml.commands.superscript = (function() { 1.600 + var nodeOptions = { 1.601 + nodeName: "SUP", 1.602 + toggle: true 1.603 + }; 1.604 + 1.605 + return { 1.606 + exec: function(composer, command) { 1.607 + wysihtml.commands.formatInline.exec(composer, command, nodeOptions); 1.608 + }, 1.609 + 1.610 + state: function(composer, command) { 1.611 + return wysihtml.commands.formatInline.state(composer, command, nodeOptions); 1.612 + } 1.613 + }; 1.614 + 1.615 +})(); 1.616 + 1.617 +wysihtml.commands.underline = (function() { 1.618 + var nodeOptions = { 1.619 + nodeName: "U", 1.620 + toggle: true 1.621 + }; 1.622 + 1.623 + return { 1.624 + exec: function(composer, command) { 1.625 + wysihtml.commands.formatInline.exec(composer, command, nodeOptions); 1.626 + }, 1.627 + 1.628 + state: function(composer, command) { 1.629 + return wysihtml.commands.formatInline.state(composer, command, nodeOptions); 1.630 + } 1.631 + }; 1.632 + 1.633 +})();