Closed (fixed)
Project:
BUEditor
Version:
6.x-2.1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
16 Mar 2008 at 19:23 UTC
Updated:
12 Sep 2010 at 05:50 UTC
I have a client who wants target="_blank" added to his links created by the BUEditor button automatically. I don't know javascript and can't figure out where to add it in this code:
js:
var B = eDefBrowseButton('', 'attr_href', 'Browse', 'link');
var form = [
{name: 'href', title: 'Link href', suffix: B},
{name: 'title', title: 'Title text' },
];
eDefTagDialog('a', form, 'Insert/edit link', 'OK');
Anyone know?
Thanks,
Michelle
Comments
Comment #1
ufku commentedFor a selectbox try replacing "{name: 'target', value: '_blank'}" with "{name: 'target', type: 'select', options: {'_blank': 'New page', '': 'Current page'} , value: '_blank'}"
For disabling the default _blank value, delete ", value: '_blank'" strings.
Comment #2
michellePerfect!
Thanks for the quick response and even going beyond with the selection. That's awesome!
Love this editor, by the way. I use it on all my sites. It gives me shortcuts for HTML without getting in the way like a WYSIWYG.
Michelle
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #4
cheathamlane commentedHi there:
Adding the line like you show above works A-OK. I can't seem to hide the "target" field though.
This doesn't work:
The target input field is still visible.
Ideas?
Thanks!
Comment #5
clockwood commentedI'd also love to learn how to hide the USER INPUT field for certain link attributes.
In my case, I'm using BUeditor on a forum and I need to add rel="nofollow" to the link code added by users in comments, without allowing them to edit/select the rel attribute.
Comment #6
clockwood commentedChanging status to active in hope this will be seen. Sorry for the double post.
Comment #7
ufku commentedtry
{name: 'rel', title: '', value: 'nofollow', attributes: {type: 'hidden'}}Comment #8
clockwood commentedA+ thanks!
Comment #9
ufku commentedComment #11
gadehans commentedThis doesn't seem to work in Drupal 6 with BUEditor version 6.x-2.1.
I'm trying to make every link open in a new window, i.e adding a default target="_blank" to links made by BUeditor. I tried messing with the code in "default.bueditor.txt" but without any luck.
Does anyone know a god solution?
Comment #12
ufku commented