返回介绍

Editor command identifiers

发布于 2019-05-06 06:49:52 字数 9487 浏览 1133 评论 0 收藏 0

Here is a list of the currently exposed editor commands. All these commands are provided by tinymce and not by the browser’s internal commands. These commands can be executed using the execCommand function.

CommandCore/PluginDescription
mceAddEditorCoreConverts the specified HTML or DOM element into an editor instance with the specified ID.
mceRemoveEditorCoreRemoves an editor instance with the specified ID.
mceToggleEditorCoreRuns mceAddEditor if an editor is not detected for the specified ID, otherwise it runs either hide if the editor is visible or show if it is not visible.
BoldCoreToggles bold formatting to selection.
ItalicCoreToggles italic formatting to selection.
UnderlineCoreToggles underline formatting to selection.
StrikethroughCoreToggles strikethough formatting to selection.
SuperscriptCoreToggles superscript formatting to selection.
SubscriptCoreToggles subscript formatting to selection.
CutCoreCuts the selected contents and puts in into users clipboard.
CopyCoreCopies the selected contents and puts in into users clipboard.
PasteCorePastes the current clipboard contents into the editor.
UnlinkCoreRemoves any links from the current selection.
JustifyLeftCoreLeft aligns the current text block/image.
JustifyCenterCoreCenter aligns the current text block/image.
JustifyRightCoreRight aligns the current text block/image.
JustifyFullCoreFull aligns the current text block/image.
JustifyNoneCoreRemoves any alignment to the selected text.
InsertUnorderedListCoreInserts an unordered list into the editor.
InsertOrderedListCoreInserts and ordered list into the editor.
ForeColorCoreChanges the text color of the text. The value passed in should be the color.
HiliteColorCoreChanges the background color of the text. The value passed in should be the color.
FontNameCoreFont name to apply to the text. The value passed in should be the font family name.
FontSizeCoreFont size of the text. The value passed in should be the font size 1-7.
RemoveFormatCoreRemoves any formats from the current selection.
mceBlockQuoteCoreWraps the selected text blocks into a block quote.
FormatBlockCoreChanges the format of the current block. The value passed in should be the block name for example H1 or P.
mceInsertContentCoreInserts contents at the current selection. The value passed in should be the contents to be insterted.
mceToggleFormatCoreToggles a specified format by name. The value is the name of the format to toggle.
mceSetContentCoreSets the contents of the editor. The value is the contents to set as the editor contents.
IndentCoreIndents the current selection.
OutdentCoreOutdents the current selection.
InsertHorizontalRuleCoreInserts a horizontal ruler.
mceToggleVisualAidCoreToggles the visual aids for tables without borders etc.
mceInsertLinkCoreInserts a link at the current selection. The value is the URL to add to the link(s).
selectAllCoreSelects all contents in the editor.
deleteCoreDeletes the current selection from the editor.
mceNewDocumentCoreRemoves all contents of the editor.
UndoCoreUndoes the last change to the editor.
RedoCoreRedoes the last change to the editor.
mceAutoResizeautoresizeAuto resizes the editor to the contents.
mceShowCharmapcharmapOpens the character map dialog.
mceCodeEditorcodeOpens the code editor dialog.
mceDirectionLTRdirectionalityChanges the directionality to LTR.
mceDirectionRTLdirectionalityChanges the directionality to RTL.
mceFullPagePropertiesfullpageOpens the fullpage dialog.
mceFullscreenfullscreenToggles fullscreen mode.
mceImageimageOpens the insert image dialog.
mceEditImageimagetoolsOpens the edit image dialog.
mceImageRotateRightimagetoolsRotates selected image 90 degrees clockwise.
mceImageRotateLeftimagetoolsRotates selected image 90 degrees counter clockwise.
mceImageFlipVerticalimagetoolsFlips selected image vertically.
mceImageFlipHorizontalimagetoolsFlips selected image horizontally.
mceInsertDateinsertdatetimeInserts the current date as a human readable string.
mceInsertTimeinsertdatetimeInsert the current time as a human readable string.
mceInsertDefinitionListlistsCreates a definition list.
mceNonBreakingnonbreakingInserts a non breaking space.
mcePageBreakpagebreakInserts a page break.
mcePreviewpreviewDisplays a preview of the editor contents.
mcePrintprintPrints the current page.
mceSavesaveSaves the current editor contents.
SearchReplacesearchreplaceOpens the search/replace dialog.
mceSpellcheckspellcheckerToggles spellchecking on/off.
mceInsertTemplatetemplateInserts a template the value should be the template HTML to process and insert.
mceVisualBlocksvisualblocksToggles visual blocks on/off.
mceVisualCharsvisualcharsToggles visual characters on/off.
mceMediamediaOpens the insert/edit media dialog.
mceAnchoranchorOpens the insert/edit anchor dialog.
mceTableSplitCellstableSplits the current merge table cell.
mceTableMergeCellstableMerges the selected cells or opens a dialog if there is no cell selection.
mceTableInsertRowBeforetableInserts a row before the current row.
mceTableInsertRowAftertableInserts a row after the current row.
mceTableInsertColBeforetableInserts a column before the current column.
mceTableInsertColAftertableInserts a column after the current column.
mceTableDeleteColtableDeletes the current column.
mceTableDeleteRowtableDeletes the current row.
mceTableCutRowtableCuts the current row into table clipboard.
mceTableCopyRowtableCopies the current row into table clipboard.
mceTablePasteRowBeforetablePaste the clipboard row before the current row.
mceTablePasteRowAftertablePaste the clipboard row after the current row.
mceTableDeletetableDeletes the current table.
mceInsertTabletableOpens the insert table dialog.
mceTableRowPropstableOpens the table row properties dialog.
mceTableCellPropstableOpens the table cell properties dialog.
mceInsertToctocInserts a Table of Contents into the editor.
mceUpdateToctocUpdates the Table of Contents, if found in the editor.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文