Viewing: jsapi_insertByTagName.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>insertByTagName</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.insertByTagName(tagname)</h2> <p class="mb-4">Inserts an element with the specified tag name.</p> <div class="hs-docs-content-divider"> <h4>Syntax</h4> <p> <code class="highlighter-rouge">editor.insertByTagName(tagname)</code> </p> <h6>Parameter</h6> <p><code class="highlighter-rouge">Type: String</code></p> <p><code class="highlighter-rouge">Required. The tagname of the elements you want to insert.</code></p> <h6>Return Value</h6> <p><code class="highlighter-rouge">Type: HTMLElement </code></p> <p><code class="highlighter-rouge">The HtmlElement that was just inserted.</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.insertByTagName(</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></ol> </div> </div> </div> </div> <script src="res/patch.js"></script> </body> </html>
Return