Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos-tav
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
agplv3
kohinos-tav
Commits
1d58427b
Commit
1d58427b
authored
a month ago
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add link plugin to ckeditor
parent
7f1c5e1b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
0 deletions
+10
-0
anchor.js
public/build/ckeditor/plugins/link/dialogs/anchor.js
+10
-0
link.js
public/build/ckeditor/plugins/link/dialogs/link.js
+0
-0
anchor.png
public/build/ckeditor/plugins/link/images/anchor.png
+0
-0
anchor.png
public/build/ckeditor/plugins/link/images/hidpi/anchor.png
+0
-0
No files found.
public/build/ckeditor/plugins/link/dialogs/anchor.js
0 → 100644
View file @
1d58427b
/*
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/
CKEDITOR
.
dialog
.
add
(
"anchor"
,
function
(
c
){
function
f
(
b
,
a
){
return
b
.
createFakeElement
(
b
.
document
.
createElement
(
"a"
,{
attributes
:
a
}),
"cke_anchor"
,
"anchor"
)}
return
{
title
:
c
.
lang
.
link
.
anchor
.
title
,
minWidth
:
300
,
minHeight
:
60
,
getModel
:
function
(
b
){
var
a
=
b
.
getSelection
();
b
=
a
.
getRanges
()[
0
];
a
=
a
.
getSelectedElement
();
b
.
shrink
(
CKEDITOR
.
SHRINK_ELEMENT
);(
a
=
b
.
getEnclosedNode
())
&&
a
.
type
===
CKEDITOR
.
NODE_TEXT
&&
(
a
=
a
.
getParent
());
a
&&!
a
.
is
(
"a"
)
&&
(
a
=
a
.
getAscendant
(
"a"
)
||
a
);
b
=
a
&&
a
.
type
===
CKEDITOR
.
NODE_ELEMENT
&&
(
"anchor"
===
a
.
data
(
"cke-real-element-type"
)
||
a
.
is
(
"a"
))?
a
:
void
0
;
return
b
||
null
},
onOk
:
function
(){
var
b
=
CKEDITOR
.
tools
.
trim
(
this
.
getValueOf
(
"info"
,
"txtName"
)),
b
=
{
id
:
b
,
name
:
b
,
"data-cke-saved-name"
:
b
},
a
=
this
.
getModel
(
c
);
if
(
a
)
a
.
data
(
"cke-realelement"
)?(
b
=
f
(
c
,
b
),
b
.
replace
(
a
),
CKEDITOR
.
env
.
ie
&&
c
.
getSelection
().
selectElement
(
b
)):
a
.
setAttributes
(
b
);
else
if
(
a
=
(
a
=
c
.
getSelection
())
&&
a
.
getRanges
()[
0
],
a
.
collapsed
)
b
=
f
(
c
,
b
),
a
.
insertNode
(
b
);
else
{
CKEDITOR
.
env
.
ie
&&
9
>
CKEDITOR
.
env
.
version
&&
(
b
[
"class"
]
=
"cke_anchor"
);
var
d
=
a
.
clone
();
d
.
enlarge
(
CKEDITOR
.
ENLARGE_ELEMENT
);
for
(
var
e
=
new
CKEDITOR
.
dom
.
walker
(
d
),
d
=
d
.
collapsed
?
d
.
startContainer
:
e
.
next
(),
g
=
a
.
createBookmark
();
d
;)
d
.
type
===
CKEDITOR
.
NODE_ELEMENT
&&
d
.
getAttribute
(
"data-cke-saved-name"
)
&&
(
d
.
remove
(
!
0
),
e
.
reset
()),
d
=
e
.
next
();
a
.
moveToBookmark
(
g
);
b
=
new
CKEDITOR
.
style
({
element
:
"a"
,
attributes
:
b
});
b
.
type
=
CKEDITOR
.
STYLE_INLINE
;
b
.
applyToRange
(
a
)}},
onShow
:
function
(){
var
b
=
c
.
getSelection
(),
a
=
this
.
getModel
(
c
),
d
=
a
&&
a
.
data
(
"cke-realelement"
);
if
(
a
=
d
?
CKEDITOR
.
plugins
.
link
.
tryRestoreFakeAnchor
(
c
,
a
):
CKEDITOR
.
plugins
.
link
.
getSelectedLink
(
c
)){
var
e
=
a
.
data
(
"cke-saved-name"
);
this
.
setValueOf
(
"info"
,
"txtName"
,
e
||
""
);
!
d
&&
b
.
selectElement
(
a
)}
this
.
getContentElement
(
"info"
,
"txtName"
).
focus
()},
contents
:[{
id
:
"info"
,
label
:
c
.
lang
.
link
.
anchor
.
title
,
accessKey
:
"I"
,
elements
:[{
type
:
"text"
,
id
:
"txtName"
,
label
:
c
.
lang
.
link
.
anchor
.
name
,
required
:
!
0
,
validate
:
function
(){
var
b
=
this
.
getValue
();
return
b
?
/
[\u
0020
\u
0009
\u
000a
\u
000c
\u
000d
]
/g
.
test
(
b
)?(
alert
(
c
.
lang
.
link
.
anchor
.
errorWhitespace
),
!
1
):
!
0
:(
alert
(
c
.
lang
.
link
.
anchor
.
errorName
),
!
1
)}}]}]}});
\ No newline at end of file
This diff is collapsed.
Click to expand it.
public/build/ckeditor/plugins/link/dialogs/link.js
0 → 100644
View file @
1d58427b
This diff is collapsed.
Click to expand it.
public/build/ckeditor/plugins/link/images/anchor.png
0 → 100644
View file @
1d58427b
752 Bytes
This diff is collapsed.
Click to expand it.
public/build/ckeditor/plugins/link/images/hidpi/anchor.png
0 → 100644
View file @
1d58427b
1.08 KB
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment