1

when we giving hyperlink to a text <a> tag will automatically assigned to the text.Like that how i can giving my own tag to the text.So i need a button the toolbar and when i selecting that button a custom tag will automatically added to the selected text.

1
  • What do you mean by "custom tag" Commented Oct 18, 2010 at 13:00

2 Answers 2

1

You are looking for http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/valid_elements and http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/extended_valid_elements just add the element in your tiny mce startup config

Sign up to request clarification or add additional context in comments.

Comments

0
theme_advanced_buttons1 : "Tittle,phpimage,bold,italic,underline",    
setup : function(ed) {
            // Add a custom button
            ed.addButton('Tittle', {
                title : 'Tittle',
                image : './images/copy.jpg',
                onclick : function() {
                    // Add you own code to execute something on click
                    ed.focus();
                    ed.selection.setContent('<tittle>' + ed.selection.getContent() + '</tittle>');
                }
            });
        }

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.