images / link Button in Editer (PLEASE HELP)
2 posters
Page 1 of 1
images / link Button in Editer (PLEASE HELP)
Hi all i Wonder if anyone could help me out here i have been trying to work on new buttons that would be a help to lots of you here but am crap at making Codes.
Do you think it would be easy to make a button that is just like the img button we have already but instead of it just adding the pic It would add the code to link to a new page or open a new page Say like a New site maybe helpful links on your own site.
A little like the buttons i have on my Siggy below this post.
Is there anyone that could make this for me and then you could prob's make it a helpful Topic for topic Tuesday ro something Hint Hint @ Ange Tuteur lol
The tool bar would look like this
Do you think it would be easy to make a button that is just like the img button we have already but instead of it just adding the pic It would add the code to link to a new page or open a new page Say like a New site maybe helpful links on your own site.
A little like the buttons i have on my Siggy below this post.
Is there anyone that could make this for me and then you could prob's make it a helpful Topic for topic Tuesday ro something Hint Hint @ Ange Tuteur lol
The tool bar would look like this
Last edited by APE on July 30th 2014, 2:47 pm; edited 1 time in total
Re: images / link Button in Editer (PLEASE HELP)
Hi APE,
Add it in all the pages :
Add it in all the pages :
- Code:
$(function(){$(function(){
$('.sceditor-button-image').after('<a title="Insert a linked image" class="sceditor-button sceditor-button-imganc"><div style="background:url(http://i39.servimg.com/u/f39/18/21/41/30/imganc10.png);"></div></a>');
$('.sceditor-button-imganc').click(function() {
if ($('.sceditor-insertimganc').length) return $('.sceditor-insertimganc').remove();
$('body').append('<div class="sceditor-dropdown sceditor-insertimganc" style="position:absolute;"><div><label>IMAGE URL:</label> <input id="imganc-img" class="url" placeholder="http://" type="text"></div><div><label>URL:</label> <input id="imganc-url" class="url" placeholder="http://" type="text"></div><div><label>Width (optional):</label> <input id="imganc-width" size="2" type="text"></div><div><label>Height (optional):</label> <input id="imganc-height" size="2" type="text"></div><div><input id="submit-imganc" class="button" value="Insert" type="button"></div></div>');
$('.sceditor-insertimganc').css({'left':$('.sceditor-button-imganc').offset().left + 'px','top':$('.sceditor-button-imganc').offset().top + 25 + 'px'});
$('#submit-imganc').click(function() {
var dimension = '',
width = $('#imganc-width').val(),
height = $('#imganc-height').val(),
image = $('#imganc-img').val(),
url = $('#imganc-url').val();
if (width.length > 0 && height.length > 0) dimension = '('+width+'px,'+height+'px)';
else if (width.length > 0 && height.length < 1) dimension = '('+width+'px,'+width+'px)';
else if (width.length < 1 && height.length > 0) dimension = '('+height+'px,'+height+'px)';
if (image.length > 0 && url.length > 0) $('#text_editor_textarea').sceditor('instance').insertText('[url='+url+'][img'+dimension+']'+image,'[/img][/url]');
$('.sceditor-insertimganc').remove();
return false;
});
});
$('.sceditor-button-source').click(function() { $('.sceditor-button-imganc').removeClass('disabled') }); $('.sceditor-button').not('.sceditor-button-imganc').click(function() { $('.sceditor-insertimganc').remove() }); $('.sceditor-container textarea').focus(function() { $('.sceditor-insertimganc').remove() }); $('.sceditor-container iframe').contents().mousedown(function() { $('.sceditor-insertimganc').remove() });
})});
Re: images / link Button in Editer (PLEASE HELP)
Wow Ange Tuteur you are the best Thank you i could KISS ya You Rock Big time it Works like a Charm XXXXXXXXXXX Thank you
Similar topics
» Nav Link Editer Help!
» Images on the navigation/link bar
» Navigation Link Images
» Need HTML to link images to a website.
» Can't change the images for "You have no new messages" link
» Images on the navigation/link bar
» Navigation Link Images
» Need HTML to link images to a website.
» Can't change the images for "You have no new messages" link
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum