Recent Topics

Open link in new page from quicktags plugin

Started by on Feb 14, 2009 – Contents updated: Feb 14, 2009

Feb 14, 2009 00:13    

Hi there,

Can anyone tell me how to add
target="_blank"
to the link code generated by the link button in the quicktags plugin?

I have a feeling that it's pretty easy for someone who knows what he or she is doing.

Thanks very much,
Ross

Feb 14, 2009 00:18

In that plugin's file, find this:

			if (!b2evoCheckOpenTags(i)) {
				var URL = prompt( '<?php echo T_('URL') ?>:', defaultValue);
				if (URL)
				{
					b2evoButtons[i].tagStart = '<a href="' + URL + '">';
					b2evoInsertTag(myField, i);
				}
			}


Now make it be this:

			if (!b2evoCheckOpenTags(i)) {
				var URL = prompt( '<?php echo T_('URL') ?>:', defaultValue);
				if (URL)
				{
					b2evoButtons[i].tagStart = '<a href="' + URL + '" target="_blank">';
					b2evoInsertTag(myField, i);
				}
			}

Untested so you should backup your file before doing this.

Feb 14, 2009 00:21

thanks, that worked perfectly. I knew one of you experts would have the answer in seconds!


Form is loading...

Advanced CMS – This forum is powered by b2evolution CMS, a complete engine for your website.