Title: TinyMCE Visual/HTML toggle doesn&#039;t work on WP3.1   Magic Fields 1.5.3
Last modified: August 19, 2016

---

# TinyMCE Visual/HTML toggle doesn't work on WP3.1 Magic Fields 1.5.3

 *  [Paul Ryan](https://wordpress.org/support/users/figureone/)
 * (@figureone)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/)
 * Great plugin!
    Just upgraded to WP 3.1, and the Visual editor / HTML editor toggle
   buttons above the TinyMCE editor no longer work.
 * [http://wordpress.org/extend/plugins/magic-fields/](http://wordpress.org/extend/plugins/magic-fields/)

Viewing 15 replies - 1 through 15 (of 55 total)

1 [2](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/page/3/?output_format=md)
[4](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/page/4/?output_format=md)
[→](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/page/2/?output_format=md)

 *  Plugin Author [hunk](https://wordpress.org/support/users/hunk/)
 * (@hunk)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/#post-1937917)
 * sorry a forget add a slider script, please update a 1.5.4.
 * Sorry
 *  Thread Starter [Paul Ryan](https://wordpress.org/support/users/figureone/)
 * (@figureone)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/#post-1938026)
 * Excellent, thanks! However, if I have a Quantity:Multiple write panel, the Visual/
   HTML toggle doesn’t work for the first section (if I add more sections, it works
   fine on them). No javascript errors are being thrown, though.
    Hope it’s an easy
   fix, and thanks for the quick response!
 *  Thread Starter [Paul Ryan](https://wordpress.org/support/users/figureone/)
 * (@figureone)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/#post-1938030)
 * Also, this issue is occurring on a WordPress multisite build…not sure if the 
   issues are related, but after upgrading to WP 3.1 I am also seeing similar problems
   to what existed before Magic Fields 1.5.1 (that is, content fields disappearing
   when saving/publishing/updating a page).
 *  [hotgluemedia](https://wordpress.org/support/users/hotgluemedia/)
 * (@hotgluemedia)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/#post-1938308)
 * We’re experiencing what I think may be a related issue on a client site running
   WP3.1 and MF1.5.4 (PHP5/Apache server). Every once in a while, but not all the
   time, the content in a multi-line widget will not save unless the “HTML” button
   is toggled. When this happens, even though the “HTML” button is toggled, the 
   content is still shown as if it were using the visual editor.
 * I’ve been able to replicate the issue in several browsers (Chrome 9, FF 3.6, 
   and IE8) and on pages with multiple multi-line MFs and single-line MFs, with 
   different types of content. There doesn’t appear to be any way to determine when
   the issue will happen.
 * Love the plugin – would appreciate some guidance. 🙂
 *  Thread Starter [Paul Ryan](https://wordpress.org/support/users/figureone/)
 * (@figureone)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/#post-1938310)
 * Yep, that’s exactly what happens for me–neither the Visual or HTML button is 
   toggled on some multi-line widgets, and if you update the page in that state (
   neither button selected), the data in that field will be lost. If you manually
   click the HTML button, the TinyMCE editor stays (i.e., it doesn’t switch to a
   textarea), but the data will be saved.
 * In my limited debugging, it’s always the first magic field section that you edit
   that has this problem. If I have a quantity:multiple write panel, any subsequent
   section I add will work perfectly. Also note, if I edit an existing page that
   has multiple magic field sections, whichever one I click on to edit first (it
   doesn’t have to be the first one at the top) will not work.
 * I’m pretty sure it’s not a database issue and should be able to be fixed with
   some jQuery or javascript calls. The data loss seems to occur because the textarea
   that doesn’t have the Visual/HTML toggle selected is not tied to the form submit,
   so the data never gets sent back to the database.
 * Again, thanks for the awesome plugin! It has made development of public online
   courses at the university I work for so much easier.
 *  Plugin Author [hunk](https://wordpress.org/support/users/hunk/)
 * (@hunk)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/#post-1938321)
 * ok quick fix comment this line 1198 in js/groups.js
    tinyMCE.init(options);
 * and check if everything is working properly. if it works pleasetell me to add
   it to the current version
 *  Thread Starter [Paul Ryan](https://wordpress.org/support/users/figureone/)
 * (@figureone)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/#post-1938322)
 * Yes, that fix works for me!
 * In my quick testing, all multiline textboxes worked fine when toggling between
   Visual/HTML (TinyMCE/textarea). Kudos to you for hunting that down! I’d say it’s
   safe to include in an update, but the one thing I haven’t tested is interaction
   with other TinyMCE extension plugins (I have the latest version of TinyMCE Advanced
   installed, but nothing else).
 * I’ll let you know if I run into any problems. Again, thanks!
 *  [hotgluemedia](https://wordpress.org/support/users/hotgluemedia/)
 * (@hotgluemedia)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/#post-1938327)
 * That seems to have done the trick – thank you!!!
 *  [hotgluemedia](https://wordpress.org/support/users/hotgluemedia/)
 * (@hotgluemedia)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/#post-1938332)
 * Update – the patch worked, but created another problem: the upload/insert media
   buttons have disappeared. Had to roll back the patch.
 *  [autumnmist](https://wordpress.org/support/users/autumnmist/)
 * (@autumnmist)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/#post-1938343)
 * Having the same problem with WP 3.1 and Magic Fields 1.5.4 (toggle between HTML
   and Visual doesn’t always work and all my linebreaks get stripped away in Visual
   mode).
 * Commenting out line 1198 didn’t help. I still can’t access HTML mode and Visual
   mode removes all paragraphs.
 *  [autumnmist](https://wordpress.org/support/users/autumnmist/)
 * (@autumnmist)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/#post-1938344)
 * Update: If I comment out 1198, I can usually access HTML mode but all the HTML
   tags/formatting (particularly paragraph tags) gets stripped away when I do that.
 * I’m pretty sure this isn’t WordPress’ doing since I disabled wpautop
 *  Plugin Author [hunk](https://wordpress.org/support/users/hunk/)
 * (@hunk)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/#post-1938370)
 * Hi hotgluemedia, this buttons are in fullscreen mode
 *  [hotgluemedia](https://wordpress.org/support/users/hotgluemedia/)
 * (@hotgluemedia)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/#post-1938379)
 * Yes, but without the patch they appear in both places.
 *  [hobojoe](https://wordpress.org/support/users/hobojoe/)
 * (@hobojoe)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/#post-1938441)
 * This happens to me as well 🙁 Only solution I’ve found so far is to try to click
   the HTML button before the page finishes loading…
 *  Thread Starter [Paul Ryan](https://wordpress.org/support/users/figureone/)
 * (@figureone)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/#post-1938459)
 * Just a quick summary of where this bug stands:
 * Applying this:
    * comment out line 1198 in js/groups.js: tinyMCE.init(options);
 * Causes this:
    * Fixed data loss if you don’t click Visual/HTML buttons on 1st
   magic field; * Breaks Upload/Insert media buttons; * Breaks other TinyMCE init
   stuff (how it treats line breaks, etc.)
 * Just looking for an update here, thanks guys!
 * p.s. any one remember this:
    [http://www.youtube.com/watch?v=NA90IlymdZ4](http://www.youtube.com/watch?v=NA90IlymdZ4)
   this is cooler: [vimeo.com/21362582](http://vimeo.com/21362582)

Viewing 15 replies - 1 through 15 (of 55 total)

1 [2](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/page/3/?output_format=md)
[4](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/page/4/?output_format=md)
[→](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/page/2/?output_format=md)

The topic ‘TinyMCE Visual/HTML toggle doesn't work on WP3.1 Magic Fields 1.5.3’ 
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/magic-fields.svg)
 * [Magic Fields](https://wordpress.org/plugins/magic-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/magic-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/magic-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/magic-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/magic-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/magic-fields/reviews/)

 * 55 replies
 * 11 participants
 * Last reply from: [res401](https://wordpress.org/support/users/res401/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/tinymce-visualhtml-toggle-doesnt-work-on-wp31-magic-fields-153/page/4/#post-1938591)
 * Status: not resolved