eWebEditor Manual V11.2 : Developer Guide : JavaScript API : exec
eWebEditor Home >> eWebEditor Manual V11.2 >> Developer Guide >> JavaScript API

3.7.11 exec

Description

Execute the specified button command function. Using the interface, you can create buttons on your own webpage. Click the button you created and it has the same function with the button in the editor. (new in V 8.0)

Syntax

object.exec(s_CommandName, s_CommandValue);

Parameter

s_CommandName: The available value of command name and character type can be checked in the following command list (case insensitive).

s_CommandName: The command value is optional. The parameter values required when executing some commands, such as the font name is needed when performing the formatting fonts.

Command List:

The unfilled command value means no required.

CommandName

CommandValue

Description

undo

 

Undo the last operation in the editor.

redo

 

Redo the last operation in the editor.

cut

 

Copies the current selection to the clipboard and then deletes it.

copy

 

Copies the current selection to the clipboard.

paste

 

Insert content from the clipboard into the editor at the selected position.

pastetext

 

Paste the plain text (no formatting) into the editor.

pasteword

 

Paste the content copied form the Microsoft word and remove the web-unfriendly tags

delete

 

Deletes the current selection.

removeformat

 

Removes the formatting tags from the current selection.

selectall

 

Selects the entire document.

unselect

 

Clears the current selection.

findreplace

 

Find and replace the text in the editor's content area

spellcheck

 

launch the spell checker

quickformat

 

quick format

bold

 

Toggles the current selection between bold and nonbold.

italic

 

Toggles the current selection between italic and nonitalic.

underline

 

Toggles the current selection between underlined and not underlined.

strikethrough

 

strike through the selected text

superscript

 

Change the selected text to superscript.

subscript

 

Change the selected text to subscript.

uppercase

 

convert the selected text to upper case

lowercase

 

convert the selected text to lower case

forecolor

 

change color of the selected text

backcolor

 

highlight the selected text

big

 

increase the font size of selected text

small

 

decrease the font size of selected text

justifyleft

 

Left-justifies the format block in which the current selection is located.

justifycenter

 

Centers the format block in which the current selection is located.

justifyright

 

Right-justifies the format block in which the current selection is located.

justifyfull

 

Justify Full

orderedlist

 

Toggles the text selection between an ordered list and a normal format block.

unorderedlist

 

Toggles the text selection between an unordered list and a normal format block.

indent

 

Increases the indent of the selected text by one indentation increment.

outdent

 

Decreases by one increment the indentation of the format block in which the current selection is located.

br

 

Insert the line break.

paragraph

 

Overwrites a line break on the text selection.

paragraphattr

 

Set the attributes of previous selected paragraph

image

 

Insert an image at the selected position in the editor and let you set its properties. Supports upload images and create thumbnail images.

flash

 

Insert a flash animation at the selected position and let you set its properties.

media

 

Insert a windows media object at the selected position and let you set its properties.

file

 

Insert a link to a document on the server (PDF,DOC, ZIP,etc.) at the selected position

remoteupload

 

Upload all chaining resource files of non-local server in editing contents to local server

localupload

 

Auto upload files in the computer to server. It is commonly used to auto upload local images, graphs and other files in Word document to host when Word pasting.

fieldset

 

Insert/Modify fieldset

iframe

 

Insert/Modify iframe

horizontalrule

 

Overwrites a horizontal line on the text selection.

marquee

 

Insert/Modify Marquee

createlink

 

Inserts a hyperlink on the current selection, or displays a dialog box enabling the user to specify a URL to insert as a hyperlink on the current selection.

unlink

 

Remove the hyperlink from the selected content.

map

 

Create or edit hot links of editing images

anchor

 

Add an anchor to the text on your page.

galleryimage

 

View uploaded image and share image gallery in server.

galleryflash

 

View uploaded flash and share flash gallery in server.

gallerymedia

 

View uploaded media and share media gallery in server.

galleryfile

 

View all uploaded files and share file gallery in server.

bgcolor

 

Background color of the object in current selected area

backimage

 

Background image of the object in current selected area

absoluteposition

 

Fly text, pictures, tables... any element anywhere you want.

zindexbackward

 

Send an item one position back at a time.

zindexforward

 

Bring an item one position forward at a time.

showborders

 

Toggle between displaying table and form guidelines and not showing any guidelines at all.

showblocks

 

show blocks

quote

 

Add quoted effect to current selected area

code

 

Add code effect to current selected area

symbol

 

Insert a special character from a predefined list.

printbreak

 

Insert Print Page Break

excel

 

Insert a blank EXCEL table

emot

 

Insert an emotion image at the selected position in the editor.

eq

 

Insert/Modify WEBEQ

art

 

Insert/Modify WordArt

nowdate

 

Insert the current date. The date format used is the date format configured on the client's machine.

nowtime

 

Insert the current time. The time format used is the time format configured on the client's machine.

importword

 

Import from Word

importexcel

 

Import from Excel

template

 

Insert Template

capture

 

Capture Screen

pagination

 

Insert Pagination

paginationinsert

 

Manage Pagination

formtext

 

Overwrites a text control on the text selection.

formtextarea

 

Overwrites a multiline text input control on the text selection.

formradio

 

Overwrites a radio control on the text selection.

formcheckbox

 

Overwrites a check box control on the text selection.

formdropdown

 

Overwrites a drop-down selection control on the text selection.

formbutton

 

Overwrites a button control on the text selection.

tableinsert

 

Insert a table into your web page.

tableprop

 

Edit table properties

tablecellprop

 

Edit cell properties

tablecellsplit

 

Split a cell into rows or columns

tablerowprop

 

Edit row properties

tablerowinsertabove

 

Insert a row above the selected row.

tablerowinsertbelow

 

Insert a row below the selected row.

tablerowmerge

 

Merge the current cell with the one below it.

tablerowsplit

 

Split a cell into rows

tablerowdelete

 

Delete the selected row.

tablecolinsertleft

 

Insert a column to the left of the selected cell.

tablecolinsertright

 

Insert a column to the right of the selected cell.

tablecolmerge

 

Merge the current cell with the one to its right.

tablecolsplit

 

Split a cell into columns

tablecoldelete

 

Delete the selected column.

refresh

 

Empty the editing area

modecode

 

Switch to source code editing mode

modeedit

 

Switch to WYSIWYG editing mode

modetext

 

Switch to plain text editing mode

modeview

 

Switch to preview mode, Show a preview of the page being edited

sizeplus

 

Increase the size of editing area

sizeminus

 

Decrease the size of editing area

print

 

Prints the current page.

maximize

 

Edit in full screen mode, maximizing your available space.

about

 

Displays about box for eWebEditor editor.

site

 

Go to eWebEditor Site

fontface

require

Sets the font for the current selection.

parameter example: "Arial"

fontsize

require

Sets the font size for the current selection.

parameter example: "16pt"

formatblock

require

Sets the current block format tag.

parameter example: "h1"

zoom

require

Zoom

parameter example: "150", means"150%"

 

For example:

The following method has demonstrated how to execute the specified command for the editor named "MyEditor".

myEditor.exec("paste);

myEditor.exec("fontface", "Arial");

myEditor.exec("fontsize", "16pt");