[Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 337
  • Last Modified:

Edit Menu help

Hello friends,


I am developing web based flex application , which contains a menubar and few textinput controls.In the menu bar i have edit menu which includes cut,copy,paste,find,replace.The keyboard shortcut and context menu item for cut,copy,paste of the textinput are working fine.But i need to implement this funtionalties(cut,copy, paste,find,replace)in my custom menubar.How can i do this?.Please suggest me some good ideas and examples.


1 Solution
Assuming you want to Cut, Copy, Paste, Search and Replace contents of a RichTextEditor or TextArea control:

1. For Find and Replace functionalities you can use the search, replace methods and Regular Expressions available for Flex String objects.

a) For Cut, Copy & Paste in a RichTextEditor: you can access the selected text thru the selection property which is of type TextRange
b) For Cut, Copy & Paste in a TextArea: you can access the selected text thru selectionBeginIndex and selectionEndIndex properties
c) Once you have the selected text, it is just a matter of doing a combination of the following tasks: Storing the text in a variable, searching for the text, replacing the text, inserting the text inside the existing string.
flex_mduAuthor Commented:
can you giv some example code snippet

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now