Update ckeditor

Avoid empty commands
Small fixes
This commit is contained in:
RainLoop Team 2016-09-01 23:41:36 +03:00
parent 969f15dd6b
commit a60ffc06e1
167 changed files with 12173 additions and 12278 deletions

View file

@ -1,55 +1,55 @@
@font-face {
font-family: 'fontello';
src: url('../font/fontello.eot?89024372');
src: url('../font/fontello.eot?89024372#iefix') format('embedded-opentype'),
url('../font/fontello.woff?89024372') format('woff'),
url('../font/fontello.ttf?89024372') format('truetype'),
url('../font/fontello.svg?89024372#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
/*
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'fontello';
src: url('../font/fontello.svg?89024372#fontello') format('svg');
}
}
*/
[class^="icon-"]:before, [class*=" icon-"]:before {
font-family: "fontello";
font-style: normal;
font-weight: normal;
speak: none;
display: inline-block;
text-decoration: inherit;
width: 1em;
margin-right: .2em;
text-align: center;
/* opacity: .8; */
/* For safety - reset parent styles, that can break glyph codes*/
font-variant: normal;
text-transform: none;
/* fix buttons height, for twitter bootstrap */
line-height: 1em;
/* Animation center compensation - margins should be symmetric */
/* remove if not needed */
margin-left: .2em;
/* you can be more comfortable with increased icons size */
/* font-size: 120%; */
/* Uncomment for 3D effect */
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
}
.icon-trash:before { content: '\e802'; } /* '' */
.icon-down-big:before { content: '\e800'; } /* '' */
.icon-up-big:before { content: '\e801'; } /* '' */
@font-face {
font-family: 'fontello';
src: url('../font/fontello.eot?89024372');
src: url('../font/fontello.eot?89024372#iefix') format('embedded-opentype'),
url('../font/fontello.woff?89024372') format('woff'),
url('../font/fontello.ttf?89024372') format('truetype'),
url('../font/fontello.svg?89024372#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
/*
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'fontello';
src: url('../font/fontello.svg?89024372#fontello') format('svg');
}
}
*/
[class^="icon-"]:before, [class*=" icon-"]:before {
font-family: "fontello";
font-style: normal;
font-weight: normal;
speak: none;
display: inline-block;
text-decoration: inherit;
width: 1em;
margin-right: .2em;
text-align: center;
/* opacity: .8; */
/* For safety - reset parent styles, that can break glyph codes*/
font-variant: normal;
text-transform: none;
/* fix buttons height, for twitter bootstrap */
line-height: 1em;
/* Animation center compensation - margins should be symmetric */
/* remove if not needed */
margin-left: .2em;
/* you can be more comfortable with increased icons size */
/* font-size: 120%; */
/* Uncomment for 3D effect */
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
}
.icon-trash:before { content: '\e802'; } /* '' */
.icon-down-big:before { content: '\e800'; } /* '' */
.icon-up-big:before { content: '\e801'; } /* '' */

View file

@ -1,10 +1,10 @@
Font license info
## Font Awesome
Copyright (C) 2012 by Dave Gandy
Author: Dave Gandy
License: SIL ()
Homepage: http://fortawesome.github.com/Font-Awesome/
Font license info
## Font Awesome
Copyright (C) 2012 by Dave Gandy
Author: Dave Gandy
License: SIL ()
Homepage: http://fortawesome.github.com/Font-Awesome/

View file

@ -1,446 +1,446 @@
<!DOCTYPE html>
<!--
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
-->
<!--[if IE 8]><html class="ie8"><![endif]-->
<!--[if gt IE 8]><html><![endif]-->
<!--[if !IE]><!--><html><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Toolbar Configurator</title>
<script src="../../ckeditor.js"></script>
<script>
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
CKEDITOR.tools.enableHtml5Elements( document );
</script>
<link rel="stylesheet" href="lib/codemirror/codemirror.css">
<link rel="stylesheet" href="lib/codemirror/show-hint.css">
<link rel="stylesheet" href="lib/codemirror/neo.css">
<link rel="stylesheet" href="css/fontello.css">
<link rel="stylesheet" href="../css/samples.css">
</head>
<body id="toolbar">
<nav class="navigation-a">
<div class="grid-container">
<ul class="navigation-a-left grid-width-70">
<li><a href="http://ckeditor.com">Project Homepage</a></li>
<li><a href="http://dev.ckeditor.com/">I found a bug</a></li>
<li><a href="http://github.com/ckeditor/ckeditor-dev" class="icon-pos-right icon-navigation-a-github">Fork CKEditor on GitHub</a></li>
</ul>
<ul class="navigation-a-right grid-width-30">
<li><a href="http://ckeditor.com/blog-list">CKEditor Blog</a></li>
</ul>
</div>
</nav>
<header class="header-a">
<div class="grid-container">
<h1 class="header-a-logo grid-width-30">
<a href="../index.html"><img src="../img/logo.png" alt="CKEditor Logo"></a>
</h1>
<nav class="navigation-b grid-width-70">
<ul>
<li><a href="../index.html" class="button-a">Start</a></li>
<li><a href="index.html" class="button-a button-a-background">Toolbar configurator</a></li>
</ul>
</nav>
</div>
</header>
<main>
<div class="adjoined-top">
<div class="grid-container">
<div class="content grid-width-100">
<div class="grid-container-nested">
<h1 class="grid-width-60">
Toolbar Configurator
<a href="#help-content" type="button" title="Configurator help" id="help" class="button-a button-a-background button-a-no-text icon-pos-left icon-question-mark">Help</a>
</h1>
<div class="grid-width-40 grid-switch-magic">
<div class="switch">
<span class="balloon-a balloon-a-se">Select configurator type</span>
<input type="radio" name="radio" data-num="1" id="radio-basic" />
<input type="radio" name="radio" data-num="2" id="radio-advanced" />
<label data-for="1" for="radio-basic">Basic</label>
<span class="switch-inner">
<span class="handler"></span>
</span>
<label data-for="2" for="radio-advanced">Advanced</label>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="adjoined-bottom">
<div class="grid-container">
<div class="grid-width-100">
<div class="editors-container">
<div id="editor-basic"></div>
<div id="editor-advanced"></div>
</div>
</div>
</div>
</div>
<div class="grid-container configurator">
<div class="content grid-width-100">
<div class="configurator">
<div>
<div id="toolbarModifierWrapper"></div>
</div>
</div>
</div>
</div>
<div id="help-content">
<div class="grid-container">
<div class="grid-width-100">
<h2>What Am I Doing Here?</h2>
<div class="grid-container grid-container-nested">
<div class="basic">
<div class="grid-width-50">
<p>Arrange <a href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-toolbarGroups">toolbar groups</a>, toggle <a href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-removeButtons">button visibility</a> according to your needs and get your toolbar configuration.</p>
<p>You can replace the content of the <a href="../../config.js"><code>config.js</code></a> file with the generated configuration. If you already set some configuration options you will need to merge both configurations.</p>
</div>
<div class="grid-width-50">
<p>Read more about different ways of <a href="http://docs.ckeditor.com/#!/guide/dev_configuration">setting configuration</a> and do not forget about <strong>clearing browser cache</strong>.</p>
<p>Arranging toolbar groups is the recommended way of configuring the toolbar, but if you need more freedom you can use the <a href="#advanced">advanced configurator</a>.</p>
</div>
</div>
<div class="advanced" style="display: none;">
<div class="grid-width-50">
<p>With this code editor you can edit your <a href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-toolbar">toolbar configuration</a> live.</p>
<p>You can replace the content of the <a href="../../config.js"><code>config.js</code></a> file with the generated configuration. If you already set some configuration options you will need to merge both configurations.</p>
</div>
<div class="grid-width-50">
<p>Read more about different ways of <a href="http://docs.ckeditor.com/#!/guide/dev_configuration">setting configuration</a> and do not forget about <strong>clearing browser cache</strong>.</p>
</div>
</div>
</div>
<p class="grid-container grid-container-nested">
<button type="button" class="help-content-close grid-width-100 button-a button-a-background">Got it. Let's play!</button>
</p>
</div>
</div>
</div>
</main>
<footer class="footer-a grid-container">
<p class="grid-width-100">
CKEditor &ndash; The text editor for the Internet &ndash; <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
</p>
<p class="grid-width-100" id="copy">
Copyright &copy; 2003-2015, <a class="samples" href="http://cksource.com/">CKSource</a> &ndash; Frederico Knabben. All rights reserved.
</p>
</footer>
<script src="lib/codemirror/codemirror.js"></script>
<script src="lib/codemirror/javascript.js"></script>
<script src="lib/codemirror/show-hint.js"></script>
<script src="js/fulltoolbareditor.js"></script>
<script src="js/abstracttoolbarmodifier.js"></script>
<script src="js/toolbarmodifier.js"></script>
<script src="js/toolbartextmodifier.js"></script>
<script src="../js/sf.js"></script>
<script>
( function() {
'use strict';
var mode = ( window.location.hash.substr( 1 ) === 'advanced' ) ? 'advanced' : 'basic',
configuratorSection = CKEDITOR.document.findOne( 'main > .grid-container.configurator' ),
basicInstruction = CKEDITOR.document.findOne( '#help-content .basic' ),
advancedInstruction = CKEDITOR.document.findOne( '#help-content .advanced' ),
// Configurator mode switcher.
modeSwitchBasic = CKEDITOR.document.getById( 'radio-basic' ),
modeSwitchAdvanced = CKEDITOR.document.getById( 'radio-advanced' );
// Initial setup
function updateSwitcher() {
if ( mode === 'advanced' ) {
modeSwitchAdvanced.$.checked = true;
} else {
modeSwitchBasic.$.checked = true;
}
}
updateSwitcher();
CKEDITOR.document.getWindow().on( 'hashchange', function( e ) {
var hash = window.location.hash.substr( 1 );
if ( !( hash === 'advanced' || hash === 'basic' ) ) {
return;
}
mode = hash;
onToolbarsDone( mode );
} );
CKEDITOR.document.getWindow().on( 'resize', function() {
updateToolbar( ( mode === 'basic' ? toolbarModifier : toolbarTextModifier )[ 'editorInstance' ] );
} );
function onRefresh( modifier ) {
modifier = modifier || this;
if ( mode === 'basic' && modifier instanceof ToolbarConfigurator.ToolbarTextModifier ) {
return;
}
// CodeMirror container becomes visible, so we need to refresh and to avoid rendering problems.
if ( mode === 'advanced' && modifier instanceof ToolbarConfigurator.ToolbarTextModifier ) {
modifier.codeContainer.refresh();
}
updateToolbar( modifier.editorInstance );
}
function updateToolbar( editor ) {
var editorContainer = editor.container;
// Not always editor is loaded.
if ( !editorContainer ) {
return;
}
var displayStyle = editorContainer.getStyle( 'display' );
editorContainer.setStyle( 'display', 'block' );
var newHeight = editorContainer.getSize( 'height' );
var newMarginTop = parseInt( editorContainer.getComputedStyle( 'margin-top' ), 10 );
newMarginTop = ( isNaN( newMarginTop ) ? 0 : Number( newMarginTop ) );
var newMarginBottom = parseInt( editorContainer.getComputedStyle( 'margin-bottom' ), 10 );
newMarginBottom = ( isNaN( newMarginBottom ) ? 0 : Number( newMarginBottom ) );
var result = newHeight + newMarginTop + newMarginBottom;
editorContainer.setStyle( 'display', displayStyle );
editor.container.getAscendant( 'div' ).setStyle( 'height', result + 'px' );
}
var toolbarModifier = new ToolbarConfigurator.ToolbarModifier( 'editor-basic' );
var done = 0;
toolbarModifier.init( onToolbarInit );
toolbarModifier.onRefresh = onRefresh;
CKEDITOR.document.getById( 'toolbarModifierWrapper' ).append( toolbarModifier.mainContainer );
var toolbarTextModifier = new ToolbarConfigurator.ToolbarTextModifier( 'editor-advanced' );
toolbarTextModifier.init( onToolbarInit );
toolbarTextModifier.onRefresh = onRefresh;
function onToolbarInit() {
if ( ++done === 2 ) {
onToolbarsDone();
positionSticky.watch( CKEDITOR.document.findOne( '.toolbar' ), function() {
return mode === 'advanced';
} );
}
}
function onToolbarsDone() {
if ( mode === 'basic' ) {
toggleModeBasic( false );
} else {
toggleModeAdvanced( false );
}
updateSwitcher();
setTimeout( function() {
CKEDITOR.document.findOne( '.editors-container' ).addClass( 'active' );
CKEDITOR.document.findOne( '#toolbarModifierWrapper' ).addClass( 'active' );
}, 200 );
}
CKEDITOR.document.getById( 'toolbarModifierWrapper' ).append( toolbarTextModifier.mainContainer );
function toogleModeSwitch( onElement, offElement, onModifier, offModifier ) {
onElement.addClass( 'fancy-button-active' );
offElement.removeClass( 'fancy-button-active' );
onModifier.showUI();
offModifier.hideUI();
}
function toggleModeBasic( callOnRefresh ) {
callOnRefresh = ( callOnRefresh !== false );
mode = 'basic';
window.location.hash = '#basic';
toogleModeSwitch( modeSwitchBasic, modeSwitchAdvanced, toolbarModifier, toolbarTextModifier );
configuratorSection.removeClass( 'freed-width' );
basicInstruction.show();
advancedInstruction.hide();
callOnRefresh && onRefresh( toolbarModifier );
}
function toggleModeAdvanced( callOnRefresh ) {
callOnRefresh = ( callOnRefresh !== false );
mode = 'advanced';
window.location.hash = '#advanced';
toogleModeSwitch( modeSwitchAdvanced, modeSwitchBasic, toolbarTextModifier, toolbarModifier );
configuratorSection.addClass( 'freed-width' );
advancedInstruction.show();
basicInstruction.hide();
callOnRefresh && onRefresh( toolbarTextModifier );
}
modeSwitchBasic.on( 'click', toggleModeBasic );
modeSwitchAdvanced.on( 'click', toggleModeAdvanced );
//
// Position:sticky for the toolbar.
//
// Will make elements behave like they were styled with position:sticky.
var positionSticky = {
// Store object: {
// element: CKEDITOR.dom.element, // Element which will float.
// placeholder: CKEDITOR.dom.element, // Placeholder which is place to prevent page bounce.
// isFixed: boolean // Whether element float now.
// }
watched: [],
active: [],
staticContainer: null,
init: function() {
var element = CKEDITOR.dom.element.createFromHtml(
'<div class="staticContainer">' +
'<div class="grid-container" >' +
'<div class="grid-width-100">' +
'<div class="inner"></div>' +
'</div>' +
'</div>' +
'</div>' );
this.staticContainer = element.findOne( '.inner' );
CKEDITOR.document.getBody().append( element );
},
watch: function( element, preventFunc ) {
this.watched.push( {
element: element,
placeholder: new CKEDITOR.dom.element( 'div' ),
isFixed: false,
preventFunc: preventFunc
} );
},
checkAll: function() {
for ( var i = 0; i < this.watched.length; i++ ) {
this.check( this.watched[ i ] );
}
},
check: function( element ) {
var isFixed = element.isFixed;
var shouldBeFixed = this.shouldBeFixed( element );
// Nothing to be done.
if ( isFixed === shouldBeFixed ) {
return;
}
var placeholder = element.placeholder;
if ( isFixed ) {
// Unfixing.
element.element.insertBefore( placeholder );
placeholder.remove();
element.element.removeStyle( 'margin' );
this.active.splice( CKEDITOR.tools.indexOf( this.active, element ), 1 );
} else {
// Fixing.
placeholder.setStyle( 'width', element.element.getSize( 'width' ) + 'px' );
placeholder.setStyle( 'height', element.element.getSize( 'height' ) + 'px' );
placeholder.setStyle( 'margin-bottom', element.element.getComputedStyle( 'margin-bottom' ) );
placeholder.setStyle( 'display', element.element.getComputedStyle( 'display' ) );
placeholder.insertAfter( element.element );
this.staticContainer.append( element.element );
this.active.push( element );
}
element.isFixed = !element.isFixed;
},
shouldBeFixed: function( element ) {
if ( element.preventFunc && element.preventFunc() ) {
return false;
}
// If element is already fixed we are checking it's placeholder.
var related = ( element.isFixed ? element.placeholder : element.element ),
clientRect = related.$.getBoundingClientRect(),
staticHeight = this.staticContainer.getSize('height' ),
elemHeight = element.element.getSize( 'height' );
if ( element.isFixed ) {
return ( clientRect.top + elemHeight < staticHeight );
} else {
return ( clientRect.top < staticHeight );
}
}
};
positionSticky.init();
CKEDITOR.document.getWindow().on( 'scroll',
new CKEDITOR.tools.eventsBuffer( 100, positionSticky.checkAll, positionSticky ).input
);
// Make the toolbar sticky.
positionSticky.watch( CKEDITOR.document.findOne( '.editors-container' ) );
// Help button and help-content.
( function() {
var helpButton = CKEDITOR.document.getById( 'help' ),
helpContent = CKEDITOR.document.getById( 'help-content' );
// Don't show help button on IE8 because it's unsupported by Pico Modal.
if ( CKEDITOR.env.ie && CKEDITOR.env.version == 8 ) {
helpButton.hide();
} else {
// Display help modal when the button is clicked.
helpButton.on( 'click', function( evt ) {
SF.modal( {
// Clone modal content from DOM.
content: helpContent.getHtml(),
afterCreate: function( modal ) {
// Enable modal content button to close the modal.
new CKEDITOR.dom.element( modal.modalElem() ).findOne( '.help-content-close' ).once( 'click', modal.close );
}
} ).show();
} );
}
} )();
} )();
</script>
</body>
</html>
<!DOCTYPE html>
<!--
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
-->
<!--[if IE 8]><html class="ie8"><![endif]-->
<!--[if gt IE 8]><html><![endif]-->
<!--[if !IE]><!--><html><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Toolbar Configurator</title>
<script src="../../ckeditor.js"></script>
<script>
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
CKEDITOR.tools.enableHtml5Elements( document );
</script>
<link rel="stylesheet" href="lib/codemirror/codemirror.css">
<link rel="stylesheet" href="lib/codemirror/show-hint.css">
<link rel="stylesheet" href="lib/codemirror/neo.css">
<link rel="stylesheet" href="css/fontello.css">
<link rel="stylesheet" href="../css/samples.css">
</head>
<body id="toolbar">
<nav class="navigation-a">
<div class="grid-container">
<ul class="navigation-a-left grid-width-70">
<li><a href="http://ckeditor.com">Project Homepage</a></li>
<li><a href="http://dev.ckeditor.com/">I found a bug</a></li>
<li><a href="http://github.com/ckeditor/ckeditor-dev" class="icon-pos-right icon-navigation-a-github">Fork CKEditor on GitHub</a></li>
</ul>
<ul class="navigation-a-right grid-width-30">
<li><a href="http://ckeditor.com/blog-list">CKEditor Blog</a></li>
</ul>
</div>
</nav>
<header class="header-a">
<div class="grid-container">
<h1 class="header-a-logo grid-width-30">
<a href="../index.html"><img src="../img/logo.png" alt="CKEditor Logo"></a>
</h1>
<nav class="navigation-b grid-width-70">
<ul>
<li><a href="../index.html" class="button-a">Start</a></li>
<li><a href="index.html" class="button-a button-a-background">Toolbar configurator</a></li>
</ul>
</nav>
</div>
</header>
<main>
<div class="adjoined-top">
<div class="grid-container">
<div class="content grid-width-100">
<div class="grid-container-nested">
<h1 class="grid-width-60">
Toolbar Configurator
<a href="#help-content" type="button" title="Configurator help" id="help" class="button-a button-a-background button-a-no-text icon-pos-left icon-question-mark">Help</a>
</h1>
<div class="grid-width-40 grid-switch-magic">
<div class="switch">
<span class="balloon-a balloon-a-se">Select configurator type</span>
<input type="radio" name="radio" data-num="1" id="radio-basic" />
<input type="radio" name="radio" data-num="2" id="radio-advanced" />
<label data-for="1" for="radio-basic">Basic</label>
<span class="switch-inner">
<span class="handler"></span>
</span>
<label data-for="2" for="radio-advanced">Advanced</label>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="adjoined-bottom">
<div class="grid-container">
<div class="grid-width-100">
<div class="editors-container">
<div id="editor-basic"></div>
<div id="editor-advanced"></div>
</div>
</div>
</div>
</div>
<div class="grid-container configurator">
<div class="content grid-width-100">
<div class="configurator">
<div>
<div id="toolbarModifierWrapper"></div>
</div>
</div>
</div>
</div>
<div id="help-content">
<div class="grid-container">
<div class="grid-width-100">
<h2>What Am I Doing Here?</h2>
<div class="grid-container grid-container-nested">
<div class="basic">
<div class="grid-width-50">
<p>Arrange <a href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-toolbarGroups">toolbar groups</a>, toggle <a href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-removeButtons">button visibility</a> according to your needs and get your toolbar configuration.</p>
<p>You can replace the content of the <a href="../../config.js"><code>config.js</code></a> file with the generated configuration. If you already set some configuration options you will need to merge both configurations.</p>
</div>
<div class="grid-width-50">
<p>Read more about different ways of <a href="http://docs.ckeditor.com/#!/guide/dev_configuration">setting configuration</a> and do not forget about <strong>clearing browser cache</strong>.</p>
<p>Arranging toolbar groups is the recommended way of configuring the toolbar, but if you need more freedom you can use the <a href="#advanced">advanced configurator</a>.</p>
</div>
</div>
<div class="advanced" style="display: none;">
<div class="grid-width-50">
<p>With this code editor you can edit your <a href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-toolbar">toolbar configuration</a> live.</p>
<p>You can replace the content of the <a href="../../config.js"><code>config.js</code></a> file with the generated configuration. If you already set some configuration options you will need to merge both configurations.</p>
</div>
<div class="grid-width-50">
<p>Read more about different ways of <a href="http://docs.ckeditor.com/#!/guide/dev_configuration">setting configuration</a> and do not forget about <strong>clearing browser cache</strong>.</p>
</div>
</div>
</div>
<p class="grid-container grid-container-nested">
<button type="button" class="help-content-close grid-width-100 button-a button-a-background">Got it. Let's play!</button>
</p>
</div>
</div>
</div>
</main>
<footer class="footer-a grid-container">
<p class="grid-width-100">
CKEditor &ndash; The text editor for the Internet &ndash; <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
</p>
<p class="grid-width-100" id="copy">
Copyright &copy; 2003-2016, <a class="samples" href="http://cksource.com/">CKSource</a> &ndash; Frederico Knabben. All rights reserved.
</p>
</footer>
<script src="lib/codemirror/codemirror.js"></script>
<script src="lib/codemirror/javascript.js"></script>
<script src="lib/codemirror/show-hint.js"></script>
<script src="js/fulltoolbareditor.js"></script>
<script src="js/abstracttoolbarmodifier.js"></script>
<script src="js/toolbarmodifier.js"></script>
<script src="js/toolbartextmodifier.js"></script>
<script src="../js/sf.js"></script>
<script>
( function() {
'use strict';
var mode = ( window.location.hash.substr( 1 ) === 'advanced' ) ? 'advanced' : 'basic',
configuratorSection = CKEDITOR.document.findOne( 'main > .grid-container.configurator' ),
basicInstruction = CKEDITOR.document.findOne( '#help-content .basic' ),
advancedInstruction = CKEDITOR.document.findOne( '#help-content .advanced' ),
// Configurator mode switcher.
modeSwitchBasic = CKEDITOR.document.getById( 'radio-basic' ),
modeSwitchAdvanced = CKEDITOR.document.getById( 'radio-advanced' );
// Initial setup
function updateSwitcher() {
if ( mode === 'advanced' ) {
modeSwitchAdvanced.$.checked = true;
} else {
modeSwitchBasic.$.checked = true;
}
}
updateSwitcher();
CKEDITOR.document.getWindow().on( 'hashchange', function( e ) {
var hash = window.location.hash.substr( 1 );
if ( !( hash === 'advanced' || hash === 'basic' ) ) {
return;
}
mode = hash;
onToolbarsDone( mode );
} );
CKEDITOR.document.getWindow().on( 'resize', function() {
updateToolbar( ( mode === 'basic' ? toolbarModifier : toolbarTextModifier )[ 'editorInstance' ] );
} );
function onRefresh( modifier ) {
modifier = modifier || this;
if ( mode === 'basic' && modifier instanceof ToolbarConfigurator.ToolbarTextModifier ) {
return;
}
// CodeMirror container becomes visible, so we need to refresh and to avoid rendering problems.
if ( mode === 'advanced' && modifier instanceof ToolbarConfigurator.ToolbarTextModifier ) {
modifier.codeContainer.refresh();
}
updateToolbar( modifier.editorInstance );
}
function updateToolbar( editor ) {
var editorContainer = editor.container;
// Not always editor is loaded.
if ( !editorContainer ) {
return;
}
var displayStyle = editorContainer.getStyle( 'display' );
editorContainer.setStyle( 'display', 'block' );
var newHeight = editorContainer.getSize( 'height' );
var newMarginTop = parseInt( editorContainer.getComputedStyle( 'margin-top' ), 10 );
newMarginTop = ( isNaN( newMarginTop ) ? 0 : Number( newMarginTop ) );
var newMarginBottom = parseInt( editorContainer.getComputedStyle( 'margin-bottom' ), 10 );
newMarginBottom = ( isNaN( newMarginBottom ) ? 0 : Number( newMarginBottom ) );
var result = newHeight + newMarginTop + newMarginBottom;
editorContainer.setStyle( 'display', displayStyle );
editor.container.getAscendant( 'div' ).setStyle( 'height', result + 'px' );
}
var toolbarModifier = new ToolbarConfigurator.ToolbarModifier( 'editor-basic' );
var done = 0;
toolbarModifier.init( onToolbarInit );
toolbarModifier.onRefresh = onRefresh;
CKEDITOR.document.getById( 'toolbarModifierWrapper' ).append( toolbarModifier.mainContainer );
var toolbarTextModifier = new ToolbarConfigurator.ToolbarTextModifier( 'editor-advanced' );
toolbarTextModifier.init( onToolbarInit );
toolbarTextModifier.onRefresh = onRefresh;
function onToolbarInit() {
if ( ++done === 2 ) {
onToolbarsDone();
positionSticky.watch( CKEDITOR.document.findOne( '.toolbar' ), function() {
return mode === 'advanced';
} );
}
}
function onToolbarsDone() {
if ( mode === 'basic' ) {
toggleModeBasic( false );
} else {
toggleModeAdvanced( false );
}
updateSwitcher();
setTimeout( function() {
CKEDITOR.document.findOne( '.editors-container' ).addClass( 'active' );
CKEDITOR.document.findOne( '#toolbarModifierWrapper' ).addClass( 'active' );
}, 200 );
}
CKEDITOR.document.getById( 'toolbarModifierWrapper' ).append( toolbarTextModifier.mainContainer );
function toogleModeSwitch( onElement, offElement, onModifier, offModifier ) {
onElement.addClass( 'fancy-button-active' );
offElement.removeClass( 'fancy-button-active' );
onModifier.showUI();
offModifier.hideUI();
}
function toggleModeBasic( callOnRefresh ) {
callOnRefresh = ( callOnRefresh !== false );
mode = 'basic';
window.location.hash = '#basic';
toogleModeSwitch( modeSwitchBasic, modeSwitchAdvanced, toolbarModifier, toolbarTextModifier );
configuratorSection.removeClass( 'freed-width' );
basicInstruction.show();
advancedInstruction.hide();
callOnRefresh && onRefresh( toolbarModifier );
}
function toggleModeAdvanced( callOnRefresh ) {
callOnRefresh = ( callOnRefresh !== false );
mode = 'advanced';
window.location.hash = '#advanced';
toogleModeSwitch( modeSwitchAdvanced, modeSwitchBasic, toolbarTextModifier, toolbarModifier );
configuratorSection.addClass( 'freed-width' );
advancedInstruction.show();
basicInstruction.hide();
callOnRefresh && onRefresh( toolbarTextModifier );
}
modeSwitchBasic.on( 'click', toggleModeBasic );
modeSwitchAdvanced.on( 'click', toggleModeAdvanced );
//
// Position:sticky for the toolbar.
//
// Will make elements behave like they were styled with position:sticky.
var positionSticky = {
// Store object: {
// element: CKEDITOR.dom.element, // Element which will float.
// placeholder: CKEDITOR.dom.element, // Placeholder which is place to prevent page bounce.
// isFixed: boolean // Whether element float now.
// }
watched: [],
active: [],
staticContainer: null,
init: function() {
var element = CKEDITOR.dom.element.createFromHtml(
'<div class="staticContainer">' +
'<div class="grid-container" >' +
'<div class="grid-width-100">' +
'<div class="inner"></div>' +
'</div>' +
'</div>' +
'</div>' );
this.staticContainer = element.findOne( '.inner' );
CKEDITOR.document.getBody().append( element );
},
watch: function( element, preventFunc ) {
this.watched.push( {
element: element,
placeholder: new CKEDITOR.dom.element( 'div' ),
isFixed: false,
preventFunc: preventFunc
} );
},
checkAll: function() {
for ( var i = 0; i < this.watched.length; i++ ) {
this.check( this.watched[ i ] );
}
},
check: function( element ) {
var isFixed = element.isFixed;
var shouldBeFixed = this.shouldBeFixed( element );
// Nothing to be done.
if ( isFixed === shouldBeFixed ) {
return;
}
var placeholder = element.placeholder;
if ( isFixed ) {
// Unfixing.
element.element.insertBefore( placeholder );
placeholder.remove();
element.element.removeStyle( 'margin' );
this.active.splice( CKEDITOR.tools.indexOf( this.active, element ), 1 );
} else {
// Fixing.
placeholder.setStyle( 'width', element.element.getSize( 'width' ) + 'px' );
placeholder.setStyle( 'height', element.element.getSize( 'height' ) + 'px' );
placeholder.setStyle( 'margin-bottom', element.element.getComputedStyle( 'margin-bottom' ) );
placeholder.setStyle( 'display', element.element.getComputedStyle( 'display' ) );
placeholder.insertAfter( element.element );
this.staticContainer.append( element.element );
this.active.push( element );
}
element.isFixed = !element.isFixed;
},
shouldBeFixed: function( element ) {
if ( element.preventFunc && element.preventFunc() ) {
return false;
}
// If element is already fixed we are checking it's placeholder.
var related = ( element.isFixed ? element.placeholder : element.element ),
clientRect = related.$.getBoundingClientRect(),
staticHeight = this.staticContainer.getSize('height' ),
elemHeight = element.element.getSize( 'height' );
if ( element.isFixed ) {
return ( clientRect.top + elemHeight < staticHeight );
} else {
return ( clientRect.top < staticHeight );
}
}
};
positionSticky.init();
CKEDITOR.document.getWindow().on( 'scroll',
new CKEDITOR.tools.eventsBuffer( 100, positionSticky.checkAll, positionSticky ).input
);
// Make the toolbar sticky.
positionSticky.watch( CKEDITOR.document.findOne( '.editors-container' ) );
// Help button and help-content.
( function() {
var helpButton = CKEDITOR.document.getById( 'help' ),
helpContent = CKEDITOR.document.getById( 'help-content' );
// Don't show help button on IE8 because it's unsupported by Pico Modal.
if ( CKEDITOR.env.ie && CKEDITOR.env.version == 8 ) {
helpButton.hide();
} else {
// Display help modal when the button is clicked.
helpButton.on( 'click', function( evt ) {
SF.modal( {
// Clone modal content from DOM.
content: helpContent.getHtml(),
afterCreate: function( modal ) {
// Enable modal content button to close the modal.
new CKEDITOR.dom.element( modal.modalElem() ).findOne( '.help-content-close' ).once( 'click', modal.close );
}
} ).show();
} );
}
} )();
} )();
</script>
</body>
</html>

View file

@ -1,325 +1,325 @@
/* BASICS */
.CodeMirror {
/* Set height, width, borders, and global font properties here */
font-family: monospace;
height: 300px;
color: black;
}
/* PADDING */
.CodeMirror-lines {
padding: 4px 0; /* Vertical padding around content */
}
.CodeMirror pre {
padding: 0 4px; /* Horizontal padding of content */
}
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
background-color: white; /* The little square between H and V scrollbars */
}
/* GUTTER */
.CodeMirror-gutters {
border-right: 1px solid #ddd;
background-color: #f7f7f7;
white-space: nowrap;
}
.CodeMirror-linenumbers {}
.CodeMirror-linenumber {
padding: 0 3px 0 5px;
min-width: 20px;
text-align: right;
color: #999;
white-space: nowrap;
}
.CodeMirror-guttermarker { color: black; }
.CodeMirror-guttermarker-subtle { color: #999; }
/* CURSOR */
.CodeMirror div.CodeMirror-cursor {
border-left: 1px solid black;
}
/* Shown when moving in bi-directional text */
.CodeMirror div.CodeMirror-secondarycursor {
border-left: 1px solid silver;
}
.CodeMirror.cm-fat-cursor div.CodeMirror-cursor {
width: auto;
border: 0;
background: #7e7;
}
.CodeMirror.cm-fat-cursor div.CodeMirror-cursors {
z-index: 1;
}
.cm-animate-fat-cursor {
width: auto;
border: 0;
-webkit-animation: blink 1.06s steps(1) infinite;
-moz-animation: blink 1.06s steps(1) infinite;
animation: blink 1.06s steps(1) infinite;
}
@-moz-keyframes blink {
0% { background: #7e7; }
50% { background: none; }
100% { background: #7e7; }
}
@-webkit-keyframes blink {
0% { background: #7e7; }
50% { background: none; }
100% { background: #7e7; }
}
@keyframes blink {
0% { background: #7e7; }
50% { background: none; }
100% { background: #7e7; }
}
/* Can style cursor different in overwrite (non-insert) mode */
div.CodeMirror-overwrite div.CodeMirror-cursor {}
.cm-tab { display: inline-block; text-decoration: inherit; }
.CodeMirror-ruler {
border-left: 1px solid #ccc;
position: absolute;
}
/* DEFAULT THEME */
.cm-s-default .cm-keyword {color: #708;}
.cm-s-default .cm-atom {color: #219;}
.cm-s-default .cm-number {color: #164;}
.cm-s-default .cm-def {color: #00f;}
.cm-s-default .cm-variable,
.cm-s-default .cm-punctuation,
.cm-s-default .cm-property,
.cm-s-default .cm-operator {}
.cm-s-default .cm-variable-2 {color: #05a;}
.cm-s-default .cm-variable-3 {color: #085;}
.cm-s-default .cm-comment {color: #a50;}
.cm-s-default .cm-string {color: #a11;}
.cm-s-default .cm-string-2 {color: #f50;}
.cm-s-default .cm-meta {color: #555;}
.cm-s-default .cm-qualifier {color: #555;}
.cm-s-default .cm-builtin {color: #30a;}
.cm-s-default .cm-bracket {color: #997;}
.cm-s-default .cm-tag {color: #170;}
.cm-s-default .cm-attribute {color: #00c;}
.cm-s-default .cm-header {color: blue;}
.cm-s-default .cm-quote {color: #090;}
.cm-s-default .cm-hr {color: #999;}
.cm-s-default .cm-link {color: #00c;}
.cm-negative {color: #d44;}
.cm-positive {color: #292;}
.cm-header, .cm-strong {font-weight: bold;}
.cm-em {font-style: italic;}
.cm-link {text-decoration: underline;}
.cm-strikethrough {text-decoration: line-through;}
.cm-s-default .cm-error {color: #f00;}
.cm-invalidchar {color: #f00;}
.CodeMirror-composing { border-bottom: 2px solid; }
/* Default styles for common addons */
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
.CodeMirror-activeline-background {background: #e8f2ff;}
/* STOP */
/* The rest of this file contains styles related to the mechanics of
the editor. You probably shouldn't touch them. */
.CodeMirror {
position: relative;
overflow: hidden;
background: white;
}
.CodeMirror-scroll {
overflow: scroll !important; /* Things will break if this is overridden */
/* 30px is the magic margin used to hide the element's real scrollbars */
/* See overflow: hidden in .CodeMirror */
margin-bottom: -30px; margin-right: -30px;
padding-bottom: 30px;
height: 100%;
outline: none; /* Prevent dragging from highlighting the element */
position: relative;
}
.CodeMirror-sizer {
position: relative;
border-right: 30px solid transparent;
}
/* The fake, visible scrollbars. Used to force redraw during scrolling
before actuall scrolling happens, thus preventing shaking and
flickering artifacts. */
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
position: absolute;
z-index: 6;
display: none;
}
.CodeMirror-vscrollbar {
right: 0; top: 0;
overflow-x: hidden;
overflow-y: scroll;
}
.CodeMirror-hscrollbar {
bottom: 0; left: 0;
overflow-y: hidden;
overflow-x: scroll;
}
.CodeMirror-scrollbar-filler {
right: 0; bottom: 0;
}
.CodeMirror-gutter-filler {
left: 0; bottom: 0;
}
.CodeMirror-gutters {
position: absolute; left: 0; top: 0;
z-index: 3;
}
.CodeMirror-gutter {
white-space: normal;
height: 100%;
display: inline-block;
margin-bottom: -30px;
/* Hack to make IE7 behave */
*zoom:1;
*display:inline;
}
.CodeMirror-gutter-wrapper {
position: absolute;
z-index: 4;
height: 100%;
}
.CodeMirror-gutter-elt {
position: absolute;
cursor: default;
z-index: 4;
}
.CodeMirror-gutter-wrapper {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
.CodeMirror-lines {
cursor: text;
min-height: 1px; /* prevents collapsing before first draw */
}
.CodeMirror pre {
/* Reset some styles that the rest of the page might have set */
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
border-width: 0;
background: transparent;
font-family: inherit;
font-size: inherit;
margin: 0;
white-space: pre;
word-wrap: normal;
line-height: inherit;
color: inherit;
z-index: 2;
position: relative;
overflow: visible;
-webkit-tap-highlight-color: transparent;
}
.CodeMirror-wrap pre {
word-wrap: break-word;
white-space: pre-wrap;
word-break: normal;
}
.CodeMirror-linebackground {
position: absolute;
left: 0; right: 0; top: 0; bottom: 0;
z-index: 0;
}
.CodeMirror-linewidget {
position: relative;
z-index: 2;
overflow: auto;
}
.CodeMirror-widget {}
.CodeMirror-code {
outline: none;
}
/* Force content-box sizing for the elements where we expect it */
.CodeMirror-scroll,
.CodeMirror-sizer,
.CodeMirror-gutter,
.CodeMirror-gutters,
.CodeMirror-linenumber {
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.CodeMirror-measure {
position: absolute;
width: 100%;
height: 0;
overflow: hidden;
visibility: hidden;
}
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor {
position: absolute;
border-right: none;
width: 0;
}
div.CodeMirror-cursors {
visibility: hidden;
position: relative;
z-index: 3;
}
.CodeMirror-focused div.CodeMirror-cursors {
visibility: visible;
}
.CodeMirror-selected { background: #d9d9d9; }
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
.CodeMirror-crosshair { cursor: crosshair; }
.CodeMirror ::selection { background: #d7d4f0; }
.CodeMirror ::-moz-selection { background: #d7d4f0; }
.cm-searching {
background: #ffa;
background: rgba(255, 255, 0, .4);
}
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
.CodeMirror span { *vertical-align: text-bottom; }
/* Used to force a border model for a node */
.cm-force-border { padding-right: .1px; }
@media print {
/* Hide the cursor when printing */
.CodeMirror div.CodeMirror-cursors {
visibility: hidden;
}
}
/* See issue #2901 */
.cm-tab-wrap-hack:after { content: ''; }
/* Help users use markselection to safely style text background */
span.CodeMirror-selectedtext { background: none; }
/* BASICS */
.CodeMirror {
/* Set height, width, borders, and global font properties here */
font-family: monospace;
height: 300px;
color: black;
}
/* PADDING */
.CodeMirror-lines {
padding: 4px 0; /* Vertical padding around content */
}
.CodeMirror pre {
padding: 0 4px; /* Horizontal padding of content */
}
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
background-color: white; /* The little square between H and V scrollbars */
}
/* GUTTER */
.CodeMirror-gutters {
border-right: 1px solid #ddd;
background-color: #f7f7f7;
white-space: nowrap;
}
.CodeMirror-linenumbers {}
.CodeMirror-linenumber {
padding: 0 3px 0 5px;
min-width: 20px;
text-align: right;
color: #999;
white-space: nowrap;
}
.CodeMirror-guttermarker { color: black; }
.CodeMirror-guttermarker-subtle { color: #999; }
/* CURSOR */
.CodeMirror div.CodeMirror-cursor {
border-left: 1px solid black;
}
/* Shown when moving in bi-directional text */
.CodeMirror div.CodeMirror-secondarycursor {
border-left: 1px solid silver;
}
.CodeMirror.cm-fat-cursor div.CodeMirror-cursor {
width: auto;
border: 0;
background: #7e7;
}
.CodeMirror.cm-fat-cursor div.CodeMirror-cursors {
z-index: 1;
}
.cm-animate-fat-cursor {
width: auto;
border: 0;
-webkit-animation: blink 1.06s steps(1) infinite;
-moz-animation: blink 1.06s steps(1) infinite;
animation: blink 1.06s steps(1) infinite;
}
@-moz-keyframes blink {
0% { background: #7e7; }
50% { background: none; }
100% { background: #7e7; }
}
@-webkit-keyframes blink {
0% { background: #7e7; }
50% { background: none; }
100% { background: #7e7; }
}
@keyframes blink {
0% { background: #7e7; }
50% { background: none; }
100% { background: #7e7; }
}
/* Can style cursor different in overwrite (non-insert) mode */
div.CodeMirror-overwrite div.CodeMirror-cursor {}
.cm-tab { display: inline-block; text-decoration: inherit; }
.CodeMirror-ruler {
border-left: 1px solid #ccc;
position: absolute;
}
/* DEFAULT THEME */
.cm-s-default .cm-keyword {color: #708;}
.cm-s-default .cm-atom {color: #219;}
.cm-s-default .cm-number {color: #164;}
.cm-s-default .cm-def {color: #00f;}
.cm-s-default .cm-variable,
.cm-s-default .cm-punctuation,
.cm-s-default .cm-property,
.cm-s-default .cm-operator {}
.cm-s-default .cm-variable-2 {color: #05a;}
.cm-s-default .cm-variable-3 {color: #085;}
.cm-s-default .cm-comment {color: #a50;}
.cm-s-default .cm-string {color: #a11;}
.cm-s-default .cm-string-2 {color: #f50;}
.cm-s-default .cm-meta {color: #555;}
.cm-s-default .cm-qualifier {color: #555;}
.cm-s-default .cm-builtin {color: #30a;}
.cm-s-default .cm-bracket {color: #997;}
.cm-s-default .cm-tag {color: #170;}
.cm-s-default .cm-attribute {color: #00c;}
.cm-s-default .cm-header {color: blue;}
.cm-s-default .cm-quote {color: #090;}
.cm-s-default .cm-hr {color: #999;}
.cm-s-default .cm-link {color: #00c;}
.cm-negative {color: #d44;}
.cm-positive {color: #292;}
.cm-header, .cm-strong {font-weight: bold;}
.cm-em {font-style: italic;}
.cm-link {text-decoration: underline;}
.cm-strikethrough {text-decoration: line-through;}
.cm-s-default .cm-error {color: #f00;}
.cm-invalidchar {color: #f00;}
.CodeMirror-composing { border-bottom: 2px solid; }
/* Default styles for common addons */
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
.CodeMirror-activeline-background {background: #e8f2ff;}
/* STOP */
/* The rest of this file contains styles related to the mechanics of
the editor. You probably shouldn't touch them. */
.CodeMirror {
position: relative;
overflow: hidden;
background: white;
}
.CodeMirror-scroll {
overflow: scroll !important; /* Things will break if this is overridden */
/* 30px is the magic margin used to hide the element's real scrollbars */
/* See overflow: hidden in .CodeMirror */
margin-bottom: -30px; margin-right: -30px;
padding-bottom: 30px;
height: 100%;
outline: none; /* Prevent dragging from highlighting the element */
position: relative;
}
.CodeMirror-sizer {
position: relative;
border-right: 30px solid transparent;
}
/* The fake, visible scrollbars. Used to force redraw during scrolling
before actuall scrolling happens, thus preventing shaking and
flickering artifacts. */
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
position: absolute;
z-index: 6;
display: none;
}
.CodeMirror-vscrollbar {
right: 0; top: 0;
overflow-x: hidden;
overflow-y: scroll;
}
.CodeMirror-hscrollbar {
bottom: 0; left: 0;
overflow-y: hidden;
overflow-x: scroll;
}
.CodeMirror-scrollbar-filler {
right: 0; bottom: 0;
}
.CodeMirror-gutter-filler {
left: 0; bottom: 0;
}
.CodeMirror-gutters {
position: absolute; left: 0; top: 0;
z-index: 3;
}
.CodeMirror-gutter {
white-space: normal;
height: 100%;
display: inline-block;
margin-bottom: -30px;
/* Hack to make IE7 behave */
*zoom:1;
*display:inline;
}
.CodeMirror-gutter-wrapper {
position: absolute;
z-index: 4;
height: 100%;
}
.CodeMirror-gutter-elt {
position: absolute;
cursor: default;
z-index: 4;
}
.CodeMirror-gutter-wrapper {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
.CodeMirror-lines {
cursor: text;
min-height: 1px; /* prevents collapsing before first draw */
}
.CodeMirror pre {
/* Reset some styles that the rest of the page might have set */
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
border-width: 0;
background: transparent;
font-family: inherit;
font-size: inherit;
margin: 0;
white-space: pre;
word-wrap: normal;
line-height: inherit;
color: inherit;
z-index: 2;
position: relative;
overflow: visible;
-webkit-tap-highlight-color: transparent;
}
.CodeMirror-wrap pre {
word-wrap: break-word;
white-space: pre-wrap;
word-break: normal;
}
.CodeMirror-linebackground {
position: absolute;
left: 0; right: 0; top: 0; bottom: 0;
z-index: 0;
}
.CodeMirror-linewidget {
position: relative;
z-index: 2;
overflow: auto;
}
.CodeMirror-widget {}
.CodeMirror-code {
outline: none;
}
/* Force content-box sizing for the elements where we expect it */
.CodeMirror-scroll,
.CodeMirror-sizer,
.CodeMirror-gutter,
.CodeMirror-gutters,
.CodeMirror-linenumber {
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.CodeMirror-measure {
position: absolute;
width: 100%;
height: 0;
overflow: hidden;
visibility: hidden;
}
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor {
position: absolute;
border-right: none;
width: 0;
}
div.CodeMirror-cursors {
visibility: hidden;
position: relative;
z-index: 3;
}
.CodeMirror-focused div.CodeMirror-cursors {
visibility: visible;
}
.CodeMirror-selected { background: #d9d9d9; }
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
.CodeMirror-crosshair { cursor: crosshair; }
.CodeMirror ::selection { background: #d7d4f0; }
.CodeMirror ::-moz-selection { background: #d7d4f0; }
.cm-searching {
background: #ffa;
background: rgba(255, 255, 0, .4);
}
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
.CodeMirror span { *vertical-align: text-bottom; }
/* Used to force a border model for a node */
.cm-force-border { padding-right: .1px; }
@media print {
/* Hide the cursor when printing */
.CodeMirror div.CodeMirror-cursors {
visibility: hidden;
}
}
/* See issue #2901 */
.cm-tab-wrap-hack:after { content: ''; }
/* Help users use markselection to safely style text background */
span.CodeMirror-selectedtext { background: none; }

View file

@ -1,36 +1,36 @@
/* neo theme for codemirror */
/* Color scheme */
.cm-s-neo.CodeMirror {
background-color:#ffffff;
color:#2e383c;
line-height:1.4375;
}
.cm-s-neo .cm-comment {color:#75787b}
.cm-s-neo .cm-keyword, .cm-s-neo .cm-property {color:#1d75b3}
.cm-s-neo .cm-atom,.cm-s-neo .cm-number {color:#75438a}
.cm-s-neo .cm-node,.cm-s-neo .cm-tag {color:#9c3328}
.cm-s-neo .cm-string {color:#b35e14}
.cm-s-neo .cm-variable,.cm-s-neo .cm-qualifier {color:#047d65}
/* Editor styling */
.cm-s-neo pre {
padding:0;
}
.cm-s-neo .CodeMirror-gutters {
border:none;
border-right:10px solid transparent;
background-color:transparent;
}
.cm-s-neo .CodeMirror-linenumber {
padding:0;
color:#e0e2e5;
}
.cm-s-neo .CodeMirror-guttermarker { color: #1d75b3; }
.cm-s-neo .CodeMirror-guttermarker-subtle { color: #e0e2e5; }
/* neo theme for codemirror */
/* Color scheme */
.cm-s-neo.CodeMirror {
background-color:#ffffff;
color:#2e383c;
line-height:1.4375;
}
.cm-s-neo .cm-comment {color:#75787b}
.cm-s-neo .cm-keyword, .cm-s-neo .cm-property {color:#1d75b3}
.cm-s-neo .cm-atom,.cm-s-neo .cm-number {color:#75438a}
.cm-s-neo .cm-node,.cm-s-neo .cm-tag {color:#9c3328}
.cm-s-neo .cm-string {color:#b35e14}
.cm-s-neo .cm-variable,.cm-s-neo .cm-qualifier {color:#047d65}
/* Editor styling */
.cm-s-neo pre {
padding:0;
}
.cm-s-neo .CodeMirror-gutters {
border:none;
border-right:10px solid transparent;
background-color:transparent;
}
.cm-s-neo .CodeMirror-linenumber {
padding:0;
color:#e0e2e5;
}
.cm-s-neo .CodeMirror-guttermarker { color: #1d75b3; }
.cm-s-neo .CodeMirror-guttermarker-subtle { color: #e0e2e5; }

View file

@ -1,38 +1,38 @@
.CodeMirror-hints {
position: absolute;
z-index: 10;
overflow: hidden;
list-style: none;
margin: 0;
padding: 2px;
-webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
-moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
border-radius: 3px;
border: 1px solid silver;
background: white;
font-size: 90%;
font-family: monospace;
max-height: 20em;
overflow-y: auto;
}
.CodeMirror-hint {
margin: 0;
padding: 0 4px;
border-radius: 2px;
max-width: 19em;
overflow: hidden;
white-space: pre;
color: black;
cursor: pointer;
}
li.CodeMirror-hint-active {
background: #08f;
color: white;
}
.CodeMirror-hints {
position: absolute;
z-index: 10;
overflow: hidden;
list-style: none;
margin: 0;
padding: 2px;
-webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
-moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
border-radius: 3px;
border: 1px solid silver;
background: white;
font-size: 90%;
font-family: monospace;
max-height: 20em;
overflow-y: auto;
}
.CodeMirror-hint {
margin: 0;
padding: 0 4px;
border-radius: 2px;
max-width: 19em;
overflow: hidden;
white-space: pre;
color: black;
cursor: pointer;
}
li.CodeMirror-hint-active {
background: #08f;
color: white;
}