In the above example the following line:
jQuery(".myDiv").find("li").each(function(){
should be:
jQuery(".keywords").find("li").each(function(){
That should enable the list items to be dragged and dropped.
To allow the items to be dropped on the TinyMCE textarea the following code works.
$('#editorcontainer').droppable({
drop: function(event, ui) {
alert('dropped'); //NOW FIRES!
//Dynamically add content
tinyMCE.activeEditor.execCommand('mceInsertContent', false, 'New content.');
}
});
Related Posts:
- Sorting UL Listing Within the TinyMCE Visual Editor in WordPress
- jQuery dialog popup
- How to change the text of a button in jQuery?
- jQueryUI dialog width
- How to use radio on change event?
- Form Submit jQuery does not work
- Slide right to left?
- Check if user is logged in using JQuery
- How to save the state of a drag and drop jQuery UI Sortables front end layout editor?
- tinymce is not defined when not using wp_editor
- Add tinymce buttons to caption textarea in media uploader
- jQuery UI Datepicker not working
- Custom function to rearrange attachments when creating posts – Almost there
- How to get a jQuery script to run on a page?
- Hacking TinyMCE for better usability (shortcodes and html)
- possible to make sections in theme customizer sortable and saveable at publish button clicked?
- How disable checkbox when listbox value changes in tinymce
- Enqueuing jQuery in plug-ins
- How do I get my page to load the jQuery UI Effects library?
- TinyMCE – TypeError: r is undefined
- Override default jquery ui library with newer version
- Automatic jQuery accordion from header tags
- Jquery not showing in homepage
- Format numeric symbols in titles
- jQuery.accordion isn’t a function even when enqueued
- Override theme style with other CSS on a specific page
- Will the latest Bootstrap work properly with the default WordPress jQuery?
- Rhyzz Repeatable-fields javascript in php and wordpress
- WordPress + BlockUI or a splash page [closed]
- Return an array from get_terms and store as JavaScript array for search autocomplete
- TinyMCE 4 remove/add attributes for all images
- Dukapress jQuery(“form.product_update”).livequery is not a function [closed]
- Which jQuery packages are included in WordPress 3.1.2?
- Good Solution for Adding jQuery Tabs Anywhere Within WordPress?
- Cannot enqueue jQuery correctly using Google CDN
- TinyMCE plugin won’t work with jQuery 3.5.1 (testing with “Test jQuery Updates”)
- Adding jQuery UI elements to WordPress page
- Dynamicaly update field created with wp_editor()
- Sorting WP Auctions by date/price?
- How to add custon UI jquery & Fancybox script to WP
- jQuery tabs plugin with callback to fetch data
- Jquery UI Google CSS, from where?
- datepicker for custom post type admin
- How do I use jQuery to add the TinyMCE WYSIWYG editor to a textarea?
- JQuery UI not loading without explicit loading of jQuery
- Is there a default way in wordpress to create a overlay in the dashboard?
- AJAX Success Function using JS substr() fails in WP 4.1 vs 4.0
- Recommended Use of Bootstrap, or JQuery-UI in WP/plugin development?
- “switchEditors is not defined” with wp_editor() in jQuery UI tabs
- Screen Options JavaScript Code
- Drag and Drop Metadata Menu Order
- A carousel slideshow plugin in JavaScript
- How to add shortcode to show/hide press releases?
- jQuery UI Accordion loading very slow
- Theme style overrides the plugin style
- Slide toggle Jquery UI
- jquery Autocomplete
- why does so many javascript libraries are loaded along with my website?
- Dashboard controls have all stopped working
- How can I add a new lib path without call each one on the header?
- Visual editor popover or placeholder
- jQuery dialog prints HTML-Tags under WordPress
- using jquery autocomplete in wordpress plugin
- Theme variation conflict with jquery select2 dropdown
- jQuery datepicker not showing on admin menu
- JavaScript: filter() for Objects
- Check if jquery library exist
- Loading style.css and Jquery using HTTPS
- How to load whole WordPress pages dynamically with AJAX/jQuery like this following website?
- Creating custom AJAX requests
- how to get the comment ID in the front end when the REPLY button is clicked?
- Gravity list field override and adding javascript [closed]
- Change header image loaded by jQuery to use HTTPS
- Admin wp_ajax hook returning 0
- wp_verify_nonce not working
- Passing JSON-encoded HTML from WordPress to JavaScript
- Load created php file data via ajax
- NextGen plugin check failing, why?
- On screen music/audio player that grabs track URL [closed]
- Prevent other versions of jquery from loading on static front page
- Jquery not loaded by default in wordpress 5.6
- problem with jquery 3.5.1 in footer
- Accessing javascript in multiple files [closed]
- Script not loading when depending on jQuery
- masonry only works if jquery is called twice
- how to use wp_editor() here am getting empty result
- jQuery is not defined, working on local server but not online
- Parse wordpress blog data using json api and ajax
- problems with jquery external rss feed integration
- How to setup multi-page using jquery?
- $ not defined using jQuery in WordPress
- error: n.imagesLoaded is not a function
- Get ajaxForm response value
- Update a parent theme JQuery property in the child theme
- jQuery search function not running in WordPress but running locally (fiddle)
- Can’t seem to get JQuery working (wordpress plugin)
- Console shows ReferenceError: jQuery is not defined, no clue why!
- jQuery .change() Event Bubbling in WP Admin
- Combo box populating a DIV using ajax/jquery
- can’t make jQuery work (change image on time interval) [closed]