Viewing: jsapi_selectControl.html
<!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml" style="display:flex;height:100%;flex-direction:column;"> <head> <meta charset="utf-8" /> <title>selectControl</title> <base href='../' /> <link rel="stylesheet" href="res/style.css" /> </head> <body style="padding-bottom:3px;align-items:center"> <div class="topbanner"> <div style="align-self:stretch;width:960px;display:flex; flex-direction: row;"> <div style="flex:99999"> <label>RichTextEditor Demo</label> </div> <div> <a target="_blank" href="https://richtexteditor.com/">Home</a> <a target="_blank" href="https://richtexteditor.com/pricing.aspx">Pricing</a> </div> </div> </div> <div style="margin:auto;padding:12px 6px 36px;max-width:960px;"> <h2 class="mb-4">editor.selectControl(element)</h2> <p class="mb-4">Selects a control.</p> <div class="hs-docs-content-divider"> <h4>Syntax</h4> <p> <code class="highlighter-rouge">editor.selectControl(element)</code> </p> <h6>Parameter</h6> <p><code class="highlighter-rouge">Type: HTMLElement</code></p> <p><code class="highlighter-rouge">Required. The element you want to select.</code></p> </div> <div class="hs-docs-content-divider"> <div> <h2 class="hs-docs-heading">Example:</h2> <div class="dp-highlighter"> <div class="bar"></div><ol start="1" class="dp-c"><li class="alt"><span><span class="keyword">var</span><span> editor1 = </span><span class="keyword">new</span><span> RichTextEditor(</span><span class="string">"#div_editor1"</span><span>); </span></span></li><li class=""><span><span class="keyword">var</span><span> img=editor1.document.createElement(</span><span class="string">"IMG"</span><span>); </span></span></li><li class="alt"><span>img.src=<span class="string">"images/editor-image.png"</span><span>; </span></span></li><li class=""><span>editor1.insertElement(img); </span></li><li class="alt"><span>editor1.selectControl(img) </span></li></ol> </div> </div> </div> </div> <script src="res/patch.js"></script> </body> </html>
Return