We have added custom tab after Media Library tab in wordpress media uploader popup but the content of tab not getting refreshed after uploads.
It requires full page reload for the update content in media uploader popup.
here is the custom tab that we have added.
A user was facing a similar issue, you could use this plugin, everything is explained here:
https://premium.wpmudev.org/forums/topic/refresh-media-library-after-manual-ftp-upload
Regards,
Daniel
Related
I am trying to integrate TinyMCE with WPForms inside the WPForms Blog Post Submission plugin.
I inserted an HTML field with the code
<script src="https://cdn.tiny.cloud/1/no-api-key/tinymce/5/tinymce.min.js" referrerpolicy="origin"></script>
<script>
tinymce.init({
selector: '#wpforms-421-field_7'
});
This kind of works as TinyMCE is integrated but in a horrible layout. Also the Images that are uploaded using this are not actually reflected in the actual page.
How do I integrate TinyMCE with WPForms correctly so that Images can be inserted in the text area and saved in the submitted posts?
You are asking a couple of different questions wrapped up in your request ... let me try to address each one:
1 - TinyMCE looks odd in the rendered page
The menus, toolbars, and statusbar of TinyMCE are part of the main web page that loads TinyMCE. As such if you are loading CSS onto the page that impacts these elements you can get to odd visual results like this.
I would use your browser's dev tools to sleuth out what CSS is impacting things.
2 - How do I upload images using TinyMCE?
You have not given us any details at all as to how you have tried to allow users to upload images via TinyMCE. There is an insert image option that you can expose via the image plugin but it requires some back end coding to receive the image and process it.
https://www.tiny.cloud/docs/plugins/image/#image_uploadtab
https://www.tiny.cloud/docs/plugins/image/#file_picker_callback
One additional question on this - Wordpress already has a media library and a UI to interact with that while using TinyMCE to create content - why are you trying to do something outside of WP's own media library?
It seems the author want TinyMCE in place of the textarea when creating Form for submission of Blog Post using WPForm.
Image: Source: https://wpforms.com/how-to-allow-users-to-submit-blog-posts-on-your-wordpress-site/
The problem is WPForm does not come along with the TinyMCE especially for the post content. You will probably get SCRIPT error or UI problem. You can use different plugins other than WPForm. Else write some custom code particularly for the Post Submission Addon found with WPForm.
You must to set Wpforms as "No styling" and check "Load Assets Globally"
I'm developing a WordPress theme that has a sidebar and in it I've added the jetpack Facebook page widget.
I want to also add the Facebook customer chat plugin to the site.
The issue I'm having is that the rendered HTML for the customer chat plugin gets appended in the same context as the Facebook page widget which is causing a display bug - the plugin doesn't appear in the bottom right of the page, it sits just below the Facebook page plugin in the sidebar.
Is there a way to tell the Facebook SDK where to place the html for the chat plugin ?
I've looked through the API documentation but no dice.
Thanks!
I'm using Drupal 7 + Ubercart. Have to add a field with easy selecting from images (52 logo images of producers), that are already uploaded and will be used every time, when i'm adding new product.
Use Media module. From media documentation
Media provides a multimedia browser which allows a user to view and
search through all of the multimedia currently added to a site.
After enabling the module, go to your content type Manage fields page, and change the widget of your image field to Media file selector.
Screenshot for your field settings.
Screenshot for Media browser
Is there a solution to change the add Media popup in posts/page Wordpress admin ?
My dream is to integrate the popup directly in a metabox. The user shouldn't open the popup to manage his media files. And sometimes hide the library and From URL tabs, not always useful...
I'm looking to better manage a product page (for ecommercial website..) and its images.
Just a question :) And maybe a suggestion.
What do you think about that?
You can manipulate that screen in a couple of ways.
Using the action hook admin_head-media-upload-popup, as seen in How to Add a Custom Colum on Thickbox Media Gallery Tab?.
Or using the filter media_upload_tabs: Remove tabs from media uploader for a CPT.
Other solutions/examples and possible hooks can be found with this search query: https://wordpress.stackexchange.com/search?q=media-upload-popup
Take a look at the plugin Image Pro, which seems to meet the requirements.
Upload, resize, add, change images instantly. Manage your media collection with ease and use it for any post or page. A new way of managing content!
And analyzing the code of the plugin Faster Image Insert can reveal some interesting techniques.
Fully integrates media manager into editing interface, avoid reloading thickbox pop-up, with enhanced features like multi-insert & mass-editing.
While editing a post that contains an image, WP attaches a properties inspector icon over the image to allow editing basic properties such as size, alignment, link etc.
I'd like to know how difficult it would be to hack into this dialog screen and add some custom programming to the link area.
I'd like to add a popup menu there that I can access with the click of a button (next to the existing "Link to Image" button.
I'd prefer to hook into this dialog via a file in my theme's folder or via a plug-in. I don't want to alter the wordpress code itself (to allow this to be more portable and theme specific).
The edit image popup is a TinyMCE plugin (the rich text editor that Wordpress uses), the files for which are in wp-includes/js/tinymce/plugins/wpeditimage/.
As such you can't simply use the Wordpress plugin API to modify it. You'd need to create your own TinyMCE plugin, probably by duplicating the wpeditimage plugin and adding your extra functionality. You'd also need to create a Wordpress plugin to activate the TinyMCE plugin, see these codex pages for more information on working with TinyMCE plugins in Wordpress:
http://codex.wordpress.org/TinyMCE_Custom_Buttons
http://codex.wordpress.org/User:Skeltoac/Extending_TinyMCE