What you’re looking for is two things:
- The
wp_tiny_mce
function that loads all the needed JS etc - The code below:
This to setup the JS etc:
// Setup the TinyMCE stuff and target it at our desired textarea
wp_tiny_mce( true, array( "editor_selector" => 'tinymce_class' ) );
And this HTML where you need the editor box:
<div class="editor_container">
<textarea class="large-text tinymce_class" rows="5" id="tinymce_1" name="name">
<?php echo esc_html($value) ?>
</textarea>
</div>
Related Posts:
- What does wp-embed.min.js do in WordPress 4.4?
- How to use wordpress default Password Strength Meter script
- Register and enqueue conditional (browser-specific) javascript files?
- wp_enqueue_script() not working at all
- How to dequeue a script?
- Any advantage of using wp_scripts and is_IE when enqueuing scripts
- How to use wp_localize_script in custom page template?
- wp_enqueue_script : how to change loading order of scripts?
- Reset Undo on the tinymce editor
- Remove extra Google Maps script
- What does wp-list.js do?
- Instantiate TinyMCE via JS ( rather than PHP/wp_editor )
- Include jQuery UI as a whole
- How to echo JS right after enqueued script to put it into noConflict mode?
- Combine enqueue js without affecting dependencies
- wp_localize_script with boolean and init
- wp_register_script multiple identifiers?
- TinyMCE Button to Insert Multiple Lines of Text?
- require.js to load javascript
- wp_enqueue_script isn’t connecting my custom js file
- How to add extra attributes to the script tag added via wp_localize_script()
- How do I enqueue(or delay loading of) tags in individual page posts?
- How to wrap the content of the main tinyMCE editor with extra tags
- Include Javascript as Plain (No file inclusion)
- Javascript not working?
- Add Item to Custom TinyMCE Menu
- wp_enqueue_script adds only the first script
- How to add JavaScript file using wp_enqueue_scripts?
- Insert shortcode in post editor from javascript (Visual / HTML)
- Listbox return wrong value in WordPress 3.9
- Is it mandatory to enqueue any kind of Javsacript?
- Close TinyMCE plugin window on click away
- wp_enqueue_script & constants?
- Can the index.asset.php file be used with the enqueue_block_editor_assets action?
- How to place script in footer?
- Where is the WP auto-save draft JavaScript?
- Exclude JS file from 404 error page
- Building a slide down search box in wordpress
- Enqueue script if screen is greater than 500
- Script Localization doesn’t work
- Enqueue Javascript After ALL Other Scripts (Including Async Scripts)
- Enqueue js script to footer
- Enqueueing a script and a style sheet not working
- Adding a Javascript slideshow to the home page
- Is there a way to check for an attribute of a script when using script_loader_tag?
- Enqueue scripts all over but not in single.php
- How to set callback to execute after all the tinyMCE editors have been initialized?
- Media library not working with wp_editor() on the front end
- Popup box when Clicking on Insert into post button in wordpress
- WP TinyMCE (Full + media ) – 4.8 JS Init Dynamicly
- Tinymce.js editor in Chrome?
- How to reference TinyMCE body in my script
- Override do_item() Function to Add Extra Attribute to Scripts
- Proper way to enqueue a generated script that isn’t in a .js file?
- Enqueue scripts based on browser width?
- wp_enqueue_script not loading my custom js file
- Correctly enqueue scripts of type=text/paperscript (PaperJs Library)
- How to execute Javascript on a WordPress page?
- Video script issue, JavaScript attribute remains ‘undefined’
- Javascript on Registration Page
- Do I just put the html in a page when enqueueng or do I also have to reference js file from the html page [closed]
- Javascript asset not enqueuing with the rest
- WordPress wp_enqueue_script only adds text to top of page source
- Getting a variable inside foreach from PHP to JS after localization
- How do I know if I should enqueue JS code or just include it in ONE PHP function?
- Including Styles and JS files to work ON my plugin interface
- TinyMCE Javascript URL Question
- Linking wp_enqueue can’t find the javascript file (adds “?ver=x.x.x” to the src)
- Failing to load my script files in wordpress! i can’t figure out what i’m doing wrong
- Setting Variable Path to Template Directory inside Script
- wp_enqueue_script does not recognize my js file?
- What to include to use jQuery UI Auto Complete
- Bootstrap bundle present in page source but not working
- Dynamically add Js
- Load JavaScript on specific page with @wordpress compiler
- How to load Javascript code or functions.php later in a child theme?
- Enqueued script fails
- Script Loaded in WordPress but won’t run
- How to pass data to javascript in custom widget class
- Loading two versions of same JS libary
- Proper way of minifiying java script files in wordpress theme
- Adding javascript script to header via functions.php
- How to use value from modal tinymce windowManager?
- load-scripts.php loads incorrect file names
- Enqueue concatinated JS file in WordPress
- wp_enqueue_scripts doesn’t work for template pages
- JavaScript and Google PageSpeed + wp_enqueue_script
- Put dynamic Javascript in header after doing operations
- early enqueueing javascript file in page template, not in functions.php
- WordPress 4.2 mce-views migration guide?
- jQuery + more won’t load in header
- WOW.js Script Tag Initialization Header/Footer
- How to integrate a different (JavaScript) editor in WordPress?
- JS enqueue path (localhost)
- Why can’t I load JS script in a plugin?
- Script loaders vs wp_enqueue_script
- wp_enqueue has a resource but doesn’t generate a script tag [duplicate]
- How to load JavaScript modules with script_loader_tag hook?
- Uncaught ReferenceError: tippy is not defined
- How to securely set dynamic HTML content with JavaScript?