drag-and-drop

tinyMCE callback handler on image drag&drop

风格不统一 提交于 2019-12-23 03:07:32
问题 tinyMCE supports dragging images from a website (not local file browser) to the rich text editor field. They get converted to and <img src=''>...</img> tag and are immediately displayed as images. I would like to change the src url of the image tag when it is inserted that way. I tried using the urlconverter_callback handler and the paste_preprocess handler from the paste plugin but neither of them get triggered when I drop the image to the editor field. Which callback can I use to react on

Can I drag files from the desktop to a drop area in Firefox 3.5 and initiate an upload?

[亡魂溺海] 提交于 2019-12-23 02:54:16
问题 I've set a ondrop event on my drop area and it receives an event when I drag an image from my desktop to the drop area. However, according to the Recommended_Drag_Types document: https://developer.mozilla.org/en/DragDrop/Recommended_Drag_Types A local file is dragged using the application/x-moz-file type with a data value that is an nsIFile object. Non-privileged web pages are not able to retrieve or modify data of this type. That makes sense, but how do I prompt the user to escalate

Drag and drop unicode TText in DelphiXe4

自古美人都是妖i 提交于 2019-12-23 02:52:44
问题 I am trying to make a chessboard gui in DelphiXE4 with TRectangle & TText using unicode chess pieces (see StackOverflow Delphi chess unicode linkand drag and drop but I cannot get DND to work properly! My test project is FireMonkey FMX. I have tried various code additions to DragDrop/DragOver Events including using Accept & Source in code but to no result. I set dragdrop to auto on TRectangle & TText components & can get drag function but no drop function! What code do I need to enter in

Drag & drop across frames with jQuery UI

我的未来我决定 提交于 2019-12-23 02:46:14
问题 I would like to do this: Drag a DIV element from a first document that contains an IFRAME Drop this DIV element into into a second document, inside the IFRAME. Is there a way to use jQuery UI draggable & droppable to achieve this? or otherwise do this in a cross-browser way, possibly with another JS library? 回答1: You can easily do this by accessing the contents inside the iframe with jQuery this way: $( 'your-iframe' ).contents().find( 'elements-to-find' ).droppable(); To make sure the iframe

jQuery draggable sortable, changing html on dropped element

血红的双手。 提交于 2019-12-23 02:39:24
问题 I'm designing a form-building interface. All available fields will be in an unordered list on the left of the interface, with a large, empty unordered list on the right which will become my webform. The "trick" to making this interface work is having the list items from the left transformed into valid html elements by appending html into the droppable ui element just before they are appended into the sortable list on the right. I have it working...mostly...using draggable() and sortable().

Disable drop if div has already been dropped?

有些话、适合烂在心里 提交于 2019-12-23 02:34:55
问题 I've created a drag and drop game in order to start teaching myself jquery. Everything seems to be working but you can drop more than one item onto the same square. I want to disable droppable if the place holder has an image in it. I've looked into: `greedy: true` That disables the drop but I'm not sure how to enable it again and also: $(this).droppable( 'disable' ); I can get these both to disable the drop but not sure how I get them to enable it again if the block/image reverts back to its

React/Dnd: Make a component draggable and droppable at the same time

风格不统一 提交于 2019-12-23 02:16:41
问题 There are multiple elements, which I want to get draggable and droppable at the same time - using react dnd . That means I need to drag one of the elements and drop it over another element. First I defined the dragSource for MyComponent. That works so far. But how do I have to setup the DropTarget for the same component? import React, { Component } from 'react' import { DragSource, DropTarget } from 'react-dnd' const elementSource = { beginDrag (props) { return { } } } const elementTarget = {

React native drag and drop position football training

对着背影说爱祢 提交于 2019-12-23 01:53:13
问题 I have such a thing, the formations are so declared: 4-4-2: [ [{}]//1 [{},{},{},{}...],//4 [{},{},{},{}...],//4 [{},{}...]//2 ] So I do two nested cycles, one to scroll the rows from the door to the midfield (number of arrays inside the main array), and one to scroll through each individual player per row (number of obj within the single array row). So far it works properly, I repeat this thing both for the home team and the away team is working properly. The problem is that I would like to

How can I have an element with “overflow-y: auto” but still allow the browser to scroll when i drag an item horizontally using jquery ui sortable?

可紊 提交于 2019-12-23 01:38:13
问题 I have a webpage that uses jquery ui sortable. I have a list of of columns where each column has an html table in it. I am using jquery ui sortable to support dragging table rows within a table as well as from one table to another similar to this jquery ui sortable demo (but with many more columns) The one issue i ran into is that if i have many columns, I can't seem to support both of these requirements below at the same time: The requirement to have vertical scrollbar in my table if it

Drag-and-drop accordion panels? (ASP.Net)

廉价感情. 提交于 2019-12-23 01:35:21
问题 I have a set of accordion panes(dynamically created) contained in an Accordion control. Basically, what I am wanting is for the user to be capable of dragging these accordion panels so that instead of A pane B pane C pane They can drag and drop it to be something like B pane A pane C pane Or whatever. Also, more importantly, I would need to be able to detect that they have changed the order. Would there be a way to have it when they "drop" the pane that it can update a hidden field or