I will assume that you are creating a custom admin page at ?page=add-quiz
, in this case before calling the wp_editor
function you also have to enqueue the CSS / Js files for it with the wp_enqueue_media()
function.
So at the end you should have
wp_enqueue_media();
wp_editor( '', 'instructions', $settings = array('textarea_name' => 'instructions', 'textarea_rows' => '5') );
A clever way to do it would be inside an action like
function prefix_my_custom_admin_scripts() {
wp_enqueue_media();
}
add_action('admin_enqueue_scripts', 'prefix_my_custom_admin_scripts');
Again assuming that you don’t have this hook already.
Related Posts:
- Checking if a file is already in the Media Library
- Change Media Uploader default directory
- Using the component outside the editor. select(‘core’) is null
- How to replicate Media Library “Add New” on Plugin Settings Page
- How to enable sorting in custom media uploader in plugin
- Upload multiple images and insert them into custom html code
- Changed media upload path for plugin, but generates error & shows wrong url
- How to destroy or dispose wordpress uploder/manager?
- How do you filter get_media_items by mime type in a custom media upload tab?
- Upload to a specific media folder created by FileBird Lite
- Load images from CDN and custom features to “Add Media” dialogue
- upload image to wordpress media library failed for custom post type
- How can I add an image upload field directly to a custom write panel?
- Enhance Media Manager for Gallery
- Adding Custom Text Patterns in the WP 4.5 Visual Editor
- Custom collection in media manager?
- Standard location for plugin to save/cache files?
- Adding more options to the instance of an image. (Attachment Display Settings)
- Saving data-URI to media library
- Can I use the wp media uploader for my own plugin?
- Load visual editor without custom styling
- Changing upload directory for plugin uploads only
- Upload file to remote storage
- How to extend LINK TO functionality in ATTACHMENT DISPLAY SETTINGS
- how does wp.media javascript library work?
- Why are two functions over-riding each other?
- How can I view all WP generated thumbnails in Media Manager?
- Modify how gallery.js builds the shortcode [gallery ...] in tinyMCE?
- WordPress Media mime type filter problem 4.0
- Bridge WordPress Media API with custom tinyMCE plugin [closed]
- How to get an image transferred via FTP or script to appear in Media Manager?
- Add Additional File Info (jpeg compression & file size) settings to Edit Images Screen
- Is it possible to modify the media library admin screen?
- Backslashes being stripped from CSS
- Proper way to hook wp_get_attachment_url
- Getting Details Of Uploaded Image
- Sharing a common set of image files for media library, across all sites within multisite
- Uploading images from a custom page using blueimp uploader?
- Hook to get image filename when it is uploaded
- How to send email in wordpress with more than one attachments
- Using the default wordpress uploader inside plugin
- Files automatically added
- What filter should I use to insert a button inside on Media>Add New
- Changing upload dir in a plugin regardless of post type
- Plugin writing: access file that was just uploaded
- Custom delete option button in plugin settings
- WP_Editor – Saving Value into Plugin Option – Stripping HTML
- Create a new post using rest api and save featured image using an external image url
- Append wp_editor to Dynamically created textarea
- WP Editor Issue in Backend
- Why is the temporary upload always 4.1K
- tinymce.get() returns error after ajax request
- Redirect to another page using contact form 7? [closed]
- WordPress Specified file failed upload test
- Run a function when new image is uploaded in media library
- Creating multiple wp_editer() text fields in for loop — the text/visual switch only works for first editor
- zip unzip attachments in wordpress
- How to create a digital product download link that can’t be used twice?
- how to save wp_editor html content in options table
- How to submit/upload data to database and in specific folder?
- custom wp_editor does not save the content in plugin settings
- Cleaning a filename after image sideloading a url that contains `%20`
- Get audio metadata on file upload
- How to move an image in a plugin to the upload directory and make it as a media of wordpress?
- Why doesn’t update_post_meta work for certain strings?
- wp.media Uncaught TypeError: Cannot read properties of undefined (reading ‘state’)
- How to create wordpress media library UI on plugin page
- How to upload large media file in chunks, without any plugin?
- wp.media gallery collection sometimes undefined
- Insert and read media from the WordPress library and call in the plugin
- How to copy the all WordPress media items to another custom plugin folder?
- Can’t load a script in my plugin page
- function add custom fields to media gallery
- Trying to rename a file upload as the hash of file content on wordpress
- Adding the image selector/uploader to an admin back page
- Home page is not loading, where in other pages are displaying on the site
- WordPress5.2.3: Better File Download Plugin validation issue
- WordPress discards PNG file when uploading plugin file
- Hook for validating and rejecting frontend image upload
- wp_editor embed shortcode not working within my plugin
- Media Upload to custom database and Custom Directory
- WordPress Dropdown image select
- How to fetch the post content from the wordpress editor before it can be saved(published)?
- Creating custom Insert Media page
- Displaying $_FILES data (simlar to $_POST)
- Changing upload directory for plugin uploads only
- Thumbnails for media Library images
- Remove image in post when it’s removed in media library
- Is it possible to convert various image types from remote URLs to WebP and then serve them immediately?
- Open media box library from link
- Add frontend editor with media buttons for Visitors and display only their media
- upload script in plugin development [duplicate]
- Leveraging Core Functionality in Icon Upload Plugin [closed]
- How do I display and edit other posts within the ‘Edit Post’ area of Wp-Admin Dashboard
- Checking if the query is empty does not work
- Remove default wordpress roles
- What is the meta_query key name for the woo product average rating? [closed]
- how to catch a data from a array in WordPress
- Why my admin-ajax url returns 0 even after adding echo and die() at the end of function?
- I want to redirect user to an amazon product page from my wordpress website when they add product to there cart [closed]