I'm developing some custom blocks in the new Gutenberg editor experience, and I'm struggle to understand how to use some build-in components, mostly the Draggable components. What I would like to achieve is a list of items (let's say many li in a ul) and I want them to be orderable with a drag & drop feature. Here is my code: import { __ } from '@wordpress/i18n'; import { registerBlockType } from '@wordpress/blocks'; import { Draggable, Dashicon } from '@wordpress/components'; …
Plugin: https://wordpress.org/plugins/wp-fullcalendar/ I use a plugin to display my “custom_post_type” events. I have modified the “wp-fullcalendar.php” plugin file in several places to show the start and end time of the “custom_fields” event. I also edited the “inline.js” file in the “includes / js /” folder to make the calendar “editable” and “dragable”. But I CAN’T set the calendar to save the change to my “custom_post_type” event when I make a change by moving the event on the calendar. I read …
I managed to somewhat replicate the product gallery metabox from WooCommerce in Gutenberg using the third-party react-sortable-hoc component. As it seems that this component is no longer supported, I'd like to know if one can get the same drag-to-sort functionality using core Gutenberg components only as I prefer to not rely on third-party components for this. Is the core Draggable component an equivalent? This is the code I got right now: index.js const { __ } = wp.i18n; const { …
I've got a very classical wp.media (lightbox) implementation to allow images uploading in a custom screen. Everything works: lightbox, upload process, selection, deletion. However as soon as I drag an image onto the lightbox and the drag&drop system is activated, the overlay saying "Drop files to upload" gets stuck and I'm not able to do anything unless I press "esc" to close the lightbox. No Javascript error is shown in the console. Here's the code I use: jQuery(document).delegate('.selector', 'click', function(e) …
I'm building a membership site with a little pseudo-CMS on the frontend that allows users to post music-related items. For this, I would like to give users the ability to order the items by using a drag-and-drop functionality like the one that exists in the admin area. I created various custom post types (Band, Artist, Record) and would like the user to be able to order these into each other, i.e. a record should be associated with an artist and …
I'm developing a new param type by following this guide. This new param type will contain a color picker and 3 text fields.To use VC's in-built colorpicker, made a littre research and found these codes from js_composer/include/params//colorpicker/colorpicker.php function vc_colorpicker_form_field( $settings, $value ) { return '<div class="color-group">' . '<input name="' . $settings['param_name'] . '" class="wpb_vc_param_value wpb-textinput ' . $settings['param_name'] . ' ' . $settings['type'] . '_field vc_color-control" type="text" value="' . $value . '"/>' . '</div>'; } So copied codes from here …
This is weird, but when I try to drag a widget to the bottom of sidebar it stuck in the middle, if I hold the dragging and drag it back to top it works but I can't drag it bellow that particular point. Any help would be appreciated! Edit I recorded a video of what's going on, here it is: http://screencast-o-matic.com/watch/coh3YXf6sl Also, I didn't tell before, I am using Jetpack plugin for widgets visibility on certain pages etc.
I created a custom post type but I want to put a functionality like the Menu Options located on Appearance>Menu. Which I can just choose a page on the side metabox then add it on the sortable area. And on the sortable area, I am arrange the order of the pages and save the arrangement when I publish or update the post. It needs to have different arrangement for each post. Please help. I am stack on this for 3 …
I would very much like to disable the drag and drop upload feature for tinyMCE (both the default one and the wp_editor() one) because it interacts with my custom pop up menus - (WP Trac). Right now I'm trying to just disable the one with the actual WP_Editor() function. For some reason it doesn't seem to actually disable any drag and drop functionality and was wondering if I was doing something wrong. My function call looks like this: wp_editor($meta_content, 'additionalTab', …