Forums

HTML button in TinyMCE missing in WP 2.1 (30 posts)

  1. stevejohnson
    Member
    Posted 5 years ago #

    So I upgraded to 2.1 and the HTML button in TinyMCE editor is missing. I use it frequently -- where did it go and how do I get it back?

  2. sheppy
    Member
    Posted 5 years ago #

    I'm missing almost all the buttons in the TinyMCE editor; all I have are Bold and Italic.

  3. stevejohnson
    Member
    Posted 5 years ago #

    Sheppy, the cure for THAT one is to dump your browser cache. In IE, go to Tools > Internet Options, and click the 'Delete Temporary Internet Files' button. In Firefox, use Tools > Options. Click the 'Advanced' tab, the the 'Network' tab and click the 'Clear Now' button on the cache line.

  4. anonislis
    Member
    Posted 5 years ago #

    You can try to insert
    "
    header("Content-type: text/javascript; charset: UTF-8");"

    after
    "@ require('../../../wp-config.php');"

    in the file "/wp-includes/js/tinymce/tiny_mce_config.php"

  5. sheppy
    Member
    Posted 5 years ago #

    Thanks, Steve, that did the job.

  6. sluggo
    Member
    Posted 5 years ago #

    Yes! What happened to the HTML button? I use that with almost every post. This is a serious loss of functionality. How can it be restored?

  7. sluggo
    Member
    Posted 5 years ago #

    Found it! stevejohnson, if you're still listening, this is what you have to do:

    Open wp-includes/js/tinymce/tiny_mce_config.php in an editor and go to the line that starts "$mce_buttons = apply_filters('mce_buttons'". You'll see the list of buttons on the toolbar in there. After "'wp_help'," add "'code',". Reload and you should see the button.

    Special bonus: I found a bug in there which is unrelated to this but still interesting. The button "wp_adv" toggles the "advanced" toolbar. The contents of the advanced tool bar are kept in between "wp_adv_start" and "wp_adv_end". But in that file, "wp_adv" is *after* "wp_adv_start". This means that the button to display the advanced toolbar is *on* the advanced toolbar! So there's no way to turn it on, apparently. If you swap "wp_adv" and "wp_adv_start" in that same file, you'll discover a whole bunch of new neat stuff.

  8. Chris_K
    Member
    Posted 5 years ago #

    You realize the "HTML" button you just added is the same as clicking the "Code" tab while on the post editor?

    As for the advanced toolbar: Just hit alt-shift-v (Firefox) or alt-v (IE) to toggle it.

  9. sbiehle
    Member
    Posted 5 years ago #

    You realize the "HTML" button you just added is the same as clicking the "Code" tab while on the post editor?

    As for the advanced toolbar: Just hit alt-shift-v (Firefox) or alt-v (IE) to toggle it.

    The CODE strips out some of the HTML when you write a post in the visual tab, so it's not really the same. I installed upgraded 2.1.1 on an office WP installation yesterday and the HTML button was there in the visual editor next to the HELP button. But today when I upgraded to 2.1.1 for a different install, there is no HTML button.

    Also, do you know what the toggle keystrokes for the advanced toolbar are on a Mac?

  10. sbiehle
    Member
    Posted 5 years ago #

    The button that should be showing up is the "HTML" button, which is located here in your WordPress install:

    /wp-includes/js/tinymce/themes/advanced/images/code.gif

    Go here to what it looks like:

    http://www.creativedepartment.com/blog/wp-includes/js/tinymce/themes/advanced/images/code.gif

  11. sbiehle
    Member
    Posted 5 years ago #

    I've cleaned out my cache, edited the tiny_mce_config.php file per Sluggo's suggestion, deactivated plugins, but I still can't seem to get the HTML button to appear. I know that it's supposed to be there... Any ideas?

  12. j25shl
    Member
    Posted 5 years ago #

    Same as above reply here. All I can see from post panel is 14 buttons; bold, italic, link, b-quote, del, ins, img, ul, ol, li, code, more, lookup, and close tags.

    I tried the instruction from sluggo that change tiny_mce_config.php, but it didn't do any change.

    Anyone had solved?

  13. webophir
    Member
    Posted 5 years ago #

    I had the same problem w/wp2.1. I looked through the source code and I found that wp loaded 'quicktags' toolbar by default instead of 'wp_tiny_mce' toolbar.

    You can find this code uder /wp-includes/general-template.php. At line 823, you may see

    <div id="quicktags">
    	<?php wp_print_scripts( 'quicktags' ); ?>
    	<script type="text/javascript">edToolbar()</script>
    	</div>

    To make tinymce working, change
    <?php wp_print_scripts( 'quicktags' ); ?>
    to
    <?php wp_print_scripts( 'tiny_mce' ); ?>
    and delete
    <script type="text/javascript">edToolbar()</script>
    line.

    With this change of code, you can see tinymce toolbar at least, but for some reason, you cannot see advanced tool bars (at the current version, 2.1.2, of wordpress). To make it work, I followed the instruction of sluggo.

    Go to /wp-includes/js/tinymce/tiny_mce_config.php file.
    At line 32, you can see
    $mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', 'separator', 'bullist', 'numlist', 'outdent', 'indent', 'separator', 'justifyleft', 'justifycenter', 'justifyright', 'separator', 'link', 'unlink', 'image', 'wp_more', 'separator', 'spellchecker', 'separator', 'wp_help', 'wp_adv_start', 'wp_adv', 'separator', 'formatselect', 'underline', 'justifyfull', 'forecolor', 'separator', 'pastetext', 'pasteword', 'separator', 'removeformat', 'cleanup', 'separator', 'charmap', 'separator', 'undo', 'redo', 'wp_adv_end'));

    Change the order of
    'wp_adv_start', 'wp_adv'
    to
    'wp_adv', 'wp_adv_start'

    Now Tinymce works with advanced toolbar w/o using other plugins!

  14. dbasden
    Member
    Posted 5 years ago #

    The above didn't work either. (webophir). Same issue here. IE and Firefox on PC, Firefox on Mac. This is not good.

  15. romico
    Member
    Posted 5 years ago #

    There's two possible ways to overcome this TinyMCE problem. One is enable javascript in firefox settings (sory i don't use IE) and two, upload the all tinymce files/folders and overide the old ones. More info and instructions go to http://www.romicozone.com

  16. charmed
    Member
    Posted 5 years ago #

    I have the same problem. The strange thing is that i have a few blogs all running 2.12 and some have the correct visual and html editor options working and others don't.. seems to somehow be corrupting in certain circumstances.

  17. sbiehle
    Member
    Posted 5 years ago #

    seems to somehow be corrupting in certain circumstances.

    Why is this happening in some instances and not in others? I've tried installing, reinstalling, and all of the suggestions above, but nothing seems to fix the problem. Occurs in all browsers.

    Is this a topic that needs to be elevated to a bug/fix?

  18. dbasden
    Member
    Posted 5 years ago #

    Ok, well, this is truly embarassing. But, it turns out there's a checkbox on the Profile that says use visual editor. And, evidently, when you create a new user, the default is NOT checked. So the new user didn't get the visual editor.

    To fix, log in. Click on My Profile in the upper right. Check the box that says 'Use the visual editor when writing'. Save.

    Blog away.

    Now I must go place my head in the sand.

  19. sbiehle
    Member
    Posted 5 years ago #

    turns out there's a checkbox on the Profile that says use visual editor

    Yeah, yeah. Already have this checked. I have all of the buttons available in the visual editor EXCEPT for the HMTL button.

  20. Chris_K
    Member
    Posted 5 years ago #

    sbiehle: See the two tabs above the editor? One of 'em is labeled "Code"? That's what replaced the "html" button.

  21. Otto
    Tech Ninja
    Posted 5 years ago #

    There is no more HTML button. It's been replaced by the code tab. They do the same things.

  22. dinobrasi
    Member
    Posted 5 years ago #

    The code tab... I don't get it. You can add SOME html elements, but not other elements. And when you save, it converts carriage returns into <br>. This is useless to me. It should be called something other than Code.

    I tried webophir's solution and it worked perfectly. Thank you!

  23. sbiehle
    Member
    Posted 5 years ago #

    See the two tabs above the editor? One of 'em is labeled "Code"? That's what replaced the "html" button.

    I don't think that's correct. The CODE tab isn't a replacement, it seems like it's somewhere between the idiot-proof rich text editor and the code monkey HTML button. The CODE tab strips out paragraph tags and other HTML code and don't get me started on trying to insert <div> tags.

    Plus, if the HTML button doesn't exist anymore, why include it in the image files in wp-includes?

  24. Otto
    Tech Ninja
    Posted 5 years ago #

    I don't think that's correct.

    Then you're wrong. The code tab is an exact replacement for the HTML button. What's changed is the editor itself. If you switch back to the Visual Editor, then it will reformat your HTML as it sees fit. It did that before too with the HTML button, just not as drastically.

    Some of the ways it edits things have been altered in the 2.2 release. Probably not all the ones everybody wanted though.

  25. sbiehle
    Member
    Posted 5 years ago #

    What's changed is the editor itself. If you switch back to the Visual Editor, then it will reformat your HTML as it sees fit. It did that before too with the HTML button, just not as drastically.

    So you're saying that as long as you don't ever switch to the Visual Editor the editor won't strip the code?

    I'm hoping the 2.2 release doesn't strip things as dramatically, because while I'm entirely comfortable editing the code, the RTE does make things easier at times.

  26. Otto
    Tech Ninja
    Posted 5 years ago #

    So you're saying that as long as you don't ever switch to the Visual Editor the editor won't strip the code?

    Yep. I've done it myself. Put in P tags and publish and they'll stay P tags. To a degree anyway, there's still some post editing that takes place due to wp-autop, but that happens when the post is displayed, not when it's being written or published.

    And of course, if you go back and Edit that post, then the visual editor loads first and they become DIV tags.

    Frankly, if you want to edit your HTML, I recommend disabling the visual editor entirely. It's simpler if you know HTML. The visual editor is meant for people who want to write text and mess with images and links and such without knowing HTML or any coding at all. It's not meant for people who are comfortable with messing with raw HTML.

    One compromise is to write your post in visual, switch to the code tab and insert any special HTML you want, and then publish without switching back. What you see in the code tab will be what is saved in the database.

    Currently there's no good way to get the best of both worlds.

  27. sbiehle
    Member
    Posted 5 years ago #

    Thanks for the tip. I still kinda wish there was a CODE button, because then I could have the best of both worlds. Alas, 'tis not meant to be.

  28. cutlerite
    Member
    Posted 5 years ago #

    I'm having similar problems.... could it be that the text box is too big, and its covering the buttons??? it kind of looks like that. anyway, I've uploaded both of the new files, and it still doesn't work. firefox, or IE, and I'm using a PC.

  29. Anderton
    Member
    Posted 4 years ago #

    I ditched the built-in TinyMCE and used this plug-in instead:
    http://mudbomb.com/archives/2005/02/02/wysiwyg-plugin-for-wordpress/

    More features and brings back iimage-browser to WordPress 2.2

  30. scot184
    Member
    Posted 4 years ago #

    Dbasden is right, visual editor was unchecked after i upgraded...glad i read this thread after the fact... =)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags