適用於 Adobe® Flash® Platform 的 ActionScript® 3.0 參考
首頁  |  隱藏套件和類別清單 |  套件  |  類別  |  新增內容  |  索引  |  附錄  |  為什麼顯示英文?
篩選: AIR 30.0 和更早版本, Flash Player 30.0 和更早版本, Flash Lite 4
Flex 4.6 和更早版本, Flash Pro CS6 和更早版本
隱藏篩選
flashx.textLayout.edit 

IEditManager  - AS3

套件x

最上層
adobe.utils
air.desktop
air.net
air.update
air.update.events
coldfusion.air
coldfusion.air.errors
coldfusion.air.events
coldfusion.service
coldfusion.service.events
coldfusion.service.mxml
com.adobe.acm.solutions.authoring.domain.extensions
com.adobe.acm.solutions.ccr.domain.extensions
com.adobe.consulting.pst.vo
com.adobe.dct.component
com.adobe.dct.component.datadictionary
com.adobe.dct.component.datadictionaryElement
com.adobe.dct.component.dataElementsPanel
com.adobe.dct.component.toolbars
com.adobe.dct.event
com.adobe.dct.exp
com.adobe.dct.model
com.adobe.dct.service
com.adobe.dct.service.provider
com.adobe.dct.transfer
com.adobe.dct.util
com.adobe.dct.view
com.adobe.ep.taskmanagement.domain
com.adobe.ep.taskmanagement.event
com.adobe.ep.taskmanagement.filter
com.adobe.ep.taskmanagement.services
com.adobe.ep.taskmanagement.util
com.adobe.ep.ux.attachmentlist.component
com.adobe.ep.ux.attachmentlist.domain
com.adobe.ep.ux.attachmentlist.domain.events
com.adobe.ep.ux.attachmentlist.domain.renderers
com.adobe.ep.ux.attachmentlist.skin
com.adobe.ep.ux.attachmentlist.skin.renderers
com.adobe.ep.ux.content.event
com.adobe.ep.ux.content.factory
com.adobe.ep.ux.content.handlers
com.adobe.ep.ux.content.managers
com.adobe.ep.ux.content.model.asset
com.adobe.ep.ux.content.model.preview
com.adobe.ep.ux.content.model.relation
com.adobe.ep.ux.content.model.search
com.adobe.ep.ux.content.model.toolbar
com.adobe.ep.ux.content.search
com.adobe.ep.ux.content.services
com.adobe.ep.ux.content.services.load
com.adobe.ep.ux.content.services.permissions
com.adobe.ep.ux.content.services.preview
com.adobe.ep.ux.content.services.providers
com.adobe.ep.ux.content.services.query
com.adobe.ep.ux.content.services.relationships
com.adobe.ep.ux.content.services.search.lccontent
com.adobe.ep.ux.content.services.version
com.adobe.ep.ux.content.view
com.adobe.ep.ux.content.view.components.activate
com.adobe.ep.ux.content.view.components.grid
com.adobe.ep.ux.content.view.components.grid.hover
com.adobe.ep.ux.content.view.components.grid.hover.component
com.adobe.ep.ux.content.view.components.grid.renderers
com.adobe.ep.ux.content.view.components.relationships
com.adobe.ep.ux.content.view.components.review
com.adobe.ep.ux.content.view.components.search.renderers
com.adobe.ep.ux.content.view.components.searchpod
com.adobe.ep.ux.content.view.components.toolbar
com.adobe.ep.ux.content.view.components.toolbar.controlRenderers
com.adobe.ep.ux.content.view.components.version
com.adobe.ep.ux.documentsubmit.component
com.adobe.ep.ux.documentsubmit.domain
com.adobe.ep.ux.documentsubmit.skin
com.adobe.ep.ux.taskaction.component
com.adobe.ep.ux.taskaction.domain
com.adobe.ep.ux.taskaction.domain.events
com.adobe.ep.ux.taskaction.skin
com.adobe.ep.ux.taskdetails.component
com.adobe.ep.ux.taskdetails.domain
com.adobe.ep.ux.taskdetails.skin
com.adobe.ep.ux.tasklist.component
com.adobe.ep.ux.tasklist.domain
com.adobe.ep.ux.tasklist.skin
com.adobe.ep.ux.webdocumentviewer.domain
com.adobe.exm.expression
com.adobe.exm.expression.error
com.adobe.exm.expression.event
com.adobe.exm.expression.impl
com.adobe.fiber.runtime.lib
com.adobe.fiber.services
com.adobe.fiber.services.wrapper
com.adobe.fiber.styles
com.adobe.fiber.util
com.adobe.fiber.valueobjects
com.adobe.gravity.binding
com.adobe.gravity.context
com.adobe.gravity.flex.bundleloader
com.adobe.gravity.flex.progress
com.adobe.gravity.flex.serviceloader
com.adobe.gravity.framework
com.adobe.gravity.init
com.adobe.gravity.service.bundleloader
com.adobe.gravity.service.logging
com.adobe.gravity.service.manifest
com.adobe.gravity.service.progress
com.adobe.gravity.tracker
com.adobe.gravity.ui
com.adobe.gravity.utility
com.adobe.gravity.utility.async
com.adobe.gravity.utility.error
com.adobe.gravity.utility.events
com.adobe.gravity.utility.factory
com.adobe.gravity.utility.flex.async
com.adobe.gravity.utility.logging
com.adobe.gravity.utility.message
com.adobe.gravity.utility.sequence
com.adobe.gravity.utility.url
com.adobe.guides.control
com.adobe.guides.domain
com.adobe.guides.i18n
com.adobe.guides.spark.components.skins
com.adobe.guides.spark.components.skins.mx
com.adobe.guides.spark.headers.components
com.adobe.guides.spark.headers.skins
com.adobe.guides.spark.layouts.components
com.adobe.guides.spark.layouts.skins
com.adobe.guides.spark.navigators.components
com.adobe.guides.spark.navigators.renderers
com.adobe.guides.spark.navigators.skins
com.adobe.guides.spark.util
com.adobe.guides.spark.wrappers.components
com.adobe.guides.spark.wrappers.skins
com.adobe.guides.submit
com.adobe.icc.dc.domain
com.adobe.icc.dc.domain.factory
com.adobe.icc.editors.events
com.adobe.icc.editors.handlers
com.adobe.icc.editors.managers
com.adobe.icc.editors.model
com.adobe.icc.editors.model.config
com.adobe.icc.editors.model.el
com.adobe.icc.editors.model.el.operands
com.adobe.icc.editors.model.el.operators
com.adobe.icc.enum
com.adobe.icc.external.dc
com.adobe.icc.obj
com.adobe.icc.services
com.adobe.icc.services.category
com.adobe.icc.services.config
com.adobe.icc.services.download
com.adobe.icc.services.export
com.adobe.icc.services.external
com.adobe.icc.services.formbridge
com.adobe.icc.services.fragmentlayout
com.adobe.icc.services.layout
com.adobe.icc.services.letter
com.adobe.icc.services.locator
com.adobe.icc.services.module
com.adobe.icc.services.render
com.adobe.icc.services.submit
com.adobe.icc.services.user
com.adobe.icc.token
com.adobe.icc.vo
com.adobe.icc.vo.render
com.adobe.icomm.assetplacement.controller
com.adobe.icomm.assetplacement.controller.utils
com.adobe.icomm.assetplacement.data
com.adobe.icomm.assetplacement.model
com.adobe.livecycle.assetmanager.client
com.adobe.livecycle.assetmanager.client.event
com.adobe.livecycle.assetmanager.client.handler
com.adobe.livecycle.assetmanager.client.managers
com.adobe.livecycle.assetmanager.client.model
com.adobe.livecycle.assetmanager.client.model.cms
com.adobe.livecycle.assetmanager.client.service
com.adobe.livecycle.assetmanager.client.service.search
com.adobe.livecycle.assetmanager.client.service.search.cms
com.adobe.livecycle.assetmanager.client.utils
com.adobe.livecycle.content
com.adobe.livecycle.rca.model
com.adobe.livecycle.rca.model.constant
com.adobe.livecycle.rca.model.document
com.adobe.livecycle.rca.model.participant
com.adobe.livecycle.rca.model.reminder
com.adobe.livecycle.rca.model.stage
com.adobe.livecycle.rca.service
com.adobe.livecycle.rca.service.core
com.adobe.livecycle.rca.service.core.delegate
com.adobe.livecycle.rca.service.process
com.adobe.livecycle.rca.service.process.delegate
com.adobe.livecycle.rca.token
com.adobe.livecycle.ria.security.api
com.adobe.livecycle.ria.security.service
com.adobe.mosaic.layouts
com.adobe.mosaic.layouts.dragAndDrop
com.adobe.mosaic.layouts.interfaces
com.adobe.mosaic.mxml
com.adobe.mosaic.om.constants
com.adobe.mosaic.om.events
com.adobe.mosaic.om.impl
com.adobe.mosaic.om.interfaces
com.adobe.mosaic.skinning
com.adobe.mosaic.sparklib.editors
com.adobe.mosaic.sparklib.optionMenu
com.adobe.mosaic.sparklib.scrollableMenu
com.adobe.mosaic.sparklib.scrollableMenu.skins
com.adobe.mosaic.sparklib.tabLayout
com.adobe.mosaic.sparklib.tabLayout.events
com.adobe.mosaic.sparklib.tabLayout.layouts
com.adobe.mosaic.sparklib.tabLayout.skins
com.adobe.mosaic.sparklib.text
com.adobe.mosaic.sparklib.util
com.adobe.solutions.acm.authoring.presentation
com.adobe.solutions.acm.authoring.presentation.actionbar
com.adobe.solutions.acm.authoring.presentation.common
com.adobe.solutions.acm.authoring.presentation.events
com.adobe.solutions.acm.authoring.presentation.fragment
com.adobe.solutions.acm.authoring.presentation.letter
com.adobe.solutions.acm.authoring.presentation.letter.data
com.adobe.solutions.acm.authoring.presentation.preview
com.adobe.solutions.acm.authoring.presentation.rte
com.adobe.solutions.acm.ccr.presentation
com.adobe.solutions.acm.ccr.presentation.contentcapture
com.adobe.solutions.acm.ccr.presentation.contentcapture.events
com.adobe.solutions.acm.ccr.presentation.contentcapture.preview
com.adobe.solutions.acm.ccr.presentation.datacapture
com.adobe.solutions.acm.ccr.presentation.datacapture.renderers
com.adobe.solutions.acm.ccr.presentation.pdf
com.adobe.solutions.exm
com.adobe.solutions.exm.authoring
com.adobe.solutions.exm.authoring.components.controls
com.adobe.solutions.exm.authoring.components.toolbars
com.adobe.solutions.exm.authoring.domain
com.adobe.solutions.exm.authoring.domain.expression
com.adobe.solutions.exm.authoring.domain.impl
com.adobe.solutions.exm.authoring.domain.method
com.adobe.solutions.exm.authoring.domain.variable
com.adobe.solutions.exm.authoring.enum
com.adobe.solutions.exm.authoring.events
com.adobe.solutions.exm.authoring.model
com.adobe.solutions.exm.authoring.renderer
com.adobe.solutions.exm.authoring.view
com.adobe.solutions.exm.expression
com.adobe.solutions.exm.impl
com.adobe.solutions.exm.impl.method
com.adobe.solutions.exm.method
com.adobe.solutions.exm.mock
com.adobe.solutions.exm.mock.method
com.adobe.solutions.exm.runtime
com.adobe.solutions.exm.runtime.impl
com.adobe.solutions.exm.variable
com.adobe.solutions.prm.constant
com.adobe.solutions.prm.domain
com.adobe.solutions.prm.domain.factory
com.adobe.solutions.prm.domain.impl
com.adobe.solutions.prm.domain.manager
com.adobe.solutions.prm.presentation.asset
com.adobe.solutions.prm.presentation.constant
com.adobe.solutions.prm.presentation.document
com.adobe.solutions.prm.presentation.event
com.adobe.solutions.prm.presentation.file
com.adobe.solutions.prm.presentation.project
com.adobe.solutions.prm.presentation.team
com.adobe.solutions.prm.presentation.util
com.adobe.solutions.prm.service
com.adobe.solutions.prm.services.impl
com.adobe.solutions.prm.vo
com.adobe.solutions.rca.constant
com.adobe.solutions.rca.domain
com.adobe.solutions.rca.domain.common
com.adobe.solutions.rca.domain.factory
com.adobe.solutions.rca.domain.impl
com.adobe.solutions.rca.domain.impl.manager
com.adobe.solutions.rca.domain.manager
com.adobe.solutions.rca.presentation
com.adobe.solutions.rca.presentation.comment
com.adobe.solutions.rca.presentation.constant
com.adobe.solutions.rca.presentation.event
com.adobe.solutions.rca.presentation.gantt
com.adobe.solutions.rca.presentation.gantt.ruler
com.adobe.solutions.rca.presentation.template
com.adobe.solutions.rca.presentation.template.audit
com.adobe.solutions.rca.presentation.template.definition
com.adobe.solutions.rca.presentation.template.documents
com.adobe.solutions.rca.presentation.template.stages
com.adobe.solutions.rca.presentation.util
com.adobe.solutions.rca.service
com.adobe.solutions.rca.services.impl
com.adobe.solutions.rca.vo
com.adobe.solutions.rca.vo.um
com.adobe.viewsource
fl.accessibility
fl.containers
fl.controls
fl.controls.dataGridClasses
fl.controls.listClasses
fl.controls.progressBarClasses
fl.core
fl.data
fl.display
fl.events
fl.ik
fl.lang
fl.livepreview
fl.managers
fl.motion
fl.motion.easing
fl.rsl
fl.text
fl.transitions
fl.transitions.easing
fl.video
flash.accessibility
flash.concurrent
flash.crypto
flash.data
flash.desktop
flash.display
flash.display3D
flash.display3D.textures
flash.errors
flash.events
flash.external
flash.filesystem
flash.filters
flash.geom
flash.globalization
flash.html
flash.media
flash.net
flash.net.dns
flash.net.drm
flash.notifications
flash.permissions
flash.printing
flash.profiler
flash.sampler
flash.security
flash.sensors
flash.system
flash.text
flash.text.engine
flash.text.ime
flash.ui
flash.utils
flash.xml
flashx.textLayout
flashx.textLayout.compose
flashx.textLayout.container
flashx.textLayout.conversion
flashx.textLayout.edit
flashx.textLayout.elements
flashx.textLayout.events
flashx.textLayout.factory
flashx.textLayout.formats
flashx.textLayout.operations
flashx.textLayout.utils
flashx.undo
ga.controls
ga.layouts
ga.model
ga.uiComponents
ga.util
ga.views
ga.wrappers
lc.foundation
lc.foundation.domain
lc.foundation.events
lc.foundation.ui
lc.foundation.util
lc.preloader
lc.procmgmt
lc.procmgmt.commands
lc.procmgmt.domain
lc.procmgmt.events
lc.procmgmt.formbridge
lc.procmgmt.impl
lc.procmgmt.ui.attachments
lc.procmgmt.ui.controls
lc.procmgmt.ui.controls.card
lc.procmgmt.ui.controls.renderer
lc.procmgmt.ui.help
lc.procmgmt.ui.layout
lc.procmgmt.ui.presentationmodel
lc.procmgmt.ui.process
lc.procmgmt.ui.search
lc.procmgmt.ui.startpoint
lc.procmgmt.ui.task
lc.procmgmt.ui.task.form
lc.procmgmt.ui.task.form.commands
lc.procmgmt.ui.tracking
mx.accessibility
mx.automation
mx.automation.air
mx.automation.delegates
mx.automation.delegates.advancedDataGrid
mx.automation.delegates.charts
mx.automation.delegates.containers
mx.automation.delegates.controls
mx.automation.delegates.controls.dataGridClasses
mx.automation.delegates.controls.fileSystemClasses
mx.automation.delegates.core
mx.automation.delegates.flashflexkit
mx.automation.events
mx.binding
mx.binding.utils
mx.charts
mx.charts.chartClasses
mx.charts.effects
mx.charts.effects.effectClasses
mx.charts.events
mx.charts.renderers
mx.charts.series
mx.charts.series.items
mx.charts.series.renderData
mx.charts.styles
mx.collections
mx.collections.errors
mx.containers
mx.containers.accordionClasses
mx.containers.dividedBoxClasses
mx.containers.errors
mx.containers.utilityClasses
mx.controls
mx.controls.advancedDataGridClasses
mx.controls.dataGridClasses
mx.controls.listClasses
mx.controls.menuClasses
mx.controls.olapDataGridClasses
mx.controls.scrollClasses
mx.controls.sliderClasses
mx.controls.textClasses
mx.controls.treeClasses
mx.controls.videoClasses
mx.core
mx.core.windowClasses
mx.data
mx.data.crypto
mx.data.errors
mx.data.events
mx.data.messages
mx.data.mxml
mx.data.offline.errors
mx.data.utils
mx.effects
mx.effects.easing
mx.effects.effectClasses
mx.events
mx.filters
mx.flash
mx.formatters
mx.geom
mx.graphics
mx.graphics.codec
mx.graphics.shaderClasses
mx.logging
mx.logging.errors
mx.logging.targets
mx.managers
mx.messaging
mx.messaging.channels
mx.messaging.config
mx.messaging.errors
mx.messaging.events
mx.messaging.management
mx.messaging.messages
mx.modules
mx.netmon
mx.olap
mx.olap.aggregators
mx.preloaders
mx.printing
mx.resources
mx.rpc
mx.rpc.events
mx.rpc.http
mx.rpc.http.mxml
mx.rpc.livecycle
mx.rpc.mxml
mx.rpc.remoting
mx.rpc.remoting.mxml
mx.rpc.soap
mx.rpc.soap.mxml
mx.rpc.wsdl
mx.rpc.xml
mx.skins
mx.skins.halo
mx.skins.spark
mx.skins.wireframe
mx.skins.wireframe.windowChrome
mx.states
mx.styles
mx.utils
mx.validators
org.osmf.containers
org.osmf.display
org.osmf.elements
org.osmf.events
org.osmf.layout
org.osmf.logging
org.osmf.media
org.osmf.metadata
org.osmf.net
org.osmf.net.dvr
org.osmf.net.httpstreaming
org.osmf.net.metrics
org.osmf.net.qos
org.osmf.net.rtmpstreaming
org.osmf.net.rules
org.osmf.traits
org.osmf.utils
spark.accessibility
spark.automation.delegates
spark.automation.delegates.components
spark.automation.delegates.components.gridClasses
spark.automation.delegates.components.mediaClasses
spark.automation.delegates.components.supportClasses
spark.automation.delegates.skins.spark
spark.automation.events
spark.collections
spark.components
spark.components.calendarClasses
spark.components.gridClasses
spark.components.mediaClasses
spark.components.supportClasses
spark.components.windowClasses
spark.core
spark.effects
spark.effects.animation
spark.effects.easing
spark.effects.interpolation
spark.effects.supportClasses
spark.events
spark.filters
spark.formatters
spark.formatters.supportClasses
spark.globalization
spark.globalization.supportClasses
spark.layouts
spark.layouts.supportClasses
spark.managers
spark.modules
spark.preloaders
spark.primitives
spark.primitives.supportClasses
spark.skins
spark.skins.mobile
spark.skins.mobile.supportClasses
spark.skins.spark
spark.skins.spark.mediaClasses.fullScreen
spark.skins.spark.mediaClasses.normal
spark.skins.spark.windowChrome
spark.skins.wireframe
spark.skins.wireframe.mediaClasses
spark.skins.wireframe.mediaClasses.fullScreen
spark.transitions
spark.utils
spark.validators
spark.validators.supportClasses
xd.core.axm.enterprise.view.components
xd.core.axm.enterprise.view.skins
xd.core.axm.view.components
xd.core.axm.view.components.support

語言元素

全域常數
全域函數
運算子
陳述式、關鍵字和指令
特殊類型

附錄

新增內容
編譯器錯誤
編譯器警告
執行階段錯誤
移轉至 ActionScript 3
支援的字元集
僅限 MXML 標籤
移動 XML 元素
Timed Text 標籤
不建議元素清單
AccessibilityImplementation 常數
如何使用 ActionScript 範例
法律聲明
套件flashx.textLayout.edit
介面public interface IEditManager extends ISelectionManager , IInteractionEventHandler
實作者 EditManager

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

IEditManager 定義處理文字流排之編輯作業的介面。

若要啟用文字流排編輯,請將 IEditManager 實體指定給 TextFlow 物件的 interactionManager 屬性。編輯管理員會處理文字的變更 (如插入、刪除及格式變更)。如果編輯管理員具有還原管理員,則可以回復變更。編輯管理員會視需要觸發文字流排的重新撰寫及顯示。

相關 API 元素



公用屬性
 屬性定義自
 InheritedabsoluteEnd : int
[唯讀] 選取範圍結尾的文字位置 (從文字流排開頭算起的偏移量)。
ISelectionManager
 InheritedabsoluteStart : int
[唯讀] 選取範圍開頭的文字位置 (從文字流排開頭算起的偏移量)。
ISelectionManager
 InheritedactivePosition : int
[唯讀] 選取範圍的作用點。
ISelectionManager
  allowDelayedOperations : Boolean
控制作業是否可以排入佇列以便稍後執行。
IEditManager
 InheritedanchorPosition : int
[唯讀] 選取範圍的錨點。
ISelectionManager
 InheritedcurrentSelectionFormat : SelectionFormat
[唯讀] 目前 SelectionFormat 物件。
ISelectionManager
  delayUpdates : Boolean
根據預設,呼叫 IEditManager 會同步處理更新,因此,會進行要求的變更,以及重新撰寫文字並新增至 IEditManager 方法內的顯示清單。
IEditManager
 InheritededitingMode : String
[唯讀] 編輯模式。
ISelectionManager
 Inheritedfocused : Boolean
[唯讀] 指出文字流排中的容器是否具有焦點。
ISelectionManager
 InheritedfocusedSelectionFormat : SelectionFormat
用來在具有焦點的容器中繪製選取範圍的 SelectionFormat 物件。
ISelectionManager
 InheritedinactiveSelectionFormat : SelectionFormat
當選取範圍不在作用中視窗時,用來繪製選取範圍的 SelectionFormat 物件。
ISelectionManager
 InheritedtextFlow : flashx.textLayout.elements:TextFlow
此選取管理員所管理的 TextFlow 物件。
ISelectionManager
  undoManager : IUndoManager
[唯讀] 指定給此 EditManager 實體的 UndoManager 物件 (如果有的話)。
IEditManager
 InheritedunfocusedSelectionFormat : SelectionFormat
當選取範圍不在具有焦點的容器但在作用中視窗時,用來繪製選取範圍的SelectionFormat 物件。
ISelectionManager
 InheritedwindowActive : Boolean
[唯讀] 指出與文字流排相關的視窗是否為作用中視窗。
ISelectionManager
公用方法
 方法定義自
 Inherited
處理 activate 事件。
IInteractionEventHandler
  
將容器樣式套用至選取範圍中的任何容器。
IEditManager
  
變更指定 (或目前) 選取範圍的格式。
IEditManager
  
applyFormatToElement(targetElement:FlowElement, format:flashx.textLayout.formats:ITextLayoutFormat, relativeStart:int = 0, relativeEnd:int = -1, operationState:SelectionState = null):void
將樣式套用至指定的元素。
IEditManager
  
變更在指定 (或目前) 選取範圍中套用至分葉元素的格式。
IEditManager
  
applyLink(href:String, target:String = null, extendToLinkBoundary:Boolean = false, operationState:SelectionState = null):LinkElement
將選取範圍轉換為連結,或將連結轉換為一般文字。
IEditManager
  
將段落樣式套用至選取範圍中的任何段落。
IEditManager
  
將文字轉換為 TCY 執行,或將 TCY 執行轉換為非 TCY 文字。
IEditManager
  
開始新的作業群組。
IEditManager
  
changeElementID(newID:String, targetElement:FlowElement, relativeStart:int = 0, relativeEnd:int = -1, operationState:SelectionState = null):void
變更元素的 ID。
IEditManager
  
changeStyleName(newName:String, targetElement:FlowElement, relativeStart:int = 0, relativeEnd:int = -1, operationState:SelectionState = null):void
從下列版本以後不建議使用: 2.0: 請使用 applyFormatToElement
變更元素或一部分元素的 styleName。
IEditManager
  
changeTypeName(newName:String, targetElement:FlowElement, relativeStart:int = 0, relativeEnd:int = -1, operationState:SelectionState = null):void
變更元素或一部分元素的 typeName。
IEditManager
  
將指定 (或目前) 選取範圍的格式解除定義。
IEditManager
  
將指定元素的樣式解除定義。
IEditManager
  
在同時包含範圍開始與結束點的最低常見父輩元素上,建立包含 operationState 中所指定之整個範圍的新 DivElement。
IEditManager
  
在同時包含範圍開始與結束點的最低常見父輩元素上,建立包含 operationState 中所指定之整個範圍的新 ListElement。
IEditManager
  
在同時包含範圍開始與結束點的最低常見父輩元素上,建立包含 operationState 中所指定之整個範圍的新 SubParagraphGroupElement。
IEditManager
  
刪除選取的區域,並在 TextScrap 物件中傳回刪除的區域。
IEditManager
 Inherited
處理 deactivate 事件。
IInteractionEventHandler
  
deleteNextCharacter(operationState:SelectionState = null):void
刪除某範圍的文字,或如果指定點選取,則刪除下一個字元。
IEditManager
  
deleteNextWord(operationState:SelectionState = null):void
刪除下一個單字。
IEditManager
  
刪除某範圍的文字,或如果指定點選取,則刪除上一個字元。
IEditManager
  
deletePreviousWord(operationState:SelectionState = null):void
刪除上一個單字。
IEditManager
  
deleteText(operationState:SelectionState = null):void
刪除某範圍的文字。
IEditManager
  
執行 FlowOperation。
IEditManager
 Inherited
處理 edit 事件。
IInteractionEventHandler
  
結束作業群組。
IEditManager
 Inherited
執行任何擱置 FlowOperation。
ISelectionManager
 Inherited
處理 focusChange 事件。
IInteractionEventHandler
 Inherited
處理 focusIn 事件。
IInteractionEventHandler
 Inherited
處理 focusOut 事件。
IInteractionEventHandler
 Inherited
取得指定文字範圍或目前選取範圍中所有字元都適用的字元格式特質。
ISelectionManager
 Inherited
取得指定文字範圍或目前選取範圍中所有容器都適用的容器格式特質。
ISelectionManager
 Inherited
取得指定文字範圍或目前選取範圍中所有段落都適用的段落格式特質。
ISelectionManager
 Inherited
取得目前選取範圍的 SelectionState 物件。
ISelectionManager
 Inherited
指出是否有選取範圍。
ISelectionManager
 Inherited
處理 imeStartComposition 事件
IInteractionEventHandler
  
insertInlineGraphic(source:Object, width:Object, height:Object, options:Object = null, operationState:SelectionState = null):InlineGraphicElement
插入影像。
IEditManager
  
insertText(text:String, operationState:SelectionState = null):void
插入文字。
IEditManager
 Inherited
指出選取範圍是否涵蓋某範圍的文字。
ISelectionManager
 Inherited
處理 keyDown 事件。
IInteractionEventHandler
 Inherited
處理 keyFocusChange 事件。
IInteractionEventHandler
 Inherited
處理 keyUp 事件。
IInteractionEventHandler
 Inherited
處理 menuSelect 事件。
IInteractionEventHandler
  
modifyInlineGraphic(source:Object, width:Object, height:Object, options:Object = null, operationState:SelectionState = null):void
修改現有內嵌圖形。
IEditManager
 Inherited
處理 mouseDoubleClick 事件。
IInteractionEventHandler
 Inherited
處理 mouseDown 事件。
IInteractionEventHandler
 Inherited
處理 mouseMove 事件。
IInteractionEventHandler
 Inherited
處理 mouseOut 事件。
IInteractionEventHandler
 Inherited
處理 mouseOver 事件。
IInteractionEventHandler
 Inherited
處理 mouseUp 事件。
IInteractionEventHandler
 Inherited
處理 mouseWheel 事件。
IInteractionEventHandler
  
moveChildren(source:FlowGroupElement, sourceIndex:int, numChildren:int, destination:FlowGroupElement, destinationIndex:int, operationState:SelectionState = null):void
將一組 FlowElements 從某個 FlowGroupElement 移至另一個。
IEditManager
 Inherited
notifyInsertOrDelete(absolutePosition:int, length:int):void
插入或刪除文字時,更新選取管理員。
ISelectionManager
  
overwriteText(text:String, operationState:SelectionState = null):void
覆寫選取的文字。
IEditManager
  
將 TextScrap 貼入選取的區域。
IEditManager
  
重新執行上一個還原作業。
IEditManager
 Inherited
重新顯示選取範圍形狀。
ISelectionManager
 Inherited
選取整個流排。
ISelectionManager
 Inherited
selectRange(anchorPosition:int, activePosition:int):void
選取一個文字範圍。
ISelectionManager
 Inherited
將焦點放在選取範圍的第一個容器。
ISelectionManager
 Inherited
設定目前選取範圍的 SelectionState 物件。
ISelectionManager
 Inherited
處理 softKeyboardActivating 事件
IInteractionEventHandler
  
在指定的位置中分割目標元素,在目前的這一個元素之後建立新元素。
IEditManager
  
在目前位置中分割段落,在目前的這一個段落之後建立新段落。
IEditManager
 Inherited
處理 TextEvent。
IInteractionEventHandler
  
回復上一個作業。
IEditManager
  
在作業修改顯示之後更新顯示。
IEditManager
屬性詳細資訊

allowDelayedOperations

屬性
allowDelayedOperations:Boolean

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10.2, AIR 2.0

控制作業是否可以排入佇列以便稍後執行。

某些作業可能會延遲執行以獲得最佳效能。例如,若能把多個按鍵動作結合成單一插入作業,將會非常方便。若 allowDelayedOperationstrue,則作業可以排入佇列。若為 false,則會立即執行所有作業。預設為 true



實作
    public function get allowDelayedOperations():Boolean
    public function set allowDelayedOperations(value:Boolean):void

相關 API 元素

flashx.edit.ISelectionManager.flushPendingOperations

delayUpdates

屬性 
delayUpdates:Boolean

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10.2, AIR 2.0

根據預設,呼叫 IEditManager 會同步處理更新,因此,會進行要求的變更,以及重新撰寫文字並新增至 IEditManager 方法內的顯示清單。若要延遲重繪,可將 delayUpdates 設定為 true。這會導致 IEditManager 只更新模型,並在下一個 enter_frame 事件中重新撰寫和重繪。



實作
    public function get delayUpdates():Boolean
    public function set delayUpdates(value:Boolean):void

undoManager

屬性 
undoManager:IUndoManager  [唯讀]

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

指定給此 EditManager 實體的 UndoManager 物件 (如果有的話)。

還原管理員會處理還原及重做作業。



實作
    public function get undoManager():IUndoManager
方法詳細資訊

applyContainerFormat

()方法
public function applyContainerFormat(format:flashx.textLayout.formats:ITextLayoutFormat, operationState:SelectionState = null):void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

將容器樣式套用至選取範圍中的任何容器。

格式物件中任何為 null 的樣式屬性都會保持不變。

參數

format:flashx.textLayout.formats:ITextLayoutFormat — 要套用至範圍中容器的格式
 
operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。


範例  ( 如何使用本範例 )

以下範例會為那些用於保存選取範圍的容器變更所用的格式,以顯示兩個直欄:
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextLayoutFormat;
    
    public class EditManager_applyContainerFormat
    {
        public function EditManager_applyContainerFormat( selection:SelectionState ):void
         {
             var textFlow:TextFlow = selection.textFlow;
             var editManager:IEditManager = textFlow.interactionManager as IEditManager;
             
             var containerStyle:TextLayoutFormat = new TextLayoutFormat();
             containerStyle.columnCount = 2;
             
             editManager.applyContainerFormat( containerStyle );
         }    
    }
}

applyFormat

()方法 
public function applyFormat(leafFormat:flashx.textLayout.formats:ITextLayoutFormat, paragraphFormat:flashx.textLayout.formats:ITextLayoutFormat, containerFormat:flashx.textLayout.formats:ITextLayoutFormat, operationState:SelectionState = null):void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

變更指定 (或目前) 選取範圍的格式。

執行套用新格式的可還原作業。只會套用針對 TextLayoutFormat 物件設定的樣式特質。格式物件中的未定義特質並不會變更。

參數

leafFormat:flashx.textLayout.formats:ITextLayoutFormat — 要套用至分葉元素 (如範圍及內嵌圖形) 的格式。
 
paragraphFormat:flashx.textLayout.formats:ITextLayoutFormat — 要套用至段落元素的格式。
 
containerFormat:flashx.textLayout.formats:ITextLayoutFormat — 要套用至容器的格式。
 
operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。


範例  ( 如何使用本範例 )

以下範例會將容器、段落以及字元格式套用至某個選取範圍。
 
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextAlign;
    import flashx.textLayout.formats.TextLayoutFormat;
    
    public class EditManager_applyFormat
    {
        public function EditManager_applyFormat( selection:SelectionState ):void
        {
            var textFlow:TextFlow = selection.textFlow;
            var editManager:IEditManager = textFlow.interactionManager as IEditManager;
         
            var containerStyle:TextLayoutFormat = new TextLayoutFormat();
            containerStyle.columnCount = 2;
            
            var paraStyle:TextLayoutFormat = new TextLayoutFormat();
            paraStyle.textAlign = TextAlign.JUSTIFY;
            
            var charStyle:TextLayoutFormat = new TextLayoutFormat();
            charStyle.color = 0xff0000;
            
            editManager.applyFormat( charStyle, paraStyle, containerStyle );    
        }
    }
}

applyFormatToElement

()方法 
public function applyFormatToElement(targetElement:FlowElement, format:flashx.textLayout.formats:ITextLayoutFormat, relativeStart:int = 0, relativeEnd:int = -1, operationState:SelectionState = null):void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

將樣式套用至指定的元素。

格式物件中任何為 null 的樣式屬性都會保持不變。只會套用與指定元素相關的樣式。

參數

targetElement:FlowElement — 要套用樣式的元素。
 
format:flashx.textLayout.formats:ITextLayoutFormat — 包含要套用之樣式的格式。
 
relativeStart:int (default = 0) — 與元素開頭之間的偏移量,這是指定新格式時用來分割元素的數量。
 
relativeEnd:int (default = -1) — 與元素開頭之間的偏移量,這是套用新格式時用來分割元素的數量。
 
operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。


範例  ( 如何使用本範例 )

以下範例會將格式套用至流排元素階層的中間層的 <div> 元素。
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.FlowElement;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextLayoutFormat;
    
    public class EditManager_applyFormatToElement
    {
        public function EditManager_applyFormatToElement( selection:SelectionState ):void
        {
            var textFlow:TextFlow = TextConverter.importToFlow("<TextFlow><div><p><span>Hello World</span></p></div><p>No indent</p></TextFlow>", TextConverter.TEXT_LAYOUT_FORMAT);
            var editManager:IEditManager = textFlow.interactionManager as IEditManager;
            var divElement:FlowElement = textFlow.getChildAt(0);
            
            var format:TextLayoutFormat = new TextLayoutFormat();
            format.textIndent = 15;
            
            
            editManager.applyFormatToElement( divElement, format );    
        }
    }
}

applyLeafFormat

()方法 
public function applyLeafFormat(format:flashx.textLayout.formats:ITextLayoutFormat, operationState:SelectionState = null):void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

變更在指定 (或目前) 選取範圍中套用至分葉元素的格式。

執行將新格式套用至分葉元素 (如 SpanElement 及 InlineGraphicElement 物件) 的可還原作業。只會套用針對 TextLayoutFormat 物件設定的樣式特質。格式物件中的未定義特質會變更。

參數

format:flashx.textLayout.formats:ITextLayoutFormat — 要套用的格式。
 
operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。


範例  ( 如何使用本範例 )

下列範例會將選取範圍中的文字顏色變更為紅色。
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextLayoutFormat;
    
    public class EditManager_applyLeafFormat
    {
        public function EditManager_applyLeafFormat(selection:SelectionState)
        {
             var textFlow:TextFlow = selection.textFlow;
             var editManager:IEditManager = textFlow.interactionManager as IEditManager;
        
             var charStyle:TextLayoutFormat = new TextLayoutFormat();
             charStyle.color = 0xff0000;
             
             editManager.applyLeafFormat( charStyle );    
        }
    }
}

applyLink

()方法 
public function applyLink(href:String, target:String = null, extendToLinkBoundary:Boolean = false, operationState:SelectionState = null):LinkElement

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

將選取範圍轉換為連結,或將連結轉換為一般文字。

執行建立或移除連結的可還原作業。

如果指定 target 參數,則該參數必須是下列其中一個值:

  • "_self"
  • "_blank"
  • "_parent"
  • "_top"

在掛載瀏覽器的執行階段中,目標 "_self" 會取代目前的 html 頁面。因此,如果包含連結的 SWF 內容位於頁框或頁框組內的頁面中,則會在該頁框內載入連結的內容。如果頁面在最上層,則會開啟連結的內容來取代原始頁面。目標 "_blank" 會開啟沒有名稱的新瀏覽器 視窗。目標 "_parent" 會取代含有 SWF 內容之 html 頁面的父輩。目標 "_top" 會取代目前瀏覽器視窗中的最上層頁面。

在其他執行階段 (如 Adobe AIR) 中,連結會在使用者的預設瀏覽器中開啟,並會忽略 target 參數。

extendToLinkBoundary 參數可決定編輯管理員如何處理與一或多個現有連結相交的選取範圍。如果參數是 true,則會將該作業視為套用至選取範圍的一個單元,以及視為套用至現有連結的完整文字。因此,會建立單一連結,該連結會從相交的第一個連結的開頭延伸至相交的最後一個連結的結尾。反之,如果 extendToLinkBoundaryfalse,則現有局部選取的連結會分割成兩個連結。

參數

href:String — 連結所參照的 URI。
 
target:String (default = null) — 連結的目標瀏覽器視窗。
 
extendToLinkBoundary:Boolean (default = false) — 指定是否合併選取範圍與任何重疊的現有連結,然後套用變更。
 
operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。

傳回值
LinkElement — 已建立的 LinkElement。

相關 API 元素


範例  ( 如何使用本範例 )

以下範例會定義兩個函式。第一個會將選取範圍轉換成連結。第二個會從連結移除 URL。
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_applyLink
    {
        
        static public function makeLink( selection:SelectionState ):void
         {
             var textFlow:TextFlow = selection.textFlow;
             var editManager:IEditManager = textFlow.interactionManager as IEditManager;
                 
             editManager.applyLink( "http://www.adobe.com" );
         }
         
        static public function removeLink( selection:SelectionState ):void
         {
            var textFlow:TextFlow = selection.textFlow;
            var editManager:IEditManager = textFlow.interactionManager as IEditManager;
            
            editManager.applyLink( null, null, true );    
         }
    }
}

applyParagraphFormat

()方法 
public function applyParagraphFormat(format:flashx.textLayout.formats:ITextLayoutFormat, operationState:SelectionState = null):void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

將段落樣式套用至選取範圍中的任何段落。

格式物件中任何為 null 的樣式屬性都會保持不變。

參數

format:flashx.textLayout.formats:ITextLayoutFormat — 要套用至選取段落的格式。
 
operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。


範例  ( 如何使用本範例 )

以下範例會定義一種函數,用於變更目前選取範圍中任何段落的格式,以便對齊文字。
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextAlign;
    import flashx.textLayout.formats.TextLayoutFormat;
    
    public class EditManager_applyParagraphFormat
    {
        static public function justifyParagraph( selection:SelectionState ):void
         {
            var textFlow:TextFlow = selection.textFlow;
            var editManager:IEditManager = textFlow.interactionManager as IEditManager;
         
             var paraStyle:TextLayoutFormat = new TextLayoutFormat();
             paraStyle.textAlign = TextAlign.JUSTIFY;
         
             editManager.applyParagraphFormat( paraStyle );    
         }
    }
}

applyTCY

()方法 
public function applyTCY(tcyOn:Boolean, operationState:SelectionState = null):flashx.textLayout.elements:TCYElement

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

將文字轉換為 TCY 執行,或將 TCY 執行轉換為非 TCY 文字。

TCY (或直排內橫排) 會讓垂直行內的文字以水平格式顯示,這是讓小區塊的非日文文字或數字 (如日期) 更容易在垂直的文字形式中讀取的方式。

參數

tcyOn:Boolean — 設定為 true 可將 TCY 套用至文字範圍,設定為 false 則可移除 TCY。
 
operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。

傳回值
flashx.textLayout.elements:TCYElement — 已建立的 TCYElement。

相關 API 元素


範例  ( 如何使用本範例 )

以下範例會定義兩個函式。第一個會將 TCY 格式套用至目前的選取範圍。第二個會移除 TCY 格式。
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_applyTCY
    {
        static public function tcyOn( selection:SelectionState ):void
         {
            var textFlow:TextFlow = selection.textFlow;
            var editManager:IEditManager = textFlow.interactionManager as IEditManager;
        
             editManager.applyTCY( true );
         }
         
        static public function tcyOff( selection:SelectionState ):void
         {
        
            var textFlow:TextFlow = selection.textFlow;
            var editManager:IEditManager = textFlow.interactionManager as IEditManager;
        
             editManager.applyTCY( false );    
         }
    }
}

beginCompositeOperation

()方法 
public function beginCompositeOperation():void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

開始新的作業群組。

在呼叫 beginCompositeOperation() 之後而在對應呼叫 endCompositeOperation() 之前執行的所有作業,都會執行並群組為可以使用一個單元來還原的單一作業。

beginCompositeOperation/endCompositeOperation 區塊可以是另一個 beginCompositeOperation/endCompositeOperation 區塊下的巢狀項目。

相關 API 元素

flashx.textLayout.edit.IEditManager.endCompositeOperation

範例  ( 如何使用本範例 )

以下範例會定義一個在自己的段落中插入圖形物件的函數。如果未使用 beginCompositeOperation()endCompositeOperation() 函數,則每一個子作業就必須分別取消,而不是整組復原。
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_beginCompositeOperation
    {
        static public function insertGraphic( source:Object, width:Object, height:Object, float:String, selection:SelectionState ):void
        {
            var editManager:IEditManager = selection.textFlow.interactionManager as IEditManager;
            
            editManager.beginCompositeOperation();
            
            editManager.deleteText( selection );
            var changedSelection:SelectionState = 
                new SelectionState( selection.textFlow, selection.anchorPosition, selection.anchorPosition );
            editManager.splitParagraph( changedSelection );
            changedSelection = 
                new SelectionState( changedSelection.textFlow, changedSelection.anchorPosition + 1, changedSelection.anchorPosition + 1);
            editManager.insertInlineGraphic( source, width, height, float, changedSelection );
            changedSelection = 
                new SelectionState( changedSelection.textFlow, changedSelection.anchorPosition + 1, changedSelection.anchorPosition + 1);
            editManager.splitParagraph( changedSelection );
            
            editManager.endCompositeOperation();                
        }
    }
}

changeElementID

()方法 
public function changeElementID(newID:String, targetElement:FlowElement, relativeStart:int = 0, relativeEnd:int = -1, operationState:SelectionState = null):void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

變更元素的 ID。

如果設定 relativeStartrelativeEnd 參數 (設定為預設值以外的值),則會分割元素。這個範圍之外的一部分元素會保留原始 ID。如果同時設定 relativeStartrelativeEnd 參數,則會建立 ID 重複的元素。

參數

newID:String — 新的 ID 值。
 
targetElement:FlowElement — 要修改的元素。
 
relativeStart:int (default = 0) — 與元素開頭之間的偏移量,這是指定新 ID 時用來分割元素的數量。
 
relativeEnd:int (default = -1) — 與元素開頭之間的偏移量,這是指定新 ID 時用來分割元素的數量。
 
operationState:SelectionState (default = null) — 指定還原此作業時要還原的選取範圍;如果是 null,則作業會儲存目前的選取範圍。


範例  ( 如何使用本範例 )

以下範例會定一種函數,它會為選取範圍中的第一個段落變更 ID:
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.edit.ElementRange;
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_changeElementID
    {
        static public function changeParagraphID( id:String, selection:SelectionState ):void
         {
            var textFlow:TextFlow = selection.textFlow;
            var editManager:IEditManager = textFlow.interactionManager as IEditManager;
            var selectedRange:ElementRange = ElementRange.createElementRange( selection.textFlow, selection.absoluteStart, selection.absoluteEnd );            
        
            editManager.changeElementID( id, selectedRange.firstParagraph, 0, -1, selection );    
         }
    }
}

         

changeStyleName

()方法 
public function changeStyleName(newName:String, targetElement:FlowElement, relativeStart:int = 0, relativeEnd:int = -1, operationState:SelectionState = null):void
從下列版本以後不建議使用: 2.0: 請使用 applyFormatToElement

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

變更元素或一部分元素的 styleName。

如果設定 relativeStartrelativeEnd 參數 (設定為預設值以外的值),則會分割元素。這個範圍之外的元素部分會保留原始樣式。

參數

newName:String — 新樣式的名稱。
 
targetElement:FlowElement — 指定要變更的元素。
 
relativeStart:int (default = 0) — 與元素開頭之間的偏移量,這是指定新樣式時用來分割元素的數量。
 
relativeEnd:int (default = -1) — 與元素結尾之間的偏移量,這是指定新樣式時用來分割元素的數量。
 
operationState:SelectionState (default = null) — 指定還原此作業時要還原的選取範圍;如果是 null,則作業會儲存目前的選取範圍。


範例  ( 如何使用本範例 )

以下範例會定一種函數,它會為選取範圍中的第一個段落變更樣式名稱:
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.edit.ElementRange;
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_changeStyleName
    {
        static public function changeParagraphStyle( styleName:String, selection:SelectionState ):void
        {
            var textFlow:TextFlow = selection.textFlow;
            var editManager:IEditManager = textFlow.interactionManager as IEditManager;
            var selectedRange:ElementRange = ElementRange.createElementRange( selection.textFlow, selection.absoluteStart, selection.absoluteEnd );            
        
            editManager.changeElementID( styleName, selectedRange.firstParagraph, 0, -1, selection );    
        }
    }
}

changeTypeName

()方法 
public function changeTypeName(newName:String, targetElement:FlowElement, relativeStart:int = 0, relativeEnd:int = -1, operationState:SelectionState = null):void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

變更元素或一部分元素的 typeName。

如果設定 relativeStartrelativeEnd 參數 (設定為預設值以外的值),則會分割元素。這個範圍之外的元素部分會保留原始樣式。

參數

newName:String — 新類型的名稱。
 
targetElement:FlowElement — 指定要變更的元素。
 
relativeStart:int (default = 0) — 與元素開頭之間的偏移量,這是指定新樣式時用來分割元素的數量。
 
relativeEnd:int (default = -1) — 與元素結尾之間的偏移量,這是指定新樣式時用來分割元素的數量。
 
operationState:SelectionState (default = null) — 指定還原此作業時要還原的選取範圍;如果是 null,則作業會儲存目前的選取範圍。

clearFormat

()方法 
public function clearFormat(leafFormat:flashx.textLayout.formats:ITextLayoutFormat, paragraphFormat:flashx.textLayout.formats:ITextLayoutFormat, containerFormat:flashx.textLayout.formats:ITextLayoutFormat, operationState:SelectionState = null):void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

將指定 (或目前) 選取範圍的格式解除定義。

執行解除定義指定格式的可還原作業。只會套用針對 TextLayoutFormat 物件設定的樣式特質。格式物件中的未定義特質並不會變更。

參數

leafFormat:flashx.textLayout.formats:ITextLayoutFormat — 設定值指示屬性將選取範圍中 LeafFlowElement 物件的格式解除定義。
 
paragraphFormat:flashx.textLayout.formats:ITextLayoutFormat — 設定值指示屬性將選取範圍中 ParagraphElement 物件的格式解除定義。
 
containerFormat:flashx.textLayout.formats:ITextLayoutFormat — 設定值指示屬性將選取範圍中 ContainerController 物件的格式解除定義。
 
operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。

clearFormatOnElement

()方法 
public function clearFormatOnElement(targetElement:FlowElement, format:flashx.textLayout.formats:ITextLayoutFormat, operationState:SelectionState = null):void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

將指定元素的樣式解除定義。

格式物件中任何為 undefined 的樣式屬性都會保持不變。以指定格式定義的任何樣式,會在指定元素上解除定義。

參數

targetElement:FlowElement — 要套用樣式的元素。
 
format:flashx.textLayout.formats:ITextLayoutFormat — 包含要解除定義之樣式的格式。
 
operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。

createDiv

()方法 
public function createDiv(parent:FlowGroupElement = null, format:flashx.textLayout.formats:ITextLayoutFormat = null, operationState:SelectionState = null):DivElement

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

在同時包含範圍開始與結束點的最低常見父輩元素上,建立包含 operationState 中所指定之整個範圍的新 DivElement。若開始點與結束點相同,即會在含單一子系段落的位置上建立新的 DivElement。

參數

parent:FlowGroupElement (default = null) — 指定新 DivElement 的父輩元素。若為 null,新的父輩將是包含 SelectionState 的最低層級。
 
format:flashx.textLayout.formats:ITextLayoutFormat (default = null) — 格式化特質以套用至新的 DivElement。
 
operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。

傳回值
DivElement — 已建立的新 DivElement。

createList

()方法 
public function createList(parent:FlowGroupElement = null, format:flashx.textLayout.formats:ITextLayoutFormat = null, operationState:SelectionState = null):ListElement

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

在同時包含範圍開始與結束點的最低常見父輩元素上,建立包含 operationState 中所指定之整個範圍的新 ListElement。範圍內的每個段落都將成為新 ListElement 中的 ListItemElement。若開始點與結束點相同,即會在含單一 ListItemElement 子系的位置上建立新的 ListElement。

參數

parent:FlowGroupElement (default = null) — 選擇性地指定新 ListElement 的父輩元素。若為 null,新的父輩將是包含 SelectionState 的最低層級。
 
format:flashx.textLayout.formats:ITextLayoutFormat (default = null) — 格式化特質以套用至新的 ListElement。
 
operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。

傳回值
ListElement — 已建立的新 ListElement。

createSubParagraphGroup

()方法 
public function createSubParagraphGroup(parent:FlowGroupElement = null, format:flashx.textLayout.formats:ITextLayoutFormat = null, operationState:SelectionState = null):SubParagraphGroupElement

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

在同時包含範圍開始與結束點的最低常見父輩元素上,建立包含 operationState 中所指定之整個範圍的新 SubParagraphGroupElement。 若開始點與結束點相同,則不會執行任何動作。

參數

parent:FlowGroupElement (default = null) — 指定新 SubParagraphGroupElement 元素的父輩元素。若為 null,新的父輩將是包含 SelectionState 的最低層級。
 
format:flashx.textLayout.formats:ITextLayoutFormat (default = null) — 格式化特質以套用至新的 SubParagraphGroupElement。
 
operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。

傳回值
SubParagraphGroupElement — 已建立的新 SubParagraphGroupElement。

cutTextScrap

()方法 
public function cutTextScrap(operationState:SelectionState = null):flashx.textLayout.edit:TextScrap

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

刪除選取的區域,並在 TextScrap 物件中傳回刪除的區域。

產生的 TextScrap 可以張貼至系統剪貼簿,或用於後續的 pasteTextOperation() 作業。

參數

operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。

傳回值
flashx.textLayout.edit:TextScrap — 已剪下的 TextScrap。

相關 API 元素

flashx.textLayout.edit.IEditManager.pasteTextScrap
flashx.textLayout.edit.TextClipboard.setContents

範例  ( 如何使用本範例 )

以下範例會在所選範圍中的文字方向裁剪中建立一個選取範圍,以及建立一個內含被刪除之內容的 TextScrap 物件。
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.edit.TextScrap;
    import flashx.undo.UndoManager;
    import flashx.textLayout.elements.TextFlow;

    public class EditManager_cutTextScrap
    {
        static public function cutTextScrap():TextScrap
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How do now brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( new Sprite() ));
            var editManager:EditManager = new EditManager( new UndoManager() );
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            editManager.selectRange( 4, 7 );
            var scrap:TextScrap = editManager.cutTextScrap(); //Displays: How now brown cow.
            return scrap;
        }
    }
}

deleteNextCharacter

()方法 
public function deleteNextCharacter(operationState:SelectionState = null):void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

刪除某範圍的文字,或如果指定點選取,則刪除下一個字元。

參數

operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。


範例  ( 如何使用本範例 )

以下範例會在文字方向中建立一個點選取範圍,然後刪除下一個字元。
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_deleteNextCharacter
    {
        static public function deleteNextCharacter():void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How now brown crow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( new Sprite() ));
            var editManager:EditManager = new EditManager();
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            editManager.selectRange( 15, 15 );
            editManager.deleteNextCharacter(); //displays: How now brown cow.
        }
    }
}

deleteNextWord

()方法 
public function deleteNextWord(operationState:SelectionState = null):void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

刪除下一個單字。

如果選取範圍,則會刪除範圍內的第一個單字。

參數

operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。


範例  ( 如何使用本範例 )

以下範例會在文字方向中建立一個點選取範圍,然後刪除下一個文字。
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_deleteNextWord
    {
        static public function deleteNextWord():void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How do now brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( new Sprite() ));
            var editManager:EditManager = new EditManager();
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            editManager.selectRange( 3, 3 );
            editManager.deleteNextWord(); //displays: How now brown cow.
        }
    }
}

deletePreviousCharacter

()方法 
public function deletePreviousCharacter(operationState:SelectionState = null):void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

刪除某範圍的文字,或如果指定點選取,則刪除上一個字元。

參數

operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。


範例  ( 如何使用本範例 )

以下範例會在文字方向中建立一個點選取範圍,然後刪除上一個字元。
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_deletePreviousCharacter
    {
        
        static public function deletePreviousCharacter():void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How now brown crow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( new Sprite() ));
            var editManager:EditManager = new EditManager();
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            editManager.selectRange( 16, 16 );
            editManager.deletePreviousCharacter(); //displays: How now brown cow.
        }
    }
}

deletePreviousWord

()方法 
public function deletePreviousWord(operationState:SelectionState = null):void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

刪除上一個單字。

如果選取範圍,則會刪除範圍內的第一個單字。

參數

operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。


範例  ( 如何使用本範例 )

以下範例會在文字方向中建立一個點選取範圍,然後刪除上一個文字。
var textFlow:TextFlow = TextConverter.importToFlow( "How do now brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
textFlow.flowComposer = new StandardFlowComposer();
textFlow.flowComposer.addController( new ContainerController( this ));
var editManager:EditManager = new EditManager( new UndoManager() );
textFlow.interactionManager = editManager;
textFlow.flowComposer.updateAllControllers();

editManager.setSelection( 7, 7 );
editManager.deletePreviousWord(); //displays: How now brown cow.

deleteText

()方法 
public function deleteText(operationState:SelectionState = null):void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

刪除某範圍的文字。

參數

operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。


範例  ( 如何使用本範例 )

以下範例會在文字方向中建立一個選取範圍,然後刪除選取的字元。
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_deleteText
    {
        static public function deleteText():void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How do now brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( new Sprite() ));
            var editManager:EditManager = new EditManager();
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            editManager.selectRange( 4, 7 );
            editManager.deleteText(); //displays: How now brown cow.
        }
    }
}

doOperation

()方法 
public function doOperation(operation:FlowOperation):void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

執行 FlowOperation。

更新文字流排的 IEditManager 函數,該函數會呼叫 doOperation() 方法。除非您建立專屬的自訂作業,否則一般並不需要直接呼叫此函數。

將在下列步驟中繼續此函數:

  1. 執行此作業前,請先清除所有擱置作業。
  2. 傳送可取消的 flowOperationBegin 事件。如果取消,則會立即傳回此方法。
  3. 執行作業。作業會傳回 truefalseFalse 表示沒有進行任何變更。
  4. 將作業推入還原堆疊中。
  5. 清除重做堆疊。
  6. 更新顯示。
  7. 傳送可取消的 flowOperationEnd 事件。

例外處理:如果作業擲出例外,則會捕捉到該例外,並將錯誤附加至 flowOperationEnd 事件。如果未取消事件,則會重新擲出錯誤。

參數

operation:FlowOperation — FlowOperation 物件


範例  ( 如何使用本範例 )

以下範例會建立以及執行 InsertTextOperation:
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.operations.InsertTextOperation;
    
    public class EditManager_doOperation
    {
        static public function doOperation(sprite:Sprite):void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( sprite ));
            var editManager:EditManager = new EditManager();
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            var selectionState:SelectionState = new SelectionState(textFlow, 4, 4);            
            var insertOperation:InsertTextOperation = new InsertTextOperation( selectionState, "now " );
            editManager.doOperation( insertOperation );        // displays: How now brown cow
        }
    }
}

endCompositeOperation

()方法 
public function endCompositeOperation():void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

結束作業群組。

自前次呼叫 beginCompositeOperation() 之後執行的所有作業會群組為 CompositeOperation,並在稍後完成。此 CompositeOperation 物件會新增至還原堆疊,或如果此撰寫作業是另一個撰寫作業下的巢狀項目,則會新增至父作業。

相關 API 元素

flashx.textLayout.edit.IEditManager.beginCompositeOperation

insertInlineGraphic

()方法 
public function insertInlineGraphic(source:Object, width:Object, height:Object, options:Object = null, operationState:SelectionState = null):InlineGraphicElement

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

插入影像。

影像來源可以是含有 URI 的字串、URLRequest 物件、代表內嵌資產的 Class 物件,或 DisplayObject 實體。

寬度及高度值可以是像素數、百分比或字串「auto」(在此情況下,會使用圖形的實際尺寸)。

float 設定為在 Float 類別所定義的其中一個常數,藉此指定影像要顯示在任何文字的左邊或右邊,還是要內嵌在文字中。

參數

source:Object — 可以是解譯為 URI 的 String、解譯為內嵌 DisplayObject 之類別的 Class、DisplayObject 實體或 URLRequest。
 
width:Object — 要插入的影像寬度 (數字、百分比或「auto」)
 
height:Object — 要插入的影像高度 (數字、百分比或「auto」)
 
options:Object (default = null) — 不支援.
 
operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。

傳回值
InlineGraphicElement

相關 API 元素


範例  ( 如何使用本範例 )

以下範例會在文字方向的開頭插入一個 Shape 物件:
package flashx.textLayout.edit.examples
{
    import flash.display.Shape;
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.elements.TextFlow;
    import flashx.undo.UndoManager;
    
    public class EditManager_insertInlineGraphic
    {
        static public function insertInlineGraphic(sprite:Sprite):void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How now brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( sprite ));
            var editManager:EditManager = new EditManager( new UndoManager() );
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            editManager.selectRange( 0, 0 );
            editManager.insertInlineGraphic( createGraphic(), 6, 6, "none" );
            
        }
        static private function createGraphic():Shape
        {
            var shape:Shape = new Shape();
            shape.graphics.beginFill( 0x993366 );
            shape.graphics.drawCircle( 5, 4, 6 );
            return shape;
        }

    }
}

insertText

()方法 
public function insertText(text:String, operationState:SelectionState = null):void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

插入文字。

在文字的某個位置或某個範圍,插入文字。如果 operationState 參數中提供的位置是範圍 (或參數是 null,而目前的選取是範圍),則會以插入的文字來取代目前範圍中的文字。

參數

text:String — 要插入的字串。
 
operationState:SelectionState (default = null) — 指定流排中要套用此作業的文字;如果是 null,則作業會套用至目前的選取範圍。


範例  ( 如何使用本範例 )

以下範例會建立以及執行 InsertTextOperation:
 
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.elements.TextFlow;
    import flashx.undo.UndoManager;
    
    public class EditManager_insertText
    {
        static public function insertText(sprite:Sprite):void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( sprite ));
            var editManager:EditManager = new EditManager( new UndoManager() );
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            editManager.selectRange( 4, 4 );
            editManager.insertText( "now " );
        }
    }
}

modifyInlineGraphic

()方法 
public function modifyInlineGraphic(source:Object, width:Object, height:Object, options:Object = null, operationState:SelectionState = null):void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

修改現有內嵌圖形。

在原始圖形中設定為不變更屬性的值 (修改現有的圖形物件,一般會比刪除並重建圖形簡單)。

參數

source:Object — 可以是解譯為 URI 的 String、解譯為內嵌 DisplayObject 之類別的 Class、DisplayObject 實體或 URLRequest。
 
width:Object — 影像的新寬度 (數字或百分比)。
 
height:Object — 影像的新高度 (數字或百分比)。
 
options:Object (default = null) — 不支援.
 
operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。

相關 API 元素


範例  ( 如何使用本範例 )

以下範例會在文字方向的開頭插入一個圓形,然後變更內嵌圖形的 widthheight 屬性,以拉伸為一個橢圓形:
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    import flash.display.Shape;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.elements.TextFlow;
    import flashx.undo.UndoManager;
    
    public class EditManager_modifyInlineGraphic
    {
        static public function modifyInlineGraphic(sprite:Sprite):void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How now brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( sprite ));
            var editManager:EditManager = new EditManager( new UndoManager() );
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            editManager.selectRange( 0, 0 );
            editManager.insertInlineGraphic( createGraphic(), 6, 6, "none" );
            
            editManager.selectRange( 0, 1 );
            editManager.modifyInlineGraphic( null, '12', '5', 'none' );
        }
    
        static private function createGraphic():Shape
        {
            var shape:Shape = new Shape();
            shape.graphics.beginFill( 0x993366 );
            shape.graphics.drawCircle( 4, 4, 6 );
            return shape;
        }
    }
}

moveChildren

()方法 
public function moveChildren(source:FlowGroupElement, sourceIndex:int, numChildren:int, destination:FlowGroupElement, destinationIndex:int, operationState:SelectionState = null):void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

將一組 FlowElements 從某個 FlowGroupElement 移至另一個。desinationElement 必須是所移動之子系的有效父輩類型,否則會擲出例外。

參數

source:FlowGroupElement — 要移動之元素的原始父輩。
 
sourceIndex:int — 要移動之第一個元素來源內的子系索引。
 
numChildren:int — 所移動的子系數目。
 
destination:FlowGroupElement — 移動後之元素的新父輩。
 
destinationIndex:int — 元素移動之目的地內的子系索引。
 
operationState:SelectionState (default = null) — 指定要套用此作業的文字,以及還原時選取範圍傳回的文字。若為 null,此作業會套用至目前的選取範圍。如果目前沒有任何選取範圍,此參數便不得為 null。

overwriteText

()方法 
public function overwriteText(text:String, operationState:SelectionState = null):void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

覆寫選取的文字。

如果選取範圍是點選取,則新的文字會覆寫第一個字元。

參數

text:String — 要插入的字串。
 
operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。


範例  ( 如何使用本範例 )

以下範例會覆寫文字方向中的字串:
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.elements.TextFlow;
    import flashx.undo.UndoManager;
    
    public class EditManager_overwriteText
    {
        static public function overwriteText(sprite:Sprite):void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How zzz brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( sprite ));
            var editManager:EditManager = new EditManager( new UndoManager() );
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            editManager.selectRange( 4, 6 );
            editManager.overwriteText( "now" ); //Displays: How now brown cow.
        }
    }
}

pasteTextScrap

()方法 
public function pasteTextScrap(scrapToPaste:flashx.textLayout.edit:TextScrap, operationState:SelectionState = null):void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

將 TextScrap 貼入選取的區域。

如果指定了文字範圍,則會刪除範圍內的文字。

參數

scrapToPaste:flashx.textLayout.edit:TextScrap — 要貼上的 TextScrap。
 
operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。

相關 API 元素

flashx.textLayout.edit.IEditManager.cutTextScrap
flashx.textLayout.edit.TextClipboard.getContents
flashx.textLayout.edit.TextScrap

範例  ( 如何使用本範例 )

以下範例會裁剪文字片段,然後貼到文字方向中的不同位置:
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.edit.TextScrap;
    import flashx.textLayout.elements.TextFlow;
    import flashx.undo.UndoManager;
    
    public class EditManager_pasteTextScrap
    {
        static public function pasteText(sprite:Sprite):void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How brown cow now.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( sprite ));
            var editManager:EditManager = new EditManager( new UndoManager() );
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            editManager.selectRange( 13, 17 );
            var scrap:TextScrap = editManager.cutTextScrap();
            
            editManager.selectRange( 3, 3 );
            editManager.pasteTextScrap( scrap ); //Displays: How now brown cow.
        }
    }
}

redo

()方法 
public function redo():void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

重新執行上一個還原作業。

注意:如果與此 IEditManager 相關的 IUndoManager 也與另一個 IEditManager 相關,則重做的可能是與另一個 IEditManager 相關的重做作業。如果另一個 IEditManager 的 FlowOperation 位在重做堆疊的上層,則會發生此狀況。

如果未開啟還原,則此函數不會有任何作用。

相關 API 元素


範例  ( 如何使用本範例 )

以下範例會定義一個函數,讓它在文字方向上執行最後的復原作業:
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_redo
    {
        static public function redo( textFlow:TextFlow ):void
        {
            if( textFlow.interactionManager is IEditManager )
            {
                IEditManager( textFlow.interactionManager ).redo();
            }
        }
    }
}

splitElement

()方法 
public function splitElement(target:FlowGroupElement, operationState:SelectionState = null):FlowGroupElement

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

在指定的位置中分割目標元素,在目前的這一個元素之後建立新元素。若 operationState 是一個範圍,則會刪除該範圍內的文字。新元素會建立在由 operationState 指定的文字位置之後。注意:分割 SubParagraphGroupElement 將不會有任何效果,因為它們將自動與相鄰的元素重新合併。

您可能會想使用此作業的範例是,若有一個清單,而您想要將其分割成兩個清單。

參數

target:FlowGroupElement — 要分割的元素。
 
operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。

傳回值
FlowGroupElement — 已建立的新段落。

splitParagraph

()方法 
public function splitParagraph(operationState:SelectionState = null):ParagraphElement

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

在目前位置中分割段落,在目前的這一個段落之後建立新段落。

如果指定了文字範圍,則會刪除範圍內的文字。

參數

operationState:SelectionState (default = null) — 指定此作業要套用的文字;如果是 null,則作業會套用至目前的選取範圍。

傳回值
ParagraphElement — 已建立的新段落。

範例  ( 如何使用本範例 )

以下範例會將段落一分為二:
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.edit.TextScrap;
    import flashx.textLayout.elements.TextFlow;
    import flashx.undo.UndoManager;
    
    public class EditManager_splitParagraph
    {
        static public function splitParagraph(sprite:Sprite):void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How now brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( sprite ));
            var editManager:EditManager = new EditManager( new UndoManager() );
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            editManager.selectRange( 8, 8 );
            editManager.splitParagraph();    //Displays:     How now
                                            //                brown cow.
        }
    }
}

undo

()方法 
public function undo():void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5

回復上一個作業。

注意:如果與此 IEditManager 相關的 IUndoManager 也與另一個 IEditManager 相關,則還原的可能是與另一個 IEditManager 相關的還原作業。如果另一個 IEditManager 的 FlowOperation 位在還原堆疊的上層,則會發生此狀況。

如果未開啟還原,則此函數不會有任何作用。

相關 API 元素


範例  ( 如何使用本範例 )

以下範例會定義一個函數,讓它在文字方向上復原最後的作業:
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_undo
    {
        static public function undo( textFlow:TextFlow ):void
        {
            if( textFlow.interactionManager is IEditManager )
            {
                IEditManager( textFlow.interactionManager ).undo();
            }
        }
    }
}

updateAllControllers

()方法 
public function updateAllControllers():void

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10.2, AIR 2.0

在作業修改顯示之後更新顯示。通常這會自動處理,但若 delayUpdates 為 on,請呼叫此方法,顯示應會在下一個 enter_frame 事件之後更新。





[ X ]為什麼顯示英文?
「ActionScript 3.0 參考」的內容是以英文顯示

並非所有「ActionScript 3.0 參考」的內容都翻譯為所有語言。當語言元素未翻譯時,就會以英文顯示。例如,ga.controls.HelpBox 類別並沒有翻譯為任何語言。因此在參考的繁體中文版本中,ga.controls.HelpBox 類別就會以英文顯示。