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.execCommand()

Editor object exposes an execCommand method to run commands that manipulate the current editable region.

Syntax

editor.execCommand(command,optionalValue)

command

Specifies the name of the command to execute on the selected section.

value

Some commands need a value to be completed.

Example 1:

var editor1 = new RichTextEditor("#div_editor1");      
      
editor1.execCommand("fullscreenenter");    

Example 2:

var editor2 = new RichTextEditor("#div_editor1");      
      
editor2.execCommand("forecolor","red");     
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.