Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F6065996
editor_plugin.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
editor_plugin.js
View Options
(
function
(){
tinymce
.
create
(
"tinymce.plugins.VisualChars"
,{
init
:
function
(
a
,
b
){
var
c
=
this
;
c
.
editor
=
a
;
a
.
addCommand
(
"mceVisualChars"
,
c
.
_toggleVisualChars
,
c
);
a
.
addButton
(
"visualchars"
,{
title
:
"visualchars.desc"
,
cmd
:
"mceVisualChars"
});
a
.
onBeforeGetContent
.
add
(
function
(
d
,
e
){
if
(
c
.
state
){
c
.
state
=
true
;
c
.
_toggleVisualChars
()}})},
getInfo
:
function
(){
return
{
longname
:
"Visual characters"
,
author
:
"Moxiecode Systems AB"
,
authorurl
:
"http://tinymce.moxiecode.com"
,
infourl
:
"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars"
,
version
:
tinymce
.
majorVersion
+
"."
+
tinymce
.
minorVersion
}},
_toggleVisualChars
:
function
(){
var
m
=
this
,
g
=
m
.
editor
,
a
,
e
,
f
,
k
=
g
.
getDoc
(),
l
=
g
.
getBody
(),
j
,
n
=
g
.
selection
,
c
;
m
.
state
=!
m
.
state
;
g
.
controlManager
.
setActive
(
"visualchars"
,
m
.
state
);
if
(
m
.
state
){
a
=
[];
tinymce
.
walk
(
l
,
function
(
b
){
if
(
b
.
nodeType
==
3
&&
b
.
nodeValue
&&
b
.
nodeValue
.
indexOf
(
"\u00a0"
)
!=-
1
){
a
.
push
(
b
)}},
"childNodes"
);
for
(
e
=
0
;
e
<
a
.
length
;
e
++
){
j
=
a
[
e
].
nodeValue
;
j
=
j
.
replace
(
/(\u00a0+)/g
,
'<span class="mceItemHidden mceVisualNbsp">$1</span>'
);
j
=
j
.
replace
(
/\u00a0/g
,
"\u00b7"
);
g
.
dom
.
setOuterHTML
(
a
[
e
],
j
,
k
)}}
else
{
a
=
tinymce
.
grep
(
g
.
dom
.
select
(
"span"
,
l
),
function
(
b
){
return
g
.
dom
.
hasClass
(
b
,
"mceVisualNbsp"
)});
for
(
e
=
0
;
e
<
a
.
length
;
e
++
){
g
.
dom
.
setOuterHTML
(
a
[
e
],
a
[
e
].
innerHTML
.
replace
(
/(·|\u00b7)/g
,
" "
),
k
)}}}});
tinymce
.
PluginManager
.
add
(
"visualchars"
,
tinymce
.
plugins
.
VisualChars
)})();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, May 22, 4:48 AM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
570811
Default Alt Text
editor_plugin.js (1 KB)
Attached To
Mode
R3 roundcubemail
Attached
Detach File
Event Timeline
Log In to Comment