Is there any way to create internal anchors without using the HTML rendering option? I don't mind but I guess my customer will ;)

Thanks!

link|improve this question

feedback

3 Answers

up vote 2 down vote accepted

In the "tinyMCE Advanced" plugin has a special icon for that. The default WordPress installation don't offer the anchor icon/attribute editor.

link|improve this answer
Thanks it worked like a charm – Kaaviar Jun 8 '11 at 15:33
feedback

Here's a simple non-plugin solution, you can paste this into your functions.php :

function set_tinymce_buttons( $initArray ) {
    $initArray['theme_advanced_buttons1'] ='formatselect,|,bold,italic,underline,|,bullist,numlist,charmap,|,pastetext,pasteword,|,removeformat,|,anchor,link,unlink,|,undo,redo';
    $initArray['theme_advanced_buttons2'] = '';
    $initArray['theme_advanced_blockformats'] = 'h2,h3,h4,p';
    return $initArray;
}
add_filter('tiny_mce_before_init', 'set_tinymce_buttons');

With that you can set the two lines of buttons as well as the tags in the Format dropdown.

See this page for options.

link|improve this answer
feedback

Building off of mike23's answer. Here you can just append the anchor button to the wysiwyg panel.

function set_tinymce_buttons( $initArray ) {
    $initArray['theme_advanced_buttons1'] .= ',anchor';
    return $initArray;
}
add_filter('tiny_mce_before_init', 'set_tinymce_buttons');
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.