Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F823600
fckplugin.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Mar 9, 10:00 PM
Size
1 KB
Mime Type
text/plain
Expires
Tue, Mar 11, 10:00 PM (1 d, 10 h)
Engine
blob
Format
Raw Data
Handle
585752
Attached To
rINP In-Portal
fckplugin.js
View Options
var
spDialog
=
'MyLink/fck_link.html'
;
FCKCommands
.
RegisterCommand
(
'MyLink'
,
new
FCKDialogCommand
(
'MyLink'
,
FCKLang
.
InsertLink
,
FCKConfig
.
PluginsPath
+
spDialog
,
340
,
300
)
)
;
FCKToolbarItems
.
RegisterItem
(
'MyLink'
,
new
FCKToolbarButton
(
'MyLink'
,
FCKLang
.
InsertLinkLbl
,
FCKLang
.
InsertLink
,
null
,
false
,
true
,
34
)
)
;
FCK
.
ContextMenu
.
RegisterListener
(
{
AddItems
:
function
(
menu
,
tag
,
tagName
)
{
var
bInsideLink
=
(
tagName
==
'A'
||
FCKSelection
.
HasAncestorNode
(
'A'
)
)
;
if
(
bInsideLink
||
FCK
.
GetNamedCommandState
(
'Unlink'
)
!=
FCK_TRISTATE_DISABLED
)
{
// Go up to the anchor to test its properties
var
oLink
=
FCKSelection
.
MoveToAncestorNode
(
'A'
)
;
var
bIsAnchor
=
(
oLink
&&
oLink
.
name
.
length
>
0
&&
oLink
.
href
.
length
==
0
)
;
// If it isn't a link then don't add the Link context menu
if
(
bIsAnchor
)
return
;
menu
.
AddSeparator
()
;
if
(
bInsideLink
)
menu
.
AddItem
(
'MyLink'
,
FCKLang
.
EditLink
,
34
)
;
menu
.
AddItem
(
'Unlink'
,
FCKLang
.
RemoveLink
,
35
)
;
}
}
});
Event Timeline
Log In to Comment