{"id":823,"date":"2011-12-14T14:18:18","date_gmt":"2011-12-14T14:18:18","guid":{"rendered":"https:\/\/www.mohanjith.net\/blog\/?p=823"},"modified":"2011-12-14T14:18:18","modified_gmt":"2011-12-14T14:18:18","slug":"wysiwyg-editor-in-your-wordpress-theme-or-plugin","status":"publish","type":"post","link":"https:\/\/mohanjith.net\/blog\/2011\/12\/wysiwyg-editor-in-your-wordpress-theme-or-plugin.html","title":{"rendered":"WYSIWYG editor in your WordPress theme or plugin"},"content":{"rendered":"<p>Prior to WordPress 3.3 adding WYSIWYG editor to a frontend page meant you had almost reinvent the wheel. In WordPress 3.3\u00a0wp_editor was introduced which made developer\/designer&#8217;s life whole lot easier. Now you can add the same editor used when you type up a post can be added anywhere in your theme or plugin (frontend or backend).<\/p>\n<p>I stumbled across this function by accident when I was checking why the WYSIWYG editor was not working on one of my plugins on WordPress 3.3 . You also can allow users to \u00a0upload images if the user has necessary capabilities using the editor wp_editor adds.<\/p>\n<p>Read all about it on the WordPress\u00a0<a href=\"http:\/\/codex.wordpress.org\/Function_Reference\/wp_editor\">Codex<\/a>\u00a0.\u00a0Hope someone will find it useful.<\/p>\n<div id=\"fb-like\" style=\"\"><iframe src=\"http:\/\/www.facebook.com\/plugins\/like.php?href=https:\/\/mohanjith.net\/blog\/2011\/12\/wysiwyg-editor-in-your-wordpress-theme-or-plugin.html&amp;layout=standard&amp;show_faces=true&amp;width=300&amp;action=like&amp;font=&amp;colorscheme=light&amp;locale=en_US\" scrolling=\"no\" frameborder=\"0\" allowTransparency=\"true\" style=\"border:none; overflow:hidden; width:300px; height:30px\"><\/iframe><\/div>","protected":false},"excerpt":{"rendered":"<p>Prior to WordPress 3.3 adding WYSIWYG editor to a frontend page meant you had almost reinvent the wheel. In WordPress 3.3\u00a0wp_editor was introduced which made developer\/designer&#8217;s life whole lot easier. Now you can add the same editor used when you type up a post can be added anywhere in your theme or plugin (frontend or &#8230; <a title=\"WYSIWYG editor in your WordPress theme or plugin\" class=\"read-more\" href=\"https:\/\/mohanjith.net\/blog\/2011\/12\/wysiwyg-editor-in-your-wordpress-theme-or-plugin.html\" aria-label=\"More on WYSIWYG editor in your WordPress theme or plugin\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[126],"tags":[295,298,438],"class_list":["post-823","post","type-post","status-publish","format-standard","hentry","category-wordpress","tag-3-3","tag-new-function","tag-wordpress"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5lUHm-dh","jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/posts\/823","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/comments?post=823"}],"version-history":[{"count":1,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/posts\/823\/revisions"}],"predecessor-version":[{"id":826,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/posts\/823\/revisions\/826"}],"wp:attachment":[{"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/media?parent=823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/categories?post=823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/tags?post=823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}