Main navigation
Product navigation
Main content
CKEditor 4
Overview
Demo
Accessibility Checker
Add-ons
Documentation
Download
Pricing
More
Home
WYSIWYG Editors
CKEditor 4
CKEditor 5
Image upload
CKFinder
Easy Image
Collaboration
Comments
New
Track changes
New
Collaborative editing
Pricing
Case studies
New
Documentation
Help center
Blog
Contact us
The forum operates in
read-only
mode. Please head to
StackOverflow
for support.
Forums
CKEditor
CKEditor
Last post
Fri, 02/26/2010 - 09:49
#1
viperwax
Joined:
09/02/2010
Posts:
10
Set AltTxt from Custom File Browser
http://docs.cksource.com/CKEditor_3.x/D ... _(Uploader
Sun, 09/26/2010 - 17:32
#2
stephaneeybert
Joined:
10/01/2005
Posts:
51
Re: Set AltTxt from Custom File Browser
Hello,
How do you get the dialog to open the custom popup window that contains your above javascript ?
I can get the call to
window.opener.CKEDITOR.tools.callFunction('$CKEditorFuncNum', internalUrl, function() {
to execute.
In my dialog I have the following button:
onClick : function() {
openWindow(CKEDITOR.config.linkSelectUrl, '', 200, 100, 600, 600, 0, 0);
}
I wonder if there is not another way to open the popup window than the onClick handler.
Thanks for any tip.
Fri, 10/01/2010 - 10:36
#3
viperwax
Joined:
09/02/2010
Posts:
10
Re: Set AltTxt from Custom File Browser
http://stackoverflow.com/questions/1498 ... h-ckeditor
Fri, 10/01/2010 - 15:14
#4
stephaneeybert
Joined:
10/01/2005
Posts:
51
Re: Set AltTxt from Custom File Browser
That is how I did it.
{
type: 'button',
id: 'browseLink',
label: editor.lang.internalLink.button_browse,
filebrowser : {
action : 'Browse',
target: linkTabName + ':' + selectedLinkFieldName,
url: CKEDITOR.config.linkSelectUrl,
onSelect : function(linkUrl, newWindow) {
var dialog = this.getDialog();
dialog.getContentElement(linkTabName, selectedLinkFieldName).setValue(linkUrl);
if (newWindow) {
dialog.getContentElement(linkTabName, selectedTargetFieldName).setValue('_blank');
} else {
dialog.getContentElement(linkTabName, selectedTargetFieldName).setValue('_self');
}
// Do not call the built-in onSelect command
return false;
}
}
Twitter
Facebook
Facebook
Instagram
Medium
Linkedin
GitHub
Arrow down
Phone
Menu
Close icon
Check
Re: Set AltTxt from Custom File Browser
How do you get the dialog to open the custom popup window that contains your above javascript ?
I can get the call to
window.opener.CKEDITOR.tools.callFunction('$CKEditorFuncNum', internalUrl, function() {
to execute.
In my dialog I have the following button:
onClick : function() {
openWindow(CKEDITOR.config.linkSelectUrl, '', 200, 100, 600, 600, 0, 0);
}
I wonder if there is not another way to open the popup window than the onClick handler.
Thanks for any tip.
Re: Set AltTxt from Custom File Browser
Re: Set AltTxt from Custom File Browser
{
type: 'button',
id: 'browseLink',
label: editor.lang.internalLink.button_browse,
filebrowser : {
action : 'Browse',
target: linkTabName + ':' + selectedLinkFieldName,
url: CKEDITOR.config.linkSelectUrl,
onSelect : function(linkUrl, newWindow) {
var dialog = this.getDialog();
dialog.getContentElement(linkTabName, selectedLinkFieldName).setValue(linkUrl);
if (newWindow) {
dialog.getContentElement(linkTabName, selectedTargetFieldName).setValue('_blank');
} else {
dialog.getContentElement(linkTabName, selectedTargetFieldName).setValue('_self');
}
// Do not call the built-in onSelect command
return false;
}
}