Topbar
  • Client Center
  • Support
RichTextEditor
  • Home
  • Demos
  • Features
  • Blazor Editor
  • Document
  • Pricing
  • Download

  1. Home
  2. Documents
  • Examples
  • Documents
    HomeInstallation (div)Installation (textarea)ConfigurationConfiguration ReferenceSetting and Getting data
  • Javascript API
    InitializationAll CommandsAll PropertiesAll MethodsHandle EventUpload files
  • Javascript Method List
    execCommandattachEventdetachEventgetHTMLCodesetHTMLCodegetPlainTextgetReadOnlysetReadOnlyisCommandEnabledisCommandActivesetContentCssTextsetPreviewCssTextinsertRootParagraphinsertByTagNamesurroundByTagNameinsertElementsurroundElementinsertTextinsertHTMLselectControlselectDoccollapsedeletefocuscommitBookmarkclearHistorynotifySelectionChangehtmlEncodehtmlDecodegetDocumentgetEditablegetSelectiongetSelectedControlgetSelectionElementgetSelectedTextcreateToolbarButtoncreateToolbarDropDowncreateDialogcloseCurrentPopupsetImageForCommand
  • JS Event List
    exec_commandchangeselectionchange

editor.getText()

Retrieves the string contents of the editor. Non-string content are omitted.

Syntax

editor.getText()

Return value

Type: String

The string contents of the editor in plain text format.

Example:

var editor1 = new RichTextEditor("#div_editor1");      
  
editor1.setHTMLCode("<p><b>Hello</b> World</p><p>Click the button below to show this text code</p>");      
  
function btnShowText() {      
    alert(editor1.getText())      
}   
RichTextEditor
  • 198 Kennedy St West
  • Aurora, ON, L4G2L7
  • Canada
Resources
  • Pricing
  • Demos
  • Support Ticket
  • Company
  • Document
  • Customers
  • Client Center
Editor Products
  • Blazor Rich Text Editor
  • Javascript Rich Text Editor
  • Rich Text Editor for .NET
  • Rich Text Editor for PHP
  • Rich Text Editor for ASP
Products
  • Javascript Obfuscator
  • Free Chat Software
  • Free Video Chat Room
  • Free .NET obfuscator
  • On-premises Live Chat
  • Blazor Uploader
  • Ajax Uploader
  • ASP Uploader
  • PHP File Uploader
  • Privacy & Policy
  • Terms
  • About Us

Copyright 2003-2024 Rich Text Editor. All rights reserved.

JavaScript Rich Text Editor is a feature-rich WYSIWYG HTML editor which allows your users create rich text content.