winix/winixd/html/ckeditor.html

178 lines
4.0 KiB
HTML

[block ckeditor_old_browsers_support]
<script>
[# blocks are not connected with languages yet, so don't use \{ but {]
function winix_ckeditor_old_browser_support() {
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
{
CKEDITOR.tools.enableHtml5Elements( document );
}
}
[if not winix_is_htmx_request]
winix_ckeditor_old_browser_support();
[end]
</script>
[end]
[block ckeditor]
<script>
function winix_ckeditor_initialize() {
var editorElement = CKEDITOR.document.getById( '[0]' );
editorElement.setAttribute( 'contenteditable', 'true' );
CKEDITOR.inline( '[0]',
{
filebrowserBrowseUrl: '[doc_base_url][dir]ls?ckeditor_browse&fullscreen',
customConfig : '[doc_base_url]/var/ckeditor_winix.js',
extraPlugins : 'sourcedialog',
removePlugins : 'sourcearea',
toolbar : 'winix',
height : '350px',
scayt_autoStartup : false, // spellchecker disabled
//docType : '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
docType : '<!DOCTYPE html>',
entities : false, // when true then ó becames &oacute,
toolbar_winix :
\[
\['Sourcedialog','-','Save','Preview','-'\],
\['Cut','Copy','Paste','PasteText','PasteFromWord','-'\],
\['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'\],
'/',
\['Bold','Italic','Underline','Strike','-','Subscript','Superscript'\],
\['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'\],
\['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'\],
\['Link','Unlink','Anchor'\],
\['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar'\],
'/',
\['Format','Font','FontSize'\],
\['TextColor','BGColor'\],
\['Maximize', 'ShowBlocks','-','About'\]
\],
contentsCss : \[[for doc_css_tab]'[if not doc_css_tab_file_is_global][doc_base_url_static][end][doc_css_tab_file]'[if doc_css_tab_has_next], [end][end]\],
//config.skin : 'office2003',
coreStyles_strike :
{
element : 'del',
overrides : 'strike'
},
coreStyles_underline :
{
element : 'span',
attributes : { 'class' : 'underline' }
},
//config.allowedContent : true, // allowes all
disallowedContent : 'p(western)', // from copying from Office
extraAllowedContent : 'aside caption figure figcaption article footer header section div (*); ul(*); ol(*); h1(*); h2(*); h3(*); h4(*); h5(*); h6(*); p(*); table(*); tr(*); td(*);'
});
}
[if not winix_is_htmx_request]
winix_ckeditor_initialize();
[end]
</script>
[end]
[block ckeditor_small]
<script>
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
{
CKEDITOR.tools.enableHtml5Elements( document );
}
var editorElement = CKEDITOR.document.getById( '[0]' );
editorElement.setAttribute( 'contenteditable', 'true' );
CKEDITOR.inline( '[0]',
{
filebrowserBrowseUrl: '[doc_base_url][dir]ls?ckeditor_browse&fullscreen',
customConfig : '[doc_base_url]/var/ckeditor_winix.js',
extraPlugins : 'sourcedialog',
removePlugins : 'sourcearea',
toolbar : 'winix',
height : '350px',
scayt_autoStartup : false, // spellchecker disabled
//docType : '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
docType : '<!DOCTYPE html>',
entities : false, // when true then ó becames &oacute,
toolbar_winix :
\[
\['Bold','Italic','Underline','Strike','-','Subscript','Superscript'\],
\['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'\],
\['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-'\],
\],
contentsCss : \[[for doc_css_tab]'[if not doc_css_tab_file_is_global][doc_base_url_static][end][doc_css_tab_file]'[if doc_css_tab_has_next], [end][end]\],
//config.skin : 'office2003',
coreStyles_strike :
{
element : 'del',
overrides : 'strike'
},
coreStyles_underline :
{
element : 'span',
attributes : { 'class' : 'underline' }
},
//config.allowedContent : true, // allowes all
disallowedContent : 'p(western)', // from copying from Office
extraAllowedContent : 'aside caption figure figcaption article footer header section (*); ul(*); h1(*); h2(*); p(*)'
});
</script>
[end]