Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F12487409
editor_plugin_src.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_src.js
View Options
/**
* editor_plugin_src.js
*
* Copyright 2012, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(
function
()
{
tinymce
.
create
(
'tinymce.plugins.VisualBlocks'
,
{
init
:
function
(
ed
,
url
)
{
var
cssId
;
// We don't support older browsers like IE6/7 and they don't provide prototypes for DOM objects
if
(
!
window
.
NodeList
)
{
return
;
}
ed
.
addCommand
(
'mceVisualBlocks'
,
function
()
{
var
dom
=
ed
.
dom
,
linkElm
;
if
(
!
cssId
)
{
cssId
=
dom
.
uniqueId
();
linkElm
=
dom
.
create
(
'link'
,
{
id
:
cssId
,
rel
:
'stylesheet'
,
href
:
url
+
'/css/visualblocks.css'
});
ed
.
getDoc
().
getElementsByTagName
(
'head'
)[
0
].
appendChild
(
linkElm
);
}
else
{
linkElm
=
dom
.
get
(
cssId
);
linkElm
.
disabled
=
!
linkElm
.
disabled
;
}
ed
.
controlManager
.
setActive
(
'visualblocks'
,
!
linkElm
.
disabled
);
});
ed
.
addButton
(
'visualblocks'
,
{
title
:
'visualblocks.desc'
,
cmd
:
'mceVisualBlocks'
});
ed
.
onInit
.
add
(
function
()
{
if
(
ed
.
settings
.
visualblocks_default_state
)
{
ed
.
execCommand
(
'mceVisualBlocks'
,
false
,
null
,
{
skip_focus
:
true
});
}
});
},
getInfo
:
function
()
{
return
{
longname
:
'Visual blocks'
,
author
:
'Moxiecode Systems AB'
,
authorurl
:
'http://tinymce.moxiecode.com'
,
infourl
:
'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualblocks'
,
version
:
tinymce
.
majorVersion
+
"."
+
tinymce
.
minorVersion
};
}
});
// Register plugin
tinymce
.
PluginManager
.
add
(
'visualblocks'
,
tinymce
.
plugins
.
VisualBlocks
);
})();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Oct 19, 9:55 PM (16 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1365204
Default Alt Text
editor_plugin_src.js (1 KB)
Attached To
Mode
R3 roundcubemail
Attached
Detach File
Event Timeline
Log In to Comment