<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxCellEditor"></a>mxCellEditor</h1><divclass=CBody><p>In-place editor for the graph. To control this editor, use <ahref="mxGraph-js.html#mxGraph.invokesStopCellEditing"class=LVariableid=link55onMouseOver="ShowTip(event, 'tt45', 'link55')"onMouseOut="HideTip('tt45')">mxGraph.invokesStopCellEditing</a>, <ahref="mxGraph-js.html#mxGraph.enterStopsCellEditing"class=LVariableid=link56onMouseOver="ShowTip(event, 'tt46', 'link56')"onMouseOut="HideTip('tt46')">mxGraph.enterStopsCellEditing</a> and <ahref="mxGraph-js.html#mxGraph.escapeEnabled"class=LVariableid=link57onMouseOver="ShowTip(event, 'tt47', 'link57')"onMouseOut="HideTip('tt47')">mxGraph.escapeEnabled</a>. If <ahref="mxGraph-js.html#mxGraph.enterStopsCellEditing"class=LVariableid=link58onMouseOver="ShowTip(event, 'tt46', 'link58')"onMouseOut="HideTip('tt46')">mxGraph.enterStopsCellEditing</a> is true then ctrl-enter or shift-enter can be used to create a linefeed. The F2 and escape keys can always be used to stop editing.</p><p>To customize the location of the textbox in the graph, override <ahref="#mxCellEditor.getEditorBounds"class=LFunctionid=link59onMouseOver="ShowTip(event, 'tt40', 'link59')"onMouseOut="HideTip('tt40')">getEditorBounds</a> as follows:</p><blockquote><preclass="prettyprint">graph.cellEditor.getEditorBounds = function(state)
};</pre></blockquote><p>Note that this hook is only called if <ahref="#mxCellEditor.autoSize"class=LVariableid=link60onMouseOver="ShowTip(event, 'tt9', 'link60')"onMouseOut="HideTip('tt9')">autoSize</a> is false. If <ahref="#mxCellEditor.autoSize"class=LVariableid=link61onMouseOver="ShowTip(event, 'tt9', 'link61')"onMouseOut="HideTip('tt9')">autoSize</a> is true, then <ahref="../shape/mxShape-js.html#mxShape.getLabelBounds"class=LFunctionid=link62onMouseOver="ShowTip(event, 'tt48', 'link62')"onMouseOut="HideTip('tt48')">mxShape.getLabelBounds</a> is used to compute the current bounds of the textbox.</p><p>The textarea uses the mxCellEditor CSS class. You can modify this class in your custom CSS. Note: You should modify the CSS after loading the client in the page.</p><h4class=CHeading>Example</h4><p>To only allow numeric input in the in-place editor, use the following code.</p><blockquote><preclass="prettyprint">var text = graph.cellEditor.textarea;
});</pre></blockquote><h4class=CHeading>Placeholder</h4><p>To implement a placeholder for cells without a label, use the <ahref="#mxCellEditor.emptyLabelText"class=LVariableid=link63onMouseOver="ShowTip(event, 'tt11', 'link63')"onMouseOut="HideTip('tt11')">emptyLabelText</a> variable.</p><h4class=CHeading>Resize in Chrome</h4><p>Resize of the textarea is disabled by default. If you want to enable this feature extend <ahref="#mxCellEditor.init"class=LFunctionid=link64onMouseOver="ShowTip(event, 'tt22', 'link64')"onMouseOut="HideTip('tt22')">init</a> and set this.textarea.style.resize = ‘’.</p><p>To start editing on a key press event, the container of the graph should have focus or a focusable parent should be used to add the key press handler as follows.</p><blockquote><preclass="prettyprint">mxEvent.addListener(graph.container, 'keypress', mxUtils.bind(this, function(evt)
}));</pre></blockquote><p>To allow focus for a DIV, and hence to receive key press events, some browsers require it to have a valid tabindex attribute. In this case the following code may be used to keep the container focused.</p><blockquote><preclass="prettyprint">var graphFireMouseEvent = graph.fireMouseEvent;
};</pre></blockquote><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxCellEditor">mxCellEditor</a></td><tdclass=SDescription>In-place editor for the graph. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxCellEditor.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxCellEditor.mxCellEditor"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">mxCellEditor</a></td><tdclass=SDescription>Constructs a new in-place editor for the specified graph.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxCellEditor.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxCellEditor.graph"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">graph</a></td><tdclass=SDescription>Reference to the enclosing <ahref="mxGraph-js.html#mxGraph"class=LClassid=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">mxGraph</a>.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxCellEditor.textarea"id=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">textarea</a></td><tdclass=SDescription>Holds the DIV that is used for text editing. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxCellEditor.editingCell"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">editingCell</a></td><tdclass=SDescription>Reference to the <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">mxCell</a> that is currently being edited.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxCellEditor.trigger"id=link7onMouseOver="ShowTip(event, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">trigger</a></td><tdclass=SDescription>Reference to the event that was used to start editing.</td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxCellEditor.modified"id=link8onMouseOver="ShowTip(event, 'tt8', 'link8')"onMouseOut="HideTip('tt8')">modified</a></td><tdclass=SDescription>Specifies if the label has been modified.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxCellEditor.autoSize"id=link9onMouseOver="ShowTip(event, 'tt9', 'link9')"onMouseOut="HideTip('tt9')">autoSize</a></td><tdclass=SDescription>Specifies if the textarea should be resized while the text is being edited. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxCellEditor.selectText"id=link10onMouseOver="ShowTip(event, 'tt10', 'link10')"onMouseOut="HideTip('tt10')">selectText</a></td><tdclass=SDescription>Specifies if the text should be selected when editing starts. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxCellEditor.emptyLabelText"id=link11onMouseOver="ShowTip(event, 'tt11', 'link11')"onMouseOut="HideTip('tt11')">emptyLabelText</a></td><tdclass=SDescription>Text to be displayed for empty labels. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxCellEditor.escapeCancelsEditing"id=link12onMouseOver="ShowTip(event, 'tt12', 'link12')"onMouseOut="HideTip('tt12')">escapeCancelsEditing</a></td><tdclass=SDescription>If true, pressing the escape key will stop editing and not accept the new value. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxCellEditor.textNode"id=link13onMouseOver="ShowTip(event, 'tt13', 'link13')"onMouseOut="HideTip('tt13')">textNode</a></td><tdclass=SDescription>Reference to the label DOM node that has been hidden.</td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxCellEditor.zIndex"id=link14onMouseOver="ShowTip(event, 'tt14', 'link14')"onMouseOut="HideTip('tt14')">zIndex</a></td><tdcl
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.mxCellEditor"></a>mxCellEditor</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function mxCellEditor(</td><tdclass="PParameter prettyprint "nowrap>graph</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a new in-place editor for the specified graph.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>graph</td><tdclass=CDLDescription>Reference to the enclosing <ahref="mxGraph-js.html#mxGraph"class=LClassid=link65onMouseOver="ShowTip(event, 'tt3', 'link65')"onMouseOut="HideTip('tt3')">mxGraph</a>.</td></tr></table></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.graph"></a>graph</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.graph</td></tr></table></blockquote><p>Reference to the enclosing <ahref="mxGraph-js.html#mxGraph"class=LClassid=link66onMouseOver="ShowTip(event, 'tt3', 'link66')"onMouseOut="HideTip('tt3')">mxGraph</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.textarea"></a>textarea</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.textarea</td></tr></table></blockquote><p>Holds the DIV that is used for text editing. Note that this may be null before the first edit. Instantiated in <ahref="#mxCellEditor.init"class=LFunctionid=link67onMouseOver="ShowTip(event, 'tt22', 'link67')"onMouseOut="HideTip('tt22')">init</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.editingCell"></a>editingCell</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.editingCell</td></tr></table></blockquote><p>Reference to the <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link68onMouseOver="ShowTip(event, 'tt6', 'link68')"onMouseOut="HideTip('tt6')">mxCell</a> that is currently being edited.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.trigger"></a>trigger</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.trigger</td></tr></table></blockquote><p>Reference to the event that was used to start editing.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.modified"></a>modified</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.modified</td></tr></table></blockquote><p>Specifies if the label has been modified.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.autoSize"></a>autoSize</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.autoSize</td></tr></table></blockquote><p>Specifies if the textarea should be resized while the text is being edited. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.selectText"></a>selectText</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.selectText</td></tr></table></blockquote><p>Specifies if the text should be selected when editing starts. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.emptyLabelText"></a>emptyLabelText</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.emptyLabelText</td></tr></table></blockquote><p>Text to be displayed for empty labels. Default is ‘’ or ‘<br>’ in Firefox as a workaround for the missing cursor bug for empty content editable. This can be set to eg. “[Type Here]” to easier visualize editing of empty labels. The value is only displayed before the first keystroke and is never used as the actual editing value.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.escapeCancelsEditing"></a>escapeCancelsEditing</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.escapeCancelsEditing</td></tr></table></blockquote><p>If true, pressing the escape key will stop editing and not accept the new value. Change this to false to accept the new value on escape, and cancel editing on Shift+Escape instead. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.textNode"></a>textNode</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.textNode</td></tr></table></blockquote><p>Reference to the label DOM node that has been hidden.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.zIndex"></a>zIndex</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.zIndex</td></tr></table></blockquote><p>Specifies the zIndex for the textarea. Default is 5.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.minResize"></a>minResize</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.minResize</td></tr></table></blockquote><p>Defines the minimum width and height to be used in <ahref="#mxCellEditor.resize"class=LFunctionid=link69onMouseOver="ShowTip(event, 'tt16', 'link69')"onMouseOut="HideTip('tt16')">resize</a>. Default is 0x20px.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.wordWrapPadding"></a>wordWrapPadding</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.wordWrapPadding</td></tr></table></blockquote><p>Correction factor for word wrapping width. Default is 2 in quirks, 0 in IE 11 and 1 in all other browsers and modes.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.blurEnabled"></a>blurEnabled</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.blurEnabled</td></tr></table></blockquote><p>If <ahref="#mxCellEditor.focusLost"class=LFunctionid=link70onMouseOver="ShowTip(event, 'tt19', 'link70')"onMouseOut="HideTip('tt19')">focusLost</a> should be called if <ahref="#mxCellEditor.textarea"class=LVariableid=link71onMouseOver="ShowTip(event, 'tt4', 'link71')"onMouseOut="HideTip('tt4')">textarea</a> loses the focus. Default is false.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.initialValue"></a>initialValue</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.initialValue</td></tr></table></blockquote><p>Holds the initial editing value to check if the current value was modified.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.align"></a>align</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.align</td></tr></table></blockquote><p>Holds the current temporary horizontal alignment for the cell style. If this is modified then the current text alignment is changed and the cell style is updated when the value is applied.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.init"></a>init</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.init = function ()</td></tr></table></blockquote><p>Creates the <ahref="#mxCellEditor.textarea"class=LVariableid=link72onMouseOver="ShowTip(event, 'tt4', 'link72')"onMouseOut="HideTip('tt4')">textarea</a> and installs the event listeners. The key handler updates the <ahref="#mxCellEditor.modified"class=LVariableid=link73onMouseOver="ShowTip(event, 'tt8', 'link73')"onMouseOut="HideTip('tt8')">modified</a> state.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.applyValue"></a>applyValue</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxCellEditor.prototype.applyValue = function(</td><tdclass="PParameter prettyprint "nowrap>state,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>value</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Called in <ahref="#mxCellEditor.stopEditing"class=LFunctionid=link74onMouseOver="ShowTip(event, 'tt24', 'link74')"onMouseOut="HideTip('tt24')">stopEditing</a> if cancel is false to invoke <ahref="mxGraph-js.html#mxGraph.labelChanged"class=LFunctionid=link75onMouseOver="ShowTip(event, 'tt25', 'link75')"onMouseOut="HideTip('tt25')">mxGraph.labelChanged</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.setAlign"></a>setAlign</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxCellEditor.prototype.setAlign = function (</td><tdclass="PParameter prettyprint "nowrap>align</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the temporary horizontal alignment for the current editing session.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.getInitialValue"></a>getInitialValue</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxCellEditor.prototype.getInitialValue = function(</td><tdclass="PParameter prettyprint "nowrap>state,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>trigger</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Gets the initial editing value for the given cell.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.isCancelEditingKeyEvent"></a>isCancelEditingKeyEvent</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxCellEditor.prototype.isCancelEditingKeyEvent = function(</td><tdclass="PParameter prettyprint "nowrap>evt</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if <ahref="#mxCellEditor.escapeCancelsEditing"class=LVariableid=link76onMouseOver="ShowTip(event, 'tt12', 'link76')"onMouseOut="HideTip('tt12')">escapeCancelsEditing</a> is true and shift, control and meta are not pressed.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.isStopEditingEvent"></a>isStopEditingEvent</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxCellEditor.prototype.isStopEditingEvent = function(</td><tdclass="PParameter prettyprint "nowrap>evt</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given keydown event should stop cell editing. This returns true if F2 is pressed of if <ahref="mxGraph-js.html#mxGraph.enterStopsCellEditing"class=LVariableid=link77onMouseOver="ShowTip(event, 'tt46', 'link77')"onMouseOut="HideTip('tt46')">mxGraph.enterStopsCellEditing</a> is true and enter is pressed without control or shift.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.isEventSource"></a>isEventSource</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxCellEditor.prototype.isEventSource = function(</td><tdclass="PParameter prettyprint "nowrap>evt</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if this editor is the source for the given native event.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.focusLost"></a>focusLost</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.focusLost = function()</td></tr></table></blockquote><p>Called if the textarea has lost focus.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.getBackgroundColor"></a>getBackgroundColor</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxCellEditor.prototype.getBackgroundColor = function(</td><tdclass="PParameter prettyprint "nowrap>state</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the background color for the in-place editor. This implementation always returns null.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.isLegacyEditor"></a>isLegacyEditor</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.isLegacyEditor = function()</td></tr></table></blockquote><p>Returns true if max-width is not supported or if the SVG root element in in the graph does not have CSS position absolute. In these cases the text editor must use CSS position absolute to avoid an offset but it will have a less accurate line wrapping width during the text editing preview. This implementation returns true for IE8- and quirks mode or if the CSS position of the SVG element is not absolute.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.startEditing"></a>startEditing</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxCellEditor.prototype.startEditing = function(</td><tdclass="PParameter prettyprint "nowrap>cell,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>trigger</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Starts the editor for the given cell.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link79onMouseOver="ShowTip(event, 'tt6', 'link79')"onMouseOut="HideTip('tt6')">mxCell</a> to start editing.</td></tr><tr><tdclass=CDLEntry>trigger</td><tdclass=CDLDescription>Optional mouse event that triggered the editor.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.stopEditing"></a>stopEditing</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxCellEditor.prototype.stopEditing = function(</td><tdclass="PParameter prettyprint "nowrap>cancel</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Stops the editor and applies the value if cancel is false.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.prepareTextarea"></a>prepareTextarea</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.prepareTextarea = function()</td></tr></table></blockquote><p>Prepares the textarea for getting its value in <ahref="#mxCellEditor.stopEditing"class=LFunctionid=link82onMouseOver="ShowTip(event, 'tt24', 'link82')"onMouseOut="HideTip('tt24')">stopEditing</a>. This implementation removes the extra trailing linefeed in Firefox.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.isHideLabel"></a>isHideLabel</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxCellEditor.prototype.isHideLabel = function(</td><tdclass="PParameter prettyprint "nowrap>state</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the label should be hidden while the cell is being edited.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.getMinimumSize"></a>getMinimumSize</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxCellEditor.prototype.getMinimumSize = function(</td><tdclass="PParameter prettyprint "nowrap>state</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the minimum width and height for editing the given state.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.getEditorBounds"></a>getEditorBounds</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxCellEditor.prototype.getEditorBounds = function(</td><tdclass="PParameter prettyprint "nowrap>state</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the <ahref="../util/mxRectangle-js.html#mxRectangle"class=LClassid=link83onMouseOver="ShowTip(event, 'tt41', 'link83')"onMouseOut="HideTip('tt41')">mxRectangle</a> that defines the bounds of the editor.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.getEmptyLabelText"></a>getEmptyLabelText</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxCellEditor.prototype.getEmptyLabelText = function (</td><tdclass="PParameter prettyprint "nowrap>cell</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the initial label value to be used of the label of the given cell is empty. This label is displayed and cleared on the first keystroke. This implementation returns <ahref="#mxCellEditor.emptyLabelText"class=LVariableid=link84onMouseOver="ShowTip(event, 'tt11', 'link84')"onMouseOut="HideTip('tt11')">emptyLabelText</a>.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link85onMouseOver="ShowTip(event, 'tt6', 'link85')"onMouseOut="HideTip('tt6')">mxCell</a> for which a text for an empty editing box should be returned.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.getEditingCell"></a>getEditingCell</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.getEditingCell = function ()</td></tr></table></blockquote><p>Returns the cell that is currently being edited or null if no cell is being edited.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellEditor.destroy"></a>destroy</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.destroy = function ()</td></tr></table></blockquote><p>Destroys the editor and removes all associated resources.</p></div></div></div>
<divclass=CToolTipid="tt1"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function mxCellEditor(</td><tdclass="PParameter prettyprint "nowrap>graph</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a new in-place editor for the specified graph.</div></div><divclass=CToolTipid="tt2"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.graph</td></tr></table></blockquote>Reference to the enclosing mxGraph.</div></div><divclass=CToolTipid="tt3"><divclass=CClass>Extends mxEventSource to implement a graph component for the browser. </div></div><divclass=CToolTipid="tt4"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.textarea</td></tr></table></blockquote>Holds the DIV that is used for text editing. </div></div><divclass=CToolTipid="tt5"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.editingCell</td></tr></table></blockquote>Reference to the mxCell that is currently being edited.</div></div><divclass=CToolTipid="tt6"><divclass=CClass>Cells are the elements of the graph model. </div></div><divclass=CToolTipid="tt7"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.trigger</td></tr></table></blockquote>Reference to the event that was used to start editing.</div></div><divclass=CToolTipid="tt8"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.modified</td></tr></table></blockquote>Specifies if the label has been modified.</div></div><divclass=CToolTipid="tt9"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.autoSize</td></tr></table></blockquote>Specifies if the textarea should be resized while the text is being edited. </div></div><divclass=CToolTipid="tt10"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.selectText</td></tr></table></blockquote>Specifies if the text should be selected when editing starts. </div></div><divclass=CToolTipid="tt11"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.emptyLabelText</td></tr></table></blockquote>Text to be displayed for empty labels. </div></div><divclass=CToolTipid="tt12"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.escapeCancelsEditing</td></tr></table></blockquote>If true, pressing the escape key will stop editing and not accept the new value. </div></div><divclass=CToolTipid="tt13"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.textNode</td></tr></table></blockquote>Reference to the label DOM node that has been hidden.</div></div><divclass=CToolTipid="tt14"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.zIndex</td></tr></table></blockquote>Specifies the zIndex for the textarea. </div></div><divclass=CToolTipid="tt15"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellEditor.prototype.minResize</td></tr></table></blockquote>Defines the minimum width and height to be used in resize. </div></div><divclass