I Have created custom tinymce button using the code
setup : function(ed) {
ed.addButton('Tittle', {
title : 'Tittle',
image : './images/T.jpg',
onclick : function() {
ed.focus();
ed.selection.setContent('<tittle>' + ed.selection.getContent() + '</tittle>');
}
});
});
When i click on the custom button the selected text is added wtih <tittle>
tag.After i save the page and again doing the same thing on the same text then how i can remove the previously added the <tittle>
from the text.I have used ed.selection.getContent()
for getting the content ,but it giving only the content without tag.Thanks in advance