Text and Image Drag Drop Functionality within TLF

Is there any way by which  I can use select the text or inlinegraphic and drag and drop it within same component?

if you want to drag and drop ILG within TLF,of course ,you can!
somebody has made it
http://diding.javaeye.com/admin/blogs/345239

Similar Messages

  • Drag and drop the text and image

    Hi,
    I need help in drag and drop text and image.
    I am able to drag and drop the text and image in doc but  i want to drag the text in text frame and image in image frame only.
    For this how to get textframe id or is there any other way to do this. Pls help me if anyone know how to do this one.
    Thanks
    Arun

    This thread is pretty old, but this can help anyone in the future:
    To handle a drop in InDesign, you have to implement your own custom CDragDropTargetFlavorHelper. You can find a working example in SDK Sample. Take a look at BasicDragDrop.sdk project in the SDK.

  • How can i copy line with text and image to ms word

    When I insert an image in textflow using InlineGraphicElement it works, but when I copy the line with the image to MS Word it copies only the text (not the image).
    How can i copy the image to MS Word?

    If you want copy formatted text and image to MS Word, you need to give MS Word rtf markup, because Word can recognize rtf markup but not TLF markup.
    So you need to create a custom clipboard to paste a rtf markup. It's a large feature for you, because you need a tlf-rtf converter in your custom clipboard.
    TLF Custom Clipboard Example:
    package
        import flash.display.Sprite;
        import flash.desktop.ClipboardFormats;
        import flashx.textLayout.container.ContainerController;
        import flashx.textLayout.conversion.ITextImporter;
        import flashx.textLayout.conversion.TextConverter;
        import flashx.textLayout.edit.EditManager;
        import flashx.textLayout.elements.*;
        import flashx.undo.UndoManager;
        // Example code to install a custom clipboard format. This one installs at the front of the list (overriding all later formats)
        // and adds a handler for plain text that strips out all consonants (everything except aeiou).
        public class CustomClipboardFormat extends Sprite
            public function CustomClipboardFormat()
                var textFlow:TextFlow = setup();
                TextConverter.addFormatAt(0, "vowelsOnly_extraList", VowelsOnlyImporter, AdditionalListExporter, "air:text" /* it's a converter for cliboard */);
            private const markup:String = '<TextFlow whiteSpaceCollapse="preserve" version="2.0.0" xmlns="http://ns.adobe.com/textLayout/2008"><p><span color=\"0x00ff00\">Anything you paste will have all consonants removed.</span></p></TextFlow>';
            private function setup():TextFlow
                var importer:ITextImporter = TextConverter.getImporter(TextConverter.TEXT_LAYOUT_FORMAT);
                var textFlow:TextFlow = importer.importToFlow(markup);
                textFlow.flowComposer.addController(new ContainerController(this,500,200));
                textFlow.interactionManager = new EditManager(new UndoManager());
                textFlow.flowComposer.updateAllControllers();
                return textFlow;
    import flashx.textLayout.conversion.ITextExporter;
    import flashx.textLayout.conversion.ConverterBase;
    import flashx.textLayout.conversion.ITextImporter;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.elements.IConfiguration;
    import flashx.textLayout.elements.TextFlow;
    class VowelsOnlyImporter extends ConverterBase implements ITextImporter
        protected var _config:IConfiguration = null;
        /** Constructor */
        public function VowelsOnlyImporter()
            super();
        public function importToFlow(source:Object):TextFlow
            if (source is String)
                var firstChar:String = (source as String).charAt(0);
                firstChar = firstChar.toLowerCase();
                // This filter only applies if the first character is a vowel
                if (firstChar == 'a' || firstChar == 'i' || firstChar == 'e' || firstChar == 'o' || firstChar == 'u')
                    var pattern:RegExp = /([b-df-hj-np-tv-z])*/g;
                    source = source.replace(pattern, "");
                    var importer:ITextImporter = TextConverter.getImporter(TextConverter.PLAIN_TEXT_FORMAT);
                    importer.useClipboardAnnotations = this.useClipboardAnnotations;
                    importer.configuration = _config;
                    return importer.importToFlow(source);
            return null;
        public function get configuration():IConfiguration
            return _config;
        public function set configuration(value:IConfiguration):void
            _config = value;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.ListElement;
    import flashx.textLayout.elements.ListItemElement;
    class AdditionalListExporter extends ConverterBase implements ITextExporter
        /** Constructor */
        public function AdditionalListExporter()   
            super();
        public function export(source:TextFlow, conversionType:String):Object
            if (source is TextFlow)
                source.getChildAt(source.numChildren - 1).setStyle(MERGE_TO_NEXT_ON_PASTE, false);
                var list:ListElement = new ListElement();
                var item1:ListItemElement = new ListItemElement();
                var item2:ListItemElement = new ListItemElement();
                var para1:ParagraphElement = new ParagraphElement();
                var para2:ParagraphElement = new ParagraphElement();
                var span1:SpanElement = new SpanElement();
                span1.text = "ab";
                var span2:SpanElement = new SpanElement();
                span2.text = "cd";
                list.addChild(item1);
                list.addChild(item2);
                item1.addChild(para1);
                para1.addChild(span1);
                item2.addChild(para2);
                para2.addChild(span2);
                source.addChild(list);
                var exporter:ITextExporter = TextConverter.getExporter(TextConverter.TEXT_LAYOUT_FORMAT);
                exporter.useClipboardAnnotations = this.useClipboardAnnotations;
                return exporter.export(source, conversionType);   
            return null;

  • Drag & drop item within Tree not working

    Hi,
    I want to be able to drag & drop items within a tree but
    items cannot move accross branches
    It can only be moved within its branch.
    For this I have a condition in dragDrop(event) handler.
    When i drag item it does not move accross branches which is
    intended but when i drop within its branch
    on a different location,
    the item does
    not get dropped
    Though i have dragMoveEnabled set to true.
    my code looks like this:
    private function onDragDrop(event:DragEvent):void {
    var dropTarget:Tree = Tree(event.currentTarget);
    var node:XML = myTree.selectedItem as XML;
    var p:*;
    p = node.parent();
    if(node.parent().@label != "sameBranch") {
    return;
    } else {
    // drop target.
    Do i need to do anything else...
    Please advice.
    Thanks
    Lucky

    topping up, still did not find a way to do...
    but i have handled all tree events like dragEnter and
    dragDrop as described in the flex doc.
    Has anyone faced a similar issue...

  • Text and Image component Image placing not working!

    Hi Guys,
    For some odd reason, when I drop text and image component to the page I do not see the left or right option to place image in "Styles" tab.  The styles tab shows blank and by default paragraph gets placed after image.  This only happens in my site, not in Geomatrix. Am I missing something to include??
    Thanks in advance.

    geometrixx site has extended the text&image component thats why it shows that option. earlier in 5.4 version they directly overrided in geometrixx apps but now you wont find it there. But if you want to achieve this functionality then you have to override same component locally in your apps and add some more configuration to style tab as below.
    <tab4
                jcr:primaryType="cq:Widget"
                xtype="componentstyles">
                <items jcr:primaryType="cq:WidgetCollection">
                    <controlstyle
                        jcr:primaryType="cq:Widget"
                        fieldLable="ControlStyle"
                        name="./ControlStyle"
                        title="ControlStyle"
                        type="select"
                        xtype="selection">
                        <options jcr:primaryType="cq:WidgetCollection">
                            <Left
                                jcr:primaryType="nt:unstructured"
                                text="Left Align"
                                value="left"/>
                            <Right
                                jcr:primaryType="nt:unstructured"
                                text="Right Align"
                                value="right"/>
                        </options>
                    </controlstyle>
                </items>
            </tab4>

  • Stretched text and image with FULL_SCREEN_INTERACTIVE after Air player update

    One of my Air applications uses StageDisplayState.FULL_SCREEN_INTERACTIVE to switch to full screen during the presentation of some sheets.
    Everything worked fine untill some users reported a streching of texts and images in the sheets.
    It turns out that the problem occurs after an update from the Adobe Air Player to 3.1 from  2.7.
    The first screen shots shows the text as it should be, the second screen shot shows the text after the update of the Air Player.
    The code used to go into the Full Screen mode is:
        public function setFullScreenInteractive(fullScreenWidth:int = Constants.INT_SCREEN_WIDTH_SMALL, fullScreenHeight:int = Constants.INT_SCREEN_HEIGHT_SMALL):void
                             s.fullScreenSourceRect = new Rectangle(          0, 0, fullScreenWidth, fullScreenHeight);
            s.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
    with  Constants.INT_SCREEN_WIDTH_SMALL = 800 and  Constants.INT_SCREEN_HEIGHT_SMALL = 600.
    I can reproduce the problem on a couple of computers with Windows Xp but it's not happening on all the computers I've tested.
    Any idea how to fix this (without telling my users to Uninstall the current Air Player and reinstall the Air Player 2.7)?
    Regards,
    Bart

    Hi Bart,
    Unfortunately the correct screenshot link appears to broken.  Could you please open a new bug report on this over at bugbase.adobe.com?  Please post back with the URL so that others affected can add their comments and votes.  It would also help if we had a sample project/application that we can reproduce this issue with.  If you'd like to keep this private, please feel free to send it to me directly at [email protected]
    Thanks,
    Chris

  • Drag & Drop Functionality Doesn't Work in External SWF?

    Hi all,
    I'm currently a TA for a Flash course at my school.  We're using AS 2.0 and working with external SWFs.
    I think this might be pretty simple to remedy.  Well, at least I'm hoping!
    A student is having trouble with drag & drop functionality when it  is used in an external SWF.  Basically, in our drag & drop section,  we have a sheet of paper ("paper" MC) and an object we drag into it  ("object" MC).  When the object is released in the paper area, we go to  frame 2 of "paper" MC, which consequently has an animation.
    This works fine and dandy in said drag & drop section, but once the  drag & drop section is loaded into our main SWF via a MC  placeholder, the drag & drop functionality stops working.
    Here is the URL to the drag & drop section by itself:
    http://www.phayzed.com/flashkit/drag_for_animation.swf
    and here is the URL to the main swf, which loads the drag & drop SWF into a movieclip and causes it to work incorrectly:
    http://www.phayzed.com/flashkit/main.swf
    Now here is the code on the draggable object ("object" MC):
    on (press) {
            startDrag (this, true);
    on (release) {
            stopDrag ();
            if (this._droptarget == "/paper") {
                    _parent.paper.gotoAndStop(2);
                    _parent.object._visible=false;
    If any more info is needed, I'm willing to upload both FLA files.   Although, something tells me that this is a simple issue to resolve.
    Thanks a lot for any help!!!
    Cheers
    T

    with as2 you must convert that antiquated as1 code:
    on (press) {
            startDrag (this, true);
    on (release) {
            stopDrag ();
            if (eval(this._droptarget) == _parent.paper) {
                    _parent.paper.gotoAndStop(2);
                    _parent.object._visible=false;

  • Paste selected text AND images from a webpage to Pages/Word?

    I'm a new Mac user (also running virtual Windows XP via vmware fusion), and I know next to nothing about my Mac. Please bear with me if this is something that has been answered (I looked, but didn't find a specific answer for my question...it may be here, but I can't find it).
    On a Windows-based PC, all I need to do is select, copy, then paste into a Word document. All text and images would paste. I can't seem to figure out how to do that in Pages or Word (have MS Office for Mac, too).
    Thanks for any help.

    I suppose I was hoping I could do on my Mac, what I did on my Dell...that doesn't appear to be the case.
    Specifically, I'm talking about clicking/dragging to select what I want (including images), opening a Word document then pasting everying, including ALL selected images. More specifically, at sites with game walkthroughs. I prefer to save them to a document and refer to them offline, if I need to. I actually tried it at 2 different sites (one that hosts their own images and one that does not), with the same results.
    While I was waiting for a response (thank you, so much, by the way), I tried again and actually managed to get the first 3 images (of 60+) to paste into Word. There were blank places in Word, but the invisible images were clickable. In Pages, only the text pasted.
    Tried it every which way, but Sunday, LOL, and nothing worked. If it can't be done on my Mac, then I'll just keep using my Dell (I knew there was a reason I decided to keep it) for that sort of thing and then email them to myself...or try installing my MS Office '07 under virtual Windows.
    Thanks, again.

  • Best approach to work with drag & drop functionality

    I m new to java technology & want to implement drag & drop functionality with java web application.so, Please suggest me the best way or best framework or any api to implement drag & drop functionality with java web application.

    In that case, you're most likely looking for a JavaScript solution. In spite of the similar name, JavaScript has nothing to do with Java.
    You may want to Google for "javascript drag and drop".

  • Is it possible to extract the text and images using PHP

    Hi friends,
    Is it possible to extract the text and images using PHP, in the same order as it is in the PDF?
    Else is it possible extract the same as XML using PHP, or ASP
    I googled it but its in vain, any help is appreciated.
    Thanks in advance.

    Dear Mike,
    Thanks for your quick reply,
    I mean is it possible to parse the PDF line by line using the PHP.
    I extracted the whole text but couldn't the images. Since the PDF's images are decoded using various methods like DCTDecode, JPXDecode, etc.
    The text is decoded with FlateDecode, which i breaked using a function in PHP.
    Thanks,

  • How to Rearrange components using Drag Drop functionality

    Hi,
    Is it possible to re-arrange the components inside the form using drag drop functionality in RCF?
    There are 3/4 section headers in my screen, user can re-arrange them.
    But as per the RCF document it says, "Drag Drop functionality allows users to drag the value of one component and drop it on to another". It dosent say any thing about component drag-drop.

    Hi,
    there is a componentDragSource element that you use for this. However, persisting the change of location is not handled automatically. I didn't try this, but I assume that using the component drag option gives you access to the UI component itself so you can nest it in another container
    Frank
    Ps.: the drag event always givey you access to the component. This componentDragSource however shows the component when dragging, which is a slightly better indicator if you plan to re-arrange items

  • Image drag drop not working in scaffholding. Does it require soem setting?

    image drag drop not working in scaffholding. Does it require soem setting?

    Hello Manoj,
    The scaffolding teamplate which you use to create scaffolding page is actually a design prototype which helps you to create similar types of pages instances very quickly without authoring each page separately (for example news, aticle types of pages) and that is the concept of scaffolding only.
    For example - When you go to location http://localhost:4502/miscadmin#/etc/scaffolding/geometrixx you will see a "News" page which is an example of scaffolding (this is a similar page which you can create using scaffolding template).
    Now if you open this page you will be accessing http://localhost:4502/cf#/etc/scaffolding/geometrixx/news.html and here you will see already design page.
         1. if you access page properties from side kick you will see how this page is configured using target template and target path
         2. if you go to design mode using side kick you will see how the component has been design (which is similar to what appears on page when you came first time)
         3. Now come back to normal view of that page (http://localhost:4502/cf#/etc/scaffolding/geometrixx/news.html) and author this page with some dummy property and click on "create" button. I know here you can not author the image as it comes as disabled empty box.
         4. once you author the content and click on create button it will create an instance of scaffolding page on the same page you can see the link on the top of same page.
         5. Now access that page, when you access that page the page will take reference of target template you configured using pare preoperties to display the page.
         6. On this page you will see the same component you configured and when you will edit it you can author the image from there directly.
    Now question is why to configure same component two times half data from scaffolding and half data from page but answer is the design is correct because the page design which you have created (for example http://localhost:4502/cf#/etc/scaffolding/geometrixx/news.html) is just proto type to create actual page instances and prototype can not holds values for page instance (specially image until it doesnt configured correctly for page instance in this case) which exist only when you create pages using the scaffolding page prototype. Otherwise you have to do more customization by extending scaffolding "/libs/wcm/scaffolding" changing the code and design OR you have to design it according to your target page strtucture which you have configured in page properties (specially image node).
    If you want to create your own page prototype using scaffolding template and want image to associate just copy paste "/etc/scaffolding/geometrixx/news/jcr:content/dialog/items/items/tab2" node to your newly created scaffolding page prototype.
    for more information on scaffolding just refer -http://dev.day.com/docs/en/cq/current/wcm/scaffolding.html
    I hope it clarifies your question and help you to proceed. Let me know if you need more information or help.
    Thanks,
    Pawan

  • Dynamic Image Drag/Drop

    Hi Dudes,
    I found a very nice image drag/drop example in the Live Doc :
    http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Live Docs_Book_Parts&file=dragdrop_081_14.html
    My problem is that I can't manage this dynamically ... I want
    this :
    <mx:Image id="myimg" alpha="1" x="800" y="500"
    source="images/qw.png"
    mouseMove="dragMe(event, myimg, 'img'); myoffset(myimg);"
    />
    but coded that way:
    im = new Image();
    im.source = 'image.jpg'
    // MY LINE
    MISSING TO MANAGE mouseMove
    Any Ideas ?
    Thanks a lot ...
    Virtualsight

    Hello.
    What about like this?
    private function dynamicImage():void
    var img:Image = new Image();
    img.name = "myImage";
    img.source = "assets/hoge.jpg";
    img.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
    private function onMouseMove(event:MouseEvent):void
    var img:Image = event.currentTarget as Image;
    dragMe(event, img, "img");
    myoffset(img);

  • New MBP 15" Retina Crashes Daily, Locks-up and Distorts Text and Images.

    Why is my new (2 weeks old) MBP Retina 15" crashing and locking-up about 3 to 6 times a day, even while using native programs like Safari?  I have all software updates.  Also, today the graphics card completely freaked out resulting in distorted text and images.  This occured while in Safari.  My hourly reboot did repair display distortions, but it occured again later in the day !

    If you're within 14 days of taking delivery, exchange it or return it for a refund. Otherwise take it in for warranty service.

  • The latest Firefox version won't expand to make text and images more visible on my 32" screen, although I have tried to adjust the advanced Windows appearance settings in the same way that has worked in previous versions of Firefox.

    Normally I have had to go to Control Panel; Appearances and Themes; Display; Settings; Advanced; Custom; and then I adjust the Customize Setting to 155% (149 dpi). I have hit on this setting through trial and error; larger and icons like the cursor get big and fuzzy. Smaller than 155% and text and images are tiny on the 32" wide screen. This time that procedure doesn't seem to work. The text and images remain too small regardless of setting, although the cursor icon gets big. I can manually zoom the pages, but that is clumsy and has to be redone. Does anyone know of an easy setting fix? I am not too smart about this stuff--mostly trial and error, but I do want to be able to enjoy my wide screen. Thanks!

    Normally I have had to go to Control Panel; Appearances and Themes; Display; Settings; Advanced; Custom; and then I adjust the Customize Setting to 155% (149 dpi). I have hit on this setting through trial and error; larger and icons like the cursor get big and fuzzy. Smaller than 155% and text and images are tiny on the 32" wide screen. This time that procedure doesn't seem to work. The text and images remain too small regardless of setting, although the cursor icon gets big. I can manually zoom the pages, but that is clumsy and has to be redone. Does anyone know of an easy setting fix? I am not too smart about this stuff--mostly trial and error, but I do want to be able to enjoy my wide screen. Thanks!

Maybe you are looking for