{"id":397,"date":"2011-12-20T19:28:55","date_gmt":"2011-12-20T19:28:55","guid":{"rendered":"http:\/\/www.websitedesignwebsitedevelopment.com\/?p=397"},"modified":"2014-03-19T09:14:14","modified_gmt":"2014-03-19T09:14:14","slug":"apply-tinymce-to-specific-textarea","status":"publish","type":"post","link":"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/","title":{"rendered":"apply tinyMCE to specific textarea instead of all textareas"},"content":{"rendered":"<h2>apply tinyMCE to specific textarea instead of all textareas<\/h2>\n<p>This problem occurs when we don&#8217;t bother to specify the textarea for tinyMCE. Situation justifies because mostly we deal with such content pages where only one textarea will be used and that either rich texteditor or simple textarea. Few developers will not agree with me if i say that use more than one textareas on the same page and apply tinyMCE to only one. Still all textareas will behave normal as they should except one which is associated with tinyMCE.<\/p>\n<p>But the magic starts after inclusion of javascript file for tinyMCE. In fact\u00a0tinyMCE script starts work when javascript file is properly called and relevant textarea is rendered. Now suppose that two textareas are rendered already and then tinyMCE starts work so what will happen? It will simply replace all textareas with tinyMCE editor.<\/p>\n<p>The reason is shown in this image where we are specifying a broad category as textareas.<br \/>\n<img decoding=\"async\" src=\"http:\/\/www.websitedesignwebsitedevelopment.com\/wp-content\/uploads\/2011\/12\/tinyMCE_wdwd_1.jpg\" alt=\"\" \/><\/p>\n<p>Another magic comes with tinyMCE is that if we are not specifying the elements to which we want to apply tinyMCE style so once javascript is called on the page after that if any textarea will be added so that textarea will get shape of\u00a0tinyMCE. This thing creates problem specially when we wait for ajax calls, JSON response and then textarea rendering etc.<\/p>\n<p>Its solution is is to set mode: exact in tinyMCE and we have to set elements in comma separated string. As in given snapshot there is only one element, you can try it with more.<br \/>\n<img decoding=\"async\" src=\"http:\/\/www.websitedesignwebsitedevelopment.com\/wp-content\/uploads\/2011\/12\/tinyMCE_wdwd_2.jpg\" alt=\"\" \/><\/p>\n<p>tinyMCE application to particular textarea is an important point if we want to save our time while deploying a solution. Hope this pictorial aid will help those a lot who straight forwardly use tinyMCE and don&#8217;t bother to be specific.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>apply tinyMCE to specific textarea instead of all textareas This problem occurs when we don&#8217;t bother to specify the textarea for tinyMCE. Situation justifies because mostly we deal with such content pages where only one textarea will be used and that either rich texteditor or simple textarea. Few developers will not agree with me if [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":399,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[8,1],"tags":[],"class_list":["post-397","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-css-issues","category-website-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>apply tinyMCE to specific textarea instead of all textareas<\/title>\n<meta name=\"description\" content=\"apply tinyMCE to specific textarea instead of all textareas is a pictorial aid to explain the important of specific application of tinyMCE\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"apply tinyMCE to specific textarea instead of all textareas\" \/>\n<meta property=\"og:description\" content=\"apply tinyMCE to specific textarea instead of all textareas is a pictorial aid to explain the important of specific application of tinyMCE\" \/>\n<meta property=\"og:url\" content=\"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/\" \/>\n<meta property=\"og:site_name\" content=\"AndroidBubble Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pages\/Website-Design-Website-Development\/172363336135453\" \/>\n<meta property=\"article:published_time\" content=\"2011-12-20T19:28:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-03-19T09:14:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/tinyMCE_wdwd_1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"620\" \/>\n\t<meta property=\"og:image:height\" content=\"230\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Fahad\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fahad\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/\"},\"author\":{\"name\":\"Fahad\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\"},\"headline\":\"apply tinyMCE to specific textarea instead of all textareas\",\"datePublished\":\"2011-12-20T19:28:55+00:00\",\"dateModified\":\"2014-03-19T09:14:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/\"},\"wordCount\":309,\"image\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/tinyMCE_wdwd_1.jpg\",\"articleSection\":[\"CSS Issues\",\"Website Development\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/\",\"url\":\"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/\",\"name\":\"apply tinyMCE to specific textarea instead of all textareas\",\"isPartOf\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/tinyMCE_wdwd_1.jpg\",\"datePublished\":\"2011-12-20T19:28:55+00:00\",\"dateModified\":\"2014-03-19T09:14:14+00:00\",\"author\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\"},\"description\":\"apply tinyMCE to specific textarea instead of all textareas is a pictorial aid to explain the important of specific application of tinyMCE\",\"breadcrumb\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/#primaryimage\",\"url\":\"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/tinyMCE_wdwd_1.jpg\",\"contentUrl\":\"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/tinyMCE_wdwd_1.jpg\",\"width\":\"620\",\"height\":\"230\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/androidbubble.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Website Design\",\"item\":\"https:\/\/androidbubble.com\/blog\/category\/website-design\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"CSS Issues\",\"item\":\"https:\/\/androidbubble.com\/blog\/category\/website-design\/css-issues\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"apply tinyMCE to specific textarea instead of all textareas\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#website\",\"url\":\"https:\/\/androidbubble.com\/blog\/\",\"name\":\"AndroidBubble Blog\",\"description\":\"Articles &amp; Posts\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/androidbubble.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\",\"name\":\"Fahad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g\",\"caption\":\"Fahad\"},\"sameAs\":[\"http:\/\/www.androidbubbles.com\/\",\"https:\/\/x.com\/phpFlex\"],\"url\":\"https:\/\/androidbubble.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"apply tinyMCE to specific textarea instead of all textareas","description":"apply tinyMCE to specific textarea instead of all textareas is a pictorial aid to explain the important of specific application of tinyMCE","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/","og_locale":"en_US","og_type":"article","og_title":"apply tinyMCE to specific textarea instead of all textareas","og_description":"apply tinyMCE to specific textarea instead of all textareas is a pictorial aid to explain the important of specific application of tinyMCE","og_url":"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/","og_site_name":"AndroidBubble Blog","article_publisher":"https:\/\/www.facebook.com\/pages\/Website-Design-Website-Development\/172363336135453","article_published_time":"2011-12-20T19:28:55+00:00","article_modified_time":"2014-03-19T09:14:14+00:00","og_image":[{"width":620,"height":230,"url":"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/tinyMCE_wdwd_1.jpg","type":"image\/jpeg"}],"author":"Fahad","twitter_misc":{"Written by":"Fahad","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/#article","isPartOf":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/"},"author":{"name":"Fahad","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7"},"headline":"apply tinyMCE to specific textarea instead of all textareas","datePublished":"2011-12-20T19:28:55+00:00","dateModified":"2014-03-19T09:14:14+00:00","mainEntityOfPage":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/"},"wordCount":309,"image":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/#primaryimage"},"thumbnailUrl":"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/tinyMCE_wdwd_1.jpg","articleSection":["CSS Issues","Website Development"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/","url":"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/","name":"apply tinyMCE to specific textarea instead of all textareas","isPartOf":{"@id":"https:\/\/androidbubble.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/#primaryimage"},"image":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/#primaryimage"},"thumbnailUrl":"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/tinyMCE_wdwd_1.jpg","datePublished":"2011-12-20T19:28:55+00:00","dateModified":"2014-03-19T09:14:14+00:00","author":{"@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7"},"description":"apply tinyMCE to specific textarea instead of all textareas is a pictorial aid to explain the important of specific application of tinyMCE","breadcrumb":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/#primaryimage","url":"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/tinyMCE_wdwd_1.jpg","contentUrl":"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/tinyMCE_wdwd_1.jpg","width":"620","height":"230"},{"@type":"BreadcrumbList","@id":"https:\/\/androidbubble.com\/blog\/website-development\/apply-tinymce-to-specific-textarea\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/androidbubble.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Website Design","item":"https:\/\/androidbubble.com\/blog\/category\/website-design\/"},{"@type":"ListItem","position":3,"name":"CSS Issues","item":"https:\/\/androidbubble.com\/blog\/category\/website-design\/css-issues\/"},{"@type":"ListItem","position":4,"name":"apply tinyMCE to specific textarea instead of all textareas"}]},{"@type":"WebSite","@id":"https:\/\/androidbubble.com\/blog\/#website","url":"https:\/\/androidbubble.com\/blog\/","name":"AndroidBubble Blog","description":"Articles &amp; Posts","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/androidbubble.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7","name":"Fahad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g","caption":"Fahad"},"sameAs":["http:\/\/www.androidbubbles.com\/","https:\/\/x.com\/phpFlex"],"url":"https:\/\/androidbubble.com\/blog\/author\/admin\/"}]}},"views":2261,"jetpack_featured_media_url":"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/tinyMCE_wdwd_1.jpg","_links":{"self":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/397","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/comments?post=397"}],"version-history":[{"count":4,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/397\/revisions"}],"predecessor-version":[{"id":403,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/397\/revisions\/403"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/media\/399"}],"wp:attachment":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/media?parent=397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/categories?post=397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/tags?post=397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}