Skip to content

TagSpaces is an offline, open source, document manager with tagging support

adding summernote as a default html editor library

Ilianf397ccc5467c
diff --git a/data/ext/editorBootHTML/LICENSE b/data/ext/editorBootHTML/LICENSE
deleted file mode 100644
index 28d02a26c..000000000
--- a/data/ext/editorBootHTML/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License
-
-Copyright (c) 2013 Damjan Vujnovic, David de Florinier, Gojko Adzic
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/data/ext/editorBootHTML/bootstrap-wysiwyg-master.zip b/data/ext/editorBootHTML/bootstrap-wysiwyg-master.zip
deleted file mode 100644
index 0627dc38b..000000000
Binary files a/data/ext/editorBootHTML/bootstrap-wysiwyg-master.zip and /dev/null differ
diff --git a/data/ext/editorBootHTML/bootstrap-wysiwyg.js b/data/ext/editorBootHTML/bootstrap-wysiwyg.js
deleted file mode 100644
index 69f64a738..000000000
--- a/data/ext/editorBootHTML/bootstrap-wysiwyg.js
+++ /dev/null
@@ -1,200 +0,0 @@
-/* http://github.com/mindmup/bootstrap-wysiwyg */
-/*global jQuery, $, FileReader*/
-/*jslint browser:true*/
-(function ($) {
- 'use strict';
- var readFileIntoDataUrl = function (fileInfo) {
- var loader = $.Deferred(),
- fReader = new FileReader();
- fReader.onload = function (e) {
- loader.resolve(e.target.result);
- };
- fReader.onerror = loader.reject;
- fReader.onprogress = loader.notify;
- fReader.readAsDataURL(fileInfo);
- return loader.promise();
- };
- $.fn.cleanHtml = function () {
- var html = $(this).html();
- return html && html.replace(/(<br>|\s|<div><br><\/div>|&nbsp;)*$/, '');
- };
- $.fn.wysiwyg = function (userOptions) {
- var editor = this,
- selectedRange,
- options,
- toolbarBtnSelector,
- updateToolbar = function () {
- if (options.activeToolbarClass) {
- $(options.toolbarSelector).find(toolbarBtnSelector).each(function () {
- var command = $(this).data(options.commandRole);
- if (document.queryCommandState(command)) {
- $(this).addClass(options.activeToolbarClass);
- } else {
- $(this).removeClass(options.activeToolbarClass);
- }
- });
- }
- },
- execCommand = function (commandWithArgs, valueArg) {
- var commandArr = commandWithArgs.split(' '),
- command = commandArr.shift(),
- args = commandArr.join(' ') + (valueArg || '');
- document.execCommand(command, 0, args);
- updateToolbar();
- },
- bindHotkeys = function (hotKeys) {
- $.each(hotKeys, function (hotkey, command) {
- editor.keydown(hotkey, function (e) {
- if (editor.attr('contenteditable') && editor.is(':visible')) {
- e.preventDefault();
- e.stopPropagation();
- execCommand(command);
- }
- }).keyup(hotkey, function (e) {
- if (editor.attr('contenteditable') && editor.is(':visible')) {
- e.preventDefault();
- e.stopPropagation();
- }
- });
- });
- },
- getCurrentRange = function () {
- var sel = window.getSelection();
- if (sel.getRangeAt && sel.rangeCount) {
- return sel.getRangeAt(0);
- }
- },
- saveSelection = function () {
- selectedRange = getCurrentRange();
- },
- restoreSelection = function () {
- var selection = window.getSelection();
- if (selectedRange) {
- try {
- selection.removeAllRanges();
- } catch (ex) {
- document.body.createTextRange().select();
- document.selection.empty();
- }
-
- selection.addRange(selectedRange);
- }
- },
- insertFiles = function (files) {
- editor.focus();
- $.each(files, function (idx, fileInfo) {
- if (/^image\//.test(fileInfo.type)) {
- $.when(readFileIntoDataUrl(fileInfo)).done(function (dataUrl) {
- execCommand('insertimage', dataUrl);
- }).fail(function (e) {
- options.fileUploadError("file-reader", e);
- });
- } else {
- options.fileUploadError("unsupported-file-type", fileInfo.type);
- }
- });
- },
- markSelection = function (input, color) {
- restoreSelection();
- if (document.queryCommandSupported('hiliteColor')) {
- document.execCommand('hiliteColor', 0, color || 'transparent');
- }
- saveSelection();
- input.data(options.selectionMarker, color);
- },
- bindToolbar = function (toolbar, options) {
- toolbar.find(toolbarBtnSelector).click(function () {
- restoreSelection();
- editor.focus();
- execCommand($(this).data(options.commandRole));
- saveSelection();
- });
- toolbar.find('[data-toggle=dropdown]').click(restoreSelection);
-
- toolbar.find('input[type=text][data-' + options.commandRole + ']').on('webkitspeechchange change', function () {
- var newValue = this.value; /* ugly but prevents fake double-calls due to selection restoration */
- this.value = '';
- restoreSelection();
- if (newValue) {
- editor.focus();
- execCommand($(this).data(options.commandRole), newValue);
- }
- saveSelection();
- }).on('focus', function () {
- var input = $(this);
- if (!input.data(options.selectionMarker)) {
- markSelection(input, options.selectionColor);
- input.focus();
- }
- }).on('blur', function () {
- var input = $(this);
- if (input.data(options.selectionMarker)) {
- markSelection(input, false);
- }
- });
- toolbar.find('input[type=file][data-' + options.commandRole + ']').change(function () {
- restoreSelection();
- if (this.type === 'file' && this.files && this.files.length > 0) {
- insertFiles(this.files);
- }
- saveSelection();
- this.value = '';
- });
- },
- initFileDrops = function () {
- editor.on('dragenter dragover', false)
- .on('drop', function (e) {
- var dataTransfer = e.originalEvent.dataTransfer;
- e.stopPropagation();
- e.preventDefault();
- if (dataTransfer && dataTransfer.files && dataTransfer.files.length > 0) {
- insertFiles(dataTransfer.files);
- }
- });
- };
- options = $.extend({}, $.fn.wysiwyg.defaults, userOptions);
- toolbarBtnSelector = 'a[data-' + options.commandRole + '],button[data-' + options.commandRole + '],input[type=button][data-' + options.commandRole + ']';
- bindHotkeys(options.hotKeys);
- if (options.dragAndDropImages) {
- initFileDrops();
- }
- bindToolbar($(options.toolbarSelector), options);
- editor.attr('contenteditable', true)
- .on('mouseup keyup mouseout', function () {
- saveSelection();
- updateToolbar();
- });
- $(window).bind('touchend', function (e) {
- var isInside = (editor.is(e.target) || editor.has(e.target).length > 0),
- currentRange = getCurrentRange(),
- clear = currentRange && (currentRange.startContainer === currentRange.endContainer && currentRange.startOffset === currentRange.endOffset);
- if (!clear || isInside) {
- saveSelection();
- updateToolbar();
- }
- });
- return this;
- };
- $.fn.wysiwyg.defaults = {
- hotKeys: {
- 'ctrl+b meta+b': 'bold',
- 'ctrl+i meta+i': 'italic',
- 'ctrl+u meta+u': 'underline',
- 'ctrl+z meta+z': 'undo',
- 'ctrl+y meta+y meta+shift+z': 'redo',
- 'ctrl+l meta+l': 'justifyleft',
- 'ctrl+r meta+r': 'justifyright',
- 'ctrl+e meta+e': 'justifycenter',
- 'ctrl+j meta+j': 'justifyfull',
- 'shift+tab': 'outdent',
- 'tab': 'indent'
- },
- toolbarSelector: '[data-role=editor-toolbar]',
- commandRole: 'edit',
- activeToolbarClass: 'btn-info',
- selectionMarker: 'edit-focus-marker',
- selectionColor: 'darkgrey',
- dragAndDropImages: true,
- fileUploadError: function (reason, detail) { console.log("File upload error", reason, detail); }
- };
-}(window.jQuery));
diff --git a/data/ext/editorBootHTML/index.css b/data/ext/editorBootHTML/index.css
deleted file mode 100644
index 728116701..000000000
--- a/data/ext/editorBootHTML/index.css
+++ /dev/null
@@ -1,42 +0,0 @@
-/* this CSS is not part of the widget, it is here just as an example of the demo page styling.... Don't copy this one, roll your own. One
- * of the key things about the widget is that it allows you to do your own styling!
- */
-
-#editor {
- max-height: 250px;
- height: 250px;
- background-color: white;
- border-collapse: separate;
- border: 1px solid rgb(204, 204, 204);
- padding: 4px;
- box-sizing: content-box;
- -webkit-box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px 0px inset;
- box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px 0px inset;
- border-top-right-radius: 3px; border-bottom-right-radius: 3px;
- border-bottom-left-radius: 3px; border-top-left-radius: 3px;
- overflow: scroll;
- outline: none;
-}
-#voiceBtn {
- width: 20px;
- color: transparent;
- background-color: transparent;
- transform: scale(2.0, 2.0);
- -webkit-transform: scale(2.0, 2.0);
- -moz-transform: scale(2.0, 2.0);
- border: transparent;
- cursor: pointer;
- box-shadow: none;
- -webkit-box-shadow: none;
-}
-
-div[data-role="editor-toolbar"] {
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
-
-.dropdown-menu a {
- cursor: pointer;
-}
diff --git a/data/ext/editorBootHTML/index.html b/data/ext/editorBootHTML/index.html
deleted file mode 100644
index f1e3d1e66..000000000
--- a/data/ext/editorBootHTML/index.html
+++ /dev/null
@@ -1,141 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <title>Tiny, opensource, Bootstrap WYSIWYG rich text editor from MindMup</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="keywords" content="opensource rich wysiwyg text editor jquery bootstrap execCommand html5" />
- <meta name="description" content="This tiny jQuery Bootstrap WYSIWYG plugin turns any DIV into a HTML5 rich text editor" />
- <link rel="apple-touch-icon" href="//mindmup.s3.amazonaws.com/lib/img/apple-touch-icon.png" />
- <link rel="shortcut icon" href="http://mindmup.s3.amazonaws.com/lib/img/favicon.ico" >
- <link href="http://twitter.github.com/bootstrap/assets/js/google-code-prettify/prettify.css" rel="stylesheet">
- <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
- <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-responsive.min.css" rel="stylesheet">
-<link href="http://netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css" rel="stylesheet">
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
-<script src="https://mindmup.s3.amazonaws.com/lib/jquery.hotkeys.js"></script>
- <script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>
- <script src="http://twitter.github.com/bootstrap/assets/js/google-code-prettify/prettify.js"></script>
-<link href="index.css" rel="stylesheet">
- <script src="bootstrap-wysiwyg.js"></script>
- </head>
- <body>
-
-<div class="container">
- <div class="hero-unit">
- <div class="pull-right">
- <div class="fb-like" data-href="http://facebook.com/mindmupapp" data-send="false" data-layout="button_count" data-width="100" data-show-faces="false"></div><br/>
- <a href="https://twitter.com/mindmup" class="twitter-follow-button" data-show-count="true" data-show-screen-name="true" data-lang="en">Follow @mindmup</a>
- </div>
- <div id="alerts"></div>
- <div class="btn-toolbar" data-role="editor-toolbar" data-target="#editor">
- <div class="btn-group">
- <a class="btn dropdown-toggle" data-toggle="dropdown" title="Font"><i class="icon-font"></i><b class="caret"></b></a>
- <ul class="dropdown-menu">
- </ul>
- </div>
- <div class="btn-group">
- <a class="btn dropdown-toggle" data-toggle="dropdown" title="Font Size"><i class="icon-text-height"></i>&nbsp;<b class="caret"></b></a>
- <ul class="dropdown-menu">
- <li><a data-edit="fontSize 5"><font size="5">Huge</font></a></li>
- <li><a data-edit="fontSize 3"><font size="3">Normal</font></a></li>
- <li><a data-edit="fontSize 1"><font size="1">Small</font></a></li>
- </ul>
- </div>
- <div class="btn-group">
- <a class="btn" data-edit="bold" title="Bold (Ctrl/Cmd+B)"><i class="icon-bold"></i></a>
- <a class="btn" data-edit="italic" title="Italic (Ctrl/Cmd+I)"><i class="icon-italic"></i></a>
- <a class="btn" data-edit="strikethrough" title="Strikethrough"><i class="icon-strikethrough"></i></a>
- <a class="btn" data-edit="underline" title="Underline (Ctrl/Cmd+U)"><i class="icon-underline"></i></a>
- </div>
- <div class="btn-group">
- <a class="btn" data-edit="insertunorderedlist" title="Bullet list"><i class="icon-list-ul"></i></a>
- <a class="btn" data-edit="insertorderedlist" title="Number list"><i class="icon-list-ol"></i></a>
- <a class="btn" data-edit="outdent" title="Reduce indent (Shift+Tab)"><i class="icon-indent-left"></i></a>
- <a class="btn" data-edit="indent" title="Indent (Tab)"><i class="icon-indent-right"></i></a>
- </div>
- <div class="btn-group">
- <a class="btn" data-edit="justifyleft" title="Align Left (Ctrl/Cmd+L)"><i class="icon-align-left"></i></a>
- <a class="btn" data-edit="justifycenter" title="Center (Ctrl/Cmd+E)"><i class="icon-align-center"></i></a>
- <a class="btn" data-edit="justifyright" title="Align Right (Ctrl/Cmd+R)"><i class="icon-align-right"></i></a>
- <a class="btn" data-edit="justifyfull" title="Justify (Ctrl/Cmd+J)"><i class="icon-align-justify"></i></a>
- </div>
- <div class="btn-group">
- <a class="btn dropdown-toggle" data-toggle="dropdown" title="Hyperlink"><i class="icon-link"></i></a>
- <div class="dropdown-menu input-append">
- <input class="span2" placeholder="URL" type="text" data-edit="createLink"/>
- <button class="btn" type="button">Add</button>
- </div>
- <a class="btn" data-edit="unlink" title="Remove Hyperlink"><i class="icon-cut"></i></a>
-
- </div>
-
- <div class="btn-group">
- <a class="btn" title="Insert picture (or just drag & drop)" id="pictureBtn"><i class="icon-picture"></i></a>
- <input type="file" data-role="magic-overlay" data-target="#pictureBtn" data-edit="insertImage" />
- </div>
- <div class="btn-group">
- <a class="btn" data-edit="undo" title="Undo (Ctrl/Cmd+Z)"><i class="icon-undo"></i></a>
- <a class="btn" data-edit="redo" title="Redo (Ctrl/Cmd+Y)"><i class="icon-repeat"></i></a>
- </div>
- <input type="text" data-edit="inserttext" id="voiceBtn" x-webkit-speech="">
- </div>
-
- <div id="editor">
- Go ahead&hellip;
- </div>
- </div>
-
-</div>
-<script>
- $(function(){
- function initToolbarBootstrapBindings() {
- var fonts = ['Serif', 'Sans', 'Arial', 'Arial Black', 'Courier',
- 'Courier New', 'Comic Sans MS', 'Helvetica', 'Impact', 'Lucida Grande', 'Lucida Sans', 'Tahoma', 'Times',
- 'Times New Roman', 'Verdana'],
- fontTarget = $('[title=Font]').siblings('.dropdown-menu');
- $.each(fonts, function (idx, fontName) {
- fontTarget.append($('<li><a data-edit="fontName ' + fontName +'" style="font-family:\''+ fontName +'\'">'+fontName + '</a></li>'));
- });
- $('a[title]').tooltip({container:'body'});
- $('.dropdown-menu input').click(function() {return false;})
- .change(function () {$(this).parent('.dropdown-menu').siblings('.dropdown-toggle').dropdown('toggle');})
- .keydown('esc', function () {this.value='';$(this).change();});
-
- $('[data-role=magic-overlay]').each(function () {
- var overlay = $(this), target = $(overlay.data('target'));
- overlay.css('opacity', 0).css('position', 'absolute').offset(target.offset()).width(target.outerWidth()).height(target.outerHeight());
- });
- if ("onwebkitspeechchange" in document.createElement("input")) {
- var editorOffset = $('#editor').offset();
- $('#voiceBtn').css('position','absolute').offset({top: editorOffset.top, left: editorOffset.left+$('#editor').innerWidth()-35});
- } else {
- $('#voiceBtn').hide();
- }
- };
- function showErrorAlert (reason, detail) {
- var msg='';
- if (reason==='unsupported-file-type') { msg = "Unsupported format " +detail; }
- else {
- console.log("error uploading file", reason, detail);
- }
- $('<div class="alert"> <button type="button" class="close" data-dismiss="alert">&times;</button>'+
- '<strong>File upload error</strong> '+msg+' </div>').prependTo('#alerts');
- };
- initToolbarBootstrapBindings();
- $('#editor').wysiwyg({ fileUploadError: showErrorAlert} );
- window.prettyPrint && prettyPrint();
- });
-</script>
-<script>(function(d, s, id) {
- var js, fjs = d.getElementsByTagName(s)[0];
- if (d.getElementById(id)) return;
- js = d.createElement(s); js.id = id;
- js.src = "http://connect.facebook.net/en_GB/all.js#xfbml=1";
- fjs.parentNode.insertBefore(js, fjs);
- }(document, 'script', 'facebook-jssdk'));
- </script>
-
-<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="http://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
-
-</html>
diff --git a/data/ext/editorHTML/extension.css b/data/ext/editorHTML/extension.css
new file mode 100644
index 000000000..db3d13cda
--- /dev/null
+++ b/data/ext/editorHTML/extension.css
@@ -0,0 +1,15 @@
+.note-editor {
+ border-width: 0px;
+ width: 100%;
+ height: 100%;
+}
+
+.note-codable {
+ height: 90% !important;
+ overflow: auto;
+}
+
+.note-editable {
+ height: 90% !important;
+ overflow: auto;
+}
\ No newline at end of file
diff --git a/data/ext/editorHTML/extension.js b/data/ext/editorHTML/extension.js
new file mode 100644
index 000000000..683a2c18c
--- /dev/null
+++ b/data/ext/editorHTML/extension.js
@@ -0,0 +1,73 @@
+/* Copyright (c) 2013 The Tagspaces Authors. All rights reserved.
+ * Use of this source code is governed by a AGPL3 license that
+ * can be found in the LICENSE file. */
+
+define(function(require, exports, module) {
+"use strict";
+
+ console.log("Loading editorHTML");
+ exports.id = "editorHTML"; // ID should be equal to the directory name where the ext. is located
+ exports.title = "HTML Editor";
+ exports.type = "editor";
+ exports.supportedFileTypes = [ "htm", "html" ];
+
+ var TSCORE = require("tscore");
+
+ var htmlEditor = undefined;
+ var extensionDirectory = TSCORE.Config.getExtensionPath()+"/"+exports.id;
+
+
+ exports.init = function(filePath, containerElementID) {
+ console.log("Initalization HTML Text Editor...");
+ require([
+ extensionDirectory+'/summernote/summernote.min.js',
+ 'css!'+extensionDirectory+'/extension.css',
+ TSCORE.Config.getExtensionPath()+'/editorText/codemirror/codemirror.js',
+ 'css!'+TSCORE.Config.getExtensionPath()+'/editorText/codemirror/codemirror.css',
+ 'css!'+TSCORE.Config.getExtensionPath()+'/editorText/codemirror/theme/monokai.css',
+ //"css!"+extensionDirectory+'/summernote/summernote-bs3.css',
+ "css!"+extensionDirectory+'/summernote/summernote.css',
+ ], function() {
+ require([
+ TSCORE.Config.getExtensionPath()+'/editorText/codemirror/mode/xml/xml.js',
+ ]);
+ $("#"+containerElementID).append('<div id="htmlEditor"></div>');
+ TSCORE.IO.loadTextFile(filePath);
+ });
+ };
+
+ exports.setFileType = function(fileType) {
+ console.log("setFileType not supported on this extension");
+ };
+
+ exports.viewerMode = function(isViewerMode) {
+ // set readonly
+ };
+
+ exports.setContent = function(content) {
+ $('#htmlEditor').html(content);
+ $('#htmlEditor').summernote({
+ focus: true,
+ codemirror: {
+ theme: 'monokai'
+ },
+ toolbar: [
+ ['style', ['style']],
+ ['style', ['bold', 'italic', 'underline', 'clear']],
+ ['fontsize', ['fontsize']],
+ ['color', ['color']],
+ ['para', ['ul', 'ol', 'paragraph']],
+ ['height', ['height']],
+ //['insert', ['picture', 'link']], // no insert buttons
+ ['table', ['table']],
+ ['view', ['codeview']],
+ //['help', ['help']] //no help button
+ ]
+ });
+ };
+
+ exports.getContent = function() {
+ return $('#htmlEditor').code();
+ };
+
+});
diff --git a/data/ext/editorHTML/summernote/MIT-License.txt b/data/ext/editorHTML/summernote/MIT-License.txt
new file mode 100644
index 000000000..c9b44cb8a
--- /dev/null
+++ b/data/ext/editorHTML/summernote/MIT-License.txt
@@ -0,0 +1,18 @@
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/data/ext/editorHTML/summernote/summernote-bs3.css b/data/ext/editorHTML/summernote/summernote-bs3.css
new file mode 100644
index 000000000..5090cd9fe
--- /dev/null
+++ b/data/ext/editorHTML/summernote/summernote-bs3.css
@@ -0,0 +1,5970 @@
+.note-editor {
+ /*! normalize.css v2.1.3 | MIT License | git.io/normalize */
+
+}
+.note-editor article,
+.note-editor aside,
+.note-editor details,
+.note-editor figcaption,
+.note-editor figure,
+.note-editor footer,
+.note-editor header,
+.note-editor hgroup,
+.note-editor main,
+.note-editor nav,
+.note-editor section,
+.note-editor summary {
+ display: block;
+}
+.note-editor audio,
+.note-editor canvas,
+.note-editor video {
+ display: inline-block;
+}
+.note-editor audio:not([controls]) {
+ display: none;
+ height: 0;
+}
+.note-editor [hidden],
+.note-editor template {
+ display: none;
+}
+.note-editor html {
+ font-family: sans-serif;
+ -ms-text-size-adjust: 100%;
+ -webkit-text-size-adjust: 100%;
+}
+.note-editor body {
+ margin: 0;
+}
+.note-editor a {
+ background: transparent;
+}
+.note-editor a:focus {
+ outline: thin dotted;
+}
+.note-editor a:active,
+.note-editor a:hover {
+ outline: 0;
+}
+.note-editor h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+.note-editor abbr[title] {
+ border-bottom: 1px dotted;
+}
+.note-editor b,
+.note-editor strong {
+ font-weight: bold;
+}
+.note-editor dfn {
+ font-style: italic;
+}
+.note-editor hr {
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ height: 0;
+}
+.note-editor mark {
+ background: #ff0;
+ color: #000;
+}
+.note-editor code,
+.note-editor kbd,
+.note-editor pre,
+.note-editor samp {
+ font-family: monospace, serif;
+ font-size: 1em;
+}
+.note-editor pre {
+ white-space: pre-wrap;
+}
+.note-editor q {
+ quotes: "\201C" "\201D" "\2018" "\2019";
+}
+.note-editor small {
+ font-size: 80%;
+}
+.note-editor sub,
+.note-editor sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+.note-editor sup {
+ top: -0.5em;
+}
+.note-editor sub {
+ bottom: -0.25em;
+}
+.note-editor img {
+ border: 0;
+}
+.note-editor svg:not(:root) {
+ overflow: hidden;
+}
+.note-editor figure {
+ margin: 0;
+}
+.note-editor fieldset {
+ border: 1px solid #c0c0c0;
+ margin: 0 2px;
+ padding: 0.35em 0.625em 0.75em;
+}
+.note-editor legend {
+ border: 0;
+ padding: 0;
+}
+.note-editor button,
+.note-editor input,
+.note-editor select,
+.note-editor textarea {
+ font-family: inherit;
+ font-size: 100%;
+ margin: 0;
+}
+.note-editor button,
+.note-editor input {
+ line-height: normal;
+}
+.note-editor button,
+.note-editor select {
+ text-transform: none;
+}
+.note-editor button,
+.note-editor html input[type="button"],
+.note-editor input[type="reset"],
+.note-editor input[type="submit"] {
+ -webkit-appearance: button;
+ cursor: pointer;
+}
+.note-editor button[disabled],
+.note-editor html input[disabled] {
+ cursor: default;
+}
+.note-editor input[type="checkbox"],
+.note-editor input[type="radio"] {
+ box-sizing: border-box;
+ padding: 0;
+}
+.note-editor input[type="search"] {
+ -webkit-appearance: textfield;
+ -moz-box-sizing: content-box;
+ -webkit-box-sizing: content-box;
+ box-sizing: content-box;
+}
+.note-editor input[type="search"]::-webkit-search-cancel-button,
+.note-editor input[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+.note-editor button::-moz-focus-inner,
+.note-editor input::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+}
+.note-editor textarea {
+ overflow: auto;
+ vertical-align: top;
+}
+.note-editor table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+@media print {
+ .note-editor * {
+ text-shadow: none !important;
+ color: #000 !important;
+ background: transparent !important;
+ box-shadow: none !important;
+ }
+ .note-editor a,
+ .note-editor a:visited {
+ text-decoration: underline;
+ }
+ .note-editor a[href]:after {
+ content: " (" attr(href) ")";
+ }
+ .note-editor abbr[title]:after {
+ content: " (" attr(title) ")";
+ }
+ .note-editor .ir a:after,
+ .note-editor a[href^="javascript:"]:after,
+ .note-editor a[href^="#"]:after {
+ content: "";
+ }
+ .note-editor pre,
+ .note-editor blockquote {
+ border: 1px solid #999;
+ page-break-inside: avoid;
+ }
+ .note-editor thead {
+ display: table-header-group;
+ }
+ .note-editor tr,
+ .note-editor img {
+ page-break-inside: avoid;
+ }
+ .note-editor img {
+ max-width: 100% !important;
+ }
+ @page {
+ margin: 2cm .5cm;
+ }
+ .note-editor p,
+ .note-editor h2,
+ .note-editor h3 {
+ orphans: 3;
+ widows: 3;
+ }
+ .note-editor h2,
+ .note-editor h3 {
+ page-break-after: avoid;
+ }
+ .note-editor .navbar {
+ display: none;
+ }
+ .note-editor .table td,
+ .note-editor .table th {
+ background-color: #fff !important;
+ }
+ .note-editor .btn > .caret,
+ .note-editor .dropup > .btn > .caret {
+ border-top-color: #000 !important;
+ }
+ .note-editor .label {
+ border: 1px solid #000;
+ }
+ .note-editor .table {
+ border-collapse: collapse !important;
+ }
+ .note-editor .table-bordered th,
+ .note-editor .table-bordered td {
+ border: 1px solid #ddd !important;
+ }
+}
+.note-editor *,
+.note-editor *:before,
+.note-editor *:after {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.note-editor html {
+ font-size: 62.5%;
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+.note-editor body {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 14px;
+ line-height: 1.428571429;
+ color: #333333;
+ background-color: #ffffff;
+}
+.note-editor input,
+.note-editor button,
+.note-editor select,
+.note-editor textarea {
+ font-family: inherit;
+ font-size: inherit;
+ line-height: inherit;
+}
+.note-editor a {
+ color: #428bca;
+ text-decoration: none;
+}
+.note-editor a:hover,
+.note-editor a:focus {
+ color: #2a6496;
+ text-decoration: underline;
+}
+.note-editor a:focus {
+ outline: thin dotted #333;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+.note-editor img {
+ vertical-align: middle;
+}
+.note-editor .img-responsive {
+ display: block;
+ max-width: 100%;
+ height: auto;
+}
+.note-editor .img-rounded {
+ border-radius: 6px;
+}
+.note-editor .img-thumbnail {
+ padding: 4px;
+ line-height: 1.428571429;
+ background-color: #ffffff;
+ border: 1px solid #dddddd;
+ border-radius: 4px;
+ -webkit-transition: all 0.2s ease-in-out;
+ transition: all 0.2s ease-in-out;
+ display: inline-block;
+ max-width: 100%;
+ height: auto;
+}
+.note-editor .img-circle {
+ border-radius: 50%;
+}
+.note-editor hr {
+ margin-top: 20px;
+ margin-bottom: 20px;
+ border: 0;
+ border-top: 1px solid #eeeeee;
+}
+.note-editor .sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ margin: -1px;
+ padding: 0;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ border: 0;
+}
+.note-editor p {
+ margin: 0 0 10px;
+}
+.note-editor .lead {
+ margin-bottom: 20px;
+ font-size: 16px;
+ font-weight: 200;
+ line-height: 1.4;
+}
+@media (min-width: 768px) {
+ .note-editor .lead {
+ font-size: 21px;
+ }
+}
+.note-editor small,
+.note-editor .small {
+ font-size: 85%;
+}
+.note-editor cite {
+ font-style: normal;
+}
+.note-editor .text-muted {
+ color: #999999;
+}
+.note-editor .text-primary {
+ color: #428bca;
+}
+.note-editor .text-primary:hover {
+ color: #3071a9;
+}
+.note-editor .text-warning {
+ color: #c09853;
+}
+.note-editor .text-warning:hover {
+ color: #a47e3c;
+}
+.note-editor .text-danger {
+ color: #b94a48;
+}
+.note-editor .text-danger:hover {
+ color: #953b39;
+}
+.note-editor .text-success {
+ color: #468847;
+}
+.note-editor .text-success:hover {
+ color: #356635;
+}
+.note-editor .text-info {
+ color: #3a87ad;
+}
+.note-editor .text-info:hover {
+ color: #2d6987;
+}
+.note-editor .text-left {
+ text-align: left;
+}
+.note-editor .text-right {
+ text-align: right;
+}
+.note-editor .text-center {
+ text-align: center;
+}
+.note-editor h1,
+.note-editor h2,
+.note-editor h3,
+.note-editor h4,
+.note-editor h5,
+.note-editor h6,
+.note-editor .h1,
+.note-editor .h2,
+.note-editor .h3,
+.note-editor .h4,
+.note-editor .h5,
+.note-editor .h6 {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-weight: 500;
+ line-height: 1.1;
+ color: inherit;
+}
+.note-editor h1 small,
+.note-editor h2 small,
+.note-editor h3 small,
+.note-editor h4 small,
+.note-editor h5 small,
+.note-editor h6 small,
+.note-editor .h1 small,
+.note-editor .h2 small,
+.note-editor .h3 small,
+.note-editor .h4 small,
+.note-editor .h5 small,
+.note-editor .h6 small,
+.note-editor h1 .small,
+.note-editor h2 .small,
+.note-editor h3 .small,
+.note-editor h4 .small,
+.note-editor h5 .small,
+.note-editor h6 .small,
+.note-editor .h1 .small,
+.note-editor .h2 .small,
+.note-editor .h3 .small,
+.note-editor .h4 .small,
+.note-editor .h5 .small,
+.note-editor .h6 .small {
+ font-weight: normal;
+ line-height: 1;
+ color: #999999;
+}
+.note-editor h1,
+.note-editor h2,
+.note-editor h3 {
+ margin-top: 20px;
+ margin-bottom: 10px;
+}
+.note-editor h1 small,
+.note-editor h2 small,
+.note-editor h3 small,
+.note-editor h1 .small,
+.note-editor h2 .small,
+.note-editor h3 .small {
+ font-size: 65%;
+}
+.note-editor h4,
+.note-editor h5,
+.note-editor h6 {
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+.note-editor h4 small,
+.note-editor h5 small,
+.note-editor h6 small,
+.note-editor h4 .small,
+.note-editor h5 .small,
+.note-editor h6 .small {
+ font-size: 75%;
+}
+.note-editor h1,
+.note-editor .h1 {
+ font-size: 36px;
+}
+.note-editor h2,
+.note-editor .h2 {
+ font-size: 30px;
+}
+.note-editor h3,
+.note-editor .h3 {
+ font-size: 24px;
+}
+.note-editor h4,
+.note-editor .h4 {
+ font-size: 18px;
+}
+.note-editor h5,
+.note-editor .h5 {
+ font-size: 14px;
+}
+.note-editor h6,
+.note-editor .h6 {
+ font-size: 12px;
+}
+.note-editor .page-header {
+ padding-bottom: 9px;
+ margin: 40px 0 20px;
+ border-bottom: 1px solid #eeeeee;
+}
+.note-editor ul,
+.note-editor ol {
+ margin-top: 0;
+ margin-bottom: 10px;
+}
+.note-editor ul ul,
+.note-editor ol ul,
+.note-editor ul ol,
+.note-editor ol ol {
+ margin-bottom: 0;
+}
+.note-editor .list-unstyled {
+ padding-left: 0;
+ list-style: none;
+}
+.note-editor .list-inline {
+ padding-left: 0;
+ list-style: none;
+}
+.note-editor .list-inline > li {
+ display: inline-block;
+ padding-left: 5px;
+ padding-right: 5px;
+}
+.note-editor dl {
+ margin-bottom: 20px;
+}
+.note-editor dt,
+.note-editor dd {
+ line-height: 1.428571429;
+}
+.note-editor dt {
+ font-weight: bold;
+}
+.note-editor dd {
+ margin-left: 0;
+}
+@media (min-width: 768px) {
+ .note-editor .dl-horizontal dt {
+ float: left;
+ width: 160px;
+ clear: left;
+ text-align: right;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .note-editor .dl-horizontal dd {
+ margin-left: 180px;
+ }
+ .note-editor .dl-horizontal dd:before,
+ .note-editor .dl-horizontal dd:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+ }
+ .note-editor .dl-horizontal dd:after {
+ clear: both;
+ }
+ .note-editor .dl-horizontal dd:before,
+ .note-editor .dl-horizontal dd:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+ }
+ .note-editor .dl-horizontal dd:after {
+ clear: both;
+ }
+}
+.note-editor abbr[title],
+.note-editor abbr[data-original-title] {
+ cursor: help;
+ border-bottom: 1px dotted #999999;
+}
+.note-editor abbr.initialism {
+ font-size: 90%;
+ text-transform: uppercase;
+}
+.note-editor blockquote {
+ padding: 10px 20px;
+ margin: 0 0 20px;
+ border-left: 5px solid #eeeeee;
+}
+.note-editor blockquote p {
+ font-size: 17.5px;
+ font-weight: 300;
+ line-height: 1.25;
+}
+.note-editor blockquote p:last-child {
+ margin-bottom: 0;
+}
+.note-editor blockquote small {
+ display: block;
+ line-height: 1.428571429;
+ color: #999999;
+}
+.note-editor blockquote small:before {
+ content: '\2014 \00A0';
+}
+.note-editor blockquote.pull-right {
+ padding-right: 15px;
+ padding-left: 0;
+ border-right: 5px solid #eeeeee;
+ border-left: 0;
+}
+.note-editor blockquote.pull-right p,
+.note-editor blockquote.pull-right small,
+.note-editor blockquote.pull-right .small {
+ text-align: right;
+}
+.note-editor blockquote.pull-right small:before,
+.note-editor blockquote.pull-right .small:before {
+ content: '';
+}
+.note-editor blockquote.pull-right small:after,
+.note-editor blockquote.pull-right .small:after {
+ content: '\00A0 \2014';
+}
+.note-editor blockquote:before,
+.note-editor blockquote:after {
+ content: "";
+}
+.note-editor address {
+ margin-bottom: 20px;
+ font-style: normal;
+ line-height: 1.428571429;
+}
+.note-editor code,
+.note-editor kdb,
+.note-editor pre,
+.note-editor samp {
+ font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
+}
+.note-editor code {
+ padding: 2px 4px;
+ font-size: 90%;
+ color: #c7254e;
+ background-color: #f9f2f4;
+ white-space: nowrap;
+ border-radius: 4px;
+}
+.note-editor pre {
+ display: block;
+ padding: 9.5px;
+ margin: 0 0 10px;
+ font-size: 13px;
+ line-height: 1.428571429;
+ word-break: break-all;
+ word-wrap: break-word;
+ color: #333333;
+ background-color: #f5f5f5;
+ border: 1px solid #cccccc;
+ border-radius: 4px;
+}
+.note-editor pre code {
+ padding: 0;
+ font-size: inherit;
+ color: inherit;
+ white-space: pre-wrap;
+ background-color: transparent;
+ border-radius: 0;
+}
+.note-editor .pre-scrollable {
+ max-height: 340px;
+ overflow-y: scroll;
+}
+.note-editor .container {
+ margin-right: auto;
+ margin-left: auto;
+ padding-left: 15px;
+ padding-right: 15px;
+}
+.note-editor .container:before,
+.note-editor .container:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .container:after {
+ clear: both;
+}
+.note-editor .container:before,
+.note-editor .container:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .container:after {
+ clear: both;
+}
+.note-editor .row {
+ margin-left: -15px;
+ margin-right: -15px;
+}
+.note-editor .row:before,
+.note-editor .row:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .row:after {
+ clear: both;
+}
+.note-editor .row:before,
+.note-editor .row:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .row:after {
+ clear: both;
+}
+.note-editor .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
+ position: relative;
+ min-height: 1px;
+ padding-left: 15px;
+ padding-right: 15px;
+}
+.note-editor .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11 {
+ float: left;
+}
+.note-editor .col-xs-12 {
+ width: 100%;
+}
+.note-editor .col-xs-11 {
+ width: 91.66666666666666%;
+}
+.note-editor .col-xs-10 {
+ width: 83.33333333333334%;
+}
+.note-editor .col-xs-9 {
+ width: 75%;
+}
+.note-editor .col-xs-8 {
+ width: 66.66666666666666%;
+}
+.note-editor .col-xs-7 {
+ width: 58.333333333333336%;
+}
+.note-editor .col-xs-6 {
+ width: 50%;
+}
+.note-editor .col-xs-5 {
+ width: 41.66666666666667%;
+}
+.note-editor .col-xs-4 {
+ width: 33.33333333333333%;
+}
+.note-editor .col-xs-3 {
+ width: 25%;
+}
+.note-editor .col-xs-2 {
+ width: 16.666666666666664%;
+}
+.note-editor .col-xs-1 {
+ width: 8.333333333333332%;
+}
+.note-editor .col-xs-pull-12 {
+ right: 100%;
+}
+.note-editor .col-xs-pull-11 {
+ right: 91.66666666666666%;
+}
+.note-editor .col-xs-pull-10 {
+ right: 83.33333333333334%;
+}
+.note-editor .col-xs-pull-9 {
+ right: 75%;
+}
+.note-editor .col-xs-pull-8 {
+ right: 66.66666666666666%;
+}
+.note-editor .col-xs-pull-7 {
+ right: 58.333333333333336%;
+}
+.note-editor .col-xs-pull-6 {
+ right: 50%;
+}
+.note-editor .col-xs-pull-5 {
+ right: 41.66666666666667%;
+}
+.note-editor .col-xs-pull-4 {
+ right: 33.33333333333333%;
+}
+.note-editor .col-xs-pull-3 {
+ right: 25%;
+}
+.note-editor .col-xs-pull-2 {
+ right: 16.666666666666664%;
+}
+.note-editor .col-xs-pull-1 {
+ right: 8.333333333333332%;
+}
+.note-editor .col-xs-push-12 {
+ left: 100%;
+}
+.note-editor .col-xs-push-11 {
+ left: 91.66666666666666%;
+}
+.note-editor .col-xs-push-10 {
+ left: 83.33333333333334%;
+}
+.note-editor .col-xs-push-9 {
+ left: 75%;
+}
+.note-editor .col-xs-push-8 {
+ left: 66.66666666666666%;
+}
+.note-editor .col-xs-push-7 {
+ left: 58.333333333333336%;
+}
+.note-editor .col-xs-push-6 {
+ left: 50%;
+}
+.note-editor .col-xs-push-5 {
+ left: 41.66666666666667%;
+}
+.note-editor .col-xs-push-4 {
+ left: 33.33333333333333%;
+}
+.note-editor .col-xs-push-3 {
+ left: 25%;
+}
+.note-editor .col-xs-push-2 {
+ left: 16.666666666666664%;
+}
+.note-editor .col-xs-push-1 {
+ left: 8.333333333333332%;
+}
+.note-editor .col-xs-offset-12 {
+ margin-left: 100%;
+}
+.note-editor .col-xs-offset-11 {
+ margin-left: 91.66666666666666%;
+}
+.note-editor .col-xs-offset-10 {
+ margin-left: 83.33333333333334%;
+}
+.note-editor .col-xs-offset-9 {
+ margin-left: 75%;
+}
+.note-editor .col-xs-offset-8 {
+ margin-left: 66.66666666666666%;
+}
+.note-editor .col-xs-offset-7 {
+ margin-left: 58.333333333333336%;
+}
+.note-editor .col-xs-offset-6 {
+ margin-left: 50%;
+}
+.note-editor .col-xs-offset-5 {
+ margin-left: 41.66666666666667%;
+}
+.note-editor .col-xs-offset-4 {
+ margin-left: 33.33333333333333%;
+}
+.note-editor .col-xs-offset-3 {
+ margin-left: 25%;
+}
+.note-editor .col-xs-offset-2 {
+ margin-left: 16.666666666666664%;
+}
+.note-editor .col-xs-offset-1 {
+ margin-left: 8.333333333333332%;
+}
+@media (min-width: 768px) {
+ .note-editor .container {
+ width: 750px;
+ }
+ .note-editor .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11 {
+ float: left;
+ }
+ .note-editor .col-sm-12 {
+ width: 100%;
+ }
+ .note-editor .col-sm-11 {
+ width: 91.66666666666666%;
+ }
+ .note-editor .col-sm-10 {
+ width: 83.33333333333334%;
+ }
+ .note-editor .col-sm-9 {
+ width: 75%;
+ }
+ .note-editor .col-sm-8 {
+ width: 66.66666666666666%;
+ }
+ .note-editor .col-sm-7 {
+ width: 58.333333333333336%;
+ }
+ .note-editor .col-sm-6 {
+ width: 50%;
+ }
+ .note-editor .col-sm-5 {
+ width: 41.66666666666667%;
+ }
+ .note-editor .col-sm-4 {
+ width: 33.33333333333333%;
+ }
+ .note-editor .col-sm-3 {
+ width: 25%;
+ }
+ .note-editor .col-sm-2 {
+ width: 16.666666666666664%;
+ }
+ .note-editor .col-sm-1 {
+ width: 8.333333333333332%;
+ }
+ .note-editor .col-sm-pull-12 {
+ right: 100%;
+ }
+ .note-editor .col-sm-pull-11 {
+ right: 91.66666666666666%;
+ }
+ .note-editor .col-sm-pull-10 {
+ right: 83.33333333333334%;
+ }
+ .note-editor .col-sm-pull-9 {
+ right: 75%;
+ }
+ .note-editor .col-sm-pull-8 {
+ right: 66.66666666666666%;
+ }
+ .note-editor .col-sm-pull-7 {
+ right: 58.333333333333336%;
+ }
+ .note-editor .col-sm-pull-6 {
+ right: 50%;
+ }
+ .note-editor .col-sm-pull-5 {
+ right: 41.66666666666667%;
+ }
+ .note-editor .col-sm-pull-4 {
+ right: 33.33333333333333%;
+ }
+ .note-editor .col-sm-pull-3 {
+ right: 25%;
+ }
+ .note-editor .col-sm-pull-2 {
+ right: 16.666666666666664%;
+ }
+ .note-editor .col-sm-pull-1 {
+ right: 8.333333333333332%;
+ }
+ .note-editor .col-sm-push-12 {
+ left: 100%;
+ }
+ .note-editor .col-sm-push-11 {
+ left: 91.66666666666666%;
+ }
+ .note-editor .col-sm-push-10 {
+ left: 83.33333333333334%;
+ }
+ .note-editor .col-sm-push-9 {
+ left: 75%;
+ }
+ .note-editor .col-sm-push-8 {
+ left: 66.66666666666666%;
+ }
+ .note-editor .col-sm-push-7 {
+ left: 58.333333333333336%;
+ }
+ .note-editor .col-sm-push-6 {
+ left: 50%;
+ }
+ .note-editor .col-sm-push-5 {
+ left: 41.66666666666667%;
+ }
+ .note-editor .col-sm-push-4 {
+ left: 33.33333333333333%;
+ }
+ .note-editor .col-sm-push-3 {
+ left: 25%;
+ }
+ .note-editor .col-sm-push-2 {
+ left: 16.666666666666664%;
+ }
+ .note-editor .col-sm-push-1 {
+ left: 8.333333333333332%;
+ }
+ .note-editor .col-sm-offset-12 {
+ margin-left: 100%;
+ }
+ .note-editor .col-sm-offset-11 {
+ margin-left: 91.66666666666666%;
+ }
+ .note-editor .col-sm-offset-10 {
+ margin-left: 83.33333333333334%;
+ }
+ .note-editor .col-sm-offset-9 {
+ margin-left: 75%;
+ }
+ .note-editor .col-sm-offset-8 {
+ margin-left: 66.66666666666666%;
+ }
+ .note-editor .col-sm-offset-7 {
+ margin-left: 58.333333333333336%;
+ }
+ .note-editor .col-sm-offset-6 {
+ margin-left: 50%;
+ }
+ .note-editor .col-sm-offset-5 {
+ margin-left: 41.66666666666667%;
+ }
+ .note-editor .col-sm-offset-4 {
+ margin-left: 33.33333333333333%;
+ }
+ .note-editor .col-sm-offset-3 {
+ margin-left: 25%;
+ }
+ .note-editor .col-sm-offset-2 {
+ margin-left: 16.666666666666664%;
+ }
+ .note-editor .col-sm-offset-1 {
+ margin-left: 8.333333333333332%;
+ }
+}
+@media (min-width: 992px) {
+ .note-editor .container {
+ width: 970px;
+ }
+ .note-editor .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11 {
+ float: left;
+ }
+ .note-editor .col-md-12 {
+ width: 100%;
+ }
+ .note-editor .col-md-11 {
+ width: 91.66666666666666%;
+ }
+ .note-editor .col-md-10 {
+ width: 83.33333333333334%;
+ }
+ .note-editor .col-md-9 {
+ width: 75%;
+ }
+ .note-editor .col-md-8 {
+ width: 66.66666666666666%;
+ }
+ .note-editor .col-md-7 {
+ width: 58.333333333333336%;
+ }
+ .note-editor .col-md-6 {
+ width: 50%;
+ }
+ .note-editor .col-md-5 {
+ width: 41.66666666666667%;
+ }
+ .note-editor .col-md-4 {
+ width: 33.33333333333333%;
+ }
+ .note-editor .col-md-3 {
+ width: 25%;
+ }
+ .note-editor .col-md-2 {
+ width: 16.666666666666664%;
+ }
+ .note-editor .col-md-1 {
+ width: 8.333333333333332%;
+ }
+ .note-editor .col-md-pull-12 {
+ right: 100%;
+ }
+ .note-editor .col-md-pull-11 {
+ right: 91.66666666666666%;
+ }
+ .note-editor .col-md-pull-10 {
+ right: 83.33333333333334%;
+ }
+ .note-editor .col-md-pull-9 {
+ right: 75%;
+ }
+ .note-editor .col-md-pull-8 {
+ right: 66.66666666666666%;
+ }
+ .note-editor .col-md-pull-7 {
+ right: 58.333333333333336%;
+ }
+ .note-editor .col-md-pull-6 {
+ right: 50%;
+ }
+ .note-editor .col-md-pull-5 {
+ right: 41.66666666666667%;
+ }
+ .note-editor .col-md-pull-4 {
+ right: 33.33333333333333%;
+ }
+ .note-editor .col-md-pull-3 {
+ right: 25%;
+ }
+ .note-editor .col-md-pull-2 {
+ right: 16.666666666666664%;
+ }
+ .note-editor .col-md-pull-1 {
+ right: 8.333333333333332%;
+ }
+ .note-editor .col-md-push-12 {
+ left: 100%;
+ }
+ .note-editor .col-md-push-11 {
+ left: 91.66666666666666%;
+ }
+ .note-editor .col-md-push-10 {
+ left: 83.33333333333334%;
+ }
+ .note-editor .col-md-push-9 {
+ left: 75%;
+ }
+ .note-editor .col-md-push-8 {
+ left: 66.66666666666666%;
+ }
+ .note-editor .col-md-push-7 {
+ left: 58.333333333333336%;
+ }
+ .note-editor .col-md-push-6 {
+ left: 50%;
+ }
+ .note-editor .col-md-push-5 {
+ left: 41.66666666666667%;
+ }
+ .note-editor .col-md-push-4 {
+ left: 33.33333333333333%;
+ }
+ .note-editor .col-md-push-3 {
+ left: 25%;
+ }
+ .note-editor .col-md-push-2 {
+ left: 16.666666666666664%;
+ }
+ .note-editor .col-md-push-1 {
+ left: 8.333333333333332%;
+ }
+ .note-editor .col-md-offset-12 {
+ margin-left: 100%;
+ }
+ .note-editor .col-md-offset-11 {
+ margin-left: 91.66666666666666%;
+ }
+ .note-editor .col-md-offset-10 {
+ margin-left: 83.33333333333334%;
+ }
+ .note-editor .col-md-offset-9 {
+ margin-left: 75%;
+ }
+ .note-editor .col-md-offset-8 {
+ margin-left: 66.66666666666666%;
+ }
+ .note-editor .col-md-offset-7 {
+ margin-left: 58.333333333333336%;
+ }
+ .note-editor .col-md-offset-6 {
+ margin-left: 50%;
+ }
+ .note-editor .col-md-offset-5 {
+ margin-left: 41.66666666666667%;
+ }
+ .note-editor .col-md-offset-4 {
+ margin-left: 33.33333333333333%;
+ }
+ .note-editor .col-md-offset-3 {
+ margin-left: 25%;
+ }
+ .note-editor .col-md-offset-2 {
+ margin-left: 16.666666666666664%;
+ }
+ .note-editor .col-md-offset-1 {
+ margin-left: 8.333333333333332%;
+ }
+}
+@media (min-width: 1200px) {
+ .note-editor .container {
+ width: 1170px;
+ }
+ .note-editor .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11 {
+ float: left;
+ }
+ .note-editor .col-lg-12 {
+ width: 100%;
+ }
+ .note-editor .col-lg-11 {
+ width: 91.66666666666666%;
+ }
+ .note-editor .col-lg-10 {
+ width: 83.33333333333334%;
+ }
+ .note-editor .col-lg-9 {
+ width: 75%;
+ }
+ .note-editor .col-lg-8 {
+ width: 66.66666666666666%;
+ }
+ .note-editor .col-lg-7 {
+ width: 58.333333333333336%;
+ }
+ .note-editor .col-lg-6 {
+ width: 50%;
+ }
+ .note-editor .col-lg-5 {
+ width: 41.66666666666667%;
+ }
+ .note-editor .col-lg-4 {
+ width: 33.33333333333333%;
+ }
+ .note-editor .col-lg-3 {
+ width: 25%;
+ }
+ .note-editor .col-lg-2 {
+ width: 16.666666666666664%;
+ }
+ .note-editor .col-lg-1 {
+ width: 8.333333333333332%;
+ }
+ .note-editor .col-lg-pull-12 {
+ right: 100%;
+ }
+ .note-editor .col-lg-pull-11 {
+ right: 91.66666666666666%;
+ }
+ .note-editor .col-lg-pull-10 {
+ right: 83.33333333333334%;
+ }
+ .note-editor .col-lg-pull-9 {
+ right: 75%;
+ }
+ .note-editor .col-lg-pull-8 {
+ right: 66.66666666666666%;
+ }
+ .note-editor .col-lg-pull-7 {
+ right: 58.333333333333336%;
+ }
+ .note-editor .col-lg-pull-6 {
+ right: 50%;
+ }
+ .note-editor .col-lg-pull-5 {
+ right: 41.66666666666667%;
+ }
+ .note-editor .col-lg-pull-4 {
+ right: 33.33333333333333%;
+ }
+ .note-editor .col-lg-pull-3 {
+ right: 25%;
+ }
+ .note-editor .col-lg-pull-2 {
+ right: 16.666666666666664%;
+ }
+ .note-editor .col-lg-pull-1 {
+ right: 8.333333333333332%;
+ }
+ .note-editor .col-lg-push-12 {
+ left: 100%;
+ }
+ .note-editor .col-lg-push-11 {
+ left: 91.66666666666666%;
+ }
+ .note-editor .col-lg-push-10 {
+ left: 83.33333333333334%;
+ }
+ .note-editor .col-lg-push-9 {
+ left: 75%;
+ }
+ .note-editor .col-lg-push-8 {
+ left: 66.66666666666666%;
+ }
+ .note-editor .col-lg-push-7 {
+ left: 58.333333333333336%;
+ }
+ .note-editor .col-lg-push-6 {
+ left: 50%;
+ }
+ .note-editor .col-lg-push-5 {
+ left: 41.66666666666667%;
+ }
+ .note-editor .col-lg-push-4 {
+ left: 33.33333333333333%;
+ }
+ .note-editor .col-lg-push-3 {
+ left: 25%;
+ }
+ .note-editor .col-lg-push-2 {
+ left: 16.666666666666664%;
+ }
+ .note-editor .col-lg-push-1 {
+ left: 8.333333333333332%;
+ }
+ .note-editor .col-lg-offset-12 {
+ margin-left: 100%;
+ }
+ .note-editor .col-lg-offset-11 {
+ margin-left: 91.66666666666666%;
+ }
+ .note-editor .col-lg-offset-10 {
+ margin-left: 83.33333333333334%;
+ }
+ .note-editor .col-lg-offset-9 {
+ margin-left: 75%;
+ }
+ .note-editor .col-lg-offset-8 {
+ margin-left: 66.66666666666666%;
+ }
+ .note-editor .col-lg-offset-7 {
+ margin-left: 58.333333333333336%;
+ }
+ .note-editor .col-lg-offset-6 {
+ margin-left: 50%;
+ }
+ .note-editor .col-lg-offset-5 {
+ margin-left: 41.66666666666667%;
+ }
+ .note-editor .col-lg-offset-4 {
+ margin-left: 33.33333333333333%;
+ }
+ .note-editor .col-lg-offset-3 {
+ margin-left: 25%;
+ }
+ .note-editor .col-lg-offset-2 {
+ margin-left: 16.666666666666664%;
+ }
+ .note-editor .col-lg-offset-1 {
+ margin-left: 8.333333333333332%;
+ }
+}
+.note-editor table {
+ max-width: 100%;
+ background-color: transparent;
+}
+.note-editor th {
+ text-align: left;
+}
+.note-editor .table {
+ width: 100%;
+ margin-bottom: 20px;
+}
+.note-editor .table > thead > tr > th,
+.note-editor .table > tbody > tr > th,
+.note-editor .table > tfoot > tr > th,
+.note-editor .table > thead > tr > td,
+.note-editor .table > tbody > tr > td,
+.note-editor .table > tfoot > tr > td {
+ padding: 8px;
+ line-height: 1.428571429;
+ vertical-align: top;
+ border-top: 1px solid #dddddd;
+}
+.note-editor .table > thead > tr > th {
+ vertical-align: bottom;
+ border-bottom: 2px solid #dddddd;
+}
+.note-editor .table > caption + thead > tr:first-child > th,
+.note-editor .table > colgroup + thead > tr:first-child > th,
+.note-editor .table > thead:first-child > tr:first-child > th,
+.note-editor .table > caption + thead > tr:first-child > td,
+.note-editor .table > colgroup + thead > tr:first-child > td,
+.note-editor .table > thead:first-child > tr:first-child > td {
+ border-top: 0;
+}
+.note-editor .table > tbody + tbody {
+ border-top: 2px solid #dddddd;
+}
+.note-editor .table .table {
+ background-color: #ffffff;
+}
+.note-editor .table-condensed > thead > tr > th,
+.note-editor .table-condensed > tbody > tr > th,
+.note-editor .table-condensed > tfoot > tr > th,
+.note-editor .table-condensed > thead > tr > td,
+.note-editor .table-condensed > tbody > tr > td,
+.note-editor .table-condensed > tfoot > tr > td {
+ padding: 5px;
+}
+.note-editor .table-bordered {
+ border: 1px solid #dddddd;
+}
+.note-editor .table-bordered > thead > tr > th,
+.note-editor .table-bordered > tbody > tr > th,
+.note-editor .table-bordered > tfoot > tr > th,
+.note-editor .table-bordered > thead > tr > td,
+.note-editor .table-bordered > tbody > tr > td,
+.note-editor .table-bordered > tfoot > tr > td {
+ border: 1px solid #dddddd;
+}
+.note-editor .table-bordered > thead > tr > th,
+.note-editor .table-bordered > thead > tr > td {
+ border-bottom-width: 2px;
+}
+.note-editor .table-striped > tbody > tr:nth-child(odd) > td,
+.note-editor .table-striped > tbody > tr:nth-child(odd) > th {
+ background-color: #f9f9f9;
+}
+.note-editor .table-hover > tbody > tr:hover > td,
+.note-editor .table-hover > tbody > tr:hover > th {
+ background-color: #f5f5f5;
+}
+.note-editor table col[class*="col-"] {
+ float: none;
+ display: table-column;
+}
+.note-editor table td[class*="col-"],
+.note-editor table th[class*="col-"] {
+ float: none;
+ display: table-cell;
+}
+.note-editor .table > thead > tr > td.active,
+.note-editor .table > tbody > tr > td.active,
+.note-editor .table > tfoot > tr > td.active,
+.note-editor .table > thead > tr > th.active,
+.note-editor .table > tbody > tr > th.active,
+.note-editor .table > tfoot > tr > th.active,
+.note-editor .table > thead > tr.active > td,
+.note-editor .table > tbody > tr.active > td,
+.note-editor .table > tfoot > tr.active > td,
+.note-editor .table > thead > tr.active > th,
+.note-editor .table > tbody > tr.active > th,
+.note-editor .table > tfoot > tr.active > th {
+ background-color: #f5f5f5;
+}
+.note-editor .table > thead > tr > td.success,
+.note-editor .table > tbody > tr > td.success,
+.note-editor .table > tfoot > tr > td.success,
+.note-editor .table > thead > tr > th.success,
+.note-editor .table > tbody > tr > th.success,
+.note-editor .table > tfoot > tr > th.success,
+.note-editor .table > thead > tr.success > td,
+.note-editor .table > tbody > tr.success > td,
+.note-editor .table > tfoot > tr.success > td,
+.note-editor .table > thead > tr.success > th,
+.note-editor .table > tbody > tr.success > th,
+.note-editor .table > tfoot > tr.success > th {
+ background-color: #dff0d8;
+ border-color: #d6e9c6;
+}
+.note-editor .table-hover > tbody > tr > td.success:hover,
+.note-editor .table-hover > tbody > tr > th.success:hover,
+.note-editor .table-hover > tbody > tr.success:hover > td,
+.note-editor .table-hover > tbody > tr.success:hover > th {
+ background-color: #d0e9c6;
+ border-color: #c9e2b3;
+}
+.note-editor .table > thead > tr > td.danger,
+.note-editor .table > tbody > tr > td.danger,
+.note-editor .table > tfoot > tr > td.danger,
+.note-editor .table > thead > tr > th.danger,
+.note-editor .table > tbody > tr > th.danger,
+.note-editor .table > tfoot > tr > th.danger,
+.note-editor .table > thead > tr.danger > td,
+.note-editor .table > tbody > tr.danger > td,
+.note-editor .table > tfoot > tr.danger > td,
+.note-editor .table > thead > tr.danger > th,
+.note-editor .table > tbody > tr.danger > th,
+.note-editor .table > tfoot > tr.danger > th {
+ background-color: #f2dede;
+ border-color: #ebccd1;
+}
+.note-editor .table-hover > tbody > tr > td.danger:hover,
+.note-editor .table-hover > tbody > tr > th.danger:hover,
+.note-editor .table-hover > tbody > tr.danger:hover > td,
+.note-editor .table-hover > tbody > tr.danger:hover > th {
+ background-color: #ebcccc;
+ border-color: #e4b9c0;
+}
+.note-editor .table > thead > tr > td.warning,
+.note-editor .table > tbody > tr > td.warning,
+.note-editor .table > tfoot > tr > td.warning,
+.note-editor .table > thead > tr > th.warning,
+.note-editor .table > tbody > tr > th.warning,
+.note-editor .table > tfoot > tr > th.warning,
+.note-editor .table > thead > tr.warning > td,
+.note-editor .table > tbody > tr.warning > td,
+.note-editor .table > tfoot > tr.warning > td,
+.note-editor .table > thead > tr.warning > th,
+.note-editor .table > tbody > tr.warning > th,
+.note-editor .table > tfoot > tr.warning > th {
+ background-color: #fcf8e3;
+ border-color: #faebcc;
+}
+.note-editor .table-hover > tbody > tr > td.warning:hover,
+.note-editor .table-hover > tbody > tr > th.warning:hover,
+.note-editor .table-hover > tbody > tr.warning:hover > td,
+.note-editor .table-hover > tbody > tr.warning:hover > th {
+ background-color: #faf2cc;
+ border-color: #f7e1b5;
+}
+@media (max-width: 767px) {
+ .note-editor .table-responsive {
+ width: 100%;
+ margin-bottom: 15px;
+ overflow-y: hidden;
+ overflow-x: scroll;
+ -ms-overflow-style: -ms-autohiding-scrollbar;
+ border: 1px solid #dddddd;
+ -webkit-overflow-scrolling: touch;
+ }
+ .note-editor .table-responsive > .table {
+ margin-bottom: 0;
+ }
+ .note-editor .table-responsive > .table > thead > tr > th,
+ .note-editor .table-responsive > .table > tbody > tr > th,
+ .note-editor .table-responsive > .table > tfoot > tr > th,
+ .note-editor .table-responsive > .table > thead > tr > td,
+ .note-editor .table-responsive > .table > tbody > tr > td,
+ .note-editor .table-responsive > .table > tfoot > tr > td {
+ white-space: nowrap;
+ }
+ .note-editor .table-responsive > .table-bordered {
+ border: 0;
+ }
+ .note-editor .table-responsive > .table-bordered > thead > tr > th:first-child,
+ .note-editor .table-responsive > .table-bordered > tbody > tr > th:first-child,
+ .note-editor .table-responsive > .table-bordered > tfoot > tr > th:first-child,
+ .note-editor .table-responsive > .table-bordered > thead > tr > td:first-child,
+ .note-editor .table-responsive > .table-bordered > tbody > tr > td:first-child,
+ .note-editor .table-responsive > .table-bordered > tfoot > tr > td:first-child {
+ border-left: 0;
+ }
+ .note-editor .table-responsive > .table-bordered > thead > tr > th:last-child,
+ .note-editor .table-responsive > .table-bordered > tbody > tr > th:last-child,
+ .note-editor .table-responsive > .table-bordered > tfoot > tr > th:last-child,
+ .note-editor .table-responsive > .table-bordered > thead > tr > td:last-child,
+ .note-editor .table-responsive > .table-bordered > tbody > tr > td:last-child,
+ .note-editor .table-responsive > .table-bordered > tfoot > tr > td:last-child {
+ border-right: 0;
+ }
+ .note-editor .table-responsive > .table-bordered > tbody > tr:last-child > th,
+ .note-editor .table-responsive > .table-bordered > tfoot > tr:last-child > th,
+ .note-editor .table-responsive > .table-bordered > tbody > tr:last-child > td,
+ .note-editor .table-responsive > .table-bordered > tfoot > tr:last-child > td {
+ border-bottom: 0;
+ }
+}
+.note-editor fieldset {
+ padding: 0;
+ margin: 0;
+ border: 0;
+}
+.note-editor legend {
+ display: block;
+ width: 100%;
+ padding: 0;
+ margin-bottom: 20px;
+ font-size: 21px;
+ line-height: inherit;
+ color: #333333;
+ border: 0;
+ border-bottom: 1px solid #e5e5e5;
+}
+.note-editor label {
+ display: inline-block;
+ margin-bottom: 5px;
+ font-weight: bold;
+}
+.note-editor input[type="search"] {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.note-editor input[type="radio"],
+.note-editor input[type="checkbox"] {
+ margin: 4px 0 0;
+ margin-top: 1px \9;
+ /* IE8-9 */
+
+ line-height: normal;
+}
+.note-editor input[type="file"] {
+ display: block;
+}
+.note-editor select[multiple],
+.note-editor select[size] {
+ height: auto;
+}
+.note-editor select optgroup {
+ font-size: inherit;
+ font-style: inherit;
+ font-family: inherit;
+}
+.note-editor input[type="file"]:focus,
+.note-editor input[type="radio"]:focus,
+.note-editor input[type="checkbox"]:focus {
+ outline: thin dotted #333;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+.note-editor input[type="number"]::-webkit-outer-spin-button,
+.note-editor input[type="number"]::-webkit-inner-spin-button {
+ height: auto;
+}
+.note-editor output {
+ display: block;
+ padding-top: 7px;
+ font-size: 14px;
+ line-height: 1.428571429;
+ color: #555555;
+ vertical-align: middle;
+}
+.note-editor .form-control:-moz-placeholder {
+ color: #999999;
+}
+.note-editor .form-control::-moz-placeholder {
+ color: #999999;
+}
+.note-editor .form-control:-ms-input-placeholder {
+ color: #999999;
+}
+.note-editor .form-control::-webkit-input-placeholder {
+ color: #999999;
+}
+.note-editor .form-control {
+ display: block;
+ width: 100%;
+ height: 34px;
+ padding: 6px 12px;
+ font-size: 14px;
+ line-height: 1.428571429;
+ color: #555555;
+ vertical-align: middle;
+ background-color: #ffffff;
+ background-image: none;
+ border: 1px solid #cccccc;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+ transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+}
+.note-editor .form-control:focus {
+ border-color: #66afe9;
+ outline: 0;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
+ box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
+}
+.note-editor .form-control[disabled],
+.note-editor .form-control[readonly],
+fieldset[disabled] .note-editor .form-control {
+ cursor: not-allowed;
+ background-color: #eeeeee;
+}
+textarea.note-editor .form-control {
+ height: auto;
+}
+.note-editor .form-group {
+ margin-bottom: 15px;
+}
+.note-editor .radio,
+.note-editor .checkbox {
+ display: block;
+ min-height: 20px;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ padding-left: 20px;
+ vertical-align: middle;
+}
+.note-editor .radio label,
+.note-editor .checkbox label {
+ display: inline;
+ margin-bottom: 0;
+ font-weight: normal;
+ cursor: pointer;
+}
+.note-editor .radio input[type="radio"],
+.note-editor .radio-inline input[type="radio"],
+.note-editor .checkbox input[type="checkbox"],
+.note-editor .checkbox-inline input[type="checkbox"] {
+ float: left;
+ margin-left: -20px;
+}
+.note-editor .radio + .radio,
+.note-editor .checkbox + .checkbox {
+ margin-top: -5px;
+}
+.note-editor .radio-inline,
+.note-editor .checkbox-inline {
+ display: inline-block;
+ padding-left: 20px;
+ margin-bottom: 0;
+ vertical-align: middle;
+ font-weight: normal;
+ cursor: pointer;
+}
+.note-editor .radio-inline + .radio-inline,
+.note-editor .checkbox-inline + .checkbox-inline {
+ margin-top: 0;
+ margin-left: 10px;
+}
+.note-editor input[type="radio"][disabled],
+.note-editor input[type="checkbox"][disabled],
+.note-editor .radio[disabled],
+.note-editor .radio-inline[disabled],
+.note-editor .checkbox[disabled],
+.note-editor .checkbox-inline[disabled],
+fieldset[disabled] .note-editor input[type="radio"],
+fieldset[disabled] .note-editor input[type="checkbox"],
+fieldset[disabled] .note-editor .radio,
+fieldset[disabled] .note-editor .radio-inline,
+fieldset[disabled] .note-editor .checkbox,
+fieldset[disabled] .note-editor .checkbox-inline {
+ cursor: not-allowed;
+}
+.note-editor .input-sm {
+ height: 30px;
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+select.note-editor .input-sm {
+ height: 30px;
+ line-height: 30px;
+}
+textarea.note-editor .input-sm {
+ height: auto;
+}
+.note-editor .input-lg {
+ height: 45px;
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.33;
+ border-radius: 6px;
+}
+select.note-editor .input-lg {
+ height: 45px;
+ line-height: 45px;
+}
+textarea.note-editor .input-lg {
+ height: auto;
+}
+.note-editor .has-warning .help-block,
+.note-editor .has-warning .control-label {
+ color: #c09853;
+}
+.note-editor .has-warning .form-control {
+ border-color: #c09853;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+.note-editor .has-warning .form-control:focus {
+ border-color: #a47e3c;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+}
+.note-editor .has-warning .input-group-addon {
+ color: #c09853;
+ border-color: #c09853;
+ background-color: #fcf8e3;
+}
+.note-editor .has-error .help-block,
+.note-editor .has-error .control-label {
+ color: #b94a48;
+}
+.note-editor .has-error .form-control {
+ border-color: #b94a48;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+.note-editor .has-error .form-control:focus {
+ border-color: #953b39;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+}
+.note-editor .has-error .input-group-addon {
+ color: #b94a48;
+ border-color: #b94a48;
+ background-color: #f2dede;
+}
+.note-editor .has-success .help-block,
+.note-editor .has-success .control-label {
+ color: #468847;
+}
+.note-editor .has-success .form-control {
+ border-color: #468847;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+.note-editor .has-success .form-control:focus {
+ border-color: #356635;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+}
+.note-editor .has-success .input-group-addon {
+ color: #468847;
+ border-color: #468847;
+ background-color: #dff0d8;
+}
+.note-editor .form-control-static {
+ margin-bottom: 0;
+}
+.note-editor .help-block {
+ display: block;
+ margin-top: 5px;
+ margin-bottom: 10px;
+ color: #737373;
+}
+@media (min-width: 768px) {
+ .note-editor .form-inline .form-group {
+ display: inline-block;
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .note-editor .form-inline .form-control {
+ display: inline-block;
+ }
+ .note-editor .form-inline .radio,
+ .note-editor .form-inline .checkbox {
+ display: inline-block;
+ margin-top: 0;
+ margin-bottom: 0;
+ padding-left: 0;
+ }
+ .note-editor .form-inline .radio input[type="radio"],
+ .note-editor .form-inline .checkbox input[type="checkbox"] {
+ float: none;
+ margin-left: 0;
+ }
+}
+.note-editor .form-horizontal .control-label,
+.note-editor .form-horizontal .radio,
+.note-editor .form-horizontal .checkbox,
+.note-editor .form-horizontal .radio-inline,
+.note-editor .form-horizontal .checkbox-inline {
+ margin-top: 0;
+ margin-bottom: 0;
+ padding-top: 7px;
+}
+.note-editor .form-horizontal .form-group {
+ margin-left: -15px;
+ margin-right: -15px;
+}
+.note-editor .form-horizontal .form-group:before,
+.note-editor .form-horizontal .form-group:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .form-horizontal .form-group:after {
+ clear: both;
+}
+.note-editor .form-horizontal .form-group:before,
+.note-editor .form-horizontal .form-group:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .form-horizontal .form-group:after {
+ clear: both;
+}
+.note-editor .form-horizontal .form-control-static {
+ padding-top: 7px;
+}
+@media (min-width: 768px) {
+ .note-editor .form-horizontal .control-label {
+ text-align: right;
+ }
+}
+.note-editor .btn {
+ display: inline-block;
+ margin-bottom: 0;
+ font-weight: normal;
+ text-align: center;
+ vertical-align: middle;
+ cursor: pointer;
+ background-image: none;
+ border: 1px solid transparent;
+ white-space: nowrap;
+ padding: 6px 12px;
+ font-size: 14px;
+ line-height: 1.428571429;
+ border-radius: 4px;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ -o-user-select: none;
+ user-select: none;
+}
+.note-editor .btn:focus {
+ outline: thin dotted #333;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+.note-editor .btn:hover,
+.note-editor .btn:focus {
+ color: #333333;
+ text-decoration: none;
+}
+.note-editor .btn:active,
+.note-editor .btn.active {
+ outline: 0;
+ background-image: none;
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+}
+.note-editor .btn.disabled,
+.note-editor .btn[disabled],
+fieldset[disabled] .note-editor .btn {
+ cursor: not-allowed;
+ pointer-events: none;
+ opacity: 0.65;
+ filter: alpha(opacity=65);
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.note-editor .btn-default {
+ color: #333333;
+ background-color: #ffffff;
+ border-color: #cccccc;
+}
+.note-editor .btn-default:hover,
+.note-editor .btn-default:focus,
+.note-editor .btn-default:active,
+.note-editor .btn-default.active,
+.open .dropdown-toggle.note-editor .btn-default {
+ color: #333333;
+ background-color: #ebebeb;
+ border-color: #adadad;
+}
+.note-editor .btn-default:active,
+.note-editor .btn-default.active,
+.open .dropdown-toggle.note-editor .btn-default {
+ background-image: none;
+}
+.note-editor .btn-default.disabled,
+.note-editor .btn-default[disabled],
+fieldset[disabled] .note-editor .btn-default,
+.note-editor .btn-default.disabled:hover,
+.note-editor .btn-default[disabled]:hover,
+fieldset[disabled] .note-editor .btn-default:hover,
+.note-editor .btn-default.disabled:focus,
+.note-editor .btn-default[disabled]:focus,
+fieldset[disabled] .note-editor .btn-default:focus,
+.note-editor .btn-default.disabled:active,
+.note-editor .btn-default[disabled]:active,
+fieldset[disabled] .note-editor .btn-default:active,
+.note-editor .btn-default.disabled.active,
+.note-editor .btn-default[disabled].active,
+fieldset[disabled] .note-editor .btn-default.active {
+ background-color: #ffffff;
+ border-color: #cccccc;
+}
+.note-editor .btn-primary {
+ color: #ffffff;
+ background-color: #428bca;
+ border-color: #357ebd;
+}
+.note-editor .btn-primary:hover,
+.note-editor .btn-primary:focus,
+.note-editor .btn-primary:active,
+.note-editor .btn-primary.active,
+.open .dropdown-toggle.note-editor .btn-primary {
+ color: #ffffff;
+ background-color: #3276b1;
+ border-color: #285e8e;
+}
+.note-editor .btn-primary:active,
+.note-editor .btn-primary.active,
+.open .dropdown-toggle.note-editor .btn-primary {
+ background-image: none;
+}
+.note-editor .btn-primary.disabled,
+.note-editor .btn-primary[disabled],
+fieldset[disabled] .note-editor .btn-primary,
+.note-editor .btn-primary.disabled:hover,
+.note-editor .btn-primary[disabled]:hover,
+fieldset[disabled] .note-editor .btn-primary:hover,
+.note-editor .btn-primary.disabled:focus,
+.note-editor .btn-primary[disabled]:focus,
+fieldset[disabled] .note-editor .btn-primary:focus,
+.note-editor .btn-primary.disabled:active,
+.note-editor .btn-primary[disabled]:active,
+fieldset[disabled] .note-editor .btn-primary:active,
+.note-editor .btn-primary.disabled.active,
+.note-editor .btn-primary[disabled].active,
+fieldset[disabled] .note-editor .btn-primary.active {
+ background-color: #428bca;
+ border-color: #357ebd;
+}
+.note-editor .btn-warning {
+ color: #ffffff;
+ background-color: #f0ad4e;
+ border-color: #eea236;
+}
+.note-editor .btn-warning:hover,
+.note-editor .btn-warning:focus,
+.note-editor .btn-warning:active,
+.note-editor .btn-warning.active,
+.open .dropdown-toggle.note-editor .btn-warning {
+ color: #ffffff;
+ background-color: #ed9c28;
+ border-color: #d58512;
+}
+.note-editor .btn-warning:active,
+.note-editor .btn-warning.active,
+.open .dropdown-toggle.note-editor .btn-warning {
+ background-image: none;
+}
+.note-editor .btn-warning.disabled,
+.note-editor .btn-warning[disabled],
+fieldset[disabled] .note-editor .btn-warning,
+.note-editor .btn-warning.disabled:hover,
+.note-editor .btn-warning[disabled]:hover,
+fieldset[disabled] .note-editor .btn-warning:hover,
+.note-editor .btn-warning.disabled:focus,
+.note-editor .btn-warning[disabled]:focus,
+fieldset[disabled] .note-editor .btn-warning:focus,
+.note-editor .btn-warning.disabled:active,
+.note-editor .btn-warning[disabled]:active,
+fieldset[disabled] .note-editor .btn-warning:active,
+.note-editor .btn-warning.disabled.active,
+.note-editor .btn-warning[disabled].active,
+fieldset[disabled] .note-editor .btn-warning.active {
+ background-color: #f0ad4e;
+ border-color: #eea236;
+}
+.note-editor .btn-danger {
+ color: #ffffff;
+ background-color: #d9534f;
+ border-color: #d43f3a;
+}
+.note-editor .btn-danger:hover,
+.note-editor .btn-danger:focus,
+.note-editor .btn-danger:active,
+.note-editor .btn-danger.active,
+.open .dropdown-toggle.note-editor .btn-danger {
+ color: #ffffff;
+ background-color: #d2322d;
+ border-color: #ac2925;
+}
+.note-editor .btn-danger:active,
+.note-editor .btn-danger.active,
+.open .dropdown-toggle.note-editor .btn-danger {
+ background-image: none;
+}
+.note-editor .btn-danger.disabled,
+.note-editor .btn-danger[disabled],
+fieldset[disabled] .note-editor .btn-danger,
+.note-editor .btn-danger.disabled:hover,
+.note-editor .btn-danger[disabled]:hover,
+fieldset[disabled] .note-editor .btn-danger:hover,
+.note-editor .btn-danger.disabled:focus,
+.note-editor .btn-danger[disabled]:focus,
+fieldset[disabled] .note-editor .btn-danger:focus,
+.note-editor .btn-danger.disabled:active,
+.note-editor .btn-danger[disabled]:active,
+fieldset[disabled] .note-editor .btn-danger:active,
+.note-editor .btn-danger.disabled.active,
+.note-editor .btn-danger[disabled].active,
+fieldset[disabled] .note-editor .btn-danger.active {
+ background-color: #d9534f;
+ border-color: #d43f3a;
+}
+.note-editor .btn-success {
+ color: #ffffff;
+ background-color: #5cb85c;
+ border-color: #4cae4c;
+}
+.note-editor .btn-success:hover,
+.note-editor .btn-success:focus,
+.note-editor .btn-success:active,
+.note-editor .btn-success.active,
+.open .dropdown-toggle.note-editor .btn-success {
+ color: #ffffff;
+ background-color: #47a447;
+ border-color: #398439;
+}
+.note-editor .btn-success:active,
+.note-editor .btn-success.active,
+.open .dropdown-toggle.note-editor .btn-success {
+ background-image: none;
+}
+.note-editor .btn-success.disabled,
+.note-editor .btn-success[disabled],
+fieldset[disabled] .note-editor .btn-success,
+.note-editor .btn-success.disabled:hover,
+.note-editor .btn-success[disabled]:hover,
+fieldset[disabled] .note-editor .btn-success:hover,
+.note-editor .btn-success.disabled:focus,
+.note-editor .btn-success[disabled]:focus,
+fieldset[disabled] .note-editor .btn-success:focus,
+.note-editor .btn-success.disabled:active,
+.note-editor .btn-success[disabled]:active,
+fieldset[disabled] .note-editor .btn-success:active,
+.note-editor .btn-success.disabled.active,
+.note-editor .btn-success[disabled].active,
+fieldset[disabled] .note-editor .btn-success.active {
+ background-color: #5cb85c;
+ border-color: #4cae4c;
+}
+.note-editor .btn-info {
+ color: #ffffff;
+ background-color: #5bc0de;
+ border-color: #46b8da;
+}
+.note-editor .btn-info:hover,
+.note-editor .btn-info:focus,
+.note-editor .btn-info:active,
+.note-editor .btn-info.active,
+.open .dropdown-toggle.note-editor .btn-info {
+ color: #ffffff;
+ background-color: #39b3d7;
+ border-color: #269abc;
+}
+.note-editor .btn-info:active,
+.note-editor .btn-info.active,
+.open .dropdown-toggle.note-editor .btn-info {
+ background-image: none;
+}
+.note-editor .btn-info.disabled,
+.note-editor .btn-info[disabled],
+fieldset[disabled] .note-editor .btn-info,
+.note-editor .btn-info.disabled:hover,
+.note-editor .btn-info[disabled]:hover,
+fieldset[disabled] .note-editor .btn-info:hover,
+.note-editor .btn-info.disabled:focus,
+.note-editor .btn-info[disabled]:focus,
+fieldset[disabled] .note-editor .btn-info:focus,
+.note-editor .btn-info.disabled:active,
+.note-editor .btn-info[disabled]:active,
+fieldset[disabled] .note-editor .btn-info:active,
+.note-editor .btn-info.disabled.active,
+.note-editor .btn-info[disabled].active,
+fieldset[disabled] .note-editor .btn-info.active {
+ background-color: #5bc0de;
+ border-color: #46b8da;
+}
+.note-editor .btn-link {
+ color: #428bca;
+ font-weight: normal;
+ cursor: pointer;
+ border-radius: 0;
+}
+.note-editor .btn-link,
+.note-editor .btn-link:active,
+.note-editor .btn-link[disabled],
+fieldset[disabled] .note-editor .btn-link {
+ background-color: transparent;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.note-editor .btn-link,
+.note-editor .btn-link:hover,
+.note-editor .btn-link:focus,
+.note-editor .btn-link:active {
+ border-color: transparent;
+}
+.note-editor .btn-link:hover,
+.note-editor .btn-link:focus {
+ color: #2a6496;
+ text-decoration: underline;
+ background-color: transparent;
+}
+.note-editor .btn-link[disabled]:hover,
+fieldset[disabled] .note-editor .btn-link:hover,
+.note-editor .btn-link[disabled]:focus,
+fieldset[disabled] .note-editor .btn-link:focus {
+ color: #999999;
+ text-decoration: none;
+}
+.note-editor .btn-lg {
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.33;
+ border-radius: 6px;
+}
+.note-editor .btn-sm,
+.note-editor .btn-xs {
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+.note-editor .btn-xs {
+ padding: 1px 5px;
+}
+.note-editor .btn-block {
+ display: block;
+ width: 100%;
+ padding-left: 0;
+ padding-right: 0;
+}
+.note-editor .btn-block + .btn-block {
+ margin-top: 5px;
+}
+.note-editor input[type="submit"].btn-block,
+.note-editor input[type="reset"].btn-block,
+.note-editor input[type="button"].btn-block {
+ width: 100%;
+}
+.note-editor .fade {
+ opacity: 0;
+ -webkit-transition: opacity 0.15s linear;
+ transition: opacity 0.15s linear;
+}
+.note-editor .fade.in {
+ opacity: 1;
+}
+.note-editor .collapse {
+ display: none;
+}
+.note-editor .collapse.in {
+ display: block;
+}
+.note-editor .collapsing {
+ position: relative;
+ height: 0;
+ overflow: hidden;
+ -webkit-transition: height 0.35s ease;
+ transition: height 0.35s ease;
+}
+@font-face {
+ font-family: 'Glyphicons Halflings';
+ src: url('../fonts/glyphicons-halflings-regular.eot');
+ src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
+}
+.note-editor .glyphicon {
+ position: relative;
+ top: 1px;
+ display: inline-block;
+ font-family: 'Glyphicons Halflings';
+ font-style: normal;
+ font-weight: normal;
+ line-height: 1;
+ -webkit-font-smoothing: antialiased;
+}
+.note-editor .glyphicon:empty {
+ width: 1em;
+}
+.note-editor .glyphicon-asterisk:before {
+ content: "\2a";
+}
+.note-editor .glyphicon-plus:before {
+ content: "\2b";
+}
+.note-editor .glyphicon-euro:before {
+ content: "\20ac";
+}
+.note-editor .glyphicon-minus:before {
+ content: "\2212";
+}
+.note-editor .glyphicon-cloud:before {
+ content: "\2601";
+}
+.note-editor .glyphicon-envelope:before {
+ content: "\2709";
+}
+.note-editor .glyphicon-pencil:before {
+ content: "\270f";
+}
+.note-editor .glyphicon-glass:before {
+ content: "\e001";
+}
+.note-editor .glyphicon-music:before {
+ content: "\e002";
+}
+.note-editor .glyphicon-search:before {
+ content: "\e003";
+}
+.note-editor .glyphicon-heart:before {
+ content: "\e005";
+}
+.note-editor .glyphicon-star:before {
+ content: "\e006";
+}
+.note-editor .glyphicon-star-empty:before {
+ content: "\e007";
+}
+.note-editor .glyphicon-user:before {
+ content: "\e008";
+}
+.note-editor .glyphicon-film:before {
+ content: "\e009";
+}
+.note-editor .glyphicon-th-large:before {
+ content: "\e010";
+}
+.note-editor .glyphicon-th:before {
+ content: "\e011";
+}
+.note-editor .glyphicon-th-list:before {
+ content: "\e012";
+}
+.note-editor .glyphicon-ok:before {
+ content: "\e013";
+}
+.note-editor .glyphicon-remove:before {
+ content: "\e014";
+}
+.note-editor .glyphicon-zoom-in:before {
+ content: "\e015";
+}
+.note-editor .glyphicon-zoom-out:before {
+ content: "\e016";
+}
+.note-editor .glyphicon-off:before {
+ content: "\e017";
+}
+.note-editor .glyphicon-signal:before {
+ content: "\e018";
+}
+.note-editor .glyphicon-cog:before {
+ content: "\e019";
+}
+.note-editor .glyphicon-trash:before {
+ content: "\e020";
+}
+.note-editor .glyphicon-home:before {
+ content: "\e021";
+}
+.note-editor .glyphicon-file:before {
+ content: "\e022";
+}
+.note-editor .glyphicon-time:before {
+ content: "\e023";
+}
+.note-editor .glyphicon-road:before {
+ content: "\e024";
+}
+.note-editor .glyphicon-download-alt:before {
+ content: "\e025";
+}
+.note-editor .glyphicon-download:before {
+ content: "\e026";
+}
+.note-editor .glyphicon-upload:before {
+ content: "\e027";
+}
+.note-editor .glyphicon-inbox:before {
+ content: "\e028";
+}
+.note-editor .glyphicon-play-circle:before {
+ content: "\e029";
+}
+.note-editor .glyphicon-repeat:before {
+ content: "\e030";
+}
+.note-editor .glyphicon-refresh:before {
+ content: "\e031";
+}
+.note-editor .glyphicon-list-alt:before {
+ content: "\e032";
+}
+.note-editor .glyphicon-lock:before {
+ content: "\e033";
+}
+.note-editor .glyphicon-flag:before {
+ content: "\e034";
+}
+.note-editor .glyphicon-headphones:before {
+ content: "\e035";
+}
+.note-editor .glyphicon-volume-off:before {
+ content: "\e036";
+}
+.note-editor .glyphicon-volume-down:before {
+ content: "\e037";
+}
+.note-editor .glyphicon-volume-up:before {
+ content: "\e038";
+}
+.note-editor .glyphicon-qrcode:before {
+ content: "\e039";
+}
+.note-editor .glyphicon-barcode:before {
+ content: "\e040";
+}
+.note-editor .glyphicon-tag:before {
+ content: "\e041";
+}
+.note-editor .glyphicon-tags:before {
+ content: "\e042";
+}
+.note-editor .glyphicon-book:before {
+ content: "\e043";
+}
+.note-editor .glyphicon-bookmark:before {
+ content: "\e044";
+}
+.note-editor .glyphicon-print:before {
+ content: "\e045";
+}
+.note-editor .glyphicon-camera:before {
+ content: "\e046";
+}
+.note-editor .glyphicon-font:before {
+ content: "\e047";
+}
+.note-editor .glyphicon-bold:before {
+ content: "\e048";
+}
+.note-editor .glyphicon-italic:before {
+ content: "\e049";
+}
+.note-editor .glyphicon-text-height:before {
+ content: "\e050";
+}
+.note-editor .glyphicon-text-width:before {
+ content: "\e051";
+}
+.note-editor .glyphicon-align-left:before {
+ content: "\e052";
+}
+.note-editor .glyphicon-align-center:before {
+ content: "\e053";
+}
+.note-editor .glyphicon-align-right:before {
+ content: "\e054";
+}
+.note-editor .glyphicon-align-justify:before {
+ content: "\e055";
+}
+.note-editor .glyphicon-list:before {
+ content: "\e056";
+}
+.note-editor .glyphicon-indent-left:before {
+ content: "\e057";
+}
+.note-editor .glyphicon-indent-right:before {
+ content: "\e058";
+}
+.note-editor .glyphicon-facetime-video:before {
+ content: "\e059";
+}
+.note-editor .glyphicon-picture:before {
+ content: "\e060";
+}
+.note-editor .glyphicon-map-marker:before {
+ content: "\e062";
+}
+.note-editor .glyphicon-adjust:before {
+ content: "\e063";
+}
+.note-editor .glyphicon-tint:before {
+ content: "\e064";
+}
+.note-editor .glyphicon-edit:before {
+ content: "\e065";
+}
+.note-editor .glyphicon-share:before {
+ content: "\e066";
+}
+.note-editor .glyphicon-check:before {
+ content: "\e067";
+}
+.note-editor .glyphicon-move:before {
+ content: "\e068";
+}
+.note-editor .glyphicon-step-backward:before {
+ content: "\e069";
+}
+.note-editor .glyphicon-fast-backward:before {
+ content: "\e070";
+}
+.note-editor .glyphicon-backward:before {
+ content: "\e071";
+}
+.note-editor .glyphicon-play:before {
+ content: "\e072";
+}
+.note-editor .glyphicon-pause:before {
+ content: "\e073";
+}
+.note-editor .glyphicon-stop:before {
+ content: "\e074";
+}
+.note-editor .glyphicon-forward:before {
+ content: "\e075";
+}
+.note-editor .glyphicon-fast-forward:before {
+ content: "\e076";
+}
+.note-editor .glyphicon-step-forward:before {
+ content: "\e077";
+}
+.note-editor .glyphicon-eject:before {
+ content: "\e078";
+}
+.note-editor .glyphicon-chevron-left:before {
+ content: "\e079";
+}
+.note-editor .glyphicon-chevron-right:before {
+ content: "\e080";
+}
+.note-editor .glyphicon-plus-sign:before {
+ content: "\e081";
+}
+.note-editor .glyphicon-minus-sign:before {
+ content: "\e082";
+}
+.note-editor .glyphicon-remove-sign:before {
+ content: "\e083";
+}
+.note-editor .glyphicon-ok-sign:before {
+ content: "\e084";
+}
+.note-editor .glyphicon-question-sign:before {
+ content: "\e085";
+}
+.note-editor .glyphicon-info-sign:before {
+ content: "\e086";
+}
+.note-editor .glyphicon-screenshot:before {
+ content: "\e087";
+}
+.note-editor .glyphicon-remove-circle:before {
+ content: "\e088";
+}
+.note-editor .glyphicon-ok-circle:before {
+ content: "\e089";
+}
+.note-editor .glyphicon-ban-circle:before {
+ content: "\e090";
+}
+.note-editor .glyphicon-arrow-left:before {
+ content: "\e091";
+}
+.note-editor .glyphicon-arrow-right:before {
+ content: "\e092";
+}
+.note-editor .glyphicon-arrow-up:before {
+ content: "\e093";
+}
+.note-editor .glyphicon-arrow-down:before {
+ content: "\e094";
+}
+.note-editor .glyphicon-share-alt:before {
+ content: "\e095";
+}
+.note-editor .glyphicon-resize-full:before {
+ content: "\e096";
+}
+.note-editor .glyphicon-resize-small:before {
+ content: "\e097";
+}
+.note-editor .glyphicon-exclamation-sign:before {
+ content: "\e101";
+}
+.note-editor .glyphicon-gift:before {
+ content: "\e102";
+}
+.note-editor .glyphicon-leaf:before {
+ content: "\e103";
+}
+.note-editor .glyphicon-fire:before {
+ content: "\e104";
+}
+.note-editor .glyphicon-eye-open:before {
+ content: "\e105";
+}
+.note-editor .glyphicon-eye-close:before {
+ content: "\e106";
+}
+.note-editor .glyphicon-warning-sign:before {
+ content: "\e107";
+}
+.note-editor .glyphicon-plane:before {
+ content: "\e108";
+}
+.note-editor .glyphicon-calendar:before {
+ content: "\e109";
+}
+.note-editor .glyphicon-random:before {
+ content: "\e110";
+}
+.note-editor .glyphicon-comment:before {
+ content: "\e111";
+}
+.note-editor .glyphicon-magnet:before {
+ content: "\e112";
+}
+.note-editor .glyphicon-chevron-up:before {
+ content: "\e113";
+}
+.note-editor .glyphicon-chevron-down:before {
+ content: "\e114";
+}
+.note-editor .glyphicon-retweet:before {
+ content: "\e115";
+}
+.note-editor .glyphicon-shopping-cart:before {
+ content: "\e116";
+}
+.note-editor .glyphicon-folder-close:before {
+ content: "\e117";
+}
+.note-editor .glyphicon-folder-open:before {
+ content: "\e118";
+}
+.note-editor .glyphicon-resize-vertical:before {
+ content: "\e119";
+}
+.note-editor .glyphicon-resize-horizontal:before {
+ content: "\e120";
+}
+.note-editor .glyphicon-hdd:before {
+ content: "\e121";
+}
+.note-editor .glyphicon-bullhorn:before {
+ content: "\e122";
+}
+.note-editor .glyphicon-bell:before {
+ content: "\e123";
+}
+.note-editor .glyphicon-certificate:before {
+ content: "\e124";
+}
+.note-editor .glyphicon-thumbs-up:before {
+ content: "\e125";
+}
+.note-editor .glyphicon-thumbs-down:before {
+ content: "\e126";
+}
+.note-editor .glyphicon-hand-right:before {
+ content: "\e127";
+}
+.note-editor .glyphicon-hand-left:before {
+ content: "\e128";
+}
+.note-editor .glyphicon-hand-up:before {
+ content: "\e129";
+}
+.note-editor .glyphicon-hand-down:before {
+ content: "\e130";
+}
+.note-editor .glyphicon-circle-arrow-right:before {
+ content: "\e131";
+}
+.note-editor .glyphicon-circle-arrow-left:before {
+ content: "\e132";
+}
+.note-editor .glyphicon-circle-arrow-up:before {
+ content: "\e133";
+}
+.note-editor .glyphicon-circle-arrow-down:before {
+ content: "\e134";
+}
+.note-editor .glyphicon-globe:before {
+ content: "\e135";
+}
+.note-editor .glyphicon-wrench:before {
+ content: "\e136";
+}
+.note-editor .glyphicon-tasks:before {
+ content: "\e137";
+}
+.note-editor .glyphicon-filter:before {
+ content: "\e138";
+}
+.note-editor .glyphicon-briefcase:before {
+ content: "\e139";
+}
+.note-editor .glyphicon-fullscreen:before {
+ content: "\e140";
+}
+.note-editor .glyphicon-dashboard:before {
+ content: "\e141";
+}
+.note-editor .glyphicon-paperclip:before {
+ content: "\e142";
+}
+.note-editor .glyphicon-heart-empty:before {
+ content: "\e143";
+}
+.note-editor .glyphicon-link:before {
+ content: "\e144";
+}
+.note-editor .glyphicon-phone:before {
+ content: "\e145";
+}
+.note-editor .glyphicon-pushpin:before {
+ content: "\e146";
+}
+.note-editor .glyphicon-usd:before {
+ content: "\e148";
+}
+.note-editor .glyphicon-gbp:before {
+ content: "\e149";
+}
+.note-editor .glyphicon-sort:before {
+ content: "\e150";
+}
+.note-editor .glyphicon-sort-by-alphabet:before {
+ content: "\e151";
+}
+.note-editor .glyphicon-sort-by-alphabet-alt:before {
+ content: "\e152";
+}
+.note-editor .glyphicon-sort-by-order:before {
+ content: "\e153";
+}
+.note-editor .glyphicon-sort-by-order-alt:before {
+ content: "\e154";
+}
+.note-editor .glyphicon-sort-by-attributes:before {
+ content: "\e155";
+}
+.note-editor .glyphicon-sort-by-attributes-alt:before {
+ content: "\e156";
+}
+.note-editor .glyphicon-unchecked:before {
+ content: "\e157";
+}
+.note-editor .glyphicon-expand:before {
+ content: "\e158";
+}
+.note-editor .glyphicon-collapse-down:before {
+ content: "\e159";
+}
+.note-editor .glyphicon-collapse-up:before {
+ content: "\e160";
+}
+.note-editor .glyphicon-log-in:before {
+ content: "\e161";
+}
+.note-editor .glyphicon-flash:before {
+ content: "\e162";
+}
+.note-editor .glyphicon-log-out:before {
+ content: "\e163";
+}
+.note-editor .glyphicon-new-window:before {
+ content: "\e164";
+}
+.note-editor .glyphicon-record:before {
+ content: "\e165";
+}
+.note-editor .glyphicon-save:before {
+ content: "\e166";
+}
+.note-editor .glyphicon-open:before {
+ content: "\e167";
+}
+.note-editor .glyphicon-saved:before {
+ content: "\e168";
+}
+.note-editor .glyphicon-import:before {
+ content: "\e169";
+}
+.note-editor .glyphicon-export:before {
+ content: "\e170";
+}
+.note-editor .glyphicon-send:before {
+ content: "\e171";
+}
+.note-editor .glyphicon-floppy-disk:before {
+ content: "\e172";
+}
+.note-editor .glyphicon-floppy-saved:before {
+ content: "\e173";
+}
+.note-editor .glyphicon-floppy-remove:before {
+ content: "\e174";
+}
+.note-editor .glyphicon-floppy-save:before {
+ content: "\e175";
+}
+.note-editor .glyphicon-floppy-open:before {
+ content: "\e176";
+}
+.note-editor .glyphicon-credit-card:before {
+ content: "\e177";
+}
+.note-editor .glyphicon-transfer:before {
+ content: "\e178";
+}
+.note-editor .glyphicon-cutlery:before {
+ content: "\e179";
+}
+.note-editor .glyphicon-header:before {
+ content: "\e180";
+}
+.note-editor .glyphicon-compressed:before {
+ content: "\e181";
+}
+.note-editor .glyphicon-earphone:before {
+ content: "\e182";
+}
+.note-editor .glyphicon-phone-alt:before {
+ content: "\e183";
+}
+.note-editor .glyphicon-tower:before {
+ content: "\e184";
+}
+.note-editor .glyphicon-stats:before {
+ content: "\e185";
+}
+.note-editor .glyphicon-sd-video:before {
+ content: "\e186";
+}
+.note-editor .glyphicon-hd-video:before {
+ content: "\e187";
+}
+.note-editor .glyphicon-subtitles:before {
+ content: "\e188";
+}
+.note-editor .glyphicon-sound-stereo:before {
+ content: "\e189";
+}
+.note-editor .glyphicon-sound-dolby:before {
+ content: "\e190";
+}
+.note-editor .glyphicon-sound-5-1:before {
+ content: "\e191";
+}
+.note-editor .glyphicon-sound-6-1:before {
+ content: "\e192";
+}
+.note-editor .glyphicon-sound-7-1:before {
+ content: "\e193";
+}
+.note-editor .glyphicon-copyright-mark:before {
+ content: "\e194";
+}
+.note-editor .glyphicon-registration-mark:before {
+ content: "\e195";
+}
+.note-editor .glyphicon-cloud-download:before {
+ content: "\e197";
+}
+.note-editor .glyphicon-cloud-upload:before {
+ content: "\e198";
+}
+.note-editor .glyphicon-tree-conifer:before {
+ content: "\e199";
+}
+.note-editor .glyphicon-tree-deciduous:before {
+ content: "\e200";
+}
+.note-editor .caret {
+ display: inline-block;
+ width: 0;
+ height: 0;
+ margin-left: 2px;
+ vertical-align: middle;
+ border-top: 4px solid #000000;
+ border-right: 4px solid transparent;
+ border-left: 4px solid transparent;
+ border-bottom: 0 dotted;
+}
+.note-editor .dropdown {
+ position: relative;
+}
+.note-editor .dropdown-toggle:focus {
+ outline: 0;
+}
+.note-editor .dropdown-menu {
+ position: absolute;
+ top: 100%;
+ left: 0;
+ z-index: 1000;
+ display: none;
+ float: left;
+ min-width: 160px;
+ padding: 5px 0;
+ margin: 2px 0 0;
+ list-style: none;
+ font-size: 14px;
+ background-color: #ffffff;
+ border: 1px solid #cccccc;
+ border: 1px solid rgba(0, 0, 0, 0.15);
+ border-radius: 4px;
+ -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
+ background-clip: padding-box;
+}
+.note-editor .dropdown-menu.pull-right {
+ right: 0;
+ left: auto;
+}
+.note-editor .dropdown-menu .divider {
+ height: 1px;
+ margin: 9px 0;
+ overflow: hidden;
+ background-color: #e5e5e5;
+}
+.note-editor .dropdown-menu > li > a {
+ display: block;
+ padding: 3px 20px;
+ clear: both;
+ font-weight: normal;
+ line-height: 1.428571429;
+ color: #333333;
+ white-space: nowrap;
+}
+.note-editor .dropdown-menu > li > a:hover,
+.note-editor .dropdown-menu > li > a:focus {
+ text-decoration: none;
+ color: #262626;
+ background-color: #f5f5f5;
+}
+.note-editor .dropdown-menu > .active > a,
+.note-editor .dropdown-menu > .active > a:hover,
+.note-editor .dropdown-menu > .active > a:focus {
+ color: #ffffff;
+ text-decoration: none;
+ outline: 0;
+ background-color: #428bca;
+}
+.note-editor .dropdown-menu > .disabled > a,
+.note-editor .dropdown-menu > .disabled > a:hover,
+.note-editor .dropdown-menu > .disabled > a:focus {
+ color: #999999;
+}
+.note-editor .dropdown-menu > .disabled > a:hover,
+.note-editor .dropdown-menu > .disabled > a:focus {
+ text-decoration: none;
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+ cursor: not-allowed;
+}
+.note-editor .open > .dropdown-menu {
+ display: block;
+}
+.note-editor .open > a {
+ outline: 0;
+}
+.note-editor .dropdown-header {
+ display: block;
+ padding: 3px 20px;
+ font-size: 12px;
+ line-height: 1.428571429;
+ color: #999999;
+}
+.note-editor .dropdown-backdrop {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ top: 0;
+ z-index: 990;
+}
+.note-editor .pull-right > .dropdown-menu {
+ right: 0;
+ left: auto;
+}
+.note-editor .dropup .caret,
+.note-editor .navbar-fixed-bottom .dropdown .caret {
+ border-top: 0 dotted;
+ border-bottom: 4px solid #000000;
+ content: "";
+}
+.note-editor .dropup .dropdown-menu,
+.note-editor .navbar-fixed-bottom .dropdown .dropdown-menu {
+ top: auto;
+ bottom: 100%;
+ margin-bottom: 1px;
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-right .dropdown-menu {
+ right: 0;
+ left: auto;
+ }
+}
+.btn-default .note-editor .caret {
+ border-top-color: #333333;
+}
+.btn-primary .note-editor .caret,
+.btn-success .note-editor .caret,
+.btn-warning .note-editor .caret,
+.btn-danger .note-editor .caret,
+.btn-info .note-editor .caret {
+ border-top-color: #fff;
+}
+.note-editor .dropup .btn-default .caret {
+ border-bottom-color: #333333;
+}
+.note-editor .dropup .btn-primary .caret,
+.note-editor .dropup .btn-success .caret,
+.note-editor .dropup .btn-warning .caret,
+.note-editor .dropup .btn-danger .caret,
+.note-editor .dropup .btn-info .caret {
+ border-bottom-color: #fff;
+}
+.note-editor .btn-group,
+.note-editor .btn-group-vertical {
+ position: relative;
+ display: inline-block;
+ vertical-align: middle;
+}
+.note-editor .btn-group > .btn,
+.note-editor .btn-group-vertical > .btn {
+ position: relative;
+ float: left;
+}
+.note-editor .btn-group > .btn:hover,
+.note-editor .btn-group-vertical > .btn:hover,
+.note-editor .btn-group > .btn:focus,
+.note-editor .btn-group-vertical > .btn:focus,
+.note-editor .btn-group > .btn:active,
+.note-editor .btn-group-vertical > .btn:active,
+.note-editor .btn-group > .btn.active,
+.note-editor .btn-group-vertical > .btn.active {
+ z-index: 2;
+}
+.note-editor .btn-group > .btn:focus,
+.note-editor .btn-group-vertical > .btn:focus {
+ outline: none;
+}
+.note-editor .btn-group .btn + .btn,
+.note-editor .btn-group .btn + .btn-group,
+.note-editor .btn-group .btn-group + .btn,
+.note-editor .btn-group .btn-group + .btn-group {
+ margin-left: -1px;
+}
+.note-editor .btn-toolbar:before,
+.note-editor .btn-toolbar:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .btn-toolbar:after {
+ clear: both;
+}
+.note-editor .btn-toolbar:before,
+.note-editor .btn-toolbar:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .btn-toolbar:after {
+ clear: both;
+}
+.note-editor .btn-toolbar .btn-group {
+ float: left;
+}
+.note-editor .btn-toolbar > .btn + .btn,
+.note-editor .btn-toolbar > .btn-group + .btn,
+.note-editor .btn-toolbar > .btn + .btn-group,
+.note-editor .btn-toolbar > .btn-group + .btn-group {
+ margin-left: 5px;
+}
+.note-editor .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
+ border-radius: 0;
+}
+.note-editor .btn-group > .btn:first-child {
+ margin-left: 0;
+}
+.note-editor .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
+ border-bottom-right-radius: 0;
+ border-top-right-radius: 0;
+}
+.note-editor .btn-group > .btn:last-child:not(:first-child),
+.note-editor .btn-group > .dropdown-toggle:not(:first-child) {
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0;
+}
+.note-editor .btn-group > .btn-group {
+ float: left;
+}
+.note-editor .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
+ border-radius: 0;
+}
+.note-editor .btn-group > .btn-group:first-child > .btn:last-child,
+.note-editor .btn-group > .btn-group:first-child > .dropdown-toggle {
+ border-bottom-right-radius: 0;
+ border-top-right-radius: 0;
+}
+.note-editor .btn-group > .btn-group:last-child > .btn:first-child {
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0;
+}
+.note-editor .btn-group .dropdown-toggle:active,
+.note-editor .btn-group.open .dropdown-toggle {
+ outline: 0;
+}
+.note-editor .btn-group-xs > .btn {
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+ padding: 1px 5px;
+}
+.note-editor .btn-group-sm > .btn {
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+.note-editor .btn-group-lg > .btn {
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.33;
+ border-radius: 6px;
+}
+.note-editor .btn-group > .btn + .dropdown-toggle {
+ padding-left: 5px;
+ padding-right: 5px;
+}
+.note-editor .btn-group > .btn-lg + .dropdown-toggle {
+ padding-left: 12px;
+ padding-right: 12px;
+}
+.note-editor .btn-group.open .dropdown-toggle {
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+}
+.note-editor .btn .caret {
+ margin-left: 0;
+}
+.note-editor .btn-lg .caret {
+ border-width: 5px 5px 0;
+ border-bottom-width: 0;
+}
+.note-editor .dropup .btn-lg .caret {
+ border-width: 0 5px 5px;
+}
+.note-editor .btn-group-vertical > .btn,
+.note-editor .btn-group-vertical > .btn-group {
+ display: block;
+ float: none;
+ width: 100%;
+ max-width: 100%;
+}
+.note-editor .btn-group-vertical > .btn-group:before,
+.note-editor .btn-group-vertical > .btn-group:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .btn-group-vertical > .btn-group:after {
+ clear: both;
+}
+.note-editor .btn-group-vertical > .btn-group:before,
+.note-editor .btn-group-vertical > .btn-group:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .btn-group-vertical > .btn-group:after {
+ clear: both;
+}
+.note-editor .btn-group-vertical > .btn-group > .btn {
+ float: none;
+}
+.note-editor .btn-group-vertical > .btn + .btn,
+.note-editor .btn-group-vertical > .btn + .btn-group,
+.note-editor .btn-group-vertical > .btn-group + .btn,
+.note-editor .btn-group-vertical > .btn-group + .btn-group {
+ margin-top: -1px;
+ margin-left: 0;
+}
+.note-editor .btn-group-vertical > .btn:not(:first-child):not(:last-child) {
+ border-radius: 0;
+}
+.note-editor .btn-group-vertical > .btn:first-child:not(:last-child) {
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.note-editor .btn-group-vertical > .btn:last-child:not(:first-child) {
+ border-bottom-left-radius: 4px;
+ border-top-right-radius: 0;
+ border-top-left-radius: 0;
+}
+.note-editor .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
+ border-radius: 0;
+}
+.note-editor .btn-group-vertical > .btn-group:first-child > .btn:last-child,
+.note-editor .btn-group-vertical > .btn-group:first-child > .dropdown-toggle {
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.note-editor .btn-group-vertical > .btn-group:last-child > .btn:first-child {
+ border-top-right-radius: 0;
+ border-top-left-radius: 0;
+}
+.note-editor .btn-group-justified {
+ display: table;
+ width: 100%;
+ table-layout: fixed;
+ border-collapse: separate;
+}
+.note-editor .btn-group-justified .btn {
+ float: none;
+ display: table-cell;
+ width: 1%;
+}
+.note-editor [data-toggle="buttons"] > .btn > input[type="radio"],
+.note-editor [data-toggle="buttons"] > .btn > input[type="checkbox"] {
+ display: none;
+}
+.note-editor .input-group {
+ position: relative;
+ display: table;
+ border-collapse: separate;
+}
+.note-editor .input-group.col {
+ float: none;
+ padding-left: 0;
+ padding-right: 0;
+}
+.note-editor .input-group .form-control {
+ width: 100%;
+ margin-bottom: 0;
+}
+.note-editor .input-group-lg > .form-control,
+.note-editor .input-group-lg > .input-group-addon,
+.note-editor .input-group-lg > .input-group-btn > .btn {
+ height: 45px;
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.33;
+ border-radius: 6px;
+}
+select.note-editor .input-group-lg > .form-control,
+select.note-editor .input-group-lg > .input-group-addon,
+select.note-editor .input-group-lg > .input-group-btn > .btn {
+ height: 45px;
+ line-height: 45px;
+}
+textarea.note-editor .input-group-lg > .form-control,
+textarea.note-editor .input-group-lg > .input-group-addon,
+textarea.note-editor .input-group-lg > .input-group-btn > .btn {
+ height: auto;
+}
+.note-editor .input-group-sm > .form-control,
+.note-editor .input-group-sm > .input-group-addon,
+.note-editor .input-group-sm > .input-group-btn > .btn {
+ height: 30px;
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+select.note-editor .input-group-sm > .form-control,
+select.note-editor .input-group-sm > .input-group-addon,
+select.note-editor .input-group-sm > .input-group-btn > .btn {
+ height: 30px;
+ line-height: 30px;
+}
+textarea.note-editor .input-group-sm > .form-control,
+textarea.note-editor .input-group-sm > .input-group-addon,
+textarea.note-editor .input-group-sm > .input-group-btn > .btn {
+ height: auto;
+}
+.note-editor .input-group-addon,
+.note-editor .input-group-btn,
+.note-editor .input-group .form-control {
+ display: table-cell;
+}
+.note-editor .input-group-addon:not(:first-child):not(:last-child),
+.note-editor .input-group-btn:not(:first-child):not(:last-child),
+.note-editor .input-group .form-control:not(:first-child):not(:last-child) {
+ border-radius: 0;
+}
+.note-editor .input-group-addon,
+.note-editor .input-group-btn {
+ width: 1%;
+ white-space: nowrap;
+ vertical-align: middle;
+}
+.note-editor .input-group-addon {
+ padding: 6px 12px;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: 1;
+ color: #555555;
+ text-align: center;
+ background-color: #eeeeee;
+ border: 1px solid #cccccc;
+ border-radius: 4px;
+}
+.note-editor .input-group-addon.input-sm {
+ padding: 5px 10px;
+ font-size: 12px;
+ border-radius: 3px;
+}
+.note-editor .input-group-addon.input-lg {
+ padding: 10px 16px;
+ font-size: 18px;
+ border-radius: 6px;
+}
+.note-editor .input-group-addon input[type="radio"],
+.note-editor .input-group-addon input[type="checkbox"] {
+ margin-top: 0;
+}
+.note-editor .input-group .form-control:first-child,
+.note-editor .input-group-addon:first-child,
+.note-editor .input-group-btn:first-child > .btn,
+.note-editor .input-group-btn:first-child > .dropdown-toggle,
+.note-editor .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) {
+ border-bottom-right-radius: 0;
+ border-top-right-radius: 0;
+}
+.note-editor .input-group-addon:first-child {
+ border-right: 0;
+}
+.note-editor .input-group .form-control:last-child,
+.note-editor .input-group-addon:last-child,
+.note-editor .input-group-btn:last-child > .btn,
+.note-editor .input-group-btn:last-child > .dropdown-toggle,
+.note-editor .input-group-btn:first-child > .btn:not(:first-child) {
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0;
+}
+.note-editor .input-group-addon:last-child {
+ border-left: 0;
+}
+.note-editor .input-group-btn {
+ position: relative;
+ white-space: nowrap;
+}
+.note-editor .input-group-btn:first-child > .btn {
+ margin-right: -1px;
+}
+.note-editor .input-group-btn:last-child > .btn {
+ margin-left: -1px;
+}
+.note-editor .input-group-btn > .btn {
+ position: relative;
+}
+.note-editor .input-group-btn > .btn + .btn {
+ margin-left: -4px;
+}
+.note-editor .input-group-btn > .btn:hover,
+.note-editor .input-group-btn > .btn:active {
+ z-index: 2;
+}
+.note-editor .nav {
+ margin-bottom: 0;
+ padding-left: 0;
+ list-style: none;
+}
+.note-editor .nav:before,
+.note-editor .nav:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .nav:after {
+ clear: both;
+}
+.note-editor .nav:before,
+.note-editor .nav:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .nav:after {
+ clear: both;
+}
+.note-editor .nav > li {
+ position: relative;
+ display: block;
+}
+.note-editor .nav > li > a {
+ position: relative;
+ display: block;
+ padding: 10px 15px;
+}
+.note-editor .nav > li > a:hover,
+.note-editor .nav > li > a:focus {
+ text-decoration: none;
+ background-color: #eeeeee;
+}
+.note-editor .nav > li.disabled > a {
+ color: #999999;
+}
+.note-editor .nav > li.disabled > a:hover,
+.note-editor .nav > li.disabled > a:focus {
+ color: #999999;
+ text-decoration: none;
+ background-color: transparent;
+ cursor: not-allowed;
+}
+.note-editor .nav .open > a,
+.note-editor .nav .open > a:hover,
+.note-editor .nav .open > a:focus {
+ background-color: #eeeeee;
+ border-color: #428bca;
+}
+.note-editor .nav .open > a .caret,
+.note-editor .nav .open > a:hover .caret,
+.note-editor .nav .open > a:focus .caret {
+ border-top-color: #2a6496;
+ border-bottom-color: #2a6496;
+}
+.note-editor .nav .nav-divider {
+ height: 1px;
+ margin: 9px 0;
+ overflow: hidden;
+ background-color: #e5e5e5;
+}
+.note-editor .nav > li > a > img {
+ max-width: none;
+}
+.note-editor .nav-tabs {
+ border-bottom: 1px solid #dddddd;
+}
+.note-editor .nav-tabs > li {
+ float: left;
+ margin-bottom: -1px;
+}
+.note-editor .nav-tabs > li > a {
+ margin-right: 2px;
+ line-height: 1.428571429;
+ border: 1px solid transparent;
+ border-radius: 4px 4px 0 0;
+}
+.note-editor .nav-tabs > li > a:hover {
+ border-color: #eeeeee #eeeeee #dddddd;
+}
+.note-editor .nav-tabs > li.active > a,
+.note-editor .nav-tabs > li.active > a:hover,
+.note-editor .nav-tabs > li.active > a:focus {
+ color: #555555;
+ background-color: #ffffff;
+ border: 1px solid #dddddd;
+ border-bottom-color: transparent;
+ cursor: default;
+}
+.note-editor .nav-tabs.nav-justified {
+ width: 100%;
+ border-bottom: 0;
+}
+.note-editor .nav-tabs.nav-justified > li {
+ float: none;
+}
+.note-editor .nav-tabs.nav-justified > li > a {
+ text-align: center;
+ margin-bottom: 5px;
+}
+@media (min-width: 768px) {
+ .note-editor .nav-tabs.nav-justified > li {
+ display: table-cell;
+ width: 1%;
+ }
+ .note-editor .nav-tabs.nav-justified > li > a {
+ margin-bottom: 0;
+ }
+}
+.note-editor .nav-tabs.nav-justified > li > a {
+ margin-right: 0;
+ border-radius: 4px;
+}
+.note-editor .nav-tabs.nav-justified > .active > a,
+.note-editor .nav-tabs.nav-justified > .active > a:hover,
+.note-editor .nav-tabs.nav-justified > .active > a:focus {
+ border: 1px solid #dddddd;
+}
+@media (min-width: 768px) {
+ .note-editor .nav-tabs.nav-justified > li > a {
+ border-bottom: 1px solid #dddddd;
+ border-radius: 4px 4px 0 0;
+ }
+ .note-editor .nav-tabs.nav-justified > .active > a,
+ .note-editor .nav-tabs.nav-justified > .active > a:hover,
+ .note-editor .nav-tabs.nav-justified > .active > a:focus {
+ border-bottom-color: #ffffff;
+ }
+}
+.note-editor .nav-pills > li {
+ float: left;
+}
+.note-editor .nav-pills > li > a {
+ border-radius: 4px;
+}
+.note-editor .nav-pills > li + li {
+ margin-left: 2px;
+}
+.note-editor .nav-pills > li.active > a,
+.note-editor .nav-pills > li.active > a:hover,
+.note-editor .nav-pills > li.active > a:focus {
+ color: #ffffff;
+ background-color: #428bca;
+}
+.note-editor .nav-pills > li.active > a .caret,
+.note-editor .nav-pills > li.active > a:hover .caret,
+.note-editor .nav-pills > li.active > a:focus .caret {
+ border-top-color: #ffffff;
+ border-bottom-color: #ffffff;
+}
+.note-editor .nav-stacked > li {
+ float: none;
+}
+.note-editor .nav-stacked > li + li {
+ margin-top: 2px;
+ margin-left: 0;
+}
+.note-editor .nav-justified {
+ width: 100%;
+}
+.note-editor .nav-justified > li {
+ float: none;
+}
+.note-editor .nav-justified > li > a {
+ text-align: center;
+ margin-bottom: 5px;
+}
+@media (min-width: 768px) {
+ .note-editor .nav-justified > li {
+ display: table-cell;
+ width: 1%;
+ }
+ .note-editor .nav-justified > li > a {
+ margin-bottom: 0;
+ }
+}
+.note-editor .nav-tabs-justified {
+ border-bottom: 0;
+}
+.note-editor .nav-tabs-justified > li > a {
+ margin-right: 0;
+ border-radius: 4px;
+}
+.note-editor .nav-tabs-justified > .active > a,
+.note-editor .nav-tabs-justified > .active > a:hover,
+.note-editor .nav-tabs-justified > .active > a:focus {
+ border: 1px solid #dddddd;
+}
+@media (min-width: 768px) {
+ .note-editor .nav-tabs-justified > li > a {
+ border-bottom: 1px solid #dddddd;
+ border-radius: 4px 4px 0 0;
+ }
+ .note-editor .nav-tabs-justified > .active > a,
+ .note-editor .nav-tabs-justified > .active > a:hover,
+ .note-editor .nav-tabs-justified > .active > a:focus {
+ border-bottom-color: #ffffff;
+ }
+}
+.note-editor .tab-content > .tab-pane {
+ display: none;
+}
+.note-editor .tab-content > .active {
+ display: block;
+}
+.note-editor .nav .caret {
+ border-top-color: #428bca;
+ border-bottom-color: #428bca;
+}
+.note-editor .nav a:hover .caret {
+ border-top-color: #2a6496;
+ border-bottom-color: #2a6496;
+}
+.note-editor .nav-tabs .dropdown-menu {
+ margin-top: -1px;
+ border-top-right-radius: 0;
+ border-top-left-radius: 0;
+}
+.note-editor .navbar {
+ position: relative;
+ z-index: 1000;
+ min-height: 50px;
+ margin-bottom: 20px;
+ border: 1px solid transparent;
+}
+.note-editor .navbar:before,
+.note-editor .navbar:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .navbar:after {
+ clear: both;
+}
+.note-editor .navbar:before,
+.note-editor .navbar:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .navbar:after {
+ clear: both;
+}
+@media (min-width: 768px) {
+ .note-editor .navbar {
+ border-radius: 4px;
+ }
+}
+.note-editor .navbar-header:before,
+.note-editor .navbar-header:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .navbar-header:after {
+ clear: both;
+}
+.note-editor .navbar-header:before,
+.note-editor .navbar-header:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .navbar-header:after {
+ clear: both;
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-header {
+ float: left;
+ }
+}
+.note-editor .navbar-collapse {
+ max-height: 340px;
+ overflow-x: visible;
+ padding-right: 15px;
+ padding-left: 15px;
+ border-top: 1px solid transparent;
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
+ -webkit-overflow-scrolling: touch;
+}
+.note-editor .navbar-collapse:before,
+.note-editor .navbar-collapse:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .navbar-collapse:after {
+ clear: both;
+}
+.note-editor .navbar-collapse:before,
+.note-editor .navbar-collapse:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .navbar-collapse:after {
+ clear: both;
+}
+.note-editor .navbar-collapse.in {
+ overflow-y: auto;
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-collapse {
+ width: auto;
+ border-top: 0;
+ box-shadow: none;
+ }
+ .note-editor .navbar-collapse.collapse {
+ display: block !important;
+ height: auto !important;
+ padding-bottom: 0;
+ overflow: visible !important;
+ }
+ .note-editor .navbar-collapse.in {
+ overflow-y: visible;
+ }
+ .note-editor .navbar-collapse .navbar-nav.navbar-left:first-child {
+ margin-left: -15px;
+ }
+ .note-editor .navbar-collapse .navbar-nav.navbar-right:last-child {
+ margin-right: -15px;
+ }
+ .note-editor .navbar-collapse .navbar-text:last-child {
+ margin-right: 0;
+ }
+}
+.note-editor .container > .navbar-header,
+.note-editor .container > .navbar-collapse {
+ margin-right: -15px;
+ margin-left: -15px;
+}
+@media (min-width: 768px) {
+ .note-editor .container > .navbar-header,
+ .note-editor .container > .navbar-collapse {
+ margin-right: 0;
+ margin-left: 0;
+ }
+}
+.note-editor .navbar-static-top {
+ border-width: 0 0 1px;
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-static-top {
+ border-radius: 0;
+ }
+}
+.note-editor .navbar-fixed-top,
+.note-editor .navbar-fixed-bottom {
+ position: fixed;
+ right: 0;
+ left: 0;
+ border-width: 0 0 1px;
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-fixed-top,
+ .note-editor .navbar-fixed-bottom {
+ border-radius: 0;
+ }
+}
+.note-editor .navbar-fixed-top {
+ z-index: 1030;
+ top: 0;
+}
+.note-editor .navbar-fixed-bottom {
+ bottom: 0;
+ margin-bottom: 0;
+}
+.note-editor .navbar-brand {
+ float: left;
+ padding: 15px 15px;
+ font-size: 18px;
+ line-height: 20px;
+}
+.note-editor .navbar-brand:hover,
+.note-editor .navbar-brand:focus {
+ text-decoration: none;
+}
+@media (min-width: 768px) {
+ .navbar > .container .note-editor .navbar-brand {
+ margin-left: -15px;
+ }
+}
+.note-editor .navbar-toggle {
+ position: relative;
+ float: right;
+ margin-right: 15px;
+ padding: 9px 10px;
+ margin-top: 8px;
+ margin-bottom: 8px;
+ background-color: transparent;
+ border: 1px solid transparent;
+ border-radius: 4px;
+}
+.note-editor .navbar-toggle .icon-bar {
+ display: block;
+ width: 22px;
+ height: 2px;
+ border-radius: 1px;
+}
+.note-editor .navbar-toggle .icon-bar + .icon-bar {
+ margin-top: 4px;
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-toggle {
+ display: none;
+ }
+}
+.note-editor .navbar-nav {
+ margin: 7.5px -15px;
+}
+.note-editor .navbar-nav > li > a {
+ padding-top: 10px;
+ padding-bottom: 10px;
+ line-height: 20px;
+}
+@media (max-width: 767px) {
+ .note-editor .navbar-nav .open .dropdown-menu {
+ position: static;
+ float: none;
+ width: auto;
+ margin-top: 0;
+ background-color: transparent;
+ border: 0;
+ box-shadow: none;
+ }
+ .note-editor .navbar-nav .open .dropdown-menu > li > a,
+ .note-editor .navbar-nav .open .dropdown-menu .dropdown-header {
+ padding: 5px 15px 5px 25px;
+ }
+ .note-editor .navbar-nav .open .dropdown-menu > li > a {
+ line-height: 20px;
+ }
+ .note-editor .navbar-nav .open .dropdown-menu > li > a:hover,
+ .note-editor .navbar-nav .open .dropdown-menu > li > a:focus {
+ background-image: none;
+ }
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-nav {
+ float: left;
+ margin: 0;
+ }
+ .note-editor .navbar-nav > li {
+ float: left;
+ }
+ .note-editor .navbar-nav > li > a {
+ padding-top: 15px;
+ padding-bottom: 15px;
+ }
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-left {
+ float: left !important;
+ }
+ .note-editor .navbar-right {
+ float: right !important;
+ }
+}
+.note-editor .navbar-form {
+ margin-left: -15px;
+ margin-right: -15px;
+ padding: 10px 15px;
+ border-top: 1px solid transparent;
+ border-bottom: 1px solid transparent;
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+ margin-top: 8px;
+ margin-bottom: 8px;
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-form .form-group {
+ display: inline-block;
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .note-editor .navbar-form .form-control {
+ display: inline-block;
+ }
+ .note-editor .navbar-form .radio,
+ .note-editor .navbar-form .checkbox {
+ display: inline-block;
+ margin-top: 0;
+ margin-bottom: 0;
+ padding-left: 0;
+ }
+ .note-editor .navbar-form .radio input[type="radio"],
+ .note-editor .navbar-form .checkbox input[type="checkbox"] {
+ float: none;
+ margin-left: 0;
+ }
+}
+@media (max-width: 767px) {
+ .note-editor .navbar-form .form-group {
+ margin-bottom: 5px;
+ }
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-form {
+ width: auto;
+ border: 0;
+ margin-left: 0;
+ margin-right: 0;
+ padding-top: 0;
+ padding-bottom: 0;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ }
+}
+.note-editor .navbar-nav > li > .dropdown-menu {
+ margin-top: 0;
+ border-top-right-radius: 0;
+ border-top-left-radius: 0;
+}
+.note-editor .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.note-editor .navbar-nav.pull-right > li > .dropdown-menu,
+.note-editor .navbar-nav > li > .dropdown-menu.pull-right {
+ left: auto;
+ right: 0;
+}
+.note-editor .navbar-btn {
+ margin-top: 8px;
+ margin-bottom: 8px;
+}
+.note-editor .navbar-text {
+ float: left;
+ margin-top: 15px;
+ margin-bottom: 15px;
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-text {
+ margin-left: 15px;
+ margin-right: 15px;
+ }
+}
+.note-editor .navbar-default {
+ background-color: #f8f8f8;
+ border-color: #e7e7e7;
+}
+.note-editor .navbar-default .navbar-brand {
+ color: #777777;
+}
+.note-editor .navbar-default .navbar-brand:hover,
+.note-editor .navbar-default .navbar-brand:focus {
+ color: #5e5e5e;
+ background-color: transparent;
+}
+.note-editor .navbar-default .navbar-text {
+ color: #777777;
+}
+.note-editor .navbar-default .navbar-nav > li > a {
+ color: #777777;
+}
+.note-editor .navbar-default .navbar-nav > li > a:hover,
+.note-editor .navbar-default .navbar-nav > li > a:focus {
+ color: #333333;
+ background-color: transparent;
+}
+.note-editor .navbar-default .navbar-nav > .active > a,
+.note-editor .navbar-default .navbar-nav > .active > a:hover,
+.note-editor .navbar-default .navbar-nav > .active > a:focus {
+ color: #555555;
+ background-color: #e7e7e7;
+}
+.note-editor .navbar-default .navbar-nav > .disabled > a,
+.note-editor .navbar-default .navbar-nav > .disabled > a:hover,
+.note-editor .navbar-default .navbar-nav > .disabled > a:focus {
+ color: #cccccc;
+ background-color: transparent;
+}
+.note-editor .navbar-default .navbar-toggle {
+ border-color: #dddddd;
+}
+.note-editor .navbar-default .navbar-toggle:hover,
+.note-editor .navbar-default .navbar-toggle:focus {
+ background-color: #dddddd;
+}
+.note-editor .navbar-default .navbar-toggle .icon-bar {
+ background-color: #cccccc;
+}
+.note-editor .navbar-default .navbar-collapse,
+.note-editor .navbar-default .navbar-form {
+ border-color: #e7e7e7;
+}
+.note-editor .navbar-default .navbar-nav > .dropdown > a:hover .caret,
+.note-editor .navbar-default .navbar-nav > .dropdown > a:focus .caret {
+ border-top-color: #333333;
+ border-bottom-color: #333333;
+}
+.note-editor .navbar-default .navbar-nav > .open > a,
+.note-editor .navbar-default .navbar-nav > .open > a:hover,
+.note-editor .navbar-default .navbar-nav > .open > a:focus {
+ background-color: #e7e7e7;
+ color: #555555;
+}
+.note-editor .navbar-default .navbar-nav > .open > a .caret,
+.note-editor .navbar-default .navbar-nav > .open > a:hover .caret,
+.note-editor .navbar-default .navbar-nav > .open > a:focus .caret {
+ border-top-color: #555555;
+ border-bottom-color: #555555;
+}
+.note-editor .navbar-default .navbar-nav > .dropdown > a .caret {
+ border-top-color: #777777;
+ border-bottom-color: #777777;
+}
+@media (max-width: 767px) {
+ .note-editor .navbar-default .navbar-nav .open .dropdown-menu > li > a {
+ color: #777777;
+ }
+ .note-editor .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
+ .note-editor .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
+ color: #333333;
+ background-color: transparent;
+ }
+ .note-editor .navbar-default .navbar-nav .open .dropdown-menu > .active > a,
+ .note-editor .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
+ .note-editor .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
+ color: #555555;
+ background-color: #e7e7e7;
+ }
+ .note-editor .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
+ .note-editor .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
+ .note-editor .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
+ color: #cccccc;
+ background-color: transparent;
+ }
+}
+.note-editor .navbar-default .navbar-link {
+ color: #777777;
+}
+.note-editor .navbar-default .navbar-link:hover {
+ color: #333333;
+}
+.note-editor .navbar-inverse {
+ background-color: #222222;
+ border-color: #080808;
+}
+.note-editor .navbar-inverse .navbar-brand {
+ color: #999999;
+}
+.note-editor .navbar-inverse .navbar-brand:hover,
+.note-editor .navbar-inverse .navbar-brand:focus {
+ color: #ffffff;
+ background-color: transparent;
+}
+.note-editor .navbar-inverse .navbar-text {
+ color: #999999;
+}
+.note-editor .navbar-inverse .navbar-nav > li > a {
+ color: #999999;
+}
+.note-editor .navbar-inverse .navbar-nav > li > a:hover,
+.note-editor .navbar-inverse .navbar-nav > li > a:focus {
+ color: #ffffff;
+ background-color: transparent;
+}
+.note-editor .navbar-inverse .navbar-nav > .active > a,
+.note-editor .navbar-inverse .navbar-nav > .active > a:hover,
+.note-editor .navbar-inverse .navbar-nav > .active > a:focus {
+ color: #ffffff;
+ background-color: #080808;
+}
+.note-editor .navbar-inverse .navbar-nav > .disabled > a,
+.note-editor .navbar-inverse .navbar-nav > .disabled > a:hover,
+.note-editor .navbar-inverse .navbar-nav > .disabled > a:focus {
+ color: #444444;
+ background-color: transparent;
+}
+.note-editor .navbar-inverse .navbar-toggle {
+ border-color: #333333;
+}
+.note-editor .navbar-inverse .navbar-toggle:hover,
+.note-editor .navbar-inverse .navbar-toggle:focus {
+ background-color: #333333;
+}
+.note-editor .navbar-inverse .navbar-toggle .icon-bar {
+ background-color: #ffffff;
+}
+.note-editor .navbar-inverse .navbar-collapse,
+.note-editor .navbar-inverse .navbar-form {
+ border-color: #101010;
+}
+.note-editor .navbar-inverse .navbar-nav > .open > a,
+.note-editor .navbar-inverse .navbar-nav > .open > a:hover,
+.note-editor .navbar-inverse .navbar-nav > .open > a:focus {
+ background-color: #080808;
+ color: #ffffff;
+}
+.note-editor .navbar-inverse .navbar-nav > .dropdown > a:hover .caret {
+ border-top-color: #ffffff;
+ border-bottom-color: #ffffff;
+}
+.note-editor .navbar-inverse .navbar-nav > .dropdown > a .caret {
+ border-top-color: #999999;
+ border-bottom-color: #999999;
+}
+.note-editor .navbar-inverse .navbar-nav > .open > a .caret,
+.note-editor .navbar-inverse .navbar-nav > .open > a:hover .caret,
+.note-editor .navbar-inverse .navbar-nav > .open > a:focus .caret {
+ border-top-color: #ffffff;
+ border-bottom-color: #ffffff;
+}
+@media (max-width: 767px) {
+ .note-editor .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
+ border-color: #080808;
+ }
+ .note-editor .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
+ color: #999999;
+ }
+ .note-editor .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
+ .note-editor .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
+ color: #ffffff;
+ background-color: transparent;
+ }
+ .note-editor .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
+ .note-editor .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
+ .note-editor .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
+ color: #ffffff;
+ background-color: #080808;
+ }
+ .note-editor .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,
+ .note-editor .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,
+ .note-editor .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
+ color: #444444;
+ background-color: transparent;
+ }
+}
+.note-editor .navbar-inverse .navbar-link {
+ color: #999999;
+}
+.note-editor .navbar-inverse .navbar-link:hover {
+ color: #ffffff;
+}
+.note-editor .breadcrumb {
+ padding: 8px 15px;
+ margin-bottom: 20px;
+ list-style: none;
+ background-color: #f5f5f5;
+ border-radius: 4px;
+}
+.note-editor .breadcrumb > li {
+ display: inline-block;
+}
+.note-editor .breadcrumb > li + li:before {
+ content: "/\00a0";
+ padding: 0 5px;
+ color: #cccccc;
+}
+.note-editor .breadcrumb > .active {
+ color: #999999;
+}
+.note-editor .pagination {
+ display: inline-block;
+ padding-left: 0;
+ margin: 20px 0;
+ border-radius: 4px;
+}
+.note-editor .pagination > li {
+ display: inline;
+}
+.note-editor .pagination > li > a,
+.note-editor .pagination > li > span {
+ position: relative;
+ float: left;
+ padding: 6px 12px;
+ line-height: 1.428571429;
+ text-decoration: none;
+ background-color: #ffffff;
+ border: 1px solid #dddddd;
+ margin-left: -1px;
+}
+.note-editor .pagination > li:first-child > a,
+.note-editor .pagination > li:first-child > span {
+ margin-left: 0;
+ border-bottom-left-radius: 4px;
+ border-top-left-radius: 4px;
+}
+.note-editor .pagination > li:last-child > a,
+.note-editor .pagination > li:last-child > span {
+ border-bottom-right-radius: 4px;
+ border-top-right-radius: 4px;
+}
+.note-editor .pagination > li > a:hover,
+.note-editor .pagination > li > span:hover,
+.note-editor .pagination > li > a:focus,
+.note-editor .pagination > li > span:focus {
+ background-color: #eeeeee;
+}
+.note-editor .pagination > .active > a,
+.note-editor .pagination > .active > span,
+.note-editor .pagination > .active > a:hover,
+.note-editor .pagination > .active > span:hover,
+.note-editor .pagination > .active > a:focus,
+.note-editor .pagination > .active > span:focus {
+ z-index: 2;
+ color: #ffffff;
+ background-color: #428bca;
+ border-color: #428bca;
+ cursor: default;
+}
+.note-editor .pagination > .disabled > span,
+.note-editor .pagination > .disabled > span:hover,
+.note-editor .pagination > .disabled > span:focus,
+.note-editor .pagination > .disabled > a,
+.note-editor .pagination > .disabled > a:hover,
+.note-editor .pagination > .disabled > a:focus {
+ color: #999999;
+ background-color: #ffffff;
+ border-color: #dddddd;
+ cursor: not-allowed;
+}
+.note-editor .pagination-lg > li > a,
+.note-editor .pagination-lg > li > span {
+ padding: 10px 16px;
+ font-size: 18px;
+}
+.note-editor .pagination-lg > li:first-child > a,
+.note-editor .pagination-lg > li:first-child > span {
+ border-bottom-left-radius: 6px;
+ border-top-left-radius: 6px;
+}
+.note-editor .pagination-lg > li:last-child > a,
+.note-editor .pagination-lg > li:last-child > span {
+ border-bottom-right-radius: 6px;
+ border-top-right-radius: 6px;
+}
+.note-editor .pagination-sm > li > a,
+.note-editor .pagination-sm > li > span {
+ padding: 5px 10px;
+ font-size: 12px;
+}
+.note-editor .pagination-sm > li:first-child > a,
+.note-editor .pagination-sm > li:first-child > span {
+ border-bottom-left-radius: 3px;
+ border-top-left-radius: 3px;
+}
+.note-editor .pagination-sm > li:last-child > a,
+.note-editor .pagination-sm > li:last-child > span {
+ border-bottom-right-radius: 3px;
+ border-top-right-radius: 3px;
+}
+.note-editor .pager {
+ padding-left: 0;
+ margin: 20px 0;
+ list-style: none;
+ text-align: center;
+}
+.note-editor .pager:before,
+.note-editor .pager:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .pager:after {
+ clear: both;
+}
+.note-editor .pager:before,
+.note-editor .pager:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .pager:after {
+ clear: both;
+}
+.note-editor .pager li {
+ display: inline;
+}
+.note-editor .pager li > a,
+.note-editor .pager li > span {
+ display: inline-block;
+ padding: 5px 14px;
+ background-color: #ffffff;
+ border: 1px solid #dddddd;
+ border-radius: 15px;
+}
+.note-editor .pager li > a:hover,
+.note-editor .pager li > a:focus {
+ text-decoration: none;
+ background-color: #eeeeee;
+}
+.note-editor .pager .next > a,
+.note-editor .pager .next > span {
+ float: right;
+}
+.note-editor .pager .previous > a,
+.note-editor .pager .previous > span {
+ float: left;
+}
+.note-editor .pager .disabled > a,
+.note-editor .pager .disabled > a:hover,
+.note-editor .pager .disabled > a:focus,
+.note-editor .pager .disabled > span {
+ color: #999999;
+ background-color: #ffffff;
+ cursor: not-allowed;
+}
+.note-editor .label {
+ display: inline;
+ padding: .2em .6em .3em;
+ font-size: 75%;
+ font-weight: bold;
+ line-height: 1;
+ color: #ffffff;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: baseline;
+ border-radius: .25em;
+}
+.note-editor .label[href]:hover,
+.note-editor .label[href]:focus {
+ color: #ffffff;
+ text-decoration: none;
+ cursor: pointer;
+}
+.note-editor .label:empty {
+ display: none;
+}
+.note-editor .label-default {
+ background-color: #999999;
+}
+.note-editor .label-default[href]:hover,
+.note-editor .label-default[href]:focus {
+ background-color: #808080;
+}
+.note-editor .label-primary {
+ background-color: #428bca;
+}
+.note-editor .label-primary[href]:hover,
+.note-editor .label-primary[href]:focus {
+ background-color: #3071a9;
+}
+.note-editor .label-success {
+ background-color: #5cb85c;
+}
+.note-editor .label-success[href]:hover,
+.note-editor .label-success[href]:focus {
+ background-color: #449d44;
+}
+.note-editor .label-info {
+ background-color: #5bc0de;
+}
+.note-editor .label-info[href]:hover,
+.note-editor .label-info[href]:focus {
+ background-color: #31b0d5;
+}
+.note-editor .label-warning {
+ background-color: #f0ad4e;
+}
+.note-editor .label-warning[href]:hover,
+.note-editor .label-warning[href]:focus {
+ background-color: #ec971f;
+}
+.note-editor .label-danger {
+ background-color: #d9534f;
+}
+.note-editor .label-danger[href]:hover,
+.note-editor .label-danger[href]:focus {
+ background-color: #c9302c;
+}
+.note-editor .badge {
+ display: inline-block;
+ min-width: 10px;
+ padding: 3px 7px;
+ font-size: 12px;
+ font-weight: bold;
+ color: #ffffff;
+ line-height: 1;
+ vertical-align: baseline;
+ white-space: nowrap;
+ text-align: center;
+ background-color: #999999;
+ border-radius: 10px;
+}
+.note-editor .badge:empty {
+ display: none;
+}
+.note-editor a.badge:hover,
+.note-editor a.badge:focus {
+ color: #ffffff;
+ text-decoration: none;
+ cursor: pointer;
+}
+.note-editor .btn .badge {
+ position: relative;
+ top: -1px;
+}
+.note-editor a.list-group-item.active > .badge,
+.note-editor .nav-pills > .active > a > .badge {
+ color: #428bca;
+ background-color: #ffffff;
+}
+.note-editor .nav-pills > li > a > .badge {
+ margin-left: 3px;
+}
+.note-editor .jumbotron {
+ padding: 30px;
+ margin-bottom: 30px;
+ font-size: 21px;
+ font-weight: 200;
+ line-height: 2.1428571435;
+ color: inherit;
+ background-color: #eeeeee;
+}
+.note-editor .jumbotron h1 {
+ line-height: 1;
+ color: inherit;
+}
+.note-editor .jumbotron p {
+ line-height: 1.4;
+}
+.container .note-editor .jumbotron {
+ border-radius: 6px;
+}
+@media screen and (min-width: 768px) {
+ .note-editor .jumbotron {
+ padding-top: 48px;
+ padding-bottom: 48px;
+ }
+ .container .note-editor .jumbotron {
+ padding-left: 60px;
+ padding-right: 60px;
+ }
+ .note-editor .jumbotron h1 {
+ font-size: 63px;
+ }
+}
+.note-editor .thumbnail {
+ padding: 4px;
+ line-height: 1.428571429;
+ background-color: #ffffff;
+ border: 1px solid #dddddd;
+ border-radius: 4px;
+ -webkit-transition: all 0.2s ease-in-out;
+ transition: all 0.2s ease-in-out;
+ display: inline-block;
+ max-width: 100%;
+ height: auto;
+ display: block;
+ margin-bottom: 20px;
+}
+.note-editor .thumbnail > img {
+ display: block;
+ max-width: 100%;
+ height: auto;
+}
+.note-editor a.thumbnail:hover,
+.note-editor a.thumbnail:focus,
+.note-editor a.thumbnail.active {
+ border-color: #428bca;
+}
+.note-editor .thumbnail > img {
+ margin-left: auto;
+ margin-right: auto;
+}
+.note-editor .thumbnail .caption {
+ padding: 9px;
+ color: #333333;
+}
+.note-editor .alert {
+ padding: 15px;
+ margin-bottom: 20px;
+ border: 1px solid transparent;
+ border-radius: 4px;
+}
+.note-editor .alert h4 {
+ margin-top: 0;
+ color: inherit;
+}
+.note-editor .alert .alert-link {
+ font-weight: bold;
+}
+.note-editor .alert > p,
+.note-editor .alert > ul {
+ margin-bottom: 0;
+}
+.note-editor .alert > p + p {
+ margin-top: 5px;
+}
+.note-editor .alert-dismissable {
+ padding-right: 35px;
+}
+.note-editor .alert-dismissable .close {
+ position: relative;
+ top: -2px;
+ right: -21px;
+ color: inherit;
+}
+.note-editor .alert-success {
+ background-color: #dff0d8;
+ border-color: #d6e9c6;
+ color: #468847;
+}
+.note-editor .alert-success hr {
+ border-top-color: #c9e2b3;
+}
+.note-editor .alert-success .alert-link {
+ color: #356635;
+}
+.note-editor .alert-info {
+ background-color: #d9edf7;
+ border-color: #bce8f1;
+ color: #3a87ad;
+}
+.note-editor .alert-info hr {
+ border-top-color: #a6e1ec;
+}
+.note-editor .alert-info .alert-link {
+ color: #2d6987;
+}
+.note-editor .alert-warning {
+ background-color: #fcf8e3;
+ border-color: #faebcc;
+ color: #c09853;
+}
+.note-editor .alert-warning hr {
+ border-top-color: #f7e1b5;
+}
+.note-editor .alert-warning .alert-link {
+ color: #a47e3c;
+}
+.note-editor .alert-danger {
+ background-color: #f2dede;
+ border-color: #ebccd1;
+ color: #b94a48;
+}
+.note-editor .alert-danger hr {
+ border-top-color: #e4b9c0;
+}
+.note-editor .alert-danger .alert-link {
+ color: #953b39;
+}
+@-webkit-keyframes progress-bar-stripes {
+ from {
+ background-position: 40px 0;
+ }
+ to {
+ background-position: 0 0;
+ }
+}
+@-moz-keyframes progress-bar-stripes {
+ from {
+ background-position: 40px 0;
+ }
+ to {
+ background-position: 0 0;
+ }
+}
+@-o-keyframes progress-bar-stripes {
+ from {
+ background-position: 0 0;
+ }
+ to {
+ background-position: 40px 0;
+ }
+}
+@keyframes progress-bar-stripes {
+ from {
+ background-position: 40px 0;
+ }
+ to {
+ background-position: 0 0;
+ }
+}
+.note-editor .progress {
+ overflow: hidden;
+ height: 20px;
+ margin-bottom: 20px;
+ background-color: #f5f5f5;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+}
+.note-editor .progress-bar {
+ float: left;
+ width: 0%;
+ height: 100%;
+ font-size: 12px;
+ line-height: 20px;
+ color: #ffffff;
+ text-align: center;
+ background-color: #428bca;
+ -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+ -webkit-transition: width 0.6s ease;
+ transition: width 0.6s ease;
+}
+.note-editor .progress-striped .progress-bar {
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-size: 40px 40px;
+}
+.note-editor .progress.active .progress-bar {
+ -webkit-animation: progress-bar-stripes 2s linear infinite;
+ -moz-animation: progress-bar-stripes 2s linear infinite;
+ -ms-animation: progress-bar-stripes 2s linear infinite;
+ -o-animation: progress-bar-stripes 2s linear infinite;
+ animation: progress-bar-stripes 2s linear infinite;
+}
+.note-editor .progress-bar-success {
+ background-color: #5cb85c;
+}
+.progress-striped .note-editor .progress-bar-success {
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.note-editor .progress-bar-info {
+ background-color: #5bc0de;
+}
+.progress-striped .note-editor .progress-bar-info {
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.note-editor .progress-bar-warning {
+ background-color: #f0ad4e;
+}
+.progress-striped .note-editor .progress-bar-warning {
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.note-editor .progress-bar-danger {
+ background-color: #d9534f;
+}
+.progress-striped .note-editor .progress-bar-danger {
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.note-editor .media,
+.note-editor .media-body {
+ overflow: hidden;
+ zoom: 1;
+}
+.note-editor .media,
+.note-editor .media .media {
+ margin-top: 15px;
+}
+.note-editor .media:first-child {
+ margin-top: 0;
+}
+.note-editor .media-object {
+ display: block;
+}
+.note-editor .media-heading {
+ margin: 0 0 5px;
+}
+.note-editor .media > .pull-left {
+ margin-right: 10px;
+}
+.note-editor .media > .pull-right {
+ margin-left: 10px;
+}
+.note-editor .media-list {
+ padding-left: 0;
+ list-style: none;
+}
+.note-editor .list-group {
+ margin-bottom: 20px;
+ padding-left: 0;
+}
+.note-editor .list-group-item {
+ position: relative;
+ display: block;
+ padding: 10px 15px;
+ margin-bottom: -1px;
+ background-color: #ffffff;
+ border: 1px solid #dddddd;
+}
+.note-editor .list-group-item:first-child {
+ border-top-right-radius: 4px;
+ border-top-left-radius: 4px;
+}
+.note-editor .list-group-item:last-child {
+ margin-bottom: 0;
+ border-bottom-right-radius: 4px;
+ border-bottom-left-radius: 4px;
+}
+.note-editor .list-group-item > .badge {
+ float: right;
+}
+.note-editor .list-group-item > .badge + .badge {
+ margin-right: 5px;
+}
+.note-editor a.list-group-item {
+ color: #555555;
+}
+.note-editor a.list-group-item .list-group-item-heading {
+ color: #333333;
+}
+.note-editor a.list-group-item:hover,
+.note-editor a.list-group-item:focus {
+ text-decoration: none;
+ background-color: #f5f5f5;
+}
+.note-editor a.list-group-item.active,
+.note-editor a.list-group-item.active:hover,
+.note-editor a.list-group-item.active:focus {
+ z-index: 2;
+ color: #ffffff;
+ background-color: #428bca;
+ border-color: #428bca;
+}
+.note-editor a.list-group-item.active .list-group-item-heading,
+.note-editor a.list-group-item.active:hover .list-group-item-heading,
+.note-editor a.list-group-item.active:focus .list-group-item-heading {
+ color: inherit;
+}
+.note-editor a.list-group-item.active .list-group-item-text,
+.note-editor a.list-group-item.active:hover .list-group-item-text,
+.note-editor a.list-group-item.active:focus .list-group-item-text {
+ color: #e1edf7;
+}
+.note-editor .list-group-item-heading {
+ margin-top: 0;
+ margin-bottom: 5px;
+}
+.note-editor .list-group-item-text {
+ margin-bottom: 0;
+ line-height: 1.3;
+}
+.note-editor .panel {
+ margin-bottom: 20px;
+ background-color: #ffffff;
+ border: 1px solid transparent;
+ border-radius: 4px;
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
+}
+.note-editor .panel-body {
+ padding: 15px;
+}
+.note-editor .panel-body:before,
+.note-editor .panel-body:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .panel-body:after {
+ clear: both;
+}
+.note-editor .panel-body:before,
+.note-editor .panel-body:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .panel-body:after {
+ clear: both;
+}
+.note-editor .panel > .list-group {
+ margin-bottom: 0;
+}
+.note-editor .panel > .list-group .list-group-item {
+ border-width: 1px 0;
+}
+.note-editor .panel > .list-group .list-group-item:first-child {
+ border-top-right-radius: 0;
+ border-top-left-radius: 0;
+}
+.note-editor .panel > .list-group .list-group-item:last-child {
+ border-bottom: 0;
+}
+.note-editor .panel-heading + .list-group .list-group-item:first-child {
+ border-top-width: 0;
+}
+.note-editor .panel > .table,
+.note-editor .panel > .table-responsive {
+ margin-bottom: 0;
+}
+.note-editor .panel > .panel-body + .table,
+.note-editor .panel > .panel-body + .table-responsive {
+ border-top: 1px solid #dddddd;
+}
+.note-editor .panel > .table-bordered,
+.note-editor .panel > .table-responsive > .table-bordered {
+ border: 0;
+}
+.note-editor .panel > .table-bordered > thead > tr > th:first-child,
+.note-editor .panel > .table-responsive > .table-bordered > thead > tr > th:first-child,
+.note-editor .panel > .table-bordered > tbody > tr > th:first-child,
+.note-editor .panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,
+.note-editor .panel > .table-bordered > tfoot > tr > th:first-child,
+.note-editor .panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,
+.note-editor .panel > .table-bordered > thead > tr > td:first-child,
+.note-editor .panel > .table-responsive > .table-bordered > thead > tr > td:first-child,
+.note-editor .panel > .table-bordered > tbody > tr > td:first-child,
+.note-editor .panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,
+.note-editor .panel > .table-bordered > tfoot > tr > td:first-child,
+.note-editor .panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {
+ border-left: 0;
+}
+.note-editor .panel > .table-bordered > thead > tr > th:last-child,
+.note-editor .panel > .table-responsive > .table-bordered > thead > tr > th:last-child,
+.note-editor .panel > .table-bordered > tbody > tr > th:last-child,
+.note-editor .panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,
+.note-editor .panel > .table-bordered > tfoot > tr > th:last-child,
+.note-editor .panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,
+.note-editor .panel > .table-bordered > thead > tr > td:last-child,
+.note-editor .panel > .table-responsive > .table-bordered > thead > tr > td:last-child,
+.note-editor .panel > .table-bordered > tbody > tr > td:last-child,
+.note-editor .panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,
+.note-editor .panel > .table-bordered > tfoot > tr > td:last-child,
+.note-editor .panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {
+ border-right: 0;
+}
+.note-editor .panel > .table-bordered > thead > tr:last-child > th,
+.note-editor .panel > .table-responsive > .table-bordered > thead > tr:last-child > th,
+.note-editor .panel > .table-bordered > tbody > tr:last-child > th,
+.note-editor .panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,
+.note-editor .panel > .table-bordered > tfoot > tr:last-child > th,
+.note-editor .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th,
+.note-editor .panel > .table-bordered > thead > tr:last-child > td,
+.note-editor .panel > .table-responsive > .table-bordered > thead > tr:last-child > td,
+.note-editor .panel > .table-bordered > tbody > tr:last-child > td,
+.note-editor .panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,
+.note-editor .panel > .table-bordered > tfoot > tr:last-child > td,
+.note-editor .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td {
+ border-bottom: 0;
+}
+.note-editor .panel-heading {
+ padding: 10px 15px;
+ border-bottom: 1px solid transparent;
+ border-top-right-radius: 3px;
+ border-top-left-radius: 3px;
+}
+.note-editor .panel-title {
+ margin-top: 0;
+ margin-bottom: 0;
+ font-size: 16px;
+}
+.note-editor .panel-title > a {
+ color: inherit;
+}
+.note-editor .panel-footer {
+ padding: 10px 15px;
+ background-color: #f5f5f5;
+ border-top: 1px solid #dddddd;
+ border-bottom-right-radius: 3px;
+ border-bottom-left-radius: 3px;
+}
+.note-editor .panel-group .panel {
+ margin-bottom: 0;
+ border-radius: 4px;
+ overflow: hidden;
+}
+.note-editor .panel-group .panel + .panel {
+ margin-top: 5px;
+}
+.note-editor .panel-group .panel-heading {
+ border-bottom: 0;
+}
+.note-editor .panel-group .panel-heading + .panel-collapse .panel-body {
+ border-top: 1px solid #dddddd;
+}
+.note-editor .panel-group .panel-footer {
+ border-top: 0;
+}
+.note-editor .panel-group .panel-footer + .panel-collapse .panel-body {
+ border-bottom: 1px solid #dddddd;
+}
+.note-editor .panel-default {
+ border-color: #dddddd;
+}
+.note-editor .panel-default > .panel-heading {
+ color: #333333;
+ background-color: #f5f5f5;
+ border-color: #dddddd;
+}
+.note-editor .panel-default > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #dddddd;
+}
+.note-editor .panel-default > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #dddddd;
+}
+.note-editor .panel-primary {
+ border-color: #428bca;
+}
+.note-editor .panel-primary > .panel-heading {
+ color: #ffffff;
+ background-color: #428bca;
+ border-color: #428bca;
+}
+.note-editor .panel-primary > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #428bca;
+}
+.note-editor .panel-primary > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #428bca;
+}
+.note-editor .panel-success {
+ border-color: #d6e9c6;
+}
+.note-editor .panel-success > .panel-heading {
+ color: #468847;
+ background-color: #dff0d8;
+ border-color: #d6e9c6;
+}
+.note-editor .panel-success > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #d6e9c6;
+}
+.note-editor .panel-success > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #d6e9c6;
+}
+.note-editor .panel-warning {
+ border-color: #faebcc;
+}
+.note-editor .panel-warning > .panel-heading {
+ color: #c09853;
+ background-color: #fcf8e3;
+ border-color: #faebcc;
+}
+.note-editor .panel-warning > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #faebcc;
+}
+.note-editor .panel-warning > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #faebcc;
+}
+.note-editor .panel-danger {
+ border-color: #ebccd1;
+}
+.note-editor .panel-danger > .panel-heading {
+ color: #b94a48;
+ background-color: #f2dede;
+ border-color: #ebccd1;
+}
+.note-editor .panel-danger > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #ebccd1;
+}
+.note-editor .panel-danger > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #ebccd1;
+}
+.note-editor .panel-info {
+ border-color: #bce8f1;
+}
+.note-editor .panel-info > .panel-heading {
+ color: #3a87ad;
+ background-color: #d9edf7;
+ border-color: #bce8f1;
+}
+.note-editor .panel-info > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #bce8f1;
+}
+.note-editor .panel-info > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #bce8f1;
+}
+.note-editor .well {
+ min-height: 20px;
+ padding: 19px;
+ margin-bottom: 20px;
+ background-color: #f5f5f5;
+ border: 1px solid #e3e3e3;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+}
+.note-editor .well blockquote {
+ border-color: #ddd;
+ border-color: rgba(0, 0, 0, 0.15);
+}
+.note-editor .well-lg {
+ padding: 24px;
+ border-radius: 6px;
+}
+.note-editor .well-sm {
+ padding: 9px;
+ border-radius: 3px;
+}
+.note-editor .close {
+ float: right;
+ font-size: 21px;
+ font-weight: bold;
+ line-height: 1;
+ color: #000000;
+ text-shadow: 0 1px 0 #ffffff;
+ opacity: 0.2;
+ filter: alpha(opacity=20);
+}
+.note-editor .close:hover,
+.note-editor .close:focus {
+ color: #000000;
+ text-decoration: none;
+ cursor: pointer;
+ opacity: 0.5;
+ filter: alpha(opacity=50);
+}
+button.note-editor .close {
+ padding: 0;
+ cursor: pointer;
+ background: transparent;
+ border: 0;
+ -webkit-appearance: none;
+}
+.modal-open {
+ overflow: hidden;
+}
+.modal {
+ display: none;
+ overflow: auto;
+ overflow-y: scroll;
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 1040;
+}
+.modal.fade .modal-dialog {
+ -webkit-transform: translate(0, -25%);
+ -ms-transform: translate(0, -25%);
+ transform: translate(0, -25%);
+ -webkit-transition: -webkit-transform 0.3s ease-out;
+ -moz-transition: -moz-transform 0.3s ease-out;
+ -o-transition: -o-transform 0.3s ease-out;
+ transition: transform 0.3s ease-out;
+}
+.modal.in .modal-dialog {
+ -webkit-transform: translate(0, 0);
+ -ms-transform: translate(0, 0);
+ transform: translate(0, 0);
+}
+.modal-dialog {
+ margin-left: auto;
+ margin-right: auto;
+ width: auto;
+ padding: 10px;
+ z-index: 1050;
+}
+.modal-content {
+ position: relative;
+ background-color: #ffffff;
+ border: 1px solid #999999;
+ border: 1px solid rgba(0, 0, 0, 0.2);
+ border-radius: 6px;
+ -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
+ box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
+ background-clip: padding-box;
+ outline: none;
+}
+.modal-backdrop {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 1030;
+ background-color: #000000;
+}
+.modal-backdrop.fade {
+ opacity: 0;
+ filter: alpha(opacity=0);
+}
+.modal-backdrop.in {
+ opacity: 0.5;
+ filter: alpha(opacity=50);
+}
+.modal-header {
+ padding: 15px;
+ border-bottom: 1px solid #e5e5e5;
+ min-height: 16.428571429px;
+}
+.modal-header .close {
+ margin-top: -2px;
+}
+.modal-title {
+ margin: 0;
+ line-height: 1.428571429;
+}
+.modal-body {
+ position: relative;
+ padding: 20px;
+}
+.modal-footer {
+ margin-top: 15px;
+ padding: 19px 20px 20px;
+ text-align: right;
+ border-top: 1px solid #e5e5e5;
+}
+.modal-footer:before,
+.modal-footer:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.modal-footer:after {
+ clear: both;
+}
+.modal-footer:before,
+.modal-footer:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.modal-footer:after {
+ clear: both;
+}
+.modal-footer .btn + .btn {
+ margin-left: 5px;
+ margin-bottom: 0;
+}
+.modal-footer .btn-group .btn + .btn {
+ margin-left: -1px;
+}
+.modal-footer .btn-block + .btn-block {
+ margin-left: 0;
+}
+@media screen and (min-width: 768px) {
+ .modal-dialog {
+ width: 600px;
+ padding-top: 30px;
+ padding-bottom: 30px;
+ }
+ .modal-content {
+ -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
+ }
+}
+.tooltip {
+ position: absolute;
+ z-index: 1030;
+ display: block;
+ visibility: visible;
+ font-size: 12px;
+ line-height: 1.4;
+ opacity: 0;
+ filter: alpha(opacity=0);
+}
+.tooltip.in {
+ opacity: 0.9;
+ filter: alpha(opacity=90);
+}
+.tooltip.top {
+ margin-top: -3px;
+ padding: 5px 0;
+}
+.tooltip.right {
+ margin-left: 3px;
+ padding: 0 5px;
+}
+.tooltip.bottom {
+ margin-top: 3px;
+ padding: 5px 0;
+}
+.tooltip.left {
+ margin-left: -3px;
+ padding: 0 5px;
+}
+.tooltip-inner {
+ max-width: 200px;
+ padding: 3px 8px;
+ color: #ffffff;
+ text-align: center;
+ text-decoration: none;
+ background-color: #000000;
+ border-radius: 4px;
+}
+.tooltip-arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+ border-color: transparent;
+ border-style: solid;
+}
+.tooltip.top .tooltip-arrow {
+ bottom: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-width: 5px 5px 0;
+ border-top-color: #000000;
+}
+.tooltip.top-left .tooltip-arrow {
+ bottom: 0;
+ left: 5px;
+ border-width: 5px 5px 0;
+ border-top-color: #000000;
+}
+.tooltip.top-right .tooltip-arrow {
+ bottom: 0;
+ right: 5px;
+ border-width: 5px 5px 0;
+ border-top-color: #000000;
+}
+.tooltip.right .tooltip-arrow {
+ top: 50%;
+ left: 0;
+ margin-top: -5px;
+ border-width: 5px 5px 5px 0;
+ border-right-color: #000000;
+}
+.tooltip.left .tooltip-arrow {
+ top: 50%;
+ right: 0;
+ margin-top: -5px;
+ border-width: 5px 0 5px 5px;
+ border-left-color: #000000;
+}
+.tooltip.bottom .tooltip-arrow {
+ top: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-width: 0 5px 5px;
+ border-bottom-color: #000000;
+}
+.tooltip.bottom-left .tooltip-arrow {
+ top: 0;
+ left: 5px;
+ border-width: 0 5px 5px;
+ border-bottom-color: #000000;
+}
+.tooltip.bottom-right .tooltip-arrow {
+ top: 0;
+ right: 5px;
+ border-width: 0 5px 5px;
+ border-bottom-color: #000000;
+}
+.popover {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 1010;
+ display: none;
+ max-width: 276px;
+ padding: 1px;
+ text-align: left;
+ background-color: #ffffff;
+ background-clip: padding-box;
+ border: 1px solid #cccccc;
+ border: 1px solid rgba(0, 0, 0, 0.2);
+ border-radius: 6px;
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ white-space: normal;
+}
+.popover.top {
+ margin-top: -10px;
+}
+.popover.right {
+ margin-left: 10px;
+}
+.popover.bottom {
+ margin-top: 10px;
+}
+.popover.left {
+ margin-left: -10px;
+}
+.popover-title {
+ margin: 0;
+ padding: 8px 14px;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: 18px;
+ background-color: #f7f7f7;
+ border-bottom: 1px solid #ebebeb;
+ border-radius: 5px 5px 0 0;
+}
+.popover-content {
+ padding: 9px 14px;
+}
+.popover .arrow,
+.popover .arrow:after {
+ position: absolute;
+ display: block;
+ width: 0;
+ height: 0;
+ border-color: transparent;
+ border-style: solid;
+}
+.popover .arrow {
+ border-width: 11px;
+}
+.popover .arrow:after {
+ border-width: 10px;
+ content: "";
+}
+.popover.top .arrow {
+ left: 50%;
+ margin-left: -11px;
+ border-bottom-width: 0;
+ border-top-color: #999999;
+ border-top-color: rgba(0, 0, 0, 0.25);
+ bottom: -11px;
+}
+.popover.top .arrow:after {
+ content: " ";
+ bottom: 1px;
+ margin-left: -10px;
+ border-bottom-width: 0;
+ border-top-color: #ffffff;
+}
+.popover.right .arrow {
+ top: 50%;
+ left: -11px;
+ margin-top: -11px;
+ border-left-width: 0;
+ border-right-color: #999999;
+ border-right-color: rgba(0, 0, 0, 0.25);
+}
+.popover.right .arrow:after {
+ content: " ";
+ left: 1px;
+ bottom: -10px;
+ border-left-width: 0;
+ border-right-color: #ffffff;
+}
+.popover.bottom .arrow {
+ left: 50%;
+ margin-left: -11px;
+ border-top-width: 0;
+ border-bottom-color: #999999;
+ border-bottom-color: rgba(0, 0, 0, 0.25);
+ top: -11px;
+}
+.popover.bottom .arrow:after {
+ content: " ";
+ top: 1px;
+ margin-left: -10px;
+ border-top-width: 0;
+ border-bottom-color: #ffffff;
+}
+.popover.left .arrow {
+ top: 50%;
+ right: -11px;
+ margin-top: -11px;
+ border-right-width: 0;
+ border-left-color: #999999;
+ border-left-color: rgba(0, 0, 0, 0.25);
+}
+.popover.left .arrow:after {
+ content: " ";
+ right: 1px;
+ border-right-width: 0;
+ border-left-color: #ffffff;
+ bottom: -10px;
+}
+.carousel {
+ position: relative;
+}
+.carousel-inner {
+ position: relative;
+ overflow: hidden;
+ width: 100%;
+}
+.carousel-inner > .item {
+ display: none;
+ position: relative;
+ -webkit-transition: 0.6s ease-in-out left;
+ transition: 0.6s ease-in-out left;
+}
+.carousel-inner > .item > img,
+.carousel-inner > .item > a > img {
+ display: block;
+ max-width: 100%;
+ height: auto;
+ line-height: 1;
+}
+.carousel-inner > .active,
+.carousel-inner > .next,
+.carousel-inner > .prev {
+ display: block;
+}
+.carousel-inner > .active {
+ left: 0;
+}
+.carousel-inner > .next,
+.carousel-inner > .prev {
+ position: absolute;
+ top: 0;
+ width: 100%;
+}
+.carousel-inner > .next {
+ left: 100%;
+}
+.carousel-inner > .prev {
+ left: -100%;
+}
+.carousel-inner > .next.left,
+.carousel-inner > .prev.right {
+ left: 0;
+}
+.carousel-inner > .active.left {
+ left: -100%;
+}
+.carousel-inner > .active.right {
+ left: 100%;
+}
+.carousel-control {
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ width: 15%;
+ opacity: 0.5;
+ filter: alpha(opacity=50);
+ font-size: 20px;
+ color: #ffffff;
+ text-align: center;
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
+}
+.carousel-control.left {
+ background-image: -webkit-gradient(linear, 0% top, 100% top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.0001)));
+ background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.5) 0%), color-stop(rgba(0, 0, 0, 0.0001) 100%));
+ background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
+ background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);
+}
+.carousel-control.right {
+ left: auto;
+ right: 0;
+ background-image: -webkit-gradient(linear, 0% top, 100% top, from(rgba(0, 0, 0, 0.0001)), to(rgba(0, 0, 0, 0.5)));
+ background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.0001) 0%), color-stop(rgba(0, 0, 0, 0.5) 100%));
+ background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);
+ background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);
+}
+.carousel-control:hover,
+.carousel-control:focus {
+ color: #ffffff;
+ text-decoration: none;
+ opacity: 0.9;
+ filter: alpha(opacity=90);
+}
+.carousel-control .icon-prev,
+.carousel-control .icon-next,
+.carousel-control .glyphicon-chevron-left,
+.carousel-control .glyphicon-chevron-right {
+ position: absolute;
+ top: 50%;
+ z-index: 5;
+ display: inline-block;
+}
+.carousel-control .icon-prev,
+.carousel-control .glyphicon-chevron-left {
+ left: 50%;
+}
+.carousel-control .icon-next,
+.carousel-control .glyphicon-chevron-right {
+ right: 50%;
+}
+.carousel-control .icon-prev,
+.carousel-control .icon-next {
+ width: 20px;
+ height: 20px;
+ margin-top: -10px;
+ margin-left: -10px;
+ font-family: serif;
+}
+.carousel-control .icon-prev:before {
+ content: '\2039';
+}
+.carousel-control .icon-next:before {
+ content: '\203a';
+}
+.carousel-indicators {
+ position: absolute;
+ bottom: 10px;
+ left: 50%;
+ z-index: 15;
+ width: 60%;
+ margin-left: -30%;
+ padding-left: 0;
+ list-style: none;
+ text-align: center;
+}
+.carousel-indicators li {
+ display: inline-block;
+ width: 10px;
+ height: 10px;
+ margin: 1px;
+ text-indent: -999px;
+ border: 1px solid #ffffff;
+ border-radius: 10px;
+ cursor: pointer;
+}
+.carousel-indicators .active {
+ margin: 0;
+ width: 12px;
+ height: 12px;
+ background-color: #ffffff;
+}
+.carousel-caption {
+ position: absolute;
+ left: 15%;
+ right: 15%;
+ bottom: 20px;
+ z-index: 10;
+ padding-top: 20px;
+ padding-bottom: 20px;
+ color: #ffffff;
+ text-align: center;
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
+}
+.carousel-caption .btn {
+ text-shadow: none;
+}
+@media screen and (min-width: 768px) {
+ .carousel-control .glyphicons-chevron-left,
+ .carousel-control .glyphicons-chevron-right,
+ .carousel-control .icon-prev,
+ .carousel-control .icon-next {
+ width: 30px;
+ height: 30px;
+ margin-top: -15px;
+ margin-left: -15px;
+ font-size: 30px;
+ }
+ .carousel-caption {
+ left: 20%;
+ right: 20%;
+ padding-bottom: 30px;
+ }
+ .carousel-indicators {
+ bottom: 20px;
+ }
+}
+.clearfix:before,
+.clearfix:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.clearfix:after {
+ clear: both;
+}
+.center-block {
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+}
+.pull-right {
+ float: right !important;
+}
+.pull-left {
+ float: left !important;
+}
+.hide {
+ display: none !important;
+}
+.show {
+ display: block !important;
+}
+.invisible {
+ visibility: hidden;
+}
+.text-hide {
+ font: 0/0 a;
+ color: transparent;
+ text-shadow: none;
+ background-color: transparent;
+ border: 0;
+}
+.hidden {
+ display: none !important;
+ visibility: hidden !important;
+}
+.affix {
+ position: fixed;
+}
+@-ms-viewport {
+ width: device-width;
+}
+.visible-xs,
+tr.visible-xs,
+th.visible-xs,
+td.visible-xs {
+ display: none !important;
+}
+@media (max-width: 767px) {
+ .visible-xs {
+ display: block !important;
+ }
+ tr.visible-xs {
+ display: table-row !important;
+ }
+ th.visible-xs,
+ td.visible-xs {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .visible-xs.visible-sm {
+ display: block !important;
+ }
+ tr.visible-xs.visible-sm {
+ display: table-row !important;
+ }
+ th.visible-xs.visible-sm,
+ td.visible-xs.visible-sm {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .visible-xs.visible-md {
+ display: block !important;
+ }
+ tr.visible-xs.visible-md {
+ display: table-row !important;
+ }
+ th.visible-xs.visible-md,
+ td.visible-xs.visible-md {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 1200px) {
+ .visible-xs.visible-lg {
+ display: block !important;
+ }
+ tr.visible-xs.visible-lg {
+ display: table-row !important;
+ }
+ th.visible-xs.visible-lg,
+ td.visible-xs.visible-lg {
+ display: table-cell !important;
+ }
+}
+.visible-sm,
+tr.visible-sm,
+th.visible-sm,
+td.visible-sm {
+ display: none !important;
+}
+@media (max-width: 767px) {
+ .visible-sm.visible-xs {
+ display: block !important;
+ }
+ tr.visible-sm.visible-xs {
+ display: table-row !important;
+ }
+ th.visible-sm.visible-xs,
+ td.visible-sm.visible-xs {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .visible-sm {
+ display: block !important;
+ }
+ tr.visible-sm {
+ display: table-row !important;
+ }
+ th.visible-sm,
+ td.visible-sm {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .visible-sm.visible-md {
+ display: block !important;
+ }
+ tr.visible-sm.visible-md {
+ display: table-row !important;
+ }
+ th.visible-sm.visible-md,
+ td.visible-sm.visible-md {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 1200px) {
+ .visible-sm.visible-lg {
+ display: block !important;
+ }
+ tr.visible-sm.visible-lg {
+ display: table-row !important;
+ }
+ th.visible-sm.visible-lg,
+ td.visible-sm.visible-lg {
+ display: table-cell !important;
+ }
+}
+.visible-md,
+tr.visible-md,
+th.visible-md,
+td.visible-md {
+ display: none !important;
+}
+@media (max-width: 767px) {
+ .visible-md.visible-xs {
+ display: block !important;
+ }
+ tr.visible-md.visible-xs {
+ display: table-row !important;
+ }
+ th.visible-md.visible-xs,
+ td.visible-md.visible-xs {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .visible-md.visible-sm {
+ display: block !important;
+ }
+ tr.visible-md.visible-sm {
+ display: table-row !important;
+ }
+ th.visible-md.visible-sm,
+ td.visible-md.visible-sm {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .visible-md {
+ display: block !important;
+ }
+ tr.visible-md {
+ display: table-row !important;
+ }
+ th.visible-md,
+ td.visible-md {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 1200px) {
+ .visible-md.visible-lg {
+ display: block !important;
+ }
+ tr.visible-md.visible-lg {
+ display: table-row !important;
+ }
+ th.visible-md.visible-lg,
+ td.visible-md.visible-lg {
+ display: table-cell !important;
+ }
+}
+.visible-lg,
+tr.visible-lg,
+th.visible-lg,
+td.visible-lg {
+ display: none !important;
+}
+@media (max-width: 767px) {
+ .visible-lg.visible-xs {
+ display: block !important;
+ }
+ tr.visible-lg.visible-xs {
+ display: table-row !important;
+ }
+ th.visible-lg.visible-xs,
+ td.visible-lg.visible-xs {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .visible-lg.visible-sm {
+ display: block !important;
+ }
+ tr.visible-lg.visible-sm {
+ display: table-row !important;
+ }
+ th.visible-lg.visible-sm,
+ td.visible-lg.visible-sm {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .visible-lg.visible-md {
+ display: block !important;
+ }
+ tr.visible-lg.visible-md {
+ display: table-row !important;
+ }
+ th.visible-lg.visible-md,
+ td.visible-lg.visible-md {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 1200px) {
+ .visible-lg {
+ display: block !important;
+ }
+ tr.visible-lg {
+ display: table-row !important;
+ }
+ th.visible-lg,
+ td.visible-lg {
+ display: table-cell !important;
+ }
+}
+.hidden-xs {
+ display: block !important;
+}
+tr.hidden-xs {
+ display: table-row !important;
+}
+th.hidden-xs,
+td.hidden-xs {
+ display: table-cell !important;
+}
+@media (max-width: 767px) {
+ .hidden-xs,
+ tr.hidden-xs,
+ th.hidden-xs,
+ td.hidden-xs {
+ display: none !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .hidden-xs.hidden-sm,
+ tr.hidden-xs.hidden-sm,
+ th.hidden-xs.hidden-sm,
+ td.hidden-xs.hidden-sm {
+ display: none !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .hidden-xs.hidden-md,
+ tr.hidden-xs.hidden-md,
+ th.hidden-xs.hidden-md,
+ td.hidden-xs.hidden-md {
+ display: none !important;
+ }
+}
+@media (min-width: 1200px) {
+ .hidden-xs.hidden-lg,
+ tr.hidden-xs.hidden-lg,
+ th.hidden-xs.hidden-lg,
+ td.hidden-xs.hidden-lg {
+ display: none !important;
+ }
+}
+.hidden-sm {
+ display: block !important;
+}
+tr.hidden-sm {
+ display: table-row !important;
+}
+th.hidden-sm,
+td.hidden-sm {
+ display: table-cell !important;
+}
+@media (max-width: 767px) {
+ .hidden-sm.hidden-xs,
+ tr.hidden-sm.hidden-xs,
+ th.hidden-sm.hidden-xs,
+ td.hidden-sm.hidden-xs {
+ display: none !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .hidden-sm,
+ tr.hidden-sm,
+ th.hidden-sm,
+ td.hidden-sm {
+ display: none !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .hidden-sm.hidden-md,
+ tr.hidden-sm.hidden-md,
+ th.hidden-sm.hidden-md,
+ td.hidden-sm.hidden-md {
+ display: none !important;
+ }
+}
+@media (min-width: 1200px) {
+ .hidden-sm.hidden-lg,
+ tr.hidden-sm.hidden-lg,
+ th.hidden-sm.hidden-lg,
+ td.hidden-sm.hidden-lg {
+ display: none !important;
+ }
+}
+.hidden-md {
+ display: block !important;
+}
+tr.hidden-md {
+ display: table-row !important;
+}
+th.hidden-md,
+td.hidden-md {
+ display: table-cell !important;
+}
+@media (max-width: 767px) {
+ .hidden-md.hidden-xs,
+ tr.hidden-md.hidden-xs,
+ th.hidden-md.hidden-xs,
+ td.hidden-md.hidden-xs {
+ display: none !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .hidden-md.hidden-sm,
+ tr.hidden-md.hidden-sm,
+ th.hidden-md.hidden-sm,
+ td.hidden-md.hidden-sm {
+ display: none !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .hidden-md,
+ tr.hidden-md,
+ th.hidden-md,
+ td.hidden-md {
+ display: none !important;
+ }
+}
+@media (min-width: 1200px) {
+ .hidden-md.hidden-lg,
+ tr.hidden-md.hidden-lg,
+ th.hidden-md.hidden-lg,
+ td.hidden-md.hidden-lg {
+ display: none !important;
+ }
+}
+.hidden-lg {
+ display: block !important;
+}
+tr.hidden-lg {
+ display: table-row !important;
+}
+th.hidden-lg,
+td.hidden-lg {
+ display: table-cell !important;
+}
+@media (max-width: 767px) {
+ .hidden-lg.hidden-xs,
+ tr.hidden-lg.hidden-xs,
+ th.hidden-lg.hidden-xs,
+ td.hidden-lg.hidden-xs {
+ display: none !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .hidden-lg.hidden-sm,
+ tr.hidden-lg.hidden-sm,
+ th.hidden-lg.hidden-sm,
+ td.hidden-lg.hidden-sm {
+ display: none !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .hidden-lg.hidden-md,
+ tr.hidden-lg.hidden-md,
+ th.hidden-lg.hidden-md,
+ td.hidden-lg.hidden-md {
+ display: none !important;
+ }
+}
+@media (min-width: 1200px) {
+ .hidden-lg,
+ tr.hidden-lg,
+ th.hidden-lg,
+ td.hidden-lg {
+ display: none !important;
+ }
+}
+.visible-print,
+tr.visible-print,
+th.visible-print,
+td.visible-print {
+ display: none !important;
+}
+@media print {
+ .visible-print {
+ display: block !important;
+ }
+ tr.visible-print {
+ display: table-row !important;
+ }
+ th.visible-print,
+ td.visible-print {
+ display: table-cell !important;
+ }
+ .hidden-print,
+ tr.hidden-print,
+ th.hidden-print,
+ td.hidden-print {
+ display: none !important;
+ }
+}
diff --git a/data/ext/editorHTML/summernote/summernote.css b/data/ext/editorHTML/summernote/summernote.css
new file mode 100644
index 000000000..a1b341e54
--- /dev/null
+++ b/data/ext/editorHTML/summernote/summernote.css
@@ -0,0 +1 @@
+.note-editor{border:1px solid #a9a9a9}.note-editor.fullscreen{position:fixed;top:0;left:0;z-index:1050;width:100%}.note-editor.fullscreen .note-editable{background-color:white}.note-editor.fullscreen .note-resizebar{display:none}.note-editor.codeview .note-editable{display:none}.note-editor.codeview .note-codable{display:block}.note-editor .note-toolbar{padding-bottom:5px;padding-left:5px;margin:0;background-color:#f5f5f5;border-bottom:1px solid #a9a9a9}.note-editor .note-toolbar>.btn-group{margin-top:5px;margin-right:5px;margin-left:0}.note-editor .note-toolbar .note-table .dropdown-menu{min-width:0;padding:5px}.note-editor .note-toolbar .note-table .dropdown-menu .note-dimension-picker{font-size:18px}.note-editor .note-toolbar .note-table .dropdown-menu .note-dimension-picker .note-dimension-picker-mousecatcher{position:absolute!important;z-index:3;width:10em;height:10em;cursor:pointer}.note-editor .note-toolbar .note-table .dropdown-menu .note-dimension-picker .note-dimension-picker-unhighlighted{position:relative!important;z-index:1;width:5em;height:5em;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAACVBMVEUAAIj4+Pjp6ekKlAqjAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKhmnaJzPAAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC') repeat}.note-editor .note-toolbar .note-table .dropdown-menu .note-dimension-picker .note-dimension-picker-highlighted{position:absolute!important;z-index:2;width:1em;height:1em;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAACVBMVEUAAIjd6vvD2f9LKLW+AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKwNDEVT0AAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC') repeat}.note-editor .note-toolbar .note-style h1,.note-editor .note-toolbar .note-style h2,.note-editor .note-toolbar .note-style h3,.note-editor .note-toolbar .note-style h4,.note-editor .note-toolbar .note-style h5,.note-editor .note-toolbar .note-style h6,.note-editor .note-toolbar .note-style blockquote{margin:0}.note-editor .note-toolbar .note-color .dropdown-toggle{width:20px;padding-left:5px}.note-editor .note-toolbar .note-color .dropdown-menu{min-width:290px}.note-editor .note-toolbar .note-color .dropdown-menu .btn-group{margin:0}.note-editor .note-toolbar .note-color .dropdown-menu .btn-group:first-child{margin:0 5px}.note-editor .note-toolbar .note-color .dropdown-menu .btn-group .note-palette-title{margin:2px 7px;font-size:12px;text-align:center;border-bottom:1px solid #eee}.note-editor .note-toolbar .note-color .dropdown-menu .btn-group .note-color-reset{padding:0 3px;margin:5px;font-size:12px;cursor:pointer;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.note-editor .note-toolbar .note-color .dropdown-menu .btn-group .note-color-reset:hover{background:#eee}.note-editor .note-toolbar .note-para .dropdown-menu{min-width:153px;padding:5px}.note-editor .note-toolbar .note-para li:first-child{margin-bottom:5px}.note-editor .note-statusbar{background-color:#f5f5f5}.note-editor .note-statusbar .note-resizebar{width:100%;height:8px;cursor:s-resize;border-top:1px solid #a9a9a9}.note-editor .note-statusbar .note-resizebar .note-icon-bar{width:20px;margin:1px auto;border-top:1px solid #a9a9a9}.note-editor .note-popover .popover{max-width:none}.note-editor .note-popover .popover .popover-content{padding:5px}.note-editor .note-popover .popover .popover-content a{display:inline-block;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}.note-editor .note-popover .popover .popover-content .btn-group+.btn-group{margin-left:5px}.note-editor .note-popover .popover .arrow{left:20px}.note-editor .note-handle .note-control-selection{position:absolute;display:none;border:1px solid black}.note-editor .note-handle .note-control-selection>div{position:absolute}.note-editor .note-handle .note-control-selection .note-control-selection-bg{width:100%;height:100%;background-color:black;-webkit-opacity:.3;-khtml-opacity:.3;-moz-opacity:.3;opacity:.3;-ms-filter:alpha(opacity=30);filter:alpha(opacity=30)}.note-editor .note-handle .note-control-selection .note-control-handle{width:7px;height:7px;border:1px solid black}.note-editor .note-handle .note-control-selection .note-control-holder{width:7px;height:7px;border:1px solid black}.note-editor .note-handle .note-control-selection .note-control-sizing{width:7px;height:7px;background-color:white;border:1px solid black}.note-editor .note-handle .note-control-selection .note-control-nw{top:-5px;left:-5px;border-right:0;border-bottom:0}.note-editor .note-handle .note-control-selection .note-control-ne{top:-5px;right:-5px;border-bottom:0;border-left:none}.note-editor .note-handle .note-control-selection .note-control-sw{bottom:-5px;left:-5px;border-top:0;border-right:0}.note-editor .note-handle .note-control-selection .note-control-se{right:-5px;bottom:-5px;cursor:se-resize}.note-editor .note-handle .note-control-selection .note-control-selection-info{right:0;bottom:0;padding:5px;margin:5px;font-size:12px;color:white;background-color:black;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-opacity:.7;-khtml-opacity:.7;-moz-opacity:.7;opacity:.7;-ms-filter:alpha(opacity=70);filter:alpha(opacity=70)}.note-editor .note-dialog>div{display:none}.note-editor .note-dialog .note-image-dialog .note-dropzone{min-height:100px;margin-bottom:10px;font-size:30px;line-height:4;color:lightgray;text-align:center;border:4px dashed lightgray}.note-editor .note-dialog .note-help-dialog{font-size:12px;color:#ccc;background:transparent;background-color:#222!important;border:0;-webkit-opacity:.9;-khtml-opacity:.9;-moz-opacity:.9;opacity:.9;-ms-filter:alpha(opacity=90);filter:alpha(opacity=90)}.note-editor .note-dialog .note-help-dialog .modal-content{background:transparent;border:1px solid white;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.note-editor .note-dialog .note-help-dialog a{font-size:12px;color:white}.note-editor .note-dialog .note-help-dialog .title{padding-bottom:5px;font-size:14px;font-weight:bold;color:white;border-bottom:white 1px solid}.note-editor .note-dialog .note-help-dialog .modal-close{font-size:14px;color:#dd0;cursor:pointer}.note-editor .note-dialog .note-help-dialog .note-shortcut-layout{width:100%}.note-editor .note-dialog .note-help-dialog .note-shortcut-layout td{vertical-align:top}.note-editor .note-dialog .note-help-dialog .note-shortcut{margin-top:8px}.note-editor .note-dialog .note-help-dialog .note-shortcut th{font-size:13px;color:#dd0;text-align:left}.note-editor .note-dialog .note-help-dialog .note-shortcut td:first-child{min-width:110px;padding-right:10px;font-family:"Courier New";color:#dd0;text-align:right}.note-editor .note-editable{padding:10px;overflow:scroll;outline:0}.note-editor .note-codable{display:none;width:100%;padding:10px;margin-bottom:0;font-family:Menlo,Monaco,monospace,sans-serif;font-size:14px;color:#ccc;background-color:#222;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;box-shadow:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;resize:none}.note-editor .dropdown-menu{min-width:90px}.note-editor .dropdown-menu.right{right:0;left:auto}.note-editor .dropdown-menu.right::before{right:9px;left:auto!important}.note-editor .dropdown-menu.right::after{right:10px;left:auto!important}.note-editor .dropdown-menu li a i{color:deepskyblue;visibility:hidden}.note-editor .dropdown-menu li a.checked i{visibility:visible}.note-editor .note-fontsize-10{font-size:10px}.note-editor .note-color-palette{line-height:1}.note-editor .note-color-palette div .note-color-btn{width:17px;height:17px;padding:0;margin:0;border:1px solid #fff}.note-editor .note-color-palette div .note-color-btn:hover{border:1px solid #000}
\ No newline at end of file
diff --git a/data/ext/editorHTML/summernote/summernote.js b/data/ext/editorHTML/summernote/summernote.js
new file mode 100644
index 000000000..78d179ba9
--- /dev/null
+++ b/data/ext/editorHTML/summernote/summernote.js
@@ -0,0 +1,2368 @@
+/**
+ * summernote.js
+ * (c) 2013~ Alan Hong
+ * summernote may be freely distributed under the MIT license./
+ */
+(function ($, CodeMirror) {
+ 'use strict';
+ /**
+ * object which check platform/agent
+ */
+ var agent = {
+ bMac: navigator.appVersion.indexOf('Mac') > -1,
+ bMSIE: navigator.userAgent.indexOf('MSIE') > -1,
+ bFF: navigator.userAgent.indexOf('Firefox') > -1,
+ bCodeMirror: !!CodeMirror
+ };
+
+ /**
+ * func utils (for high-order func's arg)
+ */
+ var func = (function () {
+ var eq = function (elA) { return function (elB) { return elA === elB; }; };
+ var eq2 = function (elA, elB) { return elA === elB; };
+ var fail = function () { return false; };
+ var not = function (f) { return function () { return !f.apply(f, arguments); }; };
+ var self = function (a) { return a; };
+ return { eq: eq, eq2: eq2, fail: fail, not: not, self: self };
+ })();
+
+ /**
+ * list utils
+ */
+ var list = (function () {
+ var head = function (array) { return array[0]; };
+ var last = function (array) { return array[array.length - 1]; };
+ var initial = function (array) { return array.slice(0, array.length - 1); };
+ var tail = function (array) { return array.slice(1); };
+
+ /**
+ * get sum from a list
+ * @param {array} array - array
+ * @param {function} fn - iterator
+ */
+ var sum = function (array, fn) {
+ fn = fn || func.self;
+ return array.reduce(function (memo, v) {
+ return memo + fn(v);
+ }, 0);
+ };
+
+ /**
+ * returns a copy of the collection with array type.
+ * @param {collection} collection - collection eg) node.childNodes, ...
+ */
+ var from = function (collection) {
+ var result = [], idx = -1, length = collection.length;
+ while (++idx < length) {
+ result[idx] = collection[idx];
+ }
+ return result;
+ };
+
+ /**
+ * cluster item by second function
+ * @param {array} array - array
+ * @param {function} fn - predicate function for cluster rule
+ */
+ var clusterBy = function (array, fn) {
+ if (array.length === 0) { return []; }
+ var aTail = tail(array);
+ return aTail.reduce(function (memo, v) {
+ var aLast = last(memo);
+ if (fn(last(aLast), v)) {
+ aLast[aLast.length] = v;
+ } else {
+ memo[memo.length] = [v];
+ }
+ return memo;
+ }, [[head(array)]]);
+ };
+
+ /**
+ * returns a copy of the array with all falsy values removed
+ * @param {array} array - array
+ * @param {function} fn - predicate function for cluster rule
+ */
+ var compact = function (array) {
+ var aResult = [];
+ for (var idx = 0, sz = array.length; idx < sz; idx ++) {
+ if (array[idx]) { aResult.push(array[idx]); }
+ }
+ return aResult;
+ };
+
+ return { head: head, last: last, initial: initial, tail: tail,
+ sum: sum, from: from, compact: compact, clusterBy: clusterBy };
+ })();
+
+ /**
+ * aysnc functions which returns deferred object
+ */
+ var async = (function () {
+ /**
+ * readFile
+ * @param {file} file - file object
+ */
+ var readFile = function (file) {
+ return $.Deferred(function (deferred) {
+ var reader = new FileReader();
+ reader.onload = function (e) { deferred.resolve(e.target.result); };
+ reader.onerror = function () { deferred.reject(this); };
+ reader.readAsDataURL(file);
+ }).promise();
+ };
+
+ /**
+ * loadImage from url string
+ * @param {string} sUrl
+ */
+ var loadImage = function (sUrl) {
+ return $.Deferred(function (deferred) {
+   var image = new Image();
+   image.onload = loaded;
+   image.onerror = errored; // URL returns 404, etc
+   image.onabort = errored; // IE may call this if user clicks "Stop"
+   image.src = sUrl;
+    
+   function loaded() {
+     unbindEvents();
+ deferred.resolve(image);
+   }
+   function errored() {
+     unbindEvents();
+ deferred.reject(image);
+   }
+   function unbindEvents() {
+     image.onload = null;
+     image.onerror = null;
+     image.onabort = null;
+   }
+ }).promise();
+ };
+
+ return { readFile: readFile, loadImage: loadImage };
+ })();
+
+ /**
+ * dom utils
+ */
+ var dom = (function () {
+ /**
+ * returns predicate which judge whether nodeName is same
+ */
+ var makePredByNodeName = function (sNodeName) {
+ // nodeName of element is always uppercase.
+ return function (node) {
+ return node && node.nodeName === sNodeName;
+ };
+ };
+
+ var isPara = function (node) {
+ // Chrome(v31.0), FF(v25.0.1) use DIV for paragraph
+ return node && /^DIV|^P|^LI|^H[1-7]/.test(node.nodeName);
+ };
+
+ var emptyPara = '<p><br/></p>';
+
+ var isList = function (node) {
+ return node && /^UL|^OL/.test(node.nodeName);
+ };
+
+ var isEditable = function (node) {
+ return node && $(node).hasClass('note-editable');
+ };
+
+ var isControlSizing = function (node) {
+ return node && $(node).hasClass('note-control-sizing');
+ };
+
+ /**
+ * find nearest ancestor predicate hit
+ * @param {element} node
+ * @param {function} pred - predicate function
+ */
+ var ancestor = function (node, pred) {
+ while (node) {
+ if (pred(node)) { return node; }
+ node = node.parentNode;
+ }
+ return null;
+ };
+
+ /**
+ * returns new array of ancestor nodes (until predicate hit).
+ * @param {element} node
+ * @param {function} [optional] pred - predicate function
+ */
+ var listAncestor = function (node, pred) {
+ pred = pred || func.fail;
+
+ var aAncestor = [];
+ ancestor(node, function (el) {
+ aAncestor.push(el);
+ return pred(el);
+ });
+ return aAncestor;
+ };
+
+ /**
+ * returns common ancestor node between two nodes.
+ * @param {element} nodeA
+ * @param {element} nodeB
+ */
+ var commonAncestor = function (nodeA, nodeB) {
+ var aAncestor = listAncestor(nodeA);
+ for (var n = nodeB; n; n = n.parentNode) {
+ if ($.inArray(n, aAncestor) > -1) { return n; }
+ }
+ return null; // difference document area
+ };
+
+ /**
+ * listing all Nodes between two nodes.
+ * FIXME: nodeA and nodeB must be sorted, use comparePoints later.
+ * @param {element} nodeA
+ * @param {element} nodeB
+ */
+ var listBetween = function (nodeA, nodeB) {
+ var aNode = [];
+
+ var bStart = false, bEnd = false;
+ var fnWalk = function (node) {
+ if (!node) { return; } // traverse fisnish
+ if (node === nodeA) { bStart = true; } // start point
+ if (bStart && !bEnd) { aNode.push(node); } // between
+ if (node === nodeB) { bEnd = true; return; } // end point
+
+ for (var idx = 0, sz = node.childNodes.length; idx < sz; idx++) {
+ fnWalk(node.childNodes[idx]);
+ }
+ };
+
+ fnWalk(commonAncestor(nodeA, nodeB)); // DFS with commonAcestor.
+ return aNode;
+ };
+
+ /**
+ * listing all prevSiblings (until predicate hit).
+ * @param {element} node
+ * @param {function} [optional] pred - predicate function
+ */
+ var listPrev = function (node, pred) {
+ pred = pred || func.fail;
+
+ var aNext = [];
+ while (node) {
+ aNext.push(node);
+ if (pred(node)) { break; }
+ node = node.previousSibling;
+ }
+ return aNext;
+ };
+
+ /**
+ * listing nextSiblings (until predicate hit).
+ * @param {element} node
+ * @param {function} pred [optional] - predicate function
+ */
+ var listNext = function (node, pred) {
+ pred = pred || func.fail;
+
+ var aNext = [];
+ while (node) {
+ aNext.push(node);
+ if (pred(node)) { break; }
+ node = node.nextSibling;
+ }
+ return aNext;
+ };
+
+ /**
+ * insert node after preceding
+ * @param {element} node
+ * @param {element} preceding - predicate function
+ */
+ var insertAfter = function (node, preceding) {
+ var next = preceding.nextSibling, parent = preceding.parentNode;
+ if (next) {
+ parent.insertBefore(node, next);
+ } else {
+ parent.appendChild(node);
+ }
+ return node;
+ };
+
+ /**
+ * append children
+ * @param {element} node
+ * @param {collection} aChild
+ */
+ var appends = function (node, aChild) {
+ $.each(aChild, function (idx, child) {
+ node.appendChild(child);
+ });
+ return node;
+ };
+
+ var isText = makePredByNodeName('#text');
+
+ /**
+ * returns #text's text size or element's childNodes size
+ * @param {element} node
+ */
+ var length = function (node) {
+ if (isText(node)) { return node.nodeValue.length; }
+ return node.childNodes.length;
+ };
+
+ /**
+ * returns offset from parent.
+ * @param {element} node
+ */
+ var position = function (node) {
+ var offset = 0;
+ while (node = node.previousSibling) { offset += 1; }
+ return offset;
+ };
+
+ /**
+ * return offsetPath(array of offset) from ancestor
+ * @param {element} ancestor - ancestor node
+ * @param {element} node
+ */
+ var makeOffsetPath = function (ancestor, node) {
+ var aAncestor = list.initial(listAncestor(node, func.eq(ancestor)));
+ return $.map(aAncestor, position).reverse();
+ };
+
+ /**
+ * return element from offsetPath(array of offset)
+ * @param {element} ancestor - ancestor node
+ * @param {array} aOffset - offsetPath
+ */
+ var fromOffsetPath = function (ancestor, aOffset) {
+ var current = ancestor;
+ for (var i = 0, sz = aOffset.length; i < sz; i++) {
+ current = current.childNodes[aOffset[i]];
+ }
+ return current;
+ };
+
+ /**
+ * split element or #text
+ * @param {element} node
+ * @param {number} offset
+ */
+ var splitData = function (node, offset) {
+ if (offset === 0) { return node; }
+ if (offset >= length(node)) { return node.nextSibling; }
+
+ // splitText
+ if (isText(node)) { return node.splitText(offset); }
+
+ // splitElement
+ var child = node.childNodes[offset];
+ node = insertAfter(node.cloneNode(false), node);
+ return appends(node, listNext(child));
+ };
+
+ /**
+ * split dom tree by boundaryPoint(pivot and offset)
+ * @param {element} root
+ * @param {element} pivot - this will be boundaryPoint's node
+ * @param {number} offset - this will be boundaryPoint's offset
+ */
+ var split = function (root, pivot, offset) {
+ var aAncestor = listAncestor(pivot, func.eq(root));
+ if (aAncestor.length === 1) { return splitData(pivot, offset); }
+ return aAncestor.reduce(function (node, parent) {
+ var clone = parent.cloneNode(false);
+ insertAfter(clone, parent);
+ if (node === pivot) {
+ node = splitData(node, offset);
+ }
+ appends(clone, listNext(node));
+ return clone;
+ });
+ };
+
+ /**
+ * remove node, (bRemoveChild: remove child or not)
+ * @param {element} node
+ * @param {boolean} bRemoveChild
+ */
+ var remove = function (node, bRemoveChild) {
+ if (!node || !node.parentNode) { return; }
+ if (node.removeNode) { return node.removeNode(bRemoveChild); }
+
+ var elParent = node.parentNode;
+ if (!bRemoveChild) {
+ var aNode = [];
+ var i, sz;
+ for (i = 0, sz = node.childNodes.length; i < sz; i++) {
+ aNode.push(node.childNodes[i]);
+ }
+
+ for (i = 0, sz = aNode.length; i < sz; i++) {
+ elParent.insertBefore(aNode[i], node);
+ }
+ }
+
+ elParent.removeChild(node);
+ };
+
+ var html = function ($node) {
+ return dom.isTextarea($node[0]) ? $node.val() : $node.html();
+ };
+
+ return {
+ emptyPara: emptyPara,
+ isText: isText,
+ isPara: isPara,
+ isList: isList,
+ isEditable: isEditable,
+ isControlSizing: isControlSizing,
+ isAnchor: makePredByNodeName('A'),
+ isDiv: makePredByNodeName('DIV'),
+ isSpan: makePredByNodeName('SPAN'),
+ isB: makePredByNodeName('B'),
+ isU: makePredByNodeName('U'),
+ isS: makePredByNodeName('S'),
+ isI: makePredByNodeName('I'),
+ isImg: makePredByNodeName('IMG'),
+ isTextarea: makePredByNodeName('TEXTAREA'),
+ ancestor: ancestor,
+ listAncestor: listAncestor,
+ listNext: listNext,
+ listPrev: listPrev,
+ commonAncestor: commonAncestor,
+ listBetween: listBetween,
+ insertAfter: insertAfter,
+ position: position,
+ makeOffsetPath: makeOffsetPath,
+ fromOffsetPath: fromOffsetPath,
+ split: split,
+ remove: remove,
+ html: html
+ };
+ })();
+
+ /**
+ * range module
+ */
+ var range = (function () {
+ var bW3CRangeSupport = !!document.createRange;
+
+ // return boundaryPoint from TextRange, inspired by Andy Na's HuskyRange.js
+ var textRange2bp = function (textRange, bStart) {
+ var elCont = textRange.parentElement(), nOffset;
+
+ var tester = document.body.createTextRange(), elPrevCont;
+ var aChild = list.from(elCont.childNodes);
+ for (nOffset = 0; nOffset < aChild.length; nOffset++) {
+ if (dom.isText(aChild[nOffset])) { continue; }
+ tester.moveToElementText(aChild[nOffset]);
+ if (tester.compareEndPoints('StartToStart', textRange) >= 0) { break; }
+ elPrevCont = aChild[nOffset];
+ }
+
+ if (nOffset !== 0 && dom.isText(aChild[nOffset - 1])) {
+ var textRangeStart = document.body.createTextRange(), elCurText = null;
+ textRangeStart.moveToElementText(elPrevCont || elCont);
+ textRangeStart.collapse(!elPrevCont);
+ elCurText = elPrevCont ? elPrevCont.nextSibling : elCont.firstChild;
+
+ var pointTester = textRange.duplicate();
+ pointTester.setEndPoint('StartToStart', textRangeStart);
+ var nTextCount = pointTester.text.replace(/[\r\n]/g, '').length;
+
+ while (nTextCount > elCurText.nodeValue.length && elCurText.nextSibling) {
+ nTextCount -= elCurText.nodeValue.length;
+ elCurText = elCurText.nextSibling;
+ }
+
+ /* jshint ignore:start */
+ var sDummy = elCurText.nodeValue; //enforce IE to re-reference elCurText, hack
+ /* jshint ignore:end */
+
+ if (bStart && elCurText.nextSibling && dom.isText(elCurText.nextSibling) &&
+ nTextCount === elCurText.nodeValue.length) {
+ nTextCount -= elCurText.nodeValue.length;
+ elCurText = elCurText.nextSibling;
+ }
+
+ elCont = elCurText;
+ nOffset = nTextCount;
+ }
+
+ return {cont: elCont, offset: nOffset};
+ };
+
+ // return TextRange from boundary point (inspired by google closure-library)
+ var bp2textRange = function (bp) {
+ var textRangeInfo = function (elCont, nOffset) {
+ var elNode, bCollapseToStart;
+
+ if (dom.isText(elCont)) {
+ var aPrevText = dom.listPrev(elCont, func.not(dom.isText));
+ var elPrevCont = list.last(aPrevText).previousSibling;
+ elNode = elPrevCont || elCont.parentNode;
+ nOffset += list.sum(list.tail(aPrevText), dom.length);
+ bCollapseToStart = !elPrevCont;
+ } else {
+ elNode = elCont.childNodes[nOffset] || elCont;
+ if (dom.isText(elNode)) {
+ return textRangeInfo(elNode, nOffset);
+ }
+
+ nOffset = 0;
+ bCollapseToStart = false;
+ }
+
+ return {cont: elNode, collapseToStart: bCollapseToStart, offset: nOffset};
+ };
+
+ var textRange = document.body.createTextRange();
+ var info = textRangeInfo(bp.cont, bp.offset);
+
+ textRange.moveToElementText(info.cont);
+ textRange.collapse(info.collapseToStart);
+ textRange.moveStart('character', info.offset);
+ return textRange;
+ };
+
+ // {startContainer, startOffset, endContainer, endOffset}
+ var WrappedRange = function (sc, so, ec, eo) {
+ this.sc = sc;
+ this.so = so;
+ this.ec = ec;
+ this.eo = eo;
+
+ // nativeRange: get nativeRange from sc, so, ec, eo
+ var nativeRange = function () {
+ if (bW3CRangeSupport) {
+ var w3cRange = document.createRange();
+ w3cRange.setStart(sc, so);
+ w3cRange.setEnd(ec, eo);
+ return w3cRange;
+ } else {
+ var textRange = bp2textRange({cont: sc, offset: so});
+ textRange.setEndPoint('EndToEnd', bp2textRange({cont: ec, offset: eo}));
+ return textRange;
+ }
+ };
+
+ // select: update visible range
+ this.select = function () {
+ var nativeRng = nativeRange();
+ if (bW3CRangeSupport) {
+ var selection = document.getSelection();
+ if (selection.rangeCount > 0) { selection.removeAllRanges(); }
+ selection.addRange(nativeRng);
+ } else {
+ nativeRng.select();
+ }
+ };
+
+ // listPara: listing paragraphs on range
+ this.listPara = function () {
+ var aNode = dom.listBetween(sc, ec);
+ var aPara = list.compact($.map(aNode, function (node) {
+ return dom.ancestor(node, dom.isPara);
+ }));
+ return $.map(list.clusterBy(aPara, func.eq2), list.head);
+ };
+
+ // makeIsOn: return isOn(pred) function
+ var makeIsOn = function (pred) {
+ return function () {
+ var elAncestor = dom.ancestor(sc, pred);
+ return elAncestor && (elAncestor === dom.ancestor(ec, pred));
+ };
+ };
+
+ // isOnEditable: judge whether range is on editable or not
+ this.isOnEditable = makeIsOn(dom.isEditable);
+ // isOnList: judge whether range is on list node or not
+ this.isOnList = makeIsOn(dom.isList);
+ // isOnAnchor: judge whether range is on anchor node or not
+ this.isOnAnchor = makeIsOn(dom.isAnchor);
+ // isCollapsed: judge whether range was collapsed
+ this.isCollapsed = function () { return sc === ec && so === eo; };
+
+ // insertNode
+ this.insertNode = function (node) {
+ var nativeRng = nativeRange();
+ if (bW3CRangeSupport) {
+ nativeRng.insertNode(node);
+ } else {
+ nativeRng.pasteHTML(node.outerHTML); // NOTE: missing node reference.
+ }
+ };
+
+ this.toString = function () {
+ var nativeRng = nativeRange();
+ return bW3CRangeSupport ? nativeRng.toString() : nativeRng.text;
+ };
+
+ //bookmark: offsetPath bookmark
+ this.bookmark = function (elEditable) {
+ return {
+ s: { path: dom.makeOffsetPath(elEditable, sc), offset: so },
+ e: { path: dom.makeOffsetPath(elEditable, ec), offset: eo }
+ };
+ };
+ };
+
+ return { // Range Object
+ // create Range Object From arguments or Browser Selection
+ create : function (sc, so, ec, eo) {
+ if (arguments.length === 0) { // from Browser Selection
+ if (bW3CRangeSupport) { // webkit, firefox
+ var selection = document.getSelection();
+ if (selection.rangeCount === 0) { return null; }
+
+ var nativeRng = selection.getRangeAt(0);
+ sc = nativeRng.startContainer;
+ so = nativeRng.startOffset;
+ ec = nativeRng.endContainer;
+ eo = nativeRng.endOffset;
+ } else { // IE8: TextRange
+ var textRange = document.selection.createRange();
+ var textRangeEnd = textRange.duplicate();
+ textRangeEnd.collapse(false);
+ var textRangeStart = textRange;
+ textRangeStart.collapse(true);
+
+ var bpStart = textRange2bp(textRangeStart, true),
+ bpEnd = textRange2bp(textRangeEnd, false);
+
+ sc = bpStart.cont;
+ so = bpStart.offset;
+ ec = bpEnd.cont;
+ eo = bpEnd.offset;
+ }
+ } else if (arguments.length === 2) { //collapsed
+ ec = sc;
+ eo = so;
+ }
+ return new WrappedRange(sc, so, ec, eo);
+ },
+ // createFromBookmark
+ createFromBookmark : function (elEditable, bookmark) {
+ var sc = dom.fromOffsetPath(elEditable, bookmark.s.path);
+ var so = bookmark.s.offset;
+ var ec = dom.fromOffsetPath(elEditable, bookmark.e.path);
+ var eo = bookmark.e.offset;
+ return new WrappedRange(sc, so, ec, eo);
+ }
+ };
+ })();
+
+ /**
+ * Style
+ */
+ var Style = function () {
+ // para level style
+ this.stylePara = function (rng, oStyle) {
+ var aPara = rng.listPara();
+ $.each(aPara, function (idx, elPara) {
+ $.each(oStyle, function (sKey, sValue) {
+ elPara.style[sKey] = sValue;
+ });
+ });
+ };
+
+ // get current style, elTarget: target element on event.
+ this.current = function (rng, elTarget) {
+ var $cont = $(dom.isText(rng.sc) ? rng.sc.parentNode : rng.sc);
+ var oStyle = $cont.css(['font-size', 'text-align',
+ 'list-style-type', 'line-height']) || {};
+
+ oStyle['font-size'] = parseInt(oStyle['font-size']);
+
+ // document.queryCommandState for toggle state
+ oStyle['font-bold'] = document.queryCommandState('bold') ? 'bold' : 'normal';
+ oStyle['font-italic'] = document.queryCommandState('italic') ? 'italic' : 'normal';
+ oStyle['font-underline'] = document.queryCommandState('underline') ? 'underline' : 'normal';
+
+ // list-style-type to list-style(unordered, ordered)
+ if (!rng.isOnList()) {
+ oStyle['list-style'] = 'none';
+ } else {
+ var aOrderedType = ['circle', 'disc', 'disc-leading-zero', 'square'];
+ var bUnordered = $.inArray(oStyle['list-style-type'], aOrderedType) > -1;
+ oStyle['list-style'] = bUnordered ? 'unordered' : 'ordered';
+ }
+
+ var elPara = dom.ancestor(rng.sc, dom.isPara);
+ if (elPara && elPara.style['line-height']) {
+ oStyle['line-height'] = elPara.style.lineHeight;
+ } else {
+ var lineHeight = parseInt(oStyle['line-height']) / parseInt(oStyle['font-size']);
+ oStyle['line-height'] = lineHeight.toFixed(1);
+ }
+
+ oStyle.image = dom.isImg(elTarget) && elTarget;
+ oStyle.anchor = rng.isOnAnchor() && dom.ancestor(rng.sc, dom.isAnchor);
+ oStyle.aAncestor = dom.listAncestor(rng.sc, dom.isEditable);
+
+ return oStyle;
+ };
+ };
+
+ /**
+ * History
+ */
+ var History = function () {
+ var aUndo = [], aRedo = [];
+
+ var makeSnap = function ($editable) {
+ var elEditable = $editable[0], rng = range.create();
+ return {
+ contents: $editable.html(),
+ bookmark: rng.bookmark(elEditable),
+ scrollTop: $editable.scrollTop()
+ };
+ };
+
+ var applySnap = function ($editable, oSnap) {
+ $editable.html(oSnap.contents).scrollTop(oSnap.scrollTop);
+ range.createFromBookmark($editable[0], oSnap.bookmark).select();
+ };
+
+ this.undo = function ($editable) {
+ var oSnap = makeSnap($editable);
+ if (aUndo.length === 0) { return; }
+ applySnap($editable, aUndo.pop());
+ aRedo.push(oSnap);
+ };
+
+ this.redo = function ($editable) {
+ var oSnap = makeSnap($editable);
+ if (aRedo.length === 0) { return; }
+ applySnap($editable, aRedo.pop());
+ aUndo.push(oSnap);
+ };
+
+ this.recordUndo = function ($editable) {
+ aRedo = [];
+ aUndo.push(makeSnap($editable));
+ };
+ };
+
+ /**
+ * Editor
+ */
+ var Editor = function () {
+ // save current range
+ this.saveRange = function ($editable) {
+ $editable.data('range', range.create());
+ };
+
+ // restore lately range
+ this.restoreRange = function ($editable) {
+ var rng = $editable.data('range');
+ if (rng) { rng.select(); }
+ };
+
+ //currentStyle
+ var style = new Style();
+ this.currentStyle = function (elTarget) {
+ var rng = range.create();
+ return rng.isOnEditable() && style.current(rng, elTarget);
+ };
+
+ this.tab = function ($editable) {
+ recordUndo($editable);
+ var rng = range.create();
+ var sNbsp = new Array($editable.data('tabsize') + 1).join('&nbsp;');
+ rng.insertNode($('<span id="noteTab">' + sNbsp + '</span>')[0]);
+ var $tab = $('#noteTab').removeAttr('id');
+ rng = range.create($tab[0], 1);
+ rng.select();
+ dom.remove($tab[0]);
+ };
+
+ // undo
+ this.undo = function ($editable) {
+ $editable.data('NoteHistory').undo($editable);
+ };
+
+ // redo
+ this.redo = function ($editable) {
+ $editable.data('NoteHistory').redo($editable);
+ };
+
+ // recordUndo
+ var recordUndo = this.recordUndo = function ($editable) {
+ $editable.data('NoteHistory').recordUndo($editable);
+ };
+
+ /* jshint ignore:start */
+ // native commands(with execCommand), generate function for execCommand
+ var aCmd = ['bold', 'italic', 'underline', 'strikethrough',
+ 'justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull',
+ 'insertOrderedList', 'insertUnorderedList',
+ 'indent', 'outdent', 'formatBlock', 'removeFormat',
+ 'backColor', 'foreColor', 'insertHorizontalRule'];
+
+ for (var idx = 0, len = aCmd.length; idx < len; idx ++) {
+ this[aCmd[idx]] = (function (sCmd) {
+ return function ($editable, sValue) {
+ recordUndo($editable);
+ document.execCommand(sCmd, false, sValue);
+ };
+ })(aCmd[idx]);
+ }
+ /* jshint ignore:end */
+
+ this.insertImage = function ($editable, sUrl) {
+ async.loadImage(sUrl).done(function (image) {
+ recordUndo($editable);
+ var $image = $('<img>').attr('src', sUrl);
+ $image.css('width', Math.min($editable.width(), image.width));
+ range.create().insertNode($image[0]);
+ }).fail(function () {
+ var callbacks = $editable.data('callbacks');
+ if (callbacks.onImageUploadError) {
+ callbacks.onImageUploadError();
+ }
+ });
+ };
+
+ this.formatBlock = function ($editable, sValue) {
+ recordUndo($editable);
+ sValue = agent.bMSIE ? '<' + sValue + '>' : sValue;
+ document.execCommand('FormatBlock', false, sValue);
+ };
+
+ this.fontSize = function ($editable, sValue) {
+ recordUndo($editable);
+ document.execCommand('fontSize', false, 3);
+ if (agent.bFF) {
+ // firefox: <font size="3"> to <span style='font-size={sValue}px;'>, buggy
+ $editable.find('font[size=3]').removeAttr('size').css('font-size', sValue + 'px');
+ } else {
+ // chrome: <span style="font-size: medium"> to <span style='font-size={sValue}px;'>
+ $editable.find('span').filter(function () {
+ return this.style.fontSize === 'medium';
+ }).css('font-size', sValue + 'px');
+ }
+ };
+
+ this.lineHeight = function ($editable, sValue) {
+ recordUndo($editable);
+ style.stylePara(range.create(), {lineHeight: sValue});
+ };
+
+ this.unlink = function ($editable) {
+ var rng = range.create();
+ if (rng.isOnAnchor()) {
+ recordUndo($editable);
+ var elAnchor = dom.ancestor(rng.sc, dom.isAnchor);
+ rng = range.create(elAnchor, 0, elAnchor, 1);
+ rng.select();
+ document.execCommand('unlink');
+ }
+ };
+
+ this.setLinkDialog = function ($editable, fnShowDialog) {
+ var rng = range.create();
+ if (rng.isOnAnchor()) {
+ var elAnchor = dom.ancestor(rng.sc, dom.isAnchor);
+ rng = range.create(elAnchor, 0, elAnchor, 1);
+ }
+ fnShowDialog({
+ range: rng,
+ text: rng.toString(),
+ url: rng.isOnAnchor() ? dom.ancestor(rng.sc, dom.isAnchor).href : ''
+ }, function (sLinkUrl) {
+ rng.select();
+ recordUndo($editable);
+
+ var sLinkUrlWithProtocol;
+ if (sLinkUrl.indexOf('@') !== -1) { // email address
+ sLinkUrlWithProtocol = sLinkUrl.indexOf(':') !== -1 ? sLinkUrl : 'mailto:' + sLinkUrl;
+ } else { // normal address
+ sLinkUrlWithProtocol = sLinkUrl.indexOf('://') !== -1 ? sLinkUrl : 'http://' + sLinkUrl;
+ }
+
+ //IE: createLink when range collapsed.
+ if (agent.bMSIE && rng.isCollapsed()) {
+ rng.insertNode($('<A id="linkAnchor">' + sLinkUrl + '</A>')[0]);
+ var $anchor = $('#linkAnchor').removeAttr('id')
+ .attr('href', sLinkUrlWithProtocol);
+ rng = range.create($anchor[0], 0, $anchor[0], 1);
+ rng.select();
+ } else {
+ document.execCommand('createlink', false, sLinkUrlWithProtocol);
+ }
+ });
+ };
+
+ this.color = function ($editable, sObjColor) {
+ var oColor = JSON.parse(sObjColor);
+ var foreColor = oColor.foreColor, backColor = oColor.backColor;
+
+ recordUndo($editable);
+ if (foreColor) { document.execCommand('foreColor', false, foreColor); }
+ if (backColor) { document.execCommand('backColor', false, backColor); }
+ };
+
+ this.insertTable = function ($editable, sDim) {
+ recordUndo($editable);
+ var aDim = sDim.split('x');
+ var nCol = aDim[0], nRow = aDim[1];
+
+ var aTD = [], sTD;
+ var sWhitespace = agent.bMSIE ? '&nbsp;' : '<br/>';
+ for (var idxCol = 0; idxCol < nCol; idxCol++) {
+ aTD.push('<td>' + sWhitespace + '</td>');
+ }
+ sTD = aTD.join('');
+
+ var aTR = [], sTR;
+ for (var idxRow = 0; idxRow < nRow; idxRow++) {
+ aTR.push('<tr>' + sTD + '</tr>');
+ }
+ sTR = aTR.join('');
+ var sTable = '<table class="table table-bordered">' + sTR + '</table>';
+ range.create().insertNode($(sTable)[0]);
+ };
+
+ this.floatMe = function ($editable, sValue, elTarget) {
+ recordUndo($editable);
+ elTarget.style.cssFloat = sValue;
+ };
+
+ this.resize = function ($editable, sValue, elTarget) {
+ recordUndo($editable);
+ elTarget.style.width = $editable.width() * sValue + 'px';
+ elTarget.style.height = '';
+ };
+
+ this.resizeTo = function (pos, $target) {
+ var newRatio = pos.y / pos.x;
+ var ratio = $target.data('ratio');
+
+ $target.css({
+ width: ratio > newRatio ? pos.x : pos.y / ratio,
+ height: ratio > newRatio ? pos.x * ratio : pos.y
+ });
+ };
+ };
+
+ /**
+ * Toolbar
+ */
+ var Toolbar = function () {
+ this.update = function ($toolbar, oStyle) {
+ //handle selectbox for fontsize, lineHeight
+ var checkDropdownMenu = function ($btn, nValue) {
+ $btn.find('.dropdown-menu li a').each(function () {
+ var bChecked = parseFloat($(this).data('value')) === nValue;
+ this.className = bChecked ? 'checked' : '';
+ });
+ };
+
+ var $fontsize = $toolbar.find('.note-fontsize');
+ $fontsize.find('.note-current-fontsize').html(oStyle['font-size']);
+ checkDropdownMenu($fontsize, parseFloat(oStyle['font-size']));
+
+ var $lineHeight = $toolbar.find('.note-height');
+ checkDropdownMenu($lineHeight, parseFloat(oStyle['line-height']));
+
+ //check button state
+ var btnState = function (sSelector, pred) {
+ var $btn = $toolbar.find(sSelector);
+ $btn[pred() ? 'addClass' : 'removeClass']('active');
+ };
+
+ btnState('button[data-event="bold"]', function () {
+ return oStyle['font-bold'] === 'bold';
+ });
+ btnState('button[data-event="italic"]', function () {
+ return oStyle['font-italic'] === 'italic';
+ });
+ btnState('button[data-event="underline"]', function () {
+ return oStyle['font-underline'] === 'underline';
+ });
+ btnState('button[data-event="justifyLeft"]', function () {
+ return oStyle['text-align'] === 'left' || oStyle['text-align'] === 'start';
+ });
+ btnState('button[data-event="justifyCenter"]', function () {
+ return oStyle['text-align'] === 'center';
+ });
+ btnState('button[data-event="justifyRight"]', function () {
+ return oStyle['text-align'] === 'right';
+ });
+ btnState('button[data-event="justifyFull"]', function () {
+ return oStyle['text-align'] === 'justify';
+ });
+ btnState('button[data-event="insertUnorderedList"]', function () {
+ return oStyle['list-style'] === 'unordered';
+ });
+ btnState('button[data-event="insertOrderedList"]', function () {
+ return oStyle['list-style'] === 'ordered';
+ });
+ };
+
+ this.updateRecentColor = function (elBtn, sEvent, sValue) {
+ var $color = $(elBtn).closest('.note-color');
+ var $recentColor = $color.find('.note-recent-color');
+ var oColor = JSON.parse($recentColor.attr('data-value'));
+ oColor[sEvent] = sValue;
+ $recentColor.attr('data-value', JSON.stringify(oColor));
+ var sKey = sEvent === 'backColor' ? 'background-color' : 'color';
+ $recentColor.find('i').css(sKey, sValue);
+ };
+
+ this.updateFullscreen = function ($toolbar, bFullscreen) {
+ var $btn = $toolbar.find('button[data-event="fullscreen"]');
+ $btn[bFullscreen ? 'addClass' : 'removeClass']('active');
+ };
+ this.updateCodeview = function ($toolbar, bCodeview) {
+ var $btn = $toolbar.find('button[data-event="codeview"]');
+ $btn[bCodeview ? 'addClass' : 'removeClass']('active');
+ };
+
+ this.enable = function ($toolbar) {
+ $toolbar.find('button').not('button[data-event="codeview"]').removeClass('disabled');
+ };
+
+ this.disable = function ($toolbar) {
+ $toolbar.find('button').not('button[data-event="codeview"]').addClass('disabled');
+ };
+ };
+
+ /**
+ * Popover (http://getbootstrap.com/javascript/#popovers)
+ */
+ var Popover = function () {
+ var showPopover = function ($popover, elPlaceholder) {
+ var $placeholder = $(elPlaceholder);
+ var pos = $placeholder.position(), height = $placeholder.height();
+ $popover.css({
+ display: 'block',
+ left: pos.left,
+ top: pos.top + height
+ });
+ };
+
+ this.update = function ($popover, oStyle) {
+ var $linkPopover = $popover.find('.note-link-popover'),
+ $imagePopover = $popover.find('.note-image-popover');
+ if (oStyle.anchor) {
+ var $anchor = $linkPopover.find('a');
+ $anchor.attr('href', oStyle.anchor.href).html(oStyle.anchor.href);
+ showPopover($linkPopover, oStyle.anchor);
+ } else {
+ $linkPopover.hide();
+ }
+
+ if (oStyle.image) {
+ showPopover($imagePopover, oStyle.image);
+ } else {
+ $imagePopover.hide();
+ }
+ };
+
+ this.hide = function ($popover) {
+ $popover.children().hide();
+ };
+ };
+
+ /**
+ * Handle
+ */
+ var Handle = function () {
+ this.update = function ($handle, oStyle) {
+ var $selection = $handle.find('.note-control-selection');
+ if (oStyle.image) {
+ var $image = $(oStyle.image);
+ var pos = $image.position();
+ var szImage = {w: $image.width(), h: $image.height()};
+ $selection.css({
+ display: 'block',
+ left: pos.left,
+ top: pos.top,
+ width: szImage.w,
+ height: szImage.h
+ }).data('target', oStyle.image); // save current image element.
+ var sSizing = szImage.w + 'x' + szImage.h;
+ $selection.find('.note-control-selection-info').text(sSizing);
+ } else {
+ $selection.hide();
+ }
+ };
+
+ this.hide = function ($handle) {
+ $handle.children().hide();
+ };
+ };
+
+ /**
+ * Dialog
+ */
+ var Dialog = function () {
+ this.showImageDialog = function ($dialog, hDropImage, fnInsertImages, fnInsertImage) {
+ var $imageDialog = $dialog.find('.note-image-dialog');
+ var $dropzone = $dialog.find('.note-dropzone'),
+ $imageInput = $dialog.find('.note-image-input'),
+ $imageUrl = $dialog.find('.note-image-url'),
+ $imageBtn = $dialog.find('.note-image-btn');
+
+ $imageDialog.on('shown.bs.modal', function () {
+ $dropzone.on('dragenter dragover dragleave', false);
+ $dropzone.on('drop', function (e) {
+ hDropImage(e);
+ $imageDialog.modal('hide');
+ });
+ $imageInput.on('change', function () {
+ fnInsertImages(this.files);
+ $(this).val('');
+ $imageDialog.modal('hide');
+ });
+ $imageUrl.val('').keyup(function () {
+ if ($imageUrl.val()) {
+ $imageBtn.removeClass('disabled').attr('disabled', false);
+ } else {
+ $imageBtn.addClass('disabled').attr('disabled', true);
+ }
+ }).trigger('focus');
+ $imageBtn.click(function (event) {
+ $imageDialog.modal('hide');
+ fnInsertImage($imageUrl.val());
+ event.preventDefault();
+ });
+ }).on('hidden.bs.modal', function () {
+ $dropzone.off('dragenter dragover dragleave drop');
+ $imageInput.off('change');
+ $imageDialog.off('shown.bs.modal hidden.bs.modal');
+ $imageUrl.off('keyup');
+ $imageBtn.off('click');
+ }).modal('show');
+ };
+
+ this.showLinkDialog = function ($dialog, linkInfo, callback) {
+ var $linkDialog = $dialog.find('.note-link-dialog');
+ var $linkText = $linkDialog.find('.note-link-text'),
+ $linkUrl = $linkDialog.find('.note-link-url'),
+ $linkBtn = $linkDialog.find('.note-link-btn');
+
+ $linkDialog.on('shown.bs.modal', function () {
+ $linkText.html(linkInfo.text);
+ $linkUrl.val(linkInfo.url).keyup(function () {
+ if ($linkUrl.val()) {
+ $linkBtn.removeClass('disabled').attr('disabled', false);
+ } else {
+ $linkBtn.addClass('disabled').attr('disabled', true);
+ }
+
+ if (!linkInfo.text) { $linkText.html($linkUrl.val()); }
+ }).trigger('focus');
+ $linkBtn.click(function (event) {
+ $linkDialog.modal('hide'); //hide and createLink (ie9+)
+ callback($linkUrl.val());
+ event.preventDefault();
+ });
+ }).on('hidden.bs.modal', function () {
+ $linkUrl.off('keyup');
+ $linkBtn.off('click');
+ $linkDialog.off('shown.bs.modal hidden.bs.modal');
+ }).modal('show');
+ };
+
+ this.showHelpDialog = function ($dialog) {
+ $dialog.find('.note-help-dialog').modal('show');
+ };
+ };
+
+ /**
+ * EventHandler
+ *
+ * handle mouse & key event on note
+ */
+ var EventHandler = function () {
+ var editor = new Editor();
+ var toolbar = new Toolbar(), popover = new Popover();
+ var handle = new Handle(), dialog = new Dialog();
+
+ var key = { BACKSPACE: 8, TAB: 9, ENTER: 13, SPACE: 32,
+ NUM0: 48, NUM1: 49, NUM6: 54, NUM7: 55, NUM8: 56,
+ B: 66, E: 69, I: 73, J: 74, K: 75, L: 76, R: 82, S: 83, U: 85,
+ Y: 89, Z: 90, SLASH: 191,
+ LEFTBRACKET: 219, BACKSLACH: 220, RIGHTBRACKET: 221 };
+
+ // makeLayoutInfo from editor's descendant node.
+ var makeLayoutInfo = function (descendant) {
+ var $editor = $(descendant).closest('.note-editor');
+ return {
+ editor: function () { return $editor; },
+ toolbar: function () { return $editor.find('.note-toolbar'); },
+ editable: function () { return $editor.find('.note-editable'); },
+ codable: function () { return $editor.find('.note-codable'); },
+ statusbar: function () { return $editor.find('.note-statusbar'); },
+ popover: function () { return $editor.find('.note-popover'); },
+ handle: function () { return $editor.find('.note-handle'); },
+ dialog: function () { return $editor.find('.note-dialog'); }
+ };
+ };
+
+ var hKeydown = function (event) {
+ var bCmd = agent.bMac ? event.metaKey : event.ctrlKey,
+ bShift = event.shiftKey, keyCode = event.keyCode;
+
+ // optimize
+ var bExecCmd = (bCmd || bShift || keyCode === key.TAB);
+ var oLayoutInfo = (bExecCmd) ? makeLayoutInfo(event.target) : null;
+
+ if (keyCode === key.TAB && oLayoutInfo.editable().data('tabsize')) {
+ editor.tab(oLayoutInfo.editable());
+ } else if (bCmd && ((bShift && keyCode === key.Z) || keyCode === key.Y)) {
+ editor.redo(oLayoutInfo.editable());
+ } else if (bCmd && keyCode === key.Z) {
+ editor.undo(oLayoutInfo.editable());
+ } else if (bCmd && keyCode === key.B) {
+ editor.bold(oLayoutInfo.editable());
+ } else if (bCmd && keyCode === key.I) {
+ editor.italic(oLayoutInfo.editable());
+ } else if (bCmd && keyCode === key.U) {
+ editor.underline(oLayoutInfo.editable());
+ } else if (bCmd && bShift && keyCode === key.S) {
+ editor.strikethrough(oLayoutInfo.editable());
+ } else if (bCmd && keyCode === key.BACKSLACH) {
+ editor.removeFormat(oLayoutInfo.editable());
+ } else if (bCmd && keyCode === key.K) {
+ oLayoutInfo.editable();
+ editor.setLinkDialog(oLayoutInfo.editable(), function (linkInfo, cb) {
+ dialog.showLinkDialog(oLayoutInfo.dialog(), linkInfo, cb);
+ });
+ } else if (bCmd && keyCode === key.SLASH) {
+ dialog.showHelpDialog(oLayoutInfo.dialog());
+ } else if (bCmd && bShift && keyCode === key.L) {
+ editor.justifyLeft(oLayoutInfo.editable());
+ } else if (bCmd && bShift && keyCode === key.E) {
+ editor.justifyCenter(oLayoutInfo.editable());
+ } else if (bCmd && bShift && keyCode === key.R) {
+ editor.justifyRight(oLayoutInfo.editable());
+ } else if (bCmd && bShift && keyCode === key.J) {
+ editor.justifyFull(oLayoutInfo.editable());
+ } else if (bCmd && bShift && keyCode === key.NUM7) {
+ editor.insertUnorderedList(oLayoutInfo.editable());
+ } else if (bCmd && bShift && keyCode === key.NUM8) {
+ editor.insertOrderedList(oLayoutInfo.editable());
+ } else if (bCmd && keyCode === key.LEFTBRACKET) {
+ editor.outdent(oLayoutInfo.editable());
+ } else if (bCmd && keyCode === key.RIGHTBRACKET) {
+ editor.indent(oLayoutInfo.editable());
+ } else if (bCmd && keyCode === key.NUM0) { // formatBlock Paragraph
+ editor.formatBlock(oLayoutInfo.editable(), 'P');
+ } else if (bCmd && (key.NUM1 <= keyCode && keyCode <= key.NUM6)) {
+ var sHeading = 'H' + String.fromCharCode(keyCode); // H1~H6
+ editor.formatBlock(oLayoutInfo.editable(), sHeading);
+ } else if (bCmd && keyCode === key.ENTER) {
+ editor.insertHorizontalRule(oLayoutInfo.editable());
+ } else {
+ if (keyCode === key.BACKSPACE || keyCode === key.ENTER ||
+ keyCode === key.SPACE) {
+ editor.recordUndo(makeLayoutInfo(event.target).editable());
+ }
+ return; // not matched
+ }
+ event.preventDefault(); //prevent default event for FF
+ };
+
+ var insertImages = function ($editable, files) {
+ var callbacks = $editable.data('callbacks');
+ editor.restoreRange($editable);
+ if (callbacks.onImageUpload) { // call custom handler
+ callbacks.onImageUpload(files, editor, $editable);
+ } else {
+ $.each(files, function (idx, file) {
+ async.readFile(file).done(function (sURL) {
+ editor.insertImage($editable, sURL);
+ }).fail(function () {
+ if (callbacks.onImageUploadError) {
+ callbacks.onImageUploadError();
+ }
+ });
+ });
+ }
+ };
+
+ var hDropImage = function (event) {
+ var dataTransfer = event.originalEvent.dataTransfer;
+ if (dataTransfer && dataTransfer.files) {
+ var oLayoutInfo = makeLayoutInfo(event.currentTarget || event.target);
+ insertImages(oLayoutInfo.editable(), dataTransfer.files);
+ }
+ event.stopPropagation();
+ event.preventDefault();
+ };
+
+ var hMousedown = function (event) {
+ //preventDefault Selection for FF, IE8+
+ if (dom.isImg(event.target)) { event.preventDefault(); }
+ };
+
+ var hToolbarAndPopoverUpdate = function (event) {
+ var oLayoutInfo = makeLayoutInfo(event.currentTarget || event.target);
+ var oStyle = editor.currentStyle(event.target);
+ if (!oStyle) { return; }
+ toolbar.update(oLayoutInfo.toolbar(), oStyle);
+ popover.update(oLayoutInfo.popover(), oStyle);
+ handle.update(oLayoutInfo.handle(), oStyle);
+ };
+
+ var hScroll = function (event) {
+ var oLayoutInfo = makeLayoutInfo(event.currentTarget || event.target);
+ //hide popover and handle when scrolled
+ popover.hide(oLayoutInfo.popover());
+ handle.hide(oLayoutInfo.handle());
+ };
+
+ var hHandleMousedown = function (event) {
+ if (dom.isControlSizing(event.target)) {
+ var oLayoutInfo = makeLayoutInfo(event.target),
+ $handle = oLayoutInfo.handle(), $popover = oLayoutInfo.popover(),
+ $editable = oLayoutInfo.editable(), $editor = oLayoutInfo.editor();
+
+ var elTarget = $handle.find('.note-control-selection').data('target'),
+ $target = $(elTarget);
+ var posStart = $target.offset(),
+ scrollTop = $(document).scrollTop(), posDistance;
+
+ $editor.on('mousemove', function (event) {
+ posDistance = {x: event.clientX - posStart.left,
+ y: event.clientY - (posStart.top - scrollTop)};
+ editor.resizeTo(posDistance, $target);
+ handle.update($handle, {image: elTarget});
+ popover.update($popover, {image: elTarget});
+ }).on('mouseup', function () {
+ $editor.off('mousemove').off('mouseup');
+ });
+
+ if (!$target.data('ratio')) { // original ratio.
+ $target.data('ratio', $target.height() / $target.width());
+ }
+
+ editor.recordUndo($editable);
+ event.stopPropagation();
+ event.preventDefault();
+ }
+ };
+
+ var hToolbarAndPopoverMousedown = function (event) {
+ // prevent default event when insertTable (FF, Webkit)
+ var $btn = $(event.target).closest('[data-event]');
+ if ($btn.length > 0) { event.preventDefault(); }
+ };
+
+ var hToolbarAndPopoverClick = function (event) {
+ var $btn = $(event.target).closest('[data-event]');
+
+ if ($btn.length > 0) {
+ var sEvent = $btn.attr('data-event'),
+ sValue = $btn.attr('data-value');
+
+ var oLayoutInfo = makeLayoutInfo(event.target);
+ var $editor = oLayoutInfo.editor(),
+ $toolbar = oLayoutInfo.toolbar(),
+ $dialog = oLayoutInfo.dialog(),
+ $editable = oLayoutInfo.editable(),
+ $codable = oLayoutInfo.codable();
+
+ // before command
+ var elTarget;
+ if ($.inArray(sEvent, ['resize', 'floatMe']) !== -1) {
+ var $handle = oLayoutInfo.handle();
+ var $selection = $handle.find('.note-control-selection');
+ elTarget = $selection.data('target');
+ }
+
+ if (editor[sEvent]) { // on command
+ $editable.trigger('focus');
+ editor[sEvent]($editable, sValue, elTarget);
+ }
+
+ // after command
+ if ($.inArray(sEvent, ['backColor', 'foreColor']) !== -1) {
+ toolbar.updateRecentColor($btn[0], sEvent, sValue);
+ } else if (sEvent === 'showLinkDialog') { // popover to dialog
+ $editable.focus();
+ editor.setLinkDialog($editable, function (linkInfo, cb) {
+ dialog.showLinkDialog($dialog, linkInfo, cb);
+ });
+ } else if (sEvent === 'showImageDialog') {
+ $editable.focus();
+ dialog.showImageDialog($dialog, hDropImage, function (files) {
+ insertImages($editable, files);
+ }, function (sUrl) {
+ editor.restoreRange($editable);
+ editor.insertImage($editable, sUrl);
+ });
+ } else if (sEvent === 'showHelpDialog') {
+ dialog.showHelpDialog($dialog);
+ } else if (sEvent === 'fullscreen') {
+ $editor.toggleClass('fullscreen');
+
+ var hResizeFullscreen = function () {
+ var nHeight = $(window).height() - $toolbar.outerHeight();
+ $editable.css('height', nHeight);
+ };
+
+ var bFullscreen = $editor.hasClass('fullscreen');
+ if (bFullscreen) {
+ $editable.data('orgHeight', $editable.css('height'));
+ $(window).resize(hResizeFullscreen).trigger('resize');
+ } else {
+ var hasOptionHeight = !!$editable.data('optionHeight');
+ $editable.css('height', hasOptionHeight ? $editable.data('orgHeight') : 'auto');
+ $(window).off('resize');
+ }
+
+ toolbar.updateFullscreen($toolbar, bFullscreen);
+ } else if (sEvent === 'codeview') {
+ $editor.toggleClass('codeview');
+
+ var bCodeview = $editor.hasClass('codeview');
+ if (bCodeview) {
+ $codable.val($editable.html());
+ $codable.height($editable.height());
+ toolbar.disable($toolbar);
+ $codable.focus();
+
+ // activate CodeMirror as codable
+ if (agent.bCodeMirror) {
+ var cmEditor = CodeMirror.fromTextArea($codable[0], $.extend({
+ mode: 'text/html',
+ lineNumbers: true
+ }, $editor.data('options').codemirror));
+ // CodeMirror hasn't Padding.
+ cmEditor.setSize(null, $editable.outerHeight());
+ // autoFormatRange If formatting included
+ if (cmEditor.autoFormatRange) {
+ cmEditor.autoFormatRange({line: 0, ch: 0}, {
+ line: cmEditor.lineCount(),
+ ch: cmEditor.getTextArea().value.length
+ });
+ }
+ $codable.data('cmEditor', cmEditor);
+ }
+ } else {
+ // deactivate CodeMirror as codable
+ if (agent.bCodeMirror) {
+ $codable.data('cmEditor').toTextArea();
+ }
+
+ $editable.html($codable.val() || dom.emptyPara);
+ $editable.height($editable.data('optionHeight') ? $codable.height() : 'auto');
+
+ toolbar.enable($toolbar);
+ $editable.focus();
+ }
+
+ toolbar.updateCodeview(oLayoutInfo.toolbar(), bCodeview);
+ }
+
+ hToolbarAndPopoverUpdate(event);
+ }
+ };
+
+ var EDITABLE_PADDING = 24;
+ var hStatusbarMousedown = function (event) {
+ var $document = $(document);
+ var oLayoutInfo = makeLayoutInfo(event.target);
+ var $editable = oLayoutInfo.editable();
+
+ var nEditableTop = $editable.offset().top - $document.scrollTop();
+ var hMousemove = function (event) {
+ $editable.height(event.clientY - (nEditableTop + EDITABLE_PADDING));
+ };
+ var hMouseup = function () {
+ $document.unbind('mousemove', hMousemove)
+ .unbind('mouseup', hMouseup);
+ };
+ $document.mousemove(hMousemove).mouseup(hMouseup);
+ event.stopPropagation();
+ event.preventDefault();
+ };
+
+ var PX_PER_EM = 18;
+ var hDimensionPickerMove = function (event) {
+ var $picker = $(event.target.parentNode); // target is mousecatcher
+ var $dimensionDisplay = $picker.next();
+ var $catcher = $picker.find('.note-dimension-picker-mousecatcher');
+ var $highlighted = $picker.find('.note-dimension-picker-highlighted');
+ var $unhighlighted = $picker.find('.note-dimension-picker-unhighlighted');
+ var posOffset;
+ if (event.offsetX === undefined) {
+ // HTML5 with jQuery - e.offsetX is undefined in Firefox
+ var posCatcher = $(event.target).offset();
+ posOffset = {x: event.pageX - posCatcher.left,
+ y: event.pageY - posCatcher.top};
+ } else {
+ posOffset = {x: event.offsetX, y: event.offsetY};
+ }
+
+ var dim = {c: Math.ceil(posOffset.x / PX_PER_EM) || 1,
+ r: Math.ceil(posOffset.y / PX_PER_EM) || 1};
+
+ $highlighted.css({ width: dim.c + 'em', height: dim.r + 'em' });
+ $catcher.attr('data-value', dim.c + 'x' + dim.r);
+
+ if (3 < dim.c && dim.c < 10) { // 5~10
+ $unhighlighted.css({ width: dim.c + 1 + 'em'});
+ }
+
+ if (3 < dim.r && dim.r < 10) { // 5~10
+ $unhighlighted.css({ height: dim.r + 1 + 'em'});
+ }
+
+ $dimensionDisplay.html(dim.c + ' x ' + dim.r);
+ };
+
+ /**
+ * Attach eventhandler
+ * @param {object} oLayoutInfo - layout Informations
+ * @param {object} options - user options include custom event handlers
+ * @param {function} options.enter - enter key handler
+ */
+ this.attach = function (oLayoutInfo, options) {
+ oLayoutInfo.editable.on('keydown', hKeydown);
+ oLayoutInfo.editable.on('mousedown', hMousedown);
+ oLayoutInfo.editable.on('keyup mouseup', hToolbarAndPopoverUpdate);
+ oLayoutInfo.editable.on('scroll', hScroll);
+ //TODO: handle Drag point
+ oLayoutInfo.editable.on('dragenter dragover dragleave', false);
+ oLayoutInfo.editable.on('drop', hDropImage);
+
+ oLayoutInfo.handle.on('mousedown', hHandleMousedown);
+
+ oLayoutInfo.toolbar.on('click', hToolbarAndPopoverClick);
+ oLayoutInfo.popover.on('click', hToolbarAndPopoverClick);
+ oLayoutInfo.toolbar.on('mousedown', hToolbarAndPopoverMousedown);
+ oLayoutInfo.popover.on('mousedown', hToolbarAndPopoverMousedown);
+
+ oLayoutInfo.statusbar.on('mousedown', hStatusbarMousedown);
+
+ //toolbar table dimension
+ var $toolbar = oLayoutInfo.toolbar;
+ var $catcher = $toolbar.find('.note-dimension-picker-mousecatcher');
+ $catcher.on('mousemove', hDimensionPickerMove);
+
+ // save selection when focusout
+ oLayoutInfo.editable.on('blur', function () {
+ editor.saveRange(oLayoutInfo.editable);
+ });
+
+ // basic event callbacks (lowercase)
+ // enter, focus, blur, keyup, keydown
+ if (options.onenter) {
+ oLayoutInfo.editable.keypress(function (event) {
+ if (event.keyCode === key.ENTER) { options.onenter(event); }
+ });
+ }
+ if (options.onfocus) { oLayoutInfo.editable.focus(options.onfocus); }
+ if (options.onblur) { oLayoutInfo.editable.blur(options.onblur); }
+ if (options.onkeyup) { oLayoutInfo.editable.keyup(options.onkeyup); }
+ if (options.onkeydown) { oLayoutInfo.editable.keydown(options.onkeydown); }
+
+ // callbacks for advanced features (camel)
+ // All editor status will be saved on editable with jquery's data
+ // for support multiple editor with singleton object.
+ oLayoutInfo.editable.data('callbacks', {
+ onChange: options.onChange,
+ onAutoSave: options.onAutoSave,
+ onPasteBefore: options.onPasteBefore,
+ onPasteAfter: options.onPasteAfter,
+ onImageUpload: options.onImageUpload,
+ onImageUploadError: options.onImageUpload,
+ onFileUpload: options.onFileUpload,
+ onFileUploadError: options.onFileUpload
+ });
+ };
+
+ this.dettach = function (oLayoutInfo) {
+ oLayoutInfo.editable.off();
+ oLayoutInfo.toolbar.off();
+ oLayoutInfo.handle.off();
+ oLayoutInfo.popover.off();
+ };
+ };
+
+ /**
+ * Locale
+ */
+ var Locale = {
+ 'en-US': {
+ font: {
+ bold: 'Bold',
+ italic: 'Italic',
+ underline: 'Underline',
+ strike: 'Strike',
+ clear: 'Remove Font Style',
+ height: 'Line Height',
+ size: 'Font Size'
+ },
+ image: {
+ image: 'Picture',
+ insert: 'Insert Image',
+ resize_full: 'Resize Full',
+ resize_half: 'Resize Half',
+ resize_quarter: 'Resize Quarter',
+ float_left: 'Float Left',
+ float_right: 'Float Right',
+ float_none: 'Float None',
+ drag_image_here: 'Drag an image here',
+ select_from_files: 'Select from files',
+ url: 'Image URL'
+ },
+ link: {
+ link: 'Link',
+ insert: 'Insert Link',
+ unlink: 'Unlink',
+ edit: 'Edit',
+ text_to_display: 'Text to display',
+ url: 'To what URL should this link go?'
+ },
+ table: {
+ table: 'Table'
+ },
+ hr: {
+ insert: 'Insert Horizontal Rule'
+ },
+ style: {
+ style: 'Style',
+ normal: 'Normal',
+ blockquote: 'Quote',
+ pre: 'Code',
+ h1: 'Header 1',
+ h2: 'Header 2',
+ h3: 'Header 3',
+ h4: 'Header 4',
+ h5: 'Header 5',
+ h6: 'Header 6'
+ },
+ lists: {
+ unordered: 'Unordered list',
+ ordered: 'Ordered list'
+ },
+ options: {
+ help: 'Help',
+ fullscreen: 'Full Screen',
+ codeview: 'Code View'
+ },
+ paragraph: {
+ paragraph: 'Paragraph',
+ outdent: 'Outdent',
+ indent: 'Indent',
+ left: 'Align left',
+ center: 'Align center',
+ right: 'Align right',
+ justify: 'Justify full'
+ },
+ color: {
+ recent: 'Recent Color',
+ more: 'More Color',
+ background: 'BackColor',
+ foreground: 'FontColor',
+ transparent: 'Transparent',
+ set_transparent: 'Set transparent',
+ reset: 'Reset',
+ reset_to_default: 'Reset to default'
+ },
+ shortcut: {
+ shortcuts: 'Keyboard shortcuts',
+ close: 'Close',
+ text_formatting: 'Text formatting',
+ action: 'Action',
+ paragraph_formatting: 'Paragraph formatting',
+ document_style: 'Document Style'
+ },
+ history: {
+ undo: 'Undo',
+ redo: 'Redo'
+ }
+ },
+
+ 'nl-NL': {
+ font: {
+ bold: 'Vet',
+ italic: 'Cursief',
+ underline: 'Onderstrepen',
+ strike: 'Doorhalen',
+ clear: 'Stijl verwijderen',
+ height: 'Regelhoogte',
+ size: 'Tekstgrootte'
+ },
+ image: {
+ image: 'Afbeelding',
+ insert: 'Afbeelding invoegen',
+ resize_full: 'Volledige breedte',
+ resize_half: 'Halve breedte',
+ resize_quarter: 'Kwart breedte',
+ float_left: 'Links uitlijnen',
+ float_right: 'Rechts uitlijnen',
+ float_none: 'Geen uitlijning',
+ drag_image_here: 'Sleep hier een afbeelding naar toe',
+ select_from_files: 'Selecteer een bestand',
+ url: 'URL van de afbeelding'
+ },
+ link: {
+ link: 'Link',
+ insert: 'Link invoegen',
+ unlink: 'Link verwijderen',
+ edit: 'Wijzigen',
+ text_to_display: 'Tekst van link',
+ url: 'Naar welke URL moet deze link verwijzen?'
+ },
+ table: {
+ table: 'Tabel'
+ },
+ hr: {
+ insert: 'Horizontale lijn invoegen'
+ },
+ style: {
+ style: 'Stijl',
+ normal: 'Normaal',
+ blockquote: 'Quote',
+ pre: 'Code',
+ h1: 'Kop 1',
+ h2: 'Kop 2',
+ h3: 'Kop 3',
+ h4: 'Kop 4',
+ h5: 'Kop 5',
+ h6: 'Kop 6'
+ },
+ lists: {
+ unordered: 'Ongeordende lijst',
+ ordered: 'Geordende lijst'
+ },
+ options: {
+ help: 'Help',
+ fullscreen: 'Volledig scherm',
+ codeview: 'Bekijk Code'
+ },
+ paragraph: {
+ paragraph: 'Paragraaf',
+ outdent: 'Inspringen verkleinen',
+ indent: 'Inspringen vergroten',
+ left: 'Links uitlijnen',
+ center: 'Centreren',
+ right: 'Rechts uitlijnen',
+ justify: 'Uitvullen'
+ },
+ color: {
+ recent: 'Recente kleur',
+ more: 'Meer kleuren',
+ background: 'Achtergrond kleur',
+ foreground: 'Tekst kleur',
+ transparent: 'Transparant',
+ set_transparent: 'Transparant',
+ reset: 'Standaard',
+ reset_to_default: 'Standaard kleur'
+ },
+ shortcut: {
+ shortcuts: 'Toetsencombinaties',
+ close: 'sluiten',
+ text_formatting: 'Tekststijlen',
+ action: 'Acties',
+ paragraph_formatting: 'Paragraafstijlen',
+ document_style: 'Documentstijlen'
+ },
+ history: {
+ undo: 'Ongedaan maken',
+ redo: 'Opnieuw doorvoeren'
+ }
+ }
+ };
+
+ /**
+ * Renderer
+ *
+ * rendering toolbar and editable
+ */
+ var Renderer = function () {
+ /* jshint ignore:start */
+ var aToolbarItem = {
+ picture: function(locale) {
+ return '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.image.image + '" data-event="showImageDialog" tabindex="-1"><i class="fa fa-picture-o icon-picture"></i></button>';
+ },
+ link: function(locale) {
+ return '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.link.link + '" data-event="showLinkDialog" data-shortcut="Ctrl+K" data-mac-shortcut="⌘+K" tabindex="-1"><i class="fa fa-link icon-link"></i></button>';
+ },
+ table: function(locale) {
+ return '<button type="button" class="btn btn-default btn-sm btn-small dropdown-toggle" title="' + locale.table.table + '" data-toggle="dropdown" tabindex="-1"><i class="fa fa-table icon-table"></i> <span class="caret"></span></button>' +
+ '<ul class="dropdown-menu">' +
+ '<div class="note-dimension-picker">' +
+ '<div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"></div>' +
+ '<div class="note-dimension-picker-highlighted"></div>' +
+ '<div class="note-dimension-picker-unhighlighted"></div>' +
+ '</div>' +
+ '<div class="note-dimension-display"> 1 x 1 </div>' +
+ '</ul>';
+ },
+ style: function(locale) {
+ return '<button type="button" class="btn btn-default btn-sm btn-small dropdown-toggle" title="' + locale.style.style + '" data-toggle="dropdown" tabindex="-1"><i class="fa fa-magic icon-magic"></i> <span class="caret"></span></button>' +
+ '<ul class="dropdown-menu">' +
+ '<li><a data-event="formatBlock" data-value="p">' + locale.style.normal + '</a></li>' +
+ '<li><a data-event="formatBlock" data-value="blockquote"><blockquote>' + locale.style.blockquote + '</blockquote></a></li>' +
+ '<li><a data-event="formatBlock" data-value="pre">' + locale.style.pre + '</a></li>' +
+ '<li><a data-event="formatBlock" data-value="h1"><h1>' + locale.style.h1 + '</h1></a></li>' +
+ '<li><a data-event="formatBlock" data-value="h2"><h2>' + locale.style.h2 + '</h2></a></li>' +
+ '<li><a data-event="formatBlock" data-value="h3"><h3>' + locale.style.h3 + '</h3></a></li>' +
+ '<li><a data-event="formatBlock" data-value="h4"><h4>' + locale.style.h4 + '</h4></a></li>' +
+ '<li><a data-event="formatBlock" data-value="h5"><h5>' + locale.style.h5 + '</h5></a></li>' +
+ '<li><a data-event="formatBlock" data-value="h6"><h6>' + locale.style.h6 + '</h6></a></li>' +
+ '</ul>';
+ },
+ fontsize: function(locale) {
+ return '<button type="button" class="btn btn-default btn-sm btn-small dropdown-toggle" data-toggle="dropdown" title="' + locale.font.size + '" tabindex="-1"><span class="note-current-fontsize">11</span> <b class="caret"></b></button>' +
+ '<ul class="dropdown-menu">' +
+ '<li><a data-event="fontSize" data-value="8"><i class="fa fa-check icon-ok"></i> 8</a></li>' +
+ '<li><a data-event="fontSize" data-value="9"><i class="fa fa-check icon-ok"></i> 9</a></li>' +
+ '<li><a data-event="fontSize" data-value="10"><i class="fa fa-check icon-ok"></i> 10</a></li>' +
+ '<li><a data-event="fontSize" data-value="11"><i class="fa fa-check icon-ok"></i> 11</a></li>' +
+ '<li><a data-event="fontSize" data-value="12"><i class="fa fa-check icon-ok"></i> 12</a></li>' +
+ '<li><a data-event="fontSize" data-value="14"><i class="fa fa-check icon-ok"></i> 14</a></li>' +
+ '<li><a data-event="fontSize" data-value="18"><i class="fa fa-check icon-ok"></i> 18</a></li>' +
+ '<li><a data-event="fontSize" data-value="24"><i class="fa fa-check icon-ok"></i> 24</a></li>' +
+ '<li><a data-event="fontSize" data-value="36"><i class="fa fa-check icon-ok"></i> 36</a></li>' +
+ '</ul>';
+ },
+ color: function(locale) {
+ return '<button type="button" class="btn btn-default btn-sm btn-small note-recent-color" title="' + locale.color.recent + '" data-event="color" data-value=\'{"backColor":"yellow"}\' tabindex="-1"><i class="fa fa-font icon-font" style="color:black;background-color:yellow;"></i></button>' +
+ '<button type="button" class="btn btn-default btn-sm btn-small dropdown-toggle" title="' + locale.color.more + '" data-toggle="dropdown" tabindex="-1">' +
+ '<span class="caret"></span>' +
+ '</button>' +
+ '<ul class="dropdown-menu">' +
+ '<li>' +
+ '<div class="btn-group">' +
+ '<div class="note-palette-title">' + locale.color.background + '</div>' +
+ '<div class="note-color-reset" data-event="backColor" data-value="inherit" title="' + locale.color.transparent + '">' + locale.color.set_transparent + '</div>' +
+ '<div class="note-color-palette" data-target-event="backColor"></div>' +
+ '</div>' +
+ '<div class="btn-group">' +
+ '<div class="note-palette-title">' + locale.color.foreground + '</div>' +
+ '<div class="note-color-reset" data-event="foreColor" data-value="inherit" title="' + locale.color.reset + '">' + locale.color.reset_to_default + '</div>' +
+ '<div class="note-color-palette" data-target-event="foreColor"></div>' +
+ '</div>' +
+ '</li>' +
+ '</ul>';
+ },
+ bold: function(locale) {
+ return '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.font.bold + '" data-shortcut="Ctrl+B" data-mac-shortcut="⌘+B" data-event="bold" tabindex="-1"><i class="fa fa-bold icon-bold"></i></button>';
+ },
+ italic: function(locale) {
+ return '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.font.italic + '" data-shortcut="Ctrl+I" data-mac-shortcut="⌘+I" data-event="italic" tabindex="-1"><i class="fa fa-italic icon-italic"></i></button>';
+ },
+ underline: function(locale) {
+ return '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.font.underline + '" data-shortcut="Ctrl+U" data-mac-shortcut="⌘+U" data-event="underline" tabindex="-1"><i class="fa fa-underline icon-underline"></i></button>';
+ },
+ clear: function(locale) {
+ return '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.font.clear + '" data-shortcut="Ctrl+\\" data-mac-shortcut="⌘+\\" data-event="removeFormat" tabindex="-1"><i class="fa fa-eraser icon-eraser"></i></button>';
+ },
+ ul: function(locale) {
+ return '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.lists.unordered + '" data-shortcut="Ctrl+Shift+8" data-mac-shortcut="⌘+⇧+7" data-event="insertUnorderedList" tabindex="-1"><i class="fa fa-list-ul icon-list-ul"></i></button>';
+ },
+ ol: function(locale) {
+ return '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.lists.ordered + '" data-shortcut="Ctrl+Shift+7" data-mac-shortcut="⌘+⇧+8" data-event="insertOrderedList" tabindex="-1"><i class="fa fa-list-ol icon-list-ol"></i></button>';
+ },
+ paragraph: function(locale) {
+ return '<button type="button" class="btn btn-default btn-sm btn-small dropdown-toggle" title="' + locale.paragraph.paragraph + '" data-toggle="dropdown" tabindex="-1"><i class="fa fa-align-left icon-align-left"></i> <span class="caret"></span></button>' +
+ '<ul class="dropdown-menu">' +
+ '<li>' +
+ '<div class="note-align btn-group">' +
+ '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.paragraph.left + '" data-shortcut="Ctrl+Shift+L" data-mac-shortcut="⌘+⇧+L" data-event="justifyLeft" tabindex="-1"><i class="fa fa-align-left icon-align-left"></i></button>' +
+ '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.paragraph.center + '" data-shortcut="Ctrl+Shift+E" data-mac-shortcut="⌘+⇧+E" data-event="justifyCenter" tabindex="-1"><i class="fa fa-align-center icon-align-center"></i></button>' +
+ '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.paragraph.right + '" data-shortcut="Ctrl+Shift+R" data-mac-shortcut="⌘+⇧+R" data-event="justifyRight" tabindex="-1"><i class="fa fa-align-right icon-align-right"></i></button>' +
+ '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.paragraph.justify + '" data-shortcut="Ctrl+Shift+J" data-mac-shortcut="⌘+⇧+J" data-event="justifyFull" tabindex="-1"><i class="fa fa-align-justify icon-align-justify"></i></button>' +
+ '</div>' +
+ '</li>' +
+ '<li>' +
+ '<div class="note-list btn-group">' +
+ '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.paragraph.outdent + '" data-shortcut="Ctrl+[" data-mac-shortcut="⌘+[" data-event="outdent" tabindex="-1"><i class="fa fa-outdent icon-indent-left"></i></button>' +
+ '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.paragraph.indent + '" data-shortcut="Ctrl+]" data-mac-shortcut="⌘+]" data-event="indent" tabindex="-1"><i class="fa fa-indent icon-indent-right"></i></button>' +
+ '</li>' +
+ '</ul>';
+ },
+ height: function(locale) {
+ return '<button type="button" class="btn btn-default btn-sm btn-small dropdown-toggle" data-toggle="dropdown" title="' + locale.font.height + '" tabindex="-1"><i class="fa fa-text-height icon-text-height"></i>&nbsp; <b class="caret"></b></button>' +
+ '<ul class="dropdown-menu">' +
+ '<li><a data-event="lineHeight" data-value="1.0"><i class="fa fa-check icon-ok"></i> 1.0</a></li>' +
+ '<li><a data-event="lineHeight" data-value="1.2"><i class="fa fa-check icon-ok"></i> 1.2</a></li>' +
+ '<li><a data-event="lineHeight" data-value="1.4"><i class="fa fa-check icon-ok"></i> 1.4</a></li>' +
+ '<li><a data-event="lineHeight" data-value="1.5"><i class="fa fa-check icon-ok"></i> 1.5</a></li>' +
+ '<li><a data-event="lineHeight" data-value="1.6"><i class="fa fa-check icon-ok"></i> 1.6</a></li>' +
+ '<li><a data-event="lineHeight" data-value="1.8"><i class="fa fa-check icon-ok"></i> 1.8</a></li>' +
+ '<li><a data-event="lineHeight" data-value="2.0"><i class="fa fa-check icon-ok"></i> 2.0</a></li>' +
+ '<li><a data-event="lineHeight" data-value="3.0"><i class="fa fa-check icon-ok"></i> 3.0</a></li>' +
+ '</ul>';
+ },
+ help: function(locale) {
+ return '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.options.help + '" data-shortcut="Ctrl+/" data-mac-shortcut="⌘+/" data-event="showHelpDialog" tabindex="-1"><i class="fa fa-question icon-question"></i></button>';
+ },
+ fullscreen: function(locale) {
+ return '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.options.fullscreen + '" data-event="fullscreen" tabindex="-1"><i class="fa fa-arrows-alt icon-fullscreen"></i></button>';
+ },
+ codeview: function(locale) {
+ return '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.options.codeview + '" data-event="codeview" tabindex="-1"><i class="fa fa-code icon-code"></i></button>';
+ }
+ };
+ var sPopover = function(locale) {
+ return '<div class="note-popover">' +
+ '<div class="note-link-popover popover bottom in" style="display: none;">' +
+ '<div class="arrow"></div>' +
+ '<div class="popover-content note-link-content">' +
+ '<a href="http://www.google.com" target="_blank">www.google.com</a>&nbsp;&nbsp;' +
+ '<div class="note-insert btn-group">' +
+ '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.link.edit + '" data-event="showLinkDialog" tabindex="-1"><i class="fa fa-edit icon-edit"></i></button>' +
+ '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.link.unlink + '" data-event="unlink" tabindex="-1"><i class="fa fa-unlink icon-unlink"></i></button>' +
+ '</div>' +
+ '</div>' +
+ '</div>' +
+ '<div class="note-image-popover popover bottom in" style="display: none;">' +
+ '<div class="arrow"></div>' +
+ '<div class="popover-content note-image-content">' +
+ '<div class="btn-group">' +
+ '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.image.resize_full + '" data-event="resize" data-value="1" tabindex="-1"><span class="note-fontsize-10">100%</span> </button>' +
+ '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.image.resize_half + '" data-event="resize" data-value="0.5" tabindex="-1"><span class="note-fontsize-10">50%</span> </button>' +
+ '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.image.resize_quarter + '" data-event="resize" data-value="0.25" tabindex="-1"><span class="note-fontsize-10">25%</span> </button>' +
+ '</div>' +
+ '<div class="btn-group">' +
+ '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.image.float_left + '" data-event="floatMe" data-value="left" tabindex="-1"><i class="fa fa-align-left icon-align-left"></i></button>' +
+ '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.image.float_right + '" data-event="floatMe" data-value="right" tabindex="-1"><i class="fa fa-align-right icon-align-right"></i></button>' +
+ '<button type="button" class="btn btn-default btn-sm btn-small" title="' + locale.image.float_none + '" data-event="floatMe" data-value="none" tabindex="-1"><i class="fa fa-align-justify icon-align-justify"></i></button>' +
+ '</div>' +
+ '</div>' +
+ '</div>' +
+ '</div>';
+ };
+
+ var sHandle = '<div class="note-handle">' +
+ '<div class="note-control-selection">' +
+ '<div class="note-control-selection-bg"></div>' +
+ '<div class="note-control-holder note-control-nw"></div>' +
+ '<div class="note-control-holder note-control-ne"></div>' +
+ '<div class="note-control-holder note-control-sw"></div>' +
+ '<div class="note-control-sizing note-control-se"></div>' +
+ '<div class="note-control-selection-info"></div>' +
+ '</div>' +
+ '</div>';
+
+ var sShortcutText = function(locale) {
+ return '<table class="note-shortcut">' +
+ '<thead>' +
+ '<tr><th></th><th>' + locale.shortcut.text_formatting + '</th></tr>' +
+ '</thead>' +
+ '<tbody>' +
+ '<tr><td>⌘ + B</td><td>' + locale.font.bold + '</td></tr>' +
+ '<tr><td>⌘ + I</td><td>' + locale.font.italic + '</td></tr>' +
+ '<tr><td>⌘ + U</td><td>' + locale.font.underline + '</td></tr>' +
+ '<tr><td>⌘ + ⇧ + S</td><td>' + locale.font.strike + '</td></tr>' +
+ '<tr><td>⌘ + \\</td><td>' + locale.font.clear + '</td></tr>' +
+ '</tr>' +
+ '</tbody>' +
+ '</table>';
+ };
+
+ var sShortcutAction = function(locale) {
+ return '<table class="note-shortcut">' +
+ '<thead>' +
+ '<tr><th></th><th>' + locale.shortcut.action + '</th></tr>' +
+ '</thead>' +
+ '<tbody>' +
+ '<tr><td>⌘ + Z</td><td>' + locale.history.undo + '</td></tr>' +
+ '<tr><td>⌘ + ⇧ + Z</td><td>' + locale.history.redo + '</td></tr>' +
+ '<tr><td>⌘ + ]</td><td>' + locale.paragraph.indent + '</td></tr>' +
+ '<tr><td>⌘ + [</td><td>' + locale.paragraph.outdent + '</td></tr>' +
+ '<tr><td>⌘ + K</td><td>' + locale.link.insert + '</td></tr>' +
+ '<tr><td>⌘ + ENTER</td><td>' + locale.hr.insert + '</td></tr>' +
+ '</tbody>' +
+ '</table>';
+ };
+
+ var sShortcutPara = function(locale) {
+ return '<table class="note-shortcut">' +
+ '<thead>' +
+ '<tr><th></th><th>' + locale.shortcut.paragraph_formatting + '</th></tr>' +
+ '</thead>' +
+ '<tbody>' +
+ '<tr><td>⌘ + ⇧ + L</td><td>' + locale.paragraph.left + '</td></tr>' +
+ '<tr><td>⌘ + ⇧ + E</td><td>' + locale.paragraph.center + '</td></tr>' +
+ '<tr><td>⌘ + ⇧ + R</td><td>' + locale.paragraph.right + '</td></tr>' +
+ '<tr><td>⌘ + ⇧ + J</td><td>' + locale.paragraph.justify + '</td></tr>' +
+ '<tr><td>⌘ + ⇧ + NUM7</td><td>' + locale.lists.ordered + '</td></tr>' +
+ '<tr><td>⌘ + ⇧ + NUM8</td><td>' + locale.lists.unordered + '</td></tr>' +
+ '</tbody>' +
+ '</table>';
+ };
+
+ var sShortcutStyle = function(locale) {
+ return '<table class="note-shortcut">' +
+ '<thead>' +
+ '<tr><th></th><th>' + locale.shortcut.document_style + '</th></tr>' +
+ '</thead>' +
+ '<tbody>' +
+ '<tr><td>⌘ + NUM0</td><td>' + locale.style.normal + '</td></tr>' +
+ '<tr><td>⌘ + NUM1</td><td>' + locale.style.h1 + '</td></tr>' +
+ '<tr><td>⌘ + NUM2</td><td>' + locale.style.h2 + '</td></tr>' +
+ '<tr><td>⌘ + NUM3</td><td>' + locale.style.h3 + '</td></tr>' +
+ '<tr><td>⌘ + NUM4</td><td>' + locale.style.h4 + '</td></tr>' +
+ '<tr><td>⌘ + NUM5</td><td>' + locale.style.h5 + '</td></tr>' +
+ '<tr><td>⌘ + NUM6</td><td>' + locale.style.h6 + '</td></tr>' +
+ '</tbody>' +
+ '</table>';
+ };
+
+ var sShortcutTable = function(locale) {
+ return '<table class="note-shortcut-layout">' +
+ '<tbody>' +
+ '<tr><td>' + sShortcutAction(locale) + '</td><td>' + sShortcutText(locale) + '</td></tr>' +
+ '<tr><td>' + sShortcutStyle(locale) + '</td><td>' + sShortcutPara(locale) + '</td></tr>' +
+ '</tbody>' +
+ '</table>';
+ };
+
+ var replaceMacKeys = function (sHtml) {
+ return sHtml.replace(/⌘/g, 'Ctrl').replace(/⇧/g, 'Shift');
+ };
+
+ var sDialog = function(locale) {
+ return '<div class="note-dialog">' +
+ '<div class="note-image-dialog modal" aria-hidden="false">' +
+ '<div class="modal-dialog">' +
+ '<div class="modal-content">' +
+ '<div class="modal-header">' +
+ '<button type="button" class="close" aria-hidden="true" tabindex="-1">×</button>' +
+ '<h4>' + locale.image.insert + '</h4>' +
+ '</div>' +
+ '<div class="modal-body">' +
+ '<div class="row-fluid">' +
+ '<div class="note-dropzone span12">' + locale.image.drag_image_here + '</div>' +
+ '<h5>' + locale.image.select_from_files + '</h5>' +
+ '<input class="note-image-input" type="file" name="files" accept="image/*" capture="camera" />' +
+ '<h5>' + locale.image.url + '</h5>' +
+ '<input class="note-image-url form-control span12" type="text" />' +
+ '</div>' +
+ '</div>' +
+ '<div class="modal-footer">' +
+ '<button href="#" class="btn btn-primary note-image-btn disabled" disabled="disabled">' + locale.image.insert + '</button>' +
+ '</div>' +
+ '</div>' +
+ '</div>' +
+ '</div>' +
+ '<div class="note-link-dialog modal" aria-hidden="false">' +
+ '<div class="modal-dialog">' +
+ '<div class="modal-content">' +
+ '<div class="modal-header">' +
+ '<button type="button" class="close" aria-hidden="true" tabindex="-1">×</button>' +
+ '<h4>' + locale.link.insert + '</h4>' +
+ '</div>' +
+ '<div class="modal-body">' +
+ '<div class="row-fluid">' +
+
+ '<div class="form-group">' +
+ '<label>' + locale.link.text_to_display + '</label>' +
+ '<span class="note-link-text form-control input-xlarge uneditable-input" />' +
+ '</div>' +
+ '<div class="form-group">' +
+ '<label>' + locale.link.url + '</label>' +
+ '<input class="note-link-url form-control span12" type="text" />' +
+ '</div>' +
+ '</div>' +
+ '</div>' +
+ '<div class="modal-footer">' +
+ '<button href="#" class="btn btn-primary note-link-btn disabled" disabled="disabled">' + locale.link.insert + '</button>' +
+ '</div>' +
+ '</div>' +
+ '</div>' +
+ '</div>' +
+ '<div class="note-help-dialog modal" aria-hidden="false">' +
+ '<div class="modal-dialog">' +
+ '<div class="modal-content">' +
+ '<div class="modal-body">' +
+ '<div class="modal-background">' +
+ '<a class="modal-close pull-right" aria-hidden="true" tabindex="-1">' + locale.shortcut.close + '</a>' +
+ '<div class="title">' + locale.shortcut.shortcuts + '</div>' +
+ (agent.bMac ? sShortcutTable(locale) : replaceMacKeys(sShortcutTable(locale))) +
+ '<p class="text-center"><a href="//hackerwins.github.io/summernote/" target="_blank">Summernote v0.4</a> · <a href="//github.com/HackerWins/summernote" target="_blank">Project</a> · <a href="//github.com/HackerWins/summernote/issues" target="_blank">Issues</a></p>' +
+ '</div>' +
+ '</div>' +
+ '</div>' +
+ '</div>' +
+ '</div>';
+ };
+
+ var sStatusbar = '<div class="note-resizebar"><div class="note-icon-bar"></div><div class="note-icon-bar"></div><div class="note-icon-bar"></div></div>';
+ /* jshint ignore:end */
+
+ // createTooltip
+ var createTooltip = function ($container, sPlacement) {
+ $container.find('button').each(function (i, elBtn) {
+ var $btn = $(elBtn);
+ var sShortcut = $btn.attr(agent.bMac ? 'data-mac-shortcut': 'data-shortcut');
+ if (sShortcut) { $btn.attr('title', function (i, v) { return v + ' (' + sShortcut + ')'; }); }
+ //bootstrap tooltip on btn-group bug: https://github.com/twitter/bootstrap/issues/5687
+ }).tooltip({container: 'body', placement: sPlacement || 'top'});
+ };
+
+ // pallete colors
+ var aaColor = [
+ ['#000000', '#424242', '#636363', '#9C9C94', '#CEC6CE', '#EFEFEF', '#F7F7F7', '#FFFFFF'],
+ ['#FF0000', '#FF9C00', '#FFFF00', '#00FF00', '#00FFFF', '#0000FF', '#9C00FF', '#FF00FF'],
+ ['#F7C6CE', '#FFE7CE', '#FFEFC6', '#D6EFD6', '#CEDEE7', '#CEE7F7', '#D6D6E7', '#E7D6DE'],
+ ['#E79C9C', '#FFC69C', '#FFE79C', '#B5D6A5', '#A5C6CE', '#9CC6EF', '#B5A5D6', '#D6A5BD'],
+ ['#E76363', '#F7AD6B', '#FFD663', '#94BD7B', '#73A5AD', '#6BADDE', '#8C7BC6', '#C67BA5'],
+ ['#CE0000', '#E79439', '#EFC631', '#6BA54A', '#4A7B8C', '#3984C6', '#634AA5', '#A54A7B'],
+ ['#9C0000', '#B56308', '#BD9400', '#397B21', '#104A5A', '#085294', '#311873', '#731842'],
+ ['#630000', '#7B3900', '#846300', '#295218', '#083139', '#003163', '#21104A', '#4A1031']
+ ];
+
+ // createPalette
+ var createPalette = function ($container) {
+ $container.find('.note-color-palette').each(function () {
+ var $palette = $(this), sEvent = $palette.attr('data-target-event');
+ var sPaletteContents = '';
+ for (var row = 0, szRow = aaColor.length; row < szRow; row++) {
+ var aColor = aaColor[row];
+ var sLine = '<div>';
+ for (var col = 0, szCol = aColor.length; col < szCol; col++) {
+ var sColor = aColor[col];
+ var sButton = ['<button type="button" class="note-color-btn" style="background-color:', sColor,
+ ';" data-event="', sEvent,
+ '" data-value="', sColor,
+ '" title="', sColor,
+ '" data-toggle="button" tabindex="-1"></button>'].join('');
+ sLine += sButton;
+ }
+ sLine += '</div>';
+ sPaletteContents += sLine;
+ }
+ $palette.html(sPaletteContents);
+ });
+ };
+
+ // createLayout
+ this.createLayout = function ($holder, options) {
+ var nHeight = options.height,
+ nTabsize = options.tabsize,
+ aToolbarSetting = options.toolbar;
+
+ //already created
+ if ($holder.next().hasClass('note-editor')) { return; }
+
+ //01. create Editor
+ var $editor = $('<div class="note-editor"></div>');
+ $editor.data('options', options);
+
+ //02. statusbar
+ if (nHeight > 0) {
+ $('<div class="note-statusbar">' + sStatusbar + '</div>').prependTo($editor);
+ }
+
+ //03. create Editable
+ var $editable = $('<div class="note-editable" contentEditable="true"></div>').prependTo($editor);
+ if (nHeight) {
+ $editable.height(nHeight);
+ $editable.data('optionHeight', nHeight);
+ }
+ if (nTabsize) {
+ $editable.data('tabsize', nTabsize);
+ }
+
+ $editable.html(dom.html($holder) || dom.emptyPara);
+ $editable.data('NoteHistory', new History());
+
+ //031. create codable
+ $('<textarea class="note-codable"></textarea>').prependTo($editor);
+
+ //032. set styleWithCSS for backColor / foreColor clearing with 'inherit'.
+ setTimeout(function () { // protect FF Error: NS_ERROR_FAILURE: Failure
+ document.execCommand('styleWithCSS', 0, true);
+ });
+
+ //04. create Toolbar
+ var sToolbar = '';
+ for (var idx = 0, sz = aToolbarSetting.length; idx < sz; idx ++) {
+ var group = aToolbarSetting[idx];
+ sToolbar += '<div class="note-' + group[0] + ' btn-group">';
+ for (var i = 0, szGroup = group[1].length; i < szGroup; i++) {
+ sToolbar += aToolbarItem[group[1][i]](Locale[options.locale]);
+ }
+ sToolbar += '</div>';
+ }
+
+ sToolbar = '<div class="note-toolbar btn-toolbar">' + sToolbar + '</div>';
+
+ var $toolbar = $(sToolbar).prependTo($editor);
+ createPalette($toolbar);
+ createTooltip($toolbar, 'bottom');
+
+ //05. create Popover
+ var $popover = $(sPopover(Locale[options.locale])).prependTo($editor);
+ createTooltip($popover);
+
+ //06. handle(control selection, ...)
+ $(sHandle).prependTo($editor);
+
+ //07. create Dialog
+ var $dialog = $(sDialog(Locale[options.locale])).prependTo($editor);
+ $dialog.find('button.close, a.modal-close').click(function () {
+ $(this).closest('.modal').modal('hide');
+ });
+
+ //08. Editor/Holder switch
+ $editor.insertAfter($holder);
+ $holder.hide();
+ };
+
+ // layoutInfoFromHolder
+ var layoutInfoFromHolder = this.layoutInfoFromHolder = function ($holder) {
+ var $editor = $holder.next();
+ if (!$editor.hasClass('note-editor')) { return; }
+
+ return {
+ editor: $editor,
+ toolbar: $editor.find('.note-toolbar'),
+ editable: $editor.find('.note-editable'),
+ codable: $editor.find('.note-codable'),
+ statusbar: $editor.find('.note-statusbar'),
+ popover: $editor.find('.note-popover'),
+ handle: $editor.find('.note-handle'),
+ dialog: $editor.find('.note-dialog')
+ };
+ };
+
+ // removeLayout
+ this.removeLayout = function ($holder) {
+ var info = layoutInfoFromHolder($holder);
+ if (!info) { return; }
+ $holder.html(info.editable.html());
+
+ info.editor.remove();
+ $holder.show();
+ };
+ };
+
+ var renderer = new Renderer();
+ var eventHandler = new EventHandler();
+
+ /**
+ * extend jquery fn
+ */
+ $.fn.extend({
+ // create Editor Layout and attach Key and Mouse Event
+ summernote: function (options) {
+ options = $.extend({
+ toolbar: [
+ ['style', ['style']],
+ ['font', ['bold', 'italic', 'underline', 'clear']],
+ ['fontsize', ['fontsize']],
+ ['color', ['color']],
+ ['para', ['ul', 'ol', 'paragraph']],
+ ['height', ['height']],
+ ['table', ['table']],
+ ['insert', ['link', 'picture']],
+ ['view', ['fullscreen', 'codeview']],
+ ['help', ['help']]
+ ],
+ locale: 'en-US'
+ }, options);
+
+ this.each(function (idx, elHolder) {
+ var $holder = $(elHolder);
+
+ // createLayout with options
+ renderer.createLayout($holder, options);
+
+ var info = renderer.layoutInfoFromHolder($holder);
+ eventHandler.attach(info, options);
+
+ // Textarea auto filling the code before form submit.
+ if (dom.isTextarea($holder[0])) {
+ $holder.closest('form').submit(function () {
+ $holder.html($holder.code());
+ });
+ }
+ });
+
+ if (this.first() && options.focus) { // focus on first editable element
+ var info = renderer.layoutInfoFromHolder(this.first());
+ info.editable.focus();
+ }
+ if (this.length > 0 && options.oninit) { // callback on init
+ options.oninit();
+ }
+ },
+ // get the HTML contents of note or set the HTML contents of note.
+ code: function (sHTML) {
+ //get the HTML contents
+ if (sHTML === undefined) {
+ var $holder = this.first();
+ if ($holder.length === 0) { return; }
+ var info = renderer.layoutInfoFromHolder($holder);
+ if (!!(info && info.editable)) {
+ var bCodeview = info.editor.hasClass('codeview');
+ if (agent.bCodeMirror) {
+ info.codable.data('cmEditor').save();
+ }
+ return bCodeview ? info.codable.val() : info.editable.html();
+ }
+ return $holder.html();
+ }
+
+ // set the HTML contents
+ this.each(function (i, elHolder) {
+ var info = renderer.layoutInfoFromHolder($(elHolder));
+ if (info && info.editable) { info.editable.html(sHTML); }
+ });
+ },
+ // destroy Editor Layout and dettach Key and Mouse Event
+ destroy: function () {
+ this.each(function (idx, elHolder) {
+ var $holder = $(elHolder);
+
+ var info = renderer.layoutInfoFromHolder($holder);
+ if (!info || !info.editable) { return; }
+ eventHandler.dettach(info);
+ renderer.removeLayout($holder);
+ });
+ },
+ // inner object for test
+ summernoteInner: function () {
+ return { dom: dom, list: list, func: func, range: range };
+ }
+ });
+})(window.jQuery, window.CodeMirror); // jQuery, CodeMirror
+
+// Array.prototype.reduce fallback
+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce
+if ('function' !== typeof Array.prototype.reduce) {
+ Array.prototype.reduce = function (callback, optInitialValue) {
+ 'use strict';
+ var idx, value, length = this.length >>> 0, isValueSet = false;
+ if (1 < arguments.length) {
+ value = optInitialValue;
+ isValueSet = true;
+ }
+ for (idx = 0; length > idx; ++idx) {
+ if (this.hasOwnProperty(idx)) {
+ if (isValueSet) {
+ value = callback(value, this[idx], idx, this);
+ } else {
+ value = this[idx];
+ isValueSet = true;
+ }
+ }
+ }
+ if (!isValueSet) {
+ throw new TypeError('Reduce of empty array with no initial value');
+ }
+ return value;
+ };
+}
diff --git a/data/ext/editorHTML/summernote/summernote.min.js b/data/ext/editorHTML/summernote/summernote.min.js
new file mode 100644
index 000000000..7965c25a5
--- /dev/null
+++ b/data/ext/editorHTML/summernote/summernote.min.js
@@ -0,0 +1,2 @@
+!function(a,b){"use strict";var c={bMac:navigator.appVersion.indexOf("Mac")>-1,bMSIE:navigator.userAgent.indexOf("MSIE")>-1,bFF:navigator.userAgent.indexOf("Firefox")>-1,bCodeMirror:!!b},d=function(){var a=function(a){return function(b){return a===b}},b=function(a,b){return a===b},c=function(){return!1},d=function(a){return function(){return!a.apply(a,arguments)}},e=function(a){return a};return{eq:a,eq2:b,fail:c,not:d,self:e}}(),e=function(){var a=function(a){return a[0]},b=function(a){return a[a.length-1]},c=function(a){return a.slice(0,a.length-1)},e=function(a){return a.slice(1)},f=function(a,b){return b=b||d.self,a.reduce(function(a,c){return a+b(c)},0)},g=function(a){for(var b=[],c=-1,d=a.length;++c<d;)b[c]=a[c];return b},h=function(c,d){if(0===c.length)return[];var f=e(c);return f.reduce(function(a,c){var e=b(a);return d(b(e),c)?e[e.length]=c:a[a.length]=[c],a},[[a(c)]])},i=function(a){for(var b=[],c=0,d=a.length;d>c;c++)a[c]&&b.push(a[c]);return b};return{head:a,last:b,initial:c,tail:e,sum:f,from:g,compact:i,clusterBy:h}}(),f=function(){var b=function(b){return a.Deferred(function(a){var c=new FileReader;c.onload=function(b){a.resolve(b.target.result)},c.onerror=function(){a.reject(this)},c.readAsDataURL(b)}).promise()},c=function(b){return a.Deferred(function(a){function c(){e(),a.resolve(f)}function d(){e(),a.reject(f)}function e(){f.onload=null,f.onerror=null,f.onabort=null}var f=new Image;f.onload=c,f.onerror=d,f.onabort=d,f.src=b}).promise()};return{readFile:b,loadImage:c}}(),g=function(){var b=function(a){return function(b){return b&&b.nodeName===a}},c=function(a){return a&&/^P|^LI|^H[1-7]/.test(a.nodeName)},f=function(a){return a&&/^UL|^OL/.test(a.nodeName)},h=function(b){return b&&a(b).hasClass("note-editable")},i=function(b){return b&&a(b).hasClass("note-control-sizing")},j=function(a,b){for(;a;){if(b(a))return a;a=a.parentNode}return null},k=function(a,b){b=b||d.fail;var c=[];return j(a,function(a){return c.push(a),b(a)}),c},l=function(b,c){for(var d=k(b),e=c;e;e=e.parentNode)if(a.inArray(e,d)>-1)return e;return null},m=function(a,b){var c=[],d=!1,e=!1,f=function(g){if(g){if(g===a&&(d=!0),d&&!e&&c.push(g),g===b)return e=!0,void 0;for(var h=0,i=g.childNodes.length;i>h;h++)f(g.childNodes[h])}};return f(l(a,b)),c},n=function(a,b){b=b||d.fail;for(var c=[];a&&(c.push(a),!b(a));)a=a.previousSibling;return c},o=function(a,b){b=b||d.fail;for(var c=[];a&&(c.push(a),!b(a));)a=a.nextSibling;return c},p=function(a,b){var c=b.nextSibling,d=b.parentNode;return c?d.insertBefore(a,c):d.appendChild(a),a},q=function(b,c){return a.each(c,function(a,c){b.appendChild(c)}),b},r=b("#text"),s=function(a){return r(a)?a.nodeValue.length:a.childNodes.length},t=function(a){for(var b=0;a=a.previousSibling;)b+=1;return b},u=function(b,c){var f=e.initial(k(c,d.eq(b)));return a.map(f,t).reverse()},v=function(a,b){for(var c=a,d=0,e=b.length;e>d;d++)c=c.childNodes[b[d]];return c},w=function(a,b){if(0===b)return a;if(b>=s(a))return a.nextSibling;if(r(a))return a.splitText(b);var c=a.childNodes[b];return a=p(a.cloneNode(!1),a),q(a,o(c))},x=function(a,b,c){var e=k(b,d.eq(a));return 1===e.length?w(b,c):e.reduce(function(a,d){var e=d.cloneNode(!1);return p(e,d),a===b&&(a=w(a,c)),q(e,o(a)),e})},y=function(a,b){if(a&&a.parentNode){if(a.removeNode)return a.removeNode(b);var c=a.parentNode;if(!b){var d,e,f=[];for(d=0,e=a.childNodes.length;e>d;d++)f.push(a.childNodes[d]);for(d=0,e=f.length;e>d;d++)c.insertBefore(f[d],a)}c.removeChild(a)}},z=function(a){return g.isTextarea(a[0])?a.val():a.html()};return{isText:r,isPara:c,isList:f,isEditable:h,isControlSizing:i,isAnchor:b("A"),isDiv:b("DIV"),isSpan:b("SPAN"),isB:b("B"),isU:b("U"),isS:b("S"),isI:b("I"),isImg:b("IMG"),isTextarea:b("TEXTAREA"),ancestor:j,listAncestor:k,listNext:o,listPrev:n,commonAncestor:l,listBetween:m,insertAfter:p,position:t,makeOffsetPath:u,fromOffsetPath:v,split:x,remove:y,html:z}}(),h=function(){var b=!!document.createRange,c=function(a,b){var c,d,f=a.parentElement(),h=document.body.createTextRange(),i=e.from(f.childNodes);for(c=0;c<i.length;c++)if(!g.isText(i[c])){if(h.moveToElementText(i[c]),h.compareEndPoints("StartToStart",a)>=0)break;d=i[c]}if(0!==c&&g.isText(i[c-1])){var j=document.body.createTextRange(),k=null;j.moveToElementText(d||f),j.collapse(!d),k=d?d.nextSibling:f.firstChild;var l=a.duplicate();l.setEndPoint("StartToStart",j);for(var m=l.text.replace(/[\r\n]/g,"").length;m>k.nodeValue.length&&k.nextSibling;)m-=k.nodeValue.length,k=k.nextSibling;{k.nodeValue}b&&k.nextSibling&&g.isText(k.nextSibling)&&m===k.nodeValue.length&&(m-=k.nodeValue.length,k=k.nextSibling),f=k,c=m}return{cont:f,offset:c}},f=function(a){var b=function(a,c){var f,h;if(g.isText(a)){var i=g.listPrev(a,d.not(g.isText)),j=e.last(i).previousSibling;f=j||a.parentNode,c+=e.sum(e.tail(i),g.length),h=!j}else{if(f=a.childNodes[c]||a,g.isText(f))return b(f,c);c=0,h=!1}return{cont:f,collapseToStart:h,offset:c}},c=document.body.createTextRange(),f=b(a.cont,a.offset);return c.moveToElementText(f.cont),c.collapse(f.collapseToStart),c.moveStart("character",f.offset),c},h=function(c,h,i,j){this.sc=c,this.so=h,this.ec=i,this.eo=j;var k=function(){if(b){var a=document.createRange();return a.setStart(c,h),a.setEnd(i,j),a}var d=f({cont:c,offset:h});return d.setEndPoint("EndToEnd",f({cont:i,offset:j})),d};this.select=function(){var a=k();if(b){var c=document.getSelection();c.rangeCount>0&&c.removeAllRanges(),c.addRange(a)}else a.select()},this.listPara=function(){var b=g.listBetween(c,i),f=e.compact(a.map(b,function(a){return g.ancestor(a,g.isPara)}));return a.map(e.clusterBy(f,d.eq2),e.head)};var l=function(a){return function(){var b=g.ancestor(c,a);return b&&b===g.ancestor(i,a)}};this.isOnEditable=l(g.isEditable),this.isOnList=l(g.isList),this.isOnAnchor=l(g.isAnchor),this.isCollapsed=function(){return c===i&&h===j},this.insertNode=function(a){var c=k();b?c.insertNode(a):c.pasteHTML(a.outerHTML)},this.toString=function(){var a=k();return b?a.toString():a.text},this.bookmark=function(a){return{s:{path:g.makeOffsetPath(a,c),offset:h},e:{path:g.makeOffsetPath(a,i),offset:j}}}};return{create:function(a,d,e,f){if(0===arguments.length)if(b){var g=document.getSelection();if(0===g.rangeCount)return null;var i=g.getRangeAt(0);a=i.startContainer,d=i.startOffset,e=i.endContainer,f=i.endOffset}else{var j=document.selection.createRange(),k=j.duplicate();k.collapse(!1);var l=j;l.collapse(!0);var m=c(l,!0),n=c(k,!1);a=m.cont,d=m.offset,e=n.cont,f=n.offset}else 2===arguments.length&&(e=a,f=d);return new h(a,d,e,f)},createFromBookmark:function(a,b){var c=g.fromOffsetPath(a,b.s.path),d=b.s.offset,e=g.fromOffsetPath(a,b.e.path),f=b.e.offset;return new h(c,d,e,f)}}}(),i=function(){this.stylePara=function(b,c){var d=b.listPara();a.each(d,function(b,d){a.each(c,function(a,b){d.style[a]=b})})},this.current=function(b,c){var d=a(g.isText(b.sc)?b.sc.parentNode:b.sc),e=d.css(["font-size","text-align","list-style-type","line-height"])||{};if(e["font-size"]=parseInt(e["font-size"]),e["font-bold"]=document.queryCommandState("bold")?"bold":"normal",e["font-italic"]=document.queryCommandState("italic")?"italic":"normal",e["font-underline"]=document.queryCommandState("underline")?"underline":"normal",b.isOnList()){var f=["circle","disc","disc-leading-zero","square"],h=a.inArray(e["list-style-type"],f)>-1;e["list-style"]=h?"unordered":"ordered"}else e["list-style"]="none";var i=g.ancestor(b.sc,g.isPara);if(i&&i.style["line-height"])e["line-height"]=i.style.lineHeight;else{var j=parseInt(e["line-height"])/parseInt(e["font-size"]);e["line-height"]=j.toFixed(1)}return e.image=g.isImg(c)&&c,e.anchor=b.isOnAnchor()&&g.ancestor(b.sc,g.isAnchor),e.aAncestor=g.listAncestor(b.sc,g.isEditable),e}},j=function(){var a=[],b=[],c=function(a){var b=a[0],c=h.create();return{contents:a.html(),bookmark:c.bookmark(b),scrollTop:a.scrollTop()}},d=function(a,b){a.html(b.contents).scrollTop(b.scrollTop),h.createFromBookmark(a[0],b.bookmark).select()};this.undo=function(e){var f=c(e);0!==a.length&&(d(e,a.pop()),b.push(f))},this.redo=function(e){var f=c(e);0!==b.length&&(d(e,b.pop()),a.push(f))},this.recordUndo=function(d){b=[],a.push(c(d))}},k=function(){this.saveRange=function(a){a.data("range",h.create())},this.restoreRange=function(a){var b=a.data("range");b&&b.select()};var b=new i;this.currentStyle=function(a){var c=h.create();return c.isOnEditable()&&b.current(c,a)},this.tab=function(b){d(b);var c=h.create(),e=new Array(b.data("tabsize")+1).join("&nbsp;");c.insertNode(a('<span id="noteTab">'+e+"</span>")[0]);var f=a("#noteTab").removeAttr("id");c=h.create(f[0],1),c.select(),g.remove(f[0])},this.undo=function(a){a.data("NoteHistory").undo(a)},this.redo=function(a){a.data("NoteHistory").redo(a)};for(var d=this.recordUndo=function(a){a.data("NoteHistory").recordUndo(a)},e=["bold","italic","underline","strikethrough","justifyLeft","justifyCenter","justifyRight","justifyFull","insertOrderedList","insertUnorderedList","indent","outdent","formatBlock","removeFormat","backColor","foreColor","insertHorizontalRule"],j=0,k=e.length;k>j;j++)this[e[j]]=function(a){return function(b,c){d(b),document.execCommand(a,!1,c)}}(e[j]);this.insertImage=function(b,c){f.loadImage(c).done(function(e){d(b);var f=a("<img>").attr("src",c);f.css("width",Math.min(b.width(),e.width)),h.create().insertNode(f[0])}).fail(function(){var a=b.data("callbacks");a.onImageUploadError&&a.onImageUploadError()})},this.formatBlock=function(a,b){d(a),b=c.bMSIE?"<"+b+">":b,document.execCommand("FormatBlock",!1,b)},this.fontSize=function(a,b){d(a),document.execCommand("fontSize",!1,3),c.bFF?a.find("font[size=3]").removeAttr("size").css("font-size",b+"px"):a.find("span").filter(function(){return"medium"===this.style.fontSize}).css("font-size",b+"px")},this.lineHeight=function(a,c){d(a),b.stylePara(h.create(),{lineHeight:c})},this.unlink=function(a){var b=h.create();if(b.isOnAnchor()){d(a);var c=g.ancestor(b.sc,g.isAnchor);b=h.create(c,0,c,1),b.select(),document.execCommand("unlink")}},this.setLinkDialog=function(b,e){var f=h.create();if(f.isOnAnchor()){var i=g.ancestor(f.sc,g.isAnchor);f=h.create(i,0,i,1)}e({range:f,text:f.toString(),url:f.isOnAnchor()?g.ancestor(f.sc,g.isAnchor).href:""},function(e){f.select(),d(b);var g=-1!==e.toLowerCase().indexOf("://"),i=g?e:"http://"+e;if(c.bMSIE&&f.isCollapsed()){f.insertNode(a('<A id="linkAnchor">'+e+"</A>")[0]);var j=a("#linkAnchor").removeAttr("id").attr("href",i);f=h.create(j[0],0,j[0],1),f.select()}else document.execCommand("createlink",!1,i)})},this.color=function(a,b){var c=JSON.parse(b),e=c.foreColor,f=c.backColor;d(a),e&&document.execCommand("foreColor",!1,e),f&&document.execCommand("backColor",!1,f)},this.insertTable=function(b,e){d(b);for(var f,g=e.split("x"),i=g[0],j=g[1],k=[],l=c.bMSIE?"&nbsp;":"<br/>",m=0;i>m;m++)k.push("<td>"+l+"</td>");f=k.join("");for(var n,o=[],p=0;j>p;p++)o.push("<tr>"+f+"</tr>");n=o.join("");var q='<table class="table table-bordered">'+n+"</table>";h.create().insertNode(a(q)[0])},this.floatMe=function(a,b,c){d(a),c.style.cssFloat=b},this.resize=function(a,b,c){d(a),c.style.width=a.width()*b+"px",c.style.height=""},this.resizeTo=function(a,b){var c=a.y/a.x,d=b.data("ratio");b.css({width:d>c?a.x:a.y/d,height:d>c?a.x*d:a.y})}},l=function(){this.update=function(b,c){var d=function(b,c){b.find(".dropdown-menu li a").each(function(){var b=a(this).attr("data-value")===c;this.className=b?"checked":""})},e=b.find(".note-fontsize");e.find(".note-current-fontsize").html(c["font-size"]),d(e,parseFloat(c["font-size"]));var f=b.find(".note-height");d(f,parseFloat(c["line-height"]));var g=function(a,c){var d=b.find(a);d[c()?"addClass":"removeClass"]("active")};g('button[data-event="bold"]',function(){return"bold"===c["font-bold"]}),g('button[data-event="italic"]',function(){return"italic"===c["font-italic"]}),g('button[data-event="underline"]',function(){return"underline"===c["font-underline"]}),g('button[data-event="justifyLeft"]',function(){return"left"===c["text-align"]||"start"===c["text-align"]}),g('button[data-event="justifyCenter"]',function(){return"center"===c["text-align"]}),g('button[data-event="justifyRight"]',function(){return"right"===c["text-align"]}),g('button[data-event="justifyFull"]',function(){return"justify"===c["text-align"]}),g('button[data-event="insertUnorderedList"]',function(){return"unordered"===c["list-style"]}),g('button[data-event="insertOrderedList"]',function(){return"ordered"===c["list-style"]})},this.updateRecentColor=function(b,c,d){var e=a(b).closest(".note-color"),f=e.find(".note-recent-color"),g=JSON.parse(f.attr("data-value"));g[c]=d,f.attr("data-value",JSON.stringify(g));var h="backColor"===c?"background-color":"color";f.find("i").css(h,d)},this.updateFullscreen=function(a,b){var c=a.find('button[data-event="fullscreen"]');c[b?"addClass":"removeClass"]("active")},this.updateCodeview=function(a,b){var c=a.find('button[data-event="codeview"]');c[b?"addClass":"removeClass"]("active")},this.enable=function(a){a.find("button").not('button[data-event="codeview"]').removeClass("disabled")},this.disable=function(a){a.find("button").not('button[data-event="codeview"]').addClass("disabled")}},m=function(){var b=function(b,c){var d=a(c),e=d.position(),f=d.height();b.css({display:"block",left:e.left,top:e.top+f})};this.update=function(a,c){var d=a.find(".note-link-popover"),e=a.find(".note-image-popover");if(c.anchor){var f=d.find("a");f.attr("href",c.anchor.href).html(c.anchor.href),b(d,c.anchor)}else d.hide();c.image?b(e,c.image):e.hide()},this.hide=function(a){a.children().hide()}},n=function(){this.update=function(b,c){var d=b.find(".note-control-selection");if(c.image){var e=a(c.image),f=e.position(),g={w:e.width(),h:e.height()};d.css({display:"block",left:f.left,top:f.top,width:g.w,height:g.h}).data("target",c.image);var h=g.w+"x"+g.h;d.find(".note-control-selection-info").text(h)}else d.hide()},this.hide=function(a){a.children().hide()}},o=function(){this.showImageDialog=function(b,c,d,e){var f=b.find(".note-image-dialog"),g=b.find(".note-dropzone"),h=b.find(".note-image-input"),i=b.find(".note-image-url"),j=b.find(".note-image-btn");f.on("shown.bs.modal",function(){g.on("dragenter dragover dragleave",!1),g.on("drop",function(a){c(a),f.modal("hide")}),h.on("change",function(){d(this.files),a(this).val(""),f.modal("hide")}),i.val("").keyup(function(){i.val()?j.removeClass("disabled").attr("disabled",!1):j.addClass("disabled").attr("disabled",!0)}).trigger("focus"),j.click(function(a){f.modal("hide"),e(i.val()),a.preventDefault()})}).on("hidden.bs.modal",function(){g.off("dragenter dragover dragleave drop"),h.off("change"),f.off("shown.bs.modal hidden.bs.modal"),i.off("keyup"),j.off("click")}).modal("show")},this.showLinkDialog=function(a,b,c){var d=a.find(".note-link-dialog"),e=d.find(".note-link-text"),f=d.find(".note-link-url"),g=d.find(".note-link-btn");d.on("shown.bs.modal",function(){e.html(b.text),f.val(b.url).keyup(function(){f.val()?g.removeClass("disabled").attr("disabled",!1):g.addClass("disabled").attr("disabled",!0),b.text||e.html(f.val())}).trigger("focus"),g.click(function(a){d.modal("hide"),c(f.val()),a.preventDefault()})}).on("hidden.bs.modal",function(){f.off("keyup"),g.off("click"),d.off("shown.bs.modal hidden.bs.modal")}).modal("show")},this.showHelpDialog=function(a){a.find(".note-help-dialog").modal("show")}},p=function(){var d=new k,e=new l,h=new m,i=new n,j=new o,p={BACKSPACE:8,TAB:9,ENTER:13,SPACE:32,NUM0:48,NUM1:49,NUM6:54,NUM7:55,NUM8:56,B:66,E:69,I:73,J:74,K:75,L:76,R:82,S:83,U:85,Y:89,Z:90,SLASH:191,LEFTBRACKET:219,BACKSLACH:220,RIGHTBRACKET:221},q=function(b){var c=a(b).closest(".note-editor");return{editor:function(){return c},toolbar:function(){return c.find(".note-toolbar")},editable:function(){return c.find(".note-editable")},codable:function(){return c.find(".note-codable")},statusbar:function(){return c.find(".note-statusbar")},popover:function(){return c.find(".note-popover")},handle:function(){return c.find(".note-handle")},dialog:function(){return c.find(".note-dialog")}}},r=function(a){var b=c.bMac?a.metaKey:a.ctrlKey,e=a.shiftKey,f=a.keyCode,g=b||e||f===p.TAB,h=g?q(a.target):null;if(f===p.TAB&&h.editable().data("tabsize"))d.tab(h.editable());else if(b&&(e&&f===p.Z||f===p.Y))d.redo(h.editable());else if(b&&f===p.Z)d.undo(h.editable());else if(b&&f===p.B)d.bold(h.editable());else if(b&&f===p.I)d.italic(h.editable());else if(b&&f===p.U)d.underline(h.editable());else if(b&&e&&f===p.S)d.strikethrough(h.editable());else if(b&&f===p.BACKSLACH)d.removeFormat(h.editable());else if(b&&f===p.K)h.editable(),d.setLinkDialog(h.editable(),function(a,b){j.showLinkDialog(h.dialog(),a,b)});else if(b&&f===p.SLASH)j.showHelpDialog(h.dialog());else if(b&&e&&f===p.L)d.justifyLeft(h.editable());else if(b&&e&&f===p.E)d.justifyCenter(h.editable());else if(b&&e&&f===p.R)d.justifyRight(h.editable());else if(b&&e&&f===p.J)d.justifyFull(h.editable());else if(b&&e&&f===p.NUM7)d.insertUnorderedList(h.editable());else if(b&&e&&f===p.NUM8)d.insertOrderedList(h.editable());else if(b&&f===p.LEFTBRACKET)d.outdent(h.editable());else if(b&&f===p.RIGHTBRACKET)d.indent(h.editable());else if(b&&f===p.NUM0)d.formatBlock(h.editable(),"P");else if(b&&p.NUM1<=f&&f<=p.NUM6){var i="H"+String.fromCharCode(f);d.formatBlock(h.editable(),i)}else{if(!b||f!==p.ENTER)return(f===p.BACKSPACE||f===p.ENTER||f===p.SPACE)&&d.recordUndo(q(a.target).editable()),void 0;d.insertHorizontalRule(h.editable())}a.preventDefault()},s=function(b,c){var e=b.data("callbacks");d.restoreRange(b),e.onImageUpload?e.onImageUpload(c,d,b):a.each(c,function(a,c){f.readFile(c).done(function(a){d.insertImage(b,a)}).fail(function(){e.onImageUploadError&&e.onImageUploadError()})})},t=function(a){var b=a.originalEvent.dataTransfer;if(b&&b.files){var c=q(a.currentTarget||a.target);s(c.editable(),b.files)}a.stopPropagation(),a.preventDefault()},u=function(a){g.isImg(a.target)&&a.preventDefault()},v=function(a){var b=q(a.currentTarget||a.target),c=d.currentStyle(a.target);c&&(e.update(b.toolbar(),c),h.update(b.popover(),c),i.update(b.handle(),c))},w=function(a){var b=q(a.currentTarget||a.target);h.hide(b.popover()),i.hide(b.handle())},x=function(b){if(g.isControlSizing(b.target)){var c,e=q(b.target),f=e.handle(),j=e.popover(),k=e.editable(),l=e.editor(),m=f.find(".note-control-selection").data("target"),n=a(m),o=n.offset(),p=a(document).scrollTop();l.on("mousemove",function(a){c={x:a.clientX-o.left,y:a.clientY-(o.top-p)},d.resizeTo(c,n),i.update(f,{image:m}),h.update(j,{image:m})}).on("mouseup",function(){l.off("mousemove").off("mouseup")}),n.data("ratio")||n.data("ratio",n.height()/n.width()),d.recordUndo(k),b.stopPropagation(),b.preventDefault()}},y=function(b){var c=a(b.target).closest("[data-event]");c.length>0&&b.preventDefault()},z=function(f){var g=a(f.target).closest("[data-event]");if(g.length>0){var h,i=g.attr("data-event"),k=g.attr("data-value"),l=q(f.target),m=l.editor(),n=l.toolbar(),o=l.dialog(),p=l.editable(),r=l.codable();if(-1!==a.inArray(i,["resize","floatMe"])){var u=l.handle(),w=u.find(".note-control-selection");h=w.data("target")}if(d[i]&&(p.trigger("focus"),d[i](p,k,h)),-1!==a.inArray(i,["backColor","foreColor"]))e.updateRecentColor(g[0],i,k);else if("showLinkDialog"===i)p.focus(),d.setLinkDialog(p,function(a,b){j.showLinkDialog(o,a,b)});else if("showImageDialog"===i)p.focus(),j.showImageDialog(o,t,function(a){s(p,a)},function(a){d.restoreRange(p),d.insertImage(p,a)});else if("showHelpDialog"===i)j.showHelpDialog(o);else if("fullscreen"===i){m.toggleClass("fullscreen");var x=function(){var b=a(window).height()-n.outerHeight();p.css("height",b)},y=m.hasClass("fullscreen");if(y)p.data("orgHeight",p.css("height")),a(window).resize(x).trigger("resize");else{var z=!!p.data("optionHeight");p.css("height",z?p.data("orgHeight"):"auto"),a(window).off("resize")}e.updateFullscreen(n,y)}else if("codeview"===i){m.toggleClass("codeview");var A=m.hasClass("codeview");if(A){if(r.val(p.html()),r.height(p.height()),e.disable(n),r.focus(),c.bCodeMirror){var B=b.fromTextArea(r[0],{mode:"text/html",lineNumbers:!0});B.setSize(null,p.outerHeight()),B.autoFormatRange&&B.autoFormatRange({line:0,ch:0},{line:B.lineCount(),ch:B.getTextArea().value.length}),r.data("cmEditor",B)}}else c.bCodeMirror&&r.data("cmEditor").toTextArea(),p.html(r.val()),p.height(p.data("optionHeight")?r.height():"auto"),e.enable(n),p.focus();e.updateCodeview(l.toolbar(),A)}v(f)}},A=24,B=function(b){var c=a(document),d=q(b.target),e=d.editable(),f=e.offset().top-c.scrollTop(),g=function(a){e.height(a.clientY-(f+A))},h=function(){c.unbind("mousemove",g).unbind("mouseup",h)};c.mousemove(g).mouseup(h),b.stopPropagation(),b.preventDefault()},C=18,D=function(b){var c,d=a(b.target.parentNode),e=d.next(),f=d.find(".note-dimension-picker-mousecatcher"),g=d.find(".note-dimension-picker-highlighted"),h=d.find(".note-dimension-picker-unhighlighted");if(void 0===b.offsetX){var i=a(b.target).offset();c={x:b.pageX-i.left,y:b.pageY-i.top}}else c={x:b.offsetX,y:b.offsetY};var j={c:Math.ceil(c.x/C)||1,r:Math.ceil(c.y/C)||1};g.css({width:j.c+"em",height:j.r+"em"}),f.attr("data-value",j.c+"x"+j.r),3<j.c&&j.c<10&&h.css({width:j.c+1+"em"}),3<j.r&&j.r<10&&h.css({height:j.r+1+"em"}),e.html(j.c+" x "+j.r)};this.attach=function(a,b){a.editable.on("keydown",r),a.editable.on("mousedown",u),a.editable.on("keyup mouseup",v),a.editable.on("scroll",w),a.editable.on("dragenter dragover dragleave",!1),a.editable.on("drop",t),a.handle.on("mousedown",x),a.toolbar.on("click",z),a.popover.on("click",z),a.toolbar.on("mousedown",y),a.popover.on("mousedown",y),a.statusbar.on("mousedown",B);var c=a.toolbar,e=c.find(".note-dimension-picker-mousecatcher");e.on("mousemove",D),a.editable.on("blur",function(){d.saveRange(a.editable)}),b.onenter&&a.editable.keypress(function(a){a.keyCode===p.ENTER&&b.onenter(a)}),b.onfocus&&a.editable.focus(b.onfocus),b.onblur&&a.editable.blur(b.onblur),b.onkeyup&&a.editable.keyup(b.onkeyup),b.onkeydown&&a.editable.keydown(b.onkeydown),a.editable.data("callbacks",{onChange:b.onChange,onAutoSave:b.onAutoSave,onPasteBefore:b.onPasteBefore,onPasteAfter:b.onPasteAfter,onImageUpload:b.onImageUpload,onImageUploadError:b.onImageUpload,onFileUpload:b.onFileUpload,onFileUploadError:b.onFileUpload})},this.dettach=function(a){a.editable.off(),a.toolbar.off(),a.handle.off(),a.popover.off()}},q=function(){var b={picture:'<button type="button" class="btn btn-default btn-sm btn-small" title="Picture" data-event="showImageDialog" tabindex="-1"><i class="fa fa-picture-o icon-picture"></i></button>',link:'<button type="button" class="btn btn-default btn-sm btn-small" title="Link" data-event="showLinkDialog" data-shortcut="Ctrl+K" data-mac-shortcut="⌘+K" tabindex="-1"><i class="fa fa-link icon-link"></i></button>',table:'<button type="button" class="btn btn-default btn-sm btn-small dropdown-toggle" title="Table" data-toggle="dropdown" tabindex="-1"><i class="fa fa-table icon-table"></i> <span class="caret"></span></button><ul class="dropdown-menu"><div class="note-dimension-picker"><div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"></div><div class="note-dimension-picker-highlighted"></div><div class="note-dimension-picker-unhighlighted"></div></div><div class="note-dimension-display"> 1 x 1 </div></ul>',style:'<button type="button" class="btn btn-default btn-sm btn-small dropdown-toggle" title="Style" data-toggle="dropdown" tabindex="-1"><i class="fa fa-magic icon-magic"></i> <span class="caret"></span></button><ul class="dropdown-menu"><li><a data-event="formatBlock" data-value="p">Normal</a></li><li><a data-event="formatBlock" data-value="blockquote"><blockquote>Quote</blockquote></a></li><li><a data-event="formatBlock" data-value="pre">Code</a></li><li><a data-event="formatBlock" data-value="h1"><h1>Header 1</h1></a></li><li><a data-event="formatBlock" data-value="h2"><h2>Header 2</h2></a></li><li><a data-event="formatBlock" data-value="h3"><h3>Header 3</h3></a></li><li><a data-event="formatBlock" data-value="h4"><h4>Header 4</h4></a></li><li><a data-event="formatBlock" data-value="h5"><h5>Header 5</h5></a></li><li><a data-event="formatBlock" data-value="h6"><h6>Header 6</h6></a></li></ul>',fontsize:'<button type="button" class="btn btn-default btn-sm btn-small dropdown-toggle" data-toggle="dropdown" title="Font Size" tabindex="-1"><span class="note-current-fontsize">11</span> <b class="caret"></b></button><ul class="dropdown-menu"><li><a data-event="fontSize" data-value="8"><i class="fa fa-check icon-ok"></i> 8</a></li><li><a data-event="fontSize" data-value="9"><i class="fa fa-check icon-ok"></i> 9</a></li><li><a data-event="fontSize" data-value="10"><i class="fa fa-check icon-ok"></i> 10</a></li><li><a data-event="fontSize" data-value="11"><i class="fa fa-check icon-ok"></i> 11</a></li><li><a data-event="fontSize" data-value="12"><i class="fa fa-check icon-ok"></i> 12</a></li><li><a data-event="fontSize" data-value="14"><i class="fa fa-check icon-ok"></i> 14</a></li><li><a data-event="fontSize" data-value="18"><i class="fa fa-check icon-ok"></i> 18</a></li><li><a data-event="fontSize" data-value="24"><i class="fa fa-check icon-ok"></i> 24</a></li><li><a data-event="fontSize" data-value="36"><i class="fa fa-check icon-ok"></i> 36</a></li></ul>',color:'<button type="button" class="btn btn-default btn-sm btn-small note-recent-color" title="Recent Color" data-event="color" data-value=\'{"backColor":"yellow"}\' tabindex="-1"><i class="fa fa-font icon-font" style="color:black;background-color:yellow;"></i></button><button type="button" class="btn btn-default btn-sm btn-small dropdown-toggle" title="More Color" data-toggle="dropdown" tabindex="-1"><span class="caret"></span></button><ul class="dropdown-menu"><li><div class="btn-group"><div class="note-palette-title">BackColor</div><div class="note-color-reset" data-event="backColor" data-value="inherit" title="Transparent">Set transparent</div><div class="note-color-palette" data-target-event="backColor"></div></div><div class="btn-group"><div class="note-palette-title">FontColor</div><div class="note-color-reset" data-event="foreColor" data-value="inherit" title="Reset">Reset to default</div><div class="note-color-palette" data-target-event="foreColor"></div></div></li></ul>',bold:'<button type="button" class="btn btn-default btn-sm btn-small" title="Bold" data-shortcut="Ctrl+B" data-mac-shortcut="⌘+B" data-event="bold" tabindex="-1"><i class="fa fa-bold icon-bold"></i></button>',italic:'<button type="button" class="btn btn-default btn-sm btn-small" title="Italic" data-shortcut="Ctrl+I" data-mac-shortcut="⌘+I" data-event="italic" tabindex="-1"><i class="fa fa-italic icon-italic"></i></button>',underline:'<button type="button" class="btn btn-default btn-sm btn-small" title="Underline" data-shortcut="Ctrl+U" data-mac-shortcut="⌘+U" data-event="underline" tabindex="-1"><i class="fa fa-underline icon-underline"></i></button>',clear:'<button type="button" class="btn btn-default btn-sm btn-small" title="Remove Font Style" data-shortcut="Ctrl+\\" data-mac-shortcut="⌘+\\" data-event="removeFormat" tabindex="-1"><i class="fa fa-eraser icon-eraser"></i></button>',ul:'<button type="button" class="btn btn-default btn-sm btn-small" title="Unordered list" data-shortcut="Ctrl+Shift+8" data-mac-shortcut="⌘+⇧+7" data-event="insertUnorderedList" tabindex="-1"><i class="fa fa-list-ul icon-list-ul"></i></button>',ol:'<button type="button" class="btn btn-default btn-sm btn-small" title="Ordered list" data-shortcut="Ctrl+Shift+7" data-mac-shortcut="⌘+⇧+8" data-event="insertOrderedList" tabindex="-1"><i class="fa fa-list-ol icon-list-ol"></i></button>',paragraph:'<button type="button" class="btn btn-default btn-sm btn-small dropdown-toggle" title="Paragraph" data-toggle="dropdown" tabindex="-1"><i class="fa fa-align-left icon-align-left"></i> <span class="caret"></span></button><ul class="dropdown-menu"><li><div class="note-align btn-group"><button type="button" class="btn btn-default btn-sm btn-small" title="Align left" data-shortcut="Ctrl+Shift+L" data-mac-shortcut="⌘+⇧+L" data-event="justifyLeft" tabindex="-1"><i class="fa fa-align-left icon-align-left"></i></button><button type="button" class="btn btn-default btn-sm btn-small" title="Align center" data-shortcut="Ctrl+Shift+E" data-mac-shortcut="⌘+⇧+E" data-event="justifyCenter" tabindex="-1"><i class="fa fa-align-center icon-align-center"></i></button><button type="button" class="btn btn-default btn-sm btn-small" title="Align right" data-shortcut="Ctrl+Shift+R" data-mac-shortcut="⌘+⇧+R" data-event="justifyRight" tabindex="-1"><i class="fa fa-align-right icon-align-right"></i></button><button type="button" class="btn btn-default btn-sm btn-small" title="Justify full" data-shortcut="Ctrl+Shift+J" data-mac-shortcut="⌘+⇧+J" data-event="justifyFull" tabindex="-1"><i class="fa fa-align-justify icon-align-justify"></i></button></div></li><li><div class="note-list btn-group"><button type="button" class="btn btn-default btn-sm btn-small" title="Outdent" data-shortcut="Ctrl+[" data-mac-shortcut="⌘+[" data-event="outdent" tabindex="-1"><i class="fa fa-outdent icon-indent-left"></i></button><button type="button" class="btn btn-default btn-sm btn-small" title="Indent" data-shortcut="Ctrl+]" data-mac-shortcut="⌘+]" data-event="indent" tabindex="-1"><i class="fa fa-indent icon-indent-right"></i></button></li></ul>',height:'<button type="button" class="btn btn-default btn-sm btn-small dropdown-toggle" data-toggle="dropdown" title="Line Height" tabindex="-1"><i class="fa fa-text-height icon-text-height"></i>&nbsp; <b class="caret"></b></button><ul class="dropdown-menu"><li><a data-event="lineHeight" data-value="1.0"><i class="fa fa-check icon-ok"></i> 1.0</a></li><li><a data-event="lineHeight" data-value="1.2"><i class="fa fa-check icon-ok"></i> 1.2</a></li><li><a data-event="lineHeight" data-value="1.4"><i class="fa fa-check icon-ok"></i> 1.4</a></li><li><a data-event="lineHeight" data-value="1.5"><i class="fa fa-check icon-ok"></i> 1.5</a></li><li><a data-event="lineHeight" data-value="1.6"><i class="fa fa-check icon-ok"></i> 1.6</a></li><li><a data-event="lineHeight" data-value="1.8"><i class="fa fa-check icon-ok"></i> 1.8</a></li><li><a data-event="lineHeight" data-value="2.0"><i class="fa fa-check icon-ok"></i> 2.0</a></li><li><a data-event="lineHeight" data-value="3.0"><i class="fa fa-check icon-ok"></i> 3.0</a></li></ul>',help:'<button type="button" class="btn btn-default btn-sm btn-small" title="Help" data-shortcut="Ctrl+/" data-mac-shortcut="⌘+/" data-event="showHelpDialog" tabindex="-1"><i class="fa fa-question icon-question"></i></button>',fullscreen:'<button type="button" class="btn btn-default btn-sm btn-small" title="Full Screen" data-event="fullscreen" tabindex="-1"><i class="fa fa-arrows-alt icon-fullscreen"></i></button>',codeview:'<button type="button" class="btn btn-default btn-sm btn-small" title="Code View" data-event="codeview" tabindex="-1"><i class="fa fa-code icon-code"></i></button>'},d='<div class="note-popover"><div class="note-link-popover popover bottom in" style="display: none;"><div class="arrow"></div><div class="popover-content note-link-content"><a href="http://www.google.com" target="_blank">www.google.com</a>&nbsp;&nbsp;<div class="note-insert btn-group"><button type="button" class="btn btn-default btn-sm btn-small" title="Edit" data-event="showLinkDialog" tabindex="-1"><i class="fa fa-edit icon-edit"></i></button><button type="button" class="btn btn-default btn-sm btn-small" title="Unlink" data-event="unlink" tabindex="-1"><i class="fa fa-unlink icon-unlink"></i></button></div></div></div><div class="note-image-popover popover bottom in" style="display: none;"><div class="arrow"></div><div class="popover-content note-image-content"><div class="btn-group"><button type="button" class="btn btn-default btn-sm btn-small" title="Resize Full" data-event="resize" data-value="1" tabindex="-1"><span class="note-fontsize-10">100%</span> </button><button type="button" class="btn btn-default btn-sm btn-small" title="Resize Half" data-event="resize" data-value="0.5" tabindex="-1"><span class="note-fontsize-10">50%</span> </button><button type="button" class="btn btn-default btn-sm btn-small" title="Resize Quarter" data-event="resize" data-value="0.25" tabindex="-1"><span class="note-fontsize-10">25%</span> </button></div><div class="btn-group"><button type="button" class="btn btn-default btn-sm btn-small" title="Float Left" data-event="floatMe" data-value="left" tabindex="-1"><i class="fa fa-align-left icon-align-left"></i></button><button type="button" class="btn btn-default btn-sm btn-small" title="Float Right" data-event="floatMe" data-value="right" tabindex="-1"><i class="fa fa-align-right icon-align-right"></i></button><button type="button" class="btn btn-default btn-sm btn-small" title="Float None" data-event="floatMe" data-value="none" tabindex="-1"><i class="fa fa-align-justify icon-align-justify"></i></button></div></div></div></div>',e='<div class="note-handle"><div class="note-control-selection"><div class="note-control-selection-bg"></div><div class="note-control-holder note-control-nw"></div><div class="note-control-holder note-control-ne"></div><div class="note-control-holder note-control-sw"></div><div class="note-control-sizing note-control-se"></div><div class="note-control-selection-info"></div></div></div>',f='<table class="note-shortcut"><thead><tr><th></th><th>Text formatting</th></tr></thead><tbody><tr><td>⌘ + B</td><td>Toggle Bold</td></tr><tr><td>⌘ + I</td><td>Toggle Italic</td></tr><tr><td>⌘ + U</td><td>Toggle Underline</td></tr><tr><td>⌘ + ⇧ + S</td><td>Toggle Strike</td></tr><tr><td>⌘ + \\</td><td>Remove Font Style</td></tr></tr></tbody></table>',h='<table class="note-shortcut"><thead><tr><th></th><th>Action</th></tr></thead><tbody><tr><td>⌘ + Z</td><td>Undo</td></tr><tr><td>⌘ + ⇧ + Z</td><td>Redo</td></tr><tr><td>⌘ + ]</td><td>Indent</td></tr><tr><td>⌘ + [</td><td>Outdent</td></tr><tr><td>⌘ + K</td><td>Insert Link</td></tr><tr><td>⌘ + ENTER</td><td>Insert Horizontal Rule</td></tr></tbody></table>',i='<table class="note-shortcut"><thead><tr><th></th><th>Paragraph formatting</th></tr></thead><tbody><tr><td>⌘ + ⇧ + L</td><td>Align Left</td></tr><tr><td>⌘ + ⇧ + E</td><td>Align Center</td></tr><tr><td>⌘ + ⇧ + R</td><td>Align Right</td></tr><tr><td>⌘ + ⇧ + J</td><td>Justify Full</td></tr><tr><td>⌘ + ⇧ + NUM7</td><td>Ordered List</td></tr><tr><td>⌘ + ⇧ + NUM8</td><td>Unordered List</td></tr></tbody></table>',k='<table class="note-shortcut"><thead><tr><th></th><th>Document Style</th></tr></thead><tbody><tr><td>⌘ + NUM0</td><td>Normal Text</td></tr><tr><td>⌘ + NUM1</td><td>Heading 1</td></tr><tr><td>⌘ + NUM2</td><td>Heading 2</td></tr><tr><td>⌘ + NUM3</td><td>Heading 3</td></tr><tr><td>⌘ + NUM4</td><td>Heading 4</td></tr><tr><td>⌘ + NUM5</td><td>Heading 5</td></tr><tr><td>⌘ + NUM6</td><td>Heading 6</td></tr></tbody></table>',l='<table class="note-shortcut-layout"><tbody><tr><td>'+h+"</td><td>"+f+"</td></tr><tr><td>"+k+"</td><td>"+i+"</td></tr></tbody></table>";
+c.bMac||(l=l.replace(/⌘/g,"Ctrl").replace(/⇧/g,"Shift"));var m='<div class="note-dialog"><div class="note-image-dialog modal" aria-hidden="false"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" aria-hidden="true" tabindex="-1">×</button><h4>Insert Image</h4></div><div class="modal-body"><div class="row-fluid"><div class="note-dropzone span12">Drag an image here</div><h5>Select from files</h5><input class="note-image-input" type="file" name="files" accept="image/*" capture="camera" /><h5>Image URL</h5><input class="note-image-url form-control span12" type="text" /></div></div><div class="modal-footer"><button href="#" class="btn btn-primary note-image-btn disabled" disabled="disabled">Insert</button></div></div></div></div><div class="note-link-dialog modal" aria-hidden="false"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" aria-hidden="true" tabindex="-1">×</button><h4>Edit Link</h4></div><div class="modal-body"><div class="row-fluid"><div class="form-group"><label>Text to display</label><span class="note-link-text form-control input-xlarge uneditable-input" /></div><div class="form-group"><label>To what URL should this link go?</label><input class="note-link-url form-control span12" type="text" /></div></div></div><div class="modal-footer"><button href="#" class="btn btn-primary note-link-btn disabled" disabled="disabled">Link</button></div></div></div></div><div class="note-help-dialog modal" aria-hidden="false"><div class="modal-dialog"><div class="modal-content"><div class="modal-body"><div class="modal-background"><a class="modal-close pull-right" aria-hidden="true" tabindex="-1">Close</a><div class="title">Keyboard shortcuts</div>'+l+'<p class="text-center"><a href="//hackerwins.github.io/summernote/" target="_blank">Summernote v0.4</a> · <a href="//github.com/HackerWins/summernote" target="_blank">Project</a> · <a href="//github.com/HackerWins/summernote/issues" target="_blank">Issues</a></p></div></div></div></div></div>',n='<div class="note-resizebar"><div class="note-icon-bar"></div><div class="note-icon-bar"></div><div class="note-icon-bar"></div></div>',o=function(b,d){b.find("button").each(function(b,d){var e=a(d),f=e.attr(c.bMac?"data-mac-shortcut":"data-shortcut");f&&e.attr("title",function(a,b){return b+" ("+f+")"})}).tooltip({container:"body",placement:d||"top"})},p=[["#000000","#424242","#636363","#9C9C94","#CEC6CE","#EFEFEF","#F7F7F7","#FFFFFF"],["#FF0000","#FF9C00","#FFFF00","#00FF00","#00FFFF","#0000FF","#9C00FF","#FF00FF"],["#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE"],["#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD"],["#E76363","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5"],["#CE0000","#E79439","#EFC631","#6BA54A","#4A7B8C","#3984C6","#634AA5","#A54A7B"],["#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842"],["#630000","#7B3900","#846300","#295218","#083139","#003163","#21104A","#4A1031"]],q=function(b){b.find(".note-color-palette").each(function(){for(var b=a(this),c=b.attr("data-target-event"),d="",e=0,f=p.length;f>e;e++){for(var g=p[e],h="<div>",i=0,j=g.length;j>i;i++){var k=g[i],l=['<button type="button" class="note-color-btn" style="background-color:',k,';" data-event="',c,'" data-value="',k,'" title="',k,'" data-toggle="button" tabindex="-1"></button>'].join("");h+=l}h+="</div>",d+=h}b.html(d)})};this.createLayout=function(c,f,h,i){if(!c.next().hasClass("note-editor")){var k=a('<div class="note-editor"></div>');f>0&&a('<div class="note-statusbar">'+n+"</div>").prependTo(k);var l=a('<div class="note-editable" contentEditable="true"></div>').prependTo(k);f&&(l.height(f),l.data("optionHeight",f)),h&&l.data("tabsize",h),l.html(g.html(c)),l.data("NoteHistory",new j),a('<textarea class="note-codable"></textarea>').prependTo(k),setTimeout(function(){document.execCommand("styleWithCSS",0,!0)});for(var p="",r=0,s=i.length;s>r;r++){var t=i[r];p+='<div class="note-'+t[0]+' btn-group">';for(var u=0,v=t[1].length;v>u;u++)p+=b[t[1][u]];p+="</div>"}p='<div class="note-toolbar btn-toolbar">'+p+"</div>";var w=a(p).prependTo(k);q(w),o(w,"bottom");var x=a(d).prependTo(k);o(x),a(e).prependTo(k);var y=a(m).prependTo(k);y.find("button.close, a.modal-close").click(function(){a(this).closest(".modal").modal("hide")}),k.insertAfter(c),c.hide()}};var r=this.layoutInfoFromHolder=function(a){var b=a.next();if(b.hasClass("note-editor"))return{editor:b,toolbar:b.find(".note-toolbar"),editable:b.find(".note-editable"),codable:b.find(".note-codable"),statusbar:b.find(".note-statusbar"),popover:b.find(".note-popover"),handle:b.find(".note-handle"),dialog:b.find(".note-dialog")}};this.removeLayout=function(a){var b=r(a);b&&(a.html(b.editable.html()),b.editor.remove(),a.show())}},r=new q,s=new p;a.fn.extend({summernote:function(b){if(b=a.extend({toolbar:[["style",["style"]],["font",["bold","italic","underline","clear"]],["fontsize",["fontsize"]],["color",["color"]],["para",["ul","ol","paragraph"]],["height",["height"]],["table",["table"]],["insert",["link","picture"]],["view",["fullscreen","codeview"]],["help",["help"]]]},b),this.each(function(c,d){var e=a(d);r.createLayout(e,b.height,b.tabsize,b.toolbar);var f=r.layoutInfoFromHolder(e);s.attach(f,b)}),this.first()&&b.focus){var c=r.layoutInfoFromHolder(this.first());c.editable.focus()}this.length>0&&b.oninit&&b.oninit()},code:function(b){if(void 0===b){var d=this.first();if(0===d.length)return;var e=r.layoutInfoFromHolder(d);if(e&&e.editable){var f=e.editor.hasClass("codeview");return c.bCodeMirror&&e.codable.data("cmEditor").save(),f?e.codable.val():e.editable.html()}return d.html()}this.each(function(c,d){var e=r.layoutInfoFromHolder(a(d));e&&e.editable&&e.editable.html(b)})},destroy:function(){this.each(function(b,c){var d=a(c),e=r.layoutInfoFromHolder(d);e&&e.editable&&(s.dettach(e),r.removeLayout(d))})},summernoteInner:function(){return{dom:g,list:e,func:d,range:h}}})}(window.jQuery,window.CodeMirror),"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(a,b){"use strict";var c,d,e=this.length>>>0,f=!1;for(1<arguments.length&&(d=b,f=!0),c=0;e>c;++c)this.hasOwnProperty(c)&&(f?d=a(d,this[c],c,this):(d=this[c],f=!0));if(!f)throw new TypeError("Reduce of empty array with no initial value");return d});
\ No newline at end of file
diff --git a/data/ext/editorHTML_/cleditor/images/buttons.gif b/data/ext/editorHTML_/cleditor/images/buttons.gif
deleted file mode 100644
index 2e464d0c8..000000000
Binary files a/data/ext/editorHTML_/cleditor/images/buttons.gif and /dev/null differ
diff --git a/data/ext/editorHTML_/cleditor/images/toolbar.gif b/data/ext/editorHTML_/cleditor/images/toolbar.gif
deleted file mode 100644
index e6eb2da55..000000000
Binary files a/data/ext/editorHTML_/cleditor/images/toolbar.gif and /dev/null differ
diff --git a/data/ext/editorHTML_/cleditor/jquery.cleditor.css b/data/ext/editorHTML_/cleditor/jquery.cleditor.css
deleted file mode 100644
index 6ac490bcf..000000000
--- a/data/ext/editorHTML_/cleditor/jquery.cleditor.css
+++ /dev/null
@@ -1,24 +0,0 @@
-.cleditorMain {border:1px solid #999; padding:0 1px 1px; background-color:white}
-.cleditorMain iframe {border:none; margin:0; padding:0}
-.cleditorMain textarea {border:none; margin:0; padding:0; overflow-y:scroll; font:10pt Arial,Verdana; resize:none; outline:none /* webkit grip focus */}
-.cleditorToolbar {background: url('images/toolbar.gif') repeat}
-.cleditorGroup {float:left; height:26px}
-.cleditorButton {float:left; width:24px; height:24px; margin:1px 0 1px 0; background: url('images/buttons.gif')}
-.cleditorDisabled {opacity:0.3; filter:alpha(opacity=30)}
-.cleditorDivider {float:left; width:1px; height:23px; margin:1px 0 1px 0; background:#CCC}
-.cleditorPopup {border:solid 1px #999; background-color:white; position:absolute; font:10pt Arial,Verdana; cursor:default; z-index:10000}
-.cleditorList div {padding:2px 4px 2px 4px}
-.cleditorList p,
-.cleditorList h1,
-.cleditorList h2,
-.cleditorList h3,
-.cleditorList h4,
-.cleditorList h5,
-.cleditorList h6,
-.cleditorList font {padding:0; margin:0; background-color:Transparent}
-.cleditorColor {width:150px; padding:1px 0 0 1px}
-.cleditorColor div {float:left; width:14px; height:14px; margin:0 1px 1px 0}
-.cleditorPrompt {background-color:#F6F7F9; padding:4px; font-size:8.5pt}
-.cleditorPrompt input,
-.cleditorPrompt textarea {font:8.5pt Arial,Verdana;}
-.cleditorMsg {background-color:#FDFCEE; width:150px; padding:4px; font-size:8.5pt}
diff --git a/data/ext/editorHTML_/cleditor/jquery.cleditor.js b/data/ext/editorHTML_/cleditor/jquery.cleditor.js
deleted file mode 100644
index 20b400fde..000000000
--- a/data/ext/editorHTML_/cleditor/jquery.cleditor.js
+++ /dev/null
@@ -1,1132 +0,0 @@
-/**
- @preserve CLEditor WYSIWYG HTML Editor v1.3.0
- http://premiumsoftware.net/cleditor
- requires jQuery v1.4.2 or later
-
- Copyright 2010, Chris Landowski, Premium Software, LLC
- Dual licensed under the MIT or GPL Version 2 licenses.
-*/
-
-// ==ClosureCompiler==
-// @compilation_level SIMPLE_OPTIMIZATIONS
-// @output_file_name jquery.cleditor.min.js
-// ==/ClosureCompiler==
-
-(function($) {
-
- //==============
- // jQuery Plugin
- //==============
-
- $.cleditor = {
-
- // Define the defaults used for all new cleditor instances
- defaultOptions: {
- width: 500, // width not including margins, borders or padding
- height: 250, // height not including margins, borders or padding
- controls: // controls to add to the toolbar
- "bold italic underline strikethrough subscript superscript | font size " +
- "style | color highlight removeformat | bullets numbering | outdent " +
- "indent | alignleft center alignright justify | undo redo | " +
- "rule image link unlink | cut copy paste pastetext | print source",
- colors: // colors in the color popup
- "FFF FCC FC9 FF9 FFC 9F9 9FF CFF CCF FCF " +
- "CCC F66 F96 FF6 FF3 6F9 3FF 6FF 99F F9F " +
- "BBB F00 F90 FC6 FF0 3F3 6CC 3CF 66C C6C " +
- "999 C00 F60 FC3 FC0 3C0 0CC 36F 63F C3C " +
- "666 900 C60 C93 990 090 399 33F 60C 939 " +
- "333 600 930 963 660 060 366 009 339 636 " +
- "000 300 630 633 330 030 033 006 309 303",
- fonts: // font names in the font popup
- "Arial,Arial Black,Comic Sans MS,Courier New,Narrow,Garamond," +
- "Georgia,Impact,Sans Serif,Serif,Tahoma,Trebuchet MS,Verdana",
- sizes: // sizes in the font size popup
- "1,2,3,4,5,6,7",
- styles: // styles in the style popup
- [["Paragraph", "<p>"], ["Header 1", "<h1>"], ["Header 2", "<h2>"],
- ["Header 3", "<h3>"], ["Header 4","<h4>"], ["Header 5","<h5>"],
- ["Header 6","<h6>"]],
- useCSS: false, // use CSS to style HTML when possible (not supported in ie)
- docType: // Document type contained within the editor
- '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
- docCSSFile: // CSS file used to style the document contained within the editor
- "",
- bodyStyle: // style to assign to document body contained within the editor
- "margin:4px; font:10pt Arial,Verdana; cursor:text"
- },
-
- // Define all usable toolbar buttons - the init string property is
- // expanded during initialization back into the buttons object and
- // seperate object properties are created for each button.
- // e.g. buttons.size.title = "Font Size"
- buttons: {
- // name,title,command,popupName (""=use name)
- init:
- "bold,,|" +
- "italic,,|" +
- "underline,,|" +
- "strikethrough,,|" +
- "subscript,,|" +
- "superscript,,|" +
- "font,,fontname,|" +
- "size,Font Size,fontsize,|" +
- "style,,formatblock,|" +
- "color,Font Color,forecolor,|" +
- "highlight,Text Highlight Color,hilitecolor,color|" +
- "removeformat,Remove Formatting,|" +
- "bullets,,insertunorderedlist|" +
- "numbering,,insertorderedlist|" +
- "outdent,,|" +
- "indent,,|" +
- "alignleft,Align Text Left,justifyleft|" +
- "center,,justifycenter|" +
- "alignright,Align Text Right,justifyright|" +
- "justify,,justifyfull|" +
- "undo,,|" +
- "redo,,|" +
- "rule,Insert Horizontal Rule,inserthorizontalrule|" +
- "image,Insert Image,insertimage,url|" +
- "link,Insert Hyperlink,createlink,url|" +
- "unlink,Remove Hyperlink,|" +
- "cut,,|" +
- "copy,,|" +
- "paste,,|" +
- "pastetext,Paste as Text,inserthtml,|" +
- "print,,|" +
- "source,Show Source"
- },
-
- // imagesPath - returns the path to the images folder
- imagesPath: function() { return imagesPath(); }
-
- };
-
- // cleditor - creates a new editor for each of the matched textareas
- $.fn.cleditor = function(options) {
-
- // Create a new jQuery object to hold the results
- var $result = $([]);
-
- // Loop through all matching textareas and create the editors
- this.each(function(idx, elem) {
- if (elem.tagName == "TEXTAREA") {
- var data = $.data(elem, CLEDITOR);
- if (!data) data = new cleditor(elem, options);
- $result = $result.add(data);
- }
- });
-
- // return the new jQuery object
- return $result;
-
- };
-
- //==================
- // Private Variables
- //==================
-
- var
-
- // Misc constants
- BACKGROUND_COLOR = "backgroundColor",
- BUTTON = "button",
- BUTTON_NAME = "buttonName",
- CHANGE = "change",
- CLEDITOR = "cleditor",
- CLICK = "click",
- DISABLED = "disabled",
- DIV_TAG = "<div>",
- TRANSPARENT = "transparent",
- UNSELECTABLE = "unselectable",
-
- // Class name constants
- MAIN_CLASS = "cleditorMain", // main containing div
- TOOLBAR_CLASS = "cleditorToolbar", // toolbar div inside main div
- GROUP_CLASS = "cleditorGroup", // group divs inside the toolbar div
- BUTTON_CLASS = "cleditorButton", // button divs inside group div
- DISABLED_CLASS = "cleditorDisabled",// disabled button divs
- DIVIDER_CLASS = "cleditorDivider", // divider divs inside group div
- POPUP_CLASS = "cleditorPopup", // popup divs inside body
- LIST_CLASS = "cleditorList", // list popup divs inside body
- COLOR_CLASS = "cleditorColor", // color popup div inside body
- PROMPT_CLASS = "cleditorPrompt", // prompt popup divs inside body
- MSG_CLASS = "cleditorMsg", // message popup div inside body
-
- // Test for ie
- ie = false,
- ie6 = /msie\s6/i.test(navigator.userAgent),
-
- // Test for iPhone/iTouch/iPad
- iOS = /iphone|ipad|ipod/i.test(navigator.userAgent),
-
- // Popups are created once as needed and shared by all editor instances
- popups = {},
-
- // Used to prevent the document click event from being bound more than once
- documentClickAssigned,
-
- // Local copy of the buttons object
- buttons = $.cleditor.buttons;
-
- //===============
- // Initialization
- //===============
-
- // Expand the buttons.init string back into the buttons object
- // and create seperate object properties for each button.
- // e.g. buttons.size.title = "Font Size"
- $.each(buttons.init.split("|"), function(idx, button) {
- var items = button.split(","), name = items[0];
- buttons[name] = {
- stripIndex: idx,
- name: name,
- title: items[1] === "" ? name.charAt(0).toUpperCase() + name.substr(1) : items[1],
- command: items[2] === "" ? name : items[2],
- popupName: items[3] === "" ? name : items[3]
- };
- });
- delete buttons.init;
-
- //============
- // Constructor
- //============
-
- // cleditor - creates a new editor for the passed in textarea element
- cleditor = function(area, options) {
-
- var editor = this;
-
- // Get the defaults and override with options
- editor.options = options = $.extend({}, $.cleditor.defaultOptions, options);
-
- // Hide the textarea and associate it with this editor
- var $area = editor.$area = $(area)
- .hide()
- .data(CLEDITOR, editor)
- .blur(function() {
- // Update the iframe when the textarea loses focus
- updateFrame(editor, true);
- });
-
- // Create the main container and append the textarea
- var $main = editor.$main = $(DIV_TAG)
- .addClass(MAIN_CLASS)
- .width(options.width)
- .height(options.height);
-
- // Create the toolbar
- var $toolbar = editor.$toolbar = $(DIV_TAG)
- .addClass(TOOLBAR_CLASS)
- .appendTo($main);
-
- // Add the first group to the toolbar
- var $group = $(DIV_TAG)
- .addClass(GROUP_CLASS)
- .appendTo($toolbar);
-
- // Add the buttons to the toolbar
- $.each(options.controls.split(" "), function(idx, buttonName) {
- if (buttonName === "") return true;
-
- // Divider
- if (buttonName == "|") {
-
- // Add a new divider to the group
- var $div = $(DIV_TAG)
- .addClass(DIVIDER_CLASS)
- .appendTo($group);
-
- // Create a new group
- $group = $(DIV_TAG)
- .addClass(GROUP_CLASS)
- .appendTo($toolbar);
-
- }
-
- // Button
- else {
-
- // Get the button definition
- var button = buttons[buttonName];
-
- // Add a new button to the group
- var $buttonDiv = $(DIV_TAG)
- .data(BUTTON_NAME, button.name)
- .addClass(BUTTON_CLASS)
- .attr("title", button.title)
- .bind(CLICK, $.proxy(buttonClick, editor))
- .appendTo($group)
- .hover(hoverEnter, hoverLeave);
-
- // Prepare the button image
- var map = {};
- if (button.css) map = button.css;
- else if (button.image) map.backgroundImage = imageUrl(button.image);
- if (button.stripIndex) map.backgroundPosition = button.stripIndex * -24;
- $buttonDiv.css(map);
-
- // Add the unselectable attribute for ie
- if (ie)
- $buttonDiv.attr(UNSELECTABLE, "on");
-
- // Create the popup
- if (button.popupName)
- createPopup(button.popupName, options, button.popupClass,
- button.popupContent, button.popupHover);
-
- }
-
- });
-
- // Add the main div to the DOM and append the textarea
- $main.insertBefore($area)
- .append($area);
-
- // Bind the document click event handler
- if (!documentClickAssigned) {
- $(document).click(function(e) {
- // Dismiss all non-prompt popups
- var $target = $(e.target);
- if (!$target.add($target.parents()).is("." + PROMPT_CLASS))
- hidePopups();
- });
- documentClickAssigned = true;
- }
-
- // Bind the window resize event when the width or height is auto or %
- if (/auto|%/.test("" + options.width + options.height))
- $(window).resize(function() {refresh(editor);});
-
- // Create the iframe and resize the controls
- refresh(editor);
-
- };
-
- //===============
- // Public Methods
- //===============
-
- var fn = cleditor.prototype,
-
- // Expose the following private functions as methods on the cleditor object.
- // The closure compiler will rename the private functions. However, the
- // exposed method names on the cleditor object will remain fixed.
- methods = [
- ["clear", clear],
- ["disable", disable],
- ["execCommand", execCommand],
- ["focus", focus],
- ["hidePopups", hidePopups],
- ["sourceMode", sourceMode, true],
- ["refresh", refresh],
- ["select", select],
- ["selectedHTML", selectedHTML, true],
- ["selectedText", selectedText, true],
- ["showMessage", showMessage],
- ["updateFrame", updateFrame],
- ["updateTextArea", updateTextArea]
- ];
-
- $.each(methods, function(idx, method) {
- fn[method[0]] = function() {
- var editor = this, args = [editor];
- // using each here would cast booleans into objects!
- for(var x = 0; x < arguments.length; x++) {args.push(arguments[x]);}
- var result = method[1].apply(editor, args);
- if (method[2]) return result;
- return editor;
- };
- });
-
- // change - shortcut for .bind("change", handler) or .trigger("change")
- fn.change = function(handler) {
- var $this = $(this);
- return handler ? $this.bind(CHANGE, handler) : $this.trigger(CHANGE);
- };
-
- //===============
- // Event Handlers
- //===============
-
- // buttonClick - click event handler for toolbar buttons
- function buttonClick(e) {
-
- var editor = this,
- buttonDiv = e.target,
- buttonName = $.data(buttonDiv, BUTTON_NAME),
- button = buttons[buttonName],
- popupName = button.popupName,
- popup = popups[popupName];
-
- // Check if disabled
- if (editor.disabled || $(buttonDiv).attr(DISABLED) == DISABLED)
- return;
-
- // Fire the buttonClick event
- var data = {
- editor: editor,
- button: buttonDiv,
- buttonName: buttonName,
- popup: popup,
- popupName: popupName,
- command: button.command,
- useCSS: editor.options.useCSS
- };
-
- if (button.buttonClick && button.buttonClick(e, data) === false)
- return false;
-
- // Toggle source
- if (buttonName == "source") {
-
- // Show the iframe
- if (sourceMode(editor)) {
- delete editor.range;
- editor.$area.hide();
- editor.$frame.show();
- buttonDiv.title = button.title;
- }
-
- // Show the textarea
- else {
- editor.$frame.hide();
- editor.$area.show();
- buttonDiv.title = "Show Rich Text";
- }
-
- // Enable or disable the toolbar buttons
- // IE requires the timeout
- setTimeout(function() {refreshButtons(editor);}, 100);
-
- }
-
- // Check for rich text mode
- else if (!sourceMode(editor)) {
-
- // Handle popups
- if (popupName) {
- var $popup = $(popup);
-
- // URL
- if (popupName == "url") {
-
- // Check for selection before showing the link url popup
- if (buttonName == "link" && selectedText(editor) === "") {
- showMessage(editor, "A selection is required when inserting a link.", buttonDiv);
- return false;
- }
-
- // Wire up the submit button click event handler
- $popup.children(":button")
- .unbind(CLICK)
- .bind(CLICK, function() {
-
- // Insert the image or link if a url was entered
- var $text = $popup.find(":text"),
- url = $.trim($text.val());
- if (url !== "")
- execCommand(editor, data.command, url, null, data.button);
-
- // Reset the text, hide the popup and set focus
- $text.val("http://");
- hidePopups();
- focus(editor);
-
- });
-
- }
-
- // Paste as Text
- else if (popupName == "pastetext") {
-
- // Wire up the submit button click event handler
- $popup.children(":button")
- .unbind(CLICK)
- .bind(CLICK, function() {
-
- // Insert the unformatted text replacing new lines with break tags
- var $textarea = $popup.find("textarea"),
- text = $textarea.val().replace(/\n/g, "<br />");
- if (text !== "")
- execCommand(editor, data.command, text, null, data.button);
-
- // Reset the text, hide the popup and set focus
- $textarea.val("");
- hidePopups();
- focus(editor);
-
- });
-
- }
-
- // Show the popup if not already showing for this button
- if (buttonDiv !== $.data(popup, BUTTON)) {
- showPopup(editor, popup, buttonDiv);
- return false; // stop propagination to document click
- }
-
- // propaginate to documnt click
- return;
-
- }
-
- // Print
- else if (buttonName == "print")
- editor.$frame[0].contentWindow.print();
-
- // All other buttons
- else if (!execCommand(editor, data.command, data.value, data.useCSS, buttonDiv))
- return false;
-
- }
-
- // Focus the editor
- focus(editor);
-
- }
-
- // hoverEnter - mouseenter event handler for buttons and popup items
- function hoverEnter(e) {
- var $div = $(e.target).closest("div");
- $div.css(BACKGROUND_COLOR, $div.data(BUTTON_NAME) ? "#FFF" : "#FFC");
- }
-
- // hoverLeave - mouseleave event handler for buttons and popup items
- function hoverLeave(e) {
- $(e.target).closest("div").css(BACKGROUND_COLOR, "transparent");
- }
-
- // popupClick - click event handler for popup items
- function popupClick(e) {
-
- var editor = this,
- popup = e.data.popup,
- target = e.target;
-
- // Check for message and prompt popups
- if (popup === popups.msg || $(popup).hasClass(PROMPT_CLASS))
- return;
-
- // Get the button info
- var buttonDiv = $.data(popup, BUTTON),
- buttonName = $.data(buttonDiv, BUTTON_NAME),
- button = buttons[buttonName],
- command = button.command,
- value,
- useCSS = editor.options.useCSS;
-
- // Get the command value
- if (buttonName == "font")
- // Opera returns the fontfamily wrapped in quotes
- value = target.style.fontFamily.replace(/"/g, "");
- else if (buttonName == "size") {
- if (target.tagName == "DIV")
- target = target.children[0];
- value = target.innerHTML;
- }
- else if (buttonName == "style")
- value = "<" + target.tagName + ">";
- else if (buttonName == "color")
- value = hex(target.style.backgroundColor);
- else if (buttonName == "highlight") {
- value = hex(target.style.backgroundColor);
- if (ie) command = 'backcolor';
- else useCSS = true;
- }
-
- // Fire the popupClick event
- var data = {
- editor: editor,
- button: buttonDiv,
- buttonName: buttonName,
- popup: popup,
- popupName: button.popupName,
- command: command,
- value: value,
- useCSS: useCSS
- };
-
- if (button.popupClick && button.popupClick(e, data) === false)
- return;
-
- // Execute the command
- if (data.command && !execCommand(editor, data.command, data.value, data.useCSS, buttonDiv))
- return false;
-
- // Hide the popup and focus the editor
- hidePopups();
- focus(editor);
-
- }
-
- //==================
- // Private Functions
- //==================
-
- // checksum - returns a checksum using the Adler-32 method
- function checksum(text)
- {
- var a = 1, b = 0;
- for (var index = 0; index < text.length; ++index) {
- a = (a + text.charCodeAt(index)) % 65521;
- b = (b + a) % 65521;
- }
- return (b << 16) | a;
- }
-
- // clear - clears the contents of the editor
- function clear(editor) {
- editor.$area.val("");
- updateFrame(editor);
- }
-
- // createPopup - creates a popup and adds it to the body
- function createPopup(popupName, options, popupTypeClass, popupContent, popupHover) {
-
- // Check if popup already exists
- if (popups[popupName])
- return popups[popupName];
-
- // Create the popup
- var $popup = $(DIV_TAG)
- .hide()
- .addClass(POPUP_CLASS)
- .appendTo("body");
-
- // Add the content
-
- // Custom popup
- if (popupContent)
- $popup.html(popupContent);
-
- // Color
- else if (popupName == "color") {
- var colors = options.colors.split(" ");
- if (colors.length < 10)
- $popup.width("auto");
- $.each(colors, function(idx, color) {
- $(DIV_TAG).appendTo($popup)
- .css(BACKGROUND_COLOR, "#" + color);
- });
- popupTypeClass = COLOR_CLASS;
- }
-
- // Font
- else if (popupName == "font")
- $.each(options.fonts.split(","), function(idx, font) {
- $(DIV_TAG).appendTo($popup)
- .css("fontFamily", font)
- .html(font);
- });
-
- // Size
- else if (popupName == "size")
- $.each(options.sizes.split(","), function(idx, size) {
- $(DIV_TAG).appendTo($popup)
- .html("<font size=" + size + ">" + size + "</font>");
- });
-
- // Style
- else if (popupName == "style")
- $.each(options.styles, function(idx, style) {
- $(DIV_TAG).appendTo($popup)
- .html(style[1] + style[0] + style[1].replace("<", "</"));
- });
-
- // URL
- else if (popupName == "url") {
- $popup.html('Enter URL:<br><input type=text value="http://" size=35><br><input type=button value="Submit">');
- popupTypeClass = PROMPT_CLASS;
- }
-
- // Paste as Text
- else if (popupName == "pastetext") {
- $popup.html('Paste your content here and click submit.<br /><textarea cols=40 rows=3></textarea><br /><input type=button value=Submit>');
- popupTypeClass = PROMPT_CLASS;
- }
-
- // Add the popup type class name
- if (!popupTypeClass && !popupContent)
- popupTypeClass = LIST_CLASS;
- $popup.addClass(popupTypeClass);
-
- // Add the unselectable attribute to all items
- if (ie) {
- $popup.attr(UNSELECTABLE, "on")
- .find("div,font,p,h1,h2,h3,h4,h5,h6")
- .attr(UNSELECTABLE, "on");
- }
-
- // Add the hover effect to all items
- if ($popup.hasClass(LIST_CLASS) || popupHover === true)
- $popup.children().hover(hoverEnter, hoverLeave);
-
- // Add the popup to the array and return it
- popups[popupName] = $popup[0];
- return $popup[0];
-
- }
-
- // disable - enables or disables the editor
- function disable(editor, disabled) {
-
- // Update the textarea and save the state
- if (disabled) {
- editor.$area.attr(DISABLED, DISABLED);
- editor.disabled = true;
- }
- else {
- editor.$area.removeAttr(DISABLED);
- delete editor.disabled;
- }
-
- // Switch the iframe into design mode.
- // ie6 does not support designMode.
- // ie7 & ie8 do not properly support designMode="off".
- try {
- if (ie) editor.doc.body.contentEditable = !disabled;
- else editor.doc.designMode = !disabled ? "on" : "off";
- }
- // Firefox 1.5 throws an exception that can be ignored
- // when toggling designMode from off to on.
- catch (err) {}
-
- // Enable or disable the toolbar buttons
- refreshButtons(editor);
-
- }
-
- // execCommand - executes a designMode command
- function execCommand(editor, command, value, useCSS, button) {
-
- // Restore the current ie selection
- restoreRange(editor);
-
- // Set the styling method
- if (!ie) {
- if (useCSS === undefined || useCSS === null)
- useCSS = editor.options.useCSS;
- editor.doc.execCommand("styleWithCSS", 0, useCSS.toString());
- }
-
- // Execute the command and check for error
- var success = true, description;
- if (ie && command.toLowerCase() == "inserthtml")
- getRange(editor).pasteHTML(value);
- else {
- try { success = editor.doc.execCommand(command, 0, value || null); }
- catch (err) { description = err.description; success = false; }
- if (!success) {
- if ("cutcopypaste".indexOf(command) > -1)
- showMessage(editor, "For security reasons, your browser does not support the " +
- command + " command. Try using the keyboard shortcut or context menu instead.",
- button);
- else
- showMessage(editor,
- (description ? description : "Error executing the " + command + " command."),
- button);
- }
- }
-
- // Enable the buttons
- refreshButtons(editor);
- return success;
-
- }
-
- // focus - sets focus to either the textarea or iframe
- function focus(editor) {
- setTimeout(function() {
- if (sourceMode(editor)) editor.$area.focus();
- else editor.$frame[0].contentWindow.focus();
- refreshButtons(editor);
- }, 0);
- }
-
- // getRange - gets the current text range object
- function getRange(editor) {
- if (ie) return getSelection(editor).createRange();
- return getSelection(editor).getRangeAt(0);
- }
-
- // getSelection - gets the current text range object
- function getSelection(editor) {
- if (ie) return editor.doc.selection;
- return editor.$frame[0].contentWindow.getSelection();
- }
-
- // Returns the hex value for the passed in string.
- // hex("rgb(255, 0, 0)"); // #FF0000
- // hex("#FF0000"); // #FF0000
- // hex("#F00"); // #FF0000
- function hex(s) {
- var m = /rgba?\((\d+), (\d+), (\d+)/.exec(s),
- c = s.split("");
- if (m) {
- s = ( m[1] << 16 | m[2] << 8 | m[3] ).toString(16);
- while (s.length < 6)
- s = "0" + s;
- }
- return "#" + (s.length == 6 ? s : c[1] + c[1] + c[2] + c[2] + c[3] + c[3]);
- }
-
- // hidePopups - hides all popups
- function hidePopups() {
- $.each(popups, function(idx, popup) {
- $(popup)
- .hide()
- .unbind(CLICK)
- .removeData(BUTTON);
- });
- }
-
- // imagesPath - returns the path to the images folder
- function imagesPath() {
- var cssFile = "jquery.cleditor.css",
- href = $("link[href$='" + cssFile +"']").attr("href");
- return href.substr(0, href.length - cssFile.length) + "images/";
- }
-
- // imageUrl - Returns the css url string for a filemane
- function imageUrl(filename) {
- return "url(" + imagesPath() + filename + ")";
- }
-
- // refresh - creates the iframe and resizes the controls
- function refresh(editor) {
-
- var $main = editor.$main,
- options = editor.options;
-
- // Remove the old iframe
- if (editor.$frame)
- editor.$frame.remove();
-
- // Create a new iframe
- var $frame = editor.$frame = $('<iframe frameborder="0" src="javascript:true;">')
- .hide()
- .appendTo($main);
-
- // Load the iframe document content
- var contentWindow = $frame[0].contentWindow,
- doc = editor.doc = contentWindow.document,
- $doc = $(doc);
-
- doc.open();
- doc.write(
- options.docType +
- '<html>' +
- ((options.docCSSFile === '') ? '' : '<head><link rel="stylesheet" type="text/css" href="' + options.docCSSFile + '" /></head>') +
- '<body style="' + options.bodyStyle + '"></body></html>'
- );
- doc.close();
-
- // Work around for bug in IE which causes the editor to lose
- // focus when clicking below the end of the document.
- if (ie)
- $doc.click(function() {focus(editor);});
-
- // Load the content
- updateFrame(editor);
-
- // Bind the ie specific iframe event handlers
- if (ie) {
-
- // Save the current user selection. This code is needed since IE will
- // reset the selection just after the beforedeactivate event and just
- // before the beforeactivate event.
- $doc.bind("beforedeactivate beforeactivate selectionchange keypress", function(e) {
-
- // Flag the editor as inactive
- if (e.type == "beforedeactivate")
- editor.inactive = true;
-
- // Get rid of the bogus selection and flag the editor as active
- else if (e.type == "beforeactivate") {
- if (!editor.inactive && editor.range && editor.range.length > 1)
- editor.range.shift();
- delete editor.inactive;
- }
-
- // Save the selection when the editor is active
- else if (!editor.inactive) {
- if (!editor.range)
- editor.range = [];
- editor.range.unshift(getRange(editor));
-
- // We only need the last 2 selections
- while (editor.range.length > 2)
- editor.range.pop();
- }
-
- });
-
- // Restore the text range when the iframe gains focus
- $frame.focus(function() {
- restoreRange(editor);
- });
-
- }
-
- // Update the textarea when the iframe loses focus
- (isFirefox ? $doc : $(contentWindow)).blur(function() {
- updateTextArea(editor, true);
- });
-
- // Enable the toolbar buttons as the user types or clicks
- $doc.click(hidePopups)
- .bind("keyup mouseup", function() {
- refreshButtons(editor);
- });
-
- // Show the textarea for iPhone/iTouch/iPad or
- // the iframe when design mode is supported.
- if (iOS) editor.$area.show();
- else $frame.show();
-
- // Wait for the layout to finish - shortcut for $(document).ready()
- $(function() {
-
- var $toolbar = editor.$toolbar,
- $group = $toolbar.children("div:last"),
- wid = $main.width();
-
- // Resize the toolbar
- var hgt = $group.offset().top + $group.outerHeight() - $toolbar.offset().top + 1;
- $toolbar.height(hgt);
-
- // Resize the iframe
- hgt = (/%/.test("" + options.height) ? $main.height() : parseInt(options.height)) - hgt;
- $frame.width(wid).height(hgt);
-
- // Resize the textarea. IE6 textareas have a 1px top
- // & bottom margin that cannot be removed using css.
- editor.$area.width(wid).height(ie6 ? hgt - 2 : hgt);
-
- // Switch the iframe into design mode if enabled
- disable(editor, editor.disabled);
-
- // Enable or disable the toolbar buttons
- refreshButtons(editor);
-
- });
-
- }
-
- // refreshButtons - enables or disables buttons based on availability
- function refreshButtons(editor) {
-
- // Webkit requires focus before queryCommandEnabled will return anything but false
- if (!iOS && isChrome && !editor.focused) {
- editor.$frame[0].contentWindow.focus();
- window.focus();
- editor.focused = true;
- }
-
- // Get the object used for checking queryCommandEnabled
- var queryObj = editor.doc;
- if (ie) queryObj = getRange(editor);
-
- // Loop through each button
- var inSourceMode = sourceMode(editor);
- $.each(editor.$toolbar.find("." + BUTTON_CLASS), function(idx, elem) {
-
- var $elem = $(elem),
- button = $.cleditor.buttons[$.data(elem, BUTTON_NAME)],
- command = button.command,
- enabled = true;
-
- // Determine the state
- if (editor.disabled)
- enabled = false;
- else if (button.getEnabled) {
- var data = {
- editor: editor,
- button: elem,
- buttonName: button.name,
- popup: popups[button.popupName],
- popupName: button.popupName,
- command: button.command,
- useCSS: editor.options.useCSS
- };
- enabled = button.getEnabled(data);
- if (enabled === undefined)
- enabled = true;
- }
- else if (((inSourceMode || iOS) && button.name != "source") ||
- (ie && (command == "undo" || command == "redo")))
- enabled = false;
- else if (command && command != "print") {
- if (ie && command == "hilitecolor")
- command = "backcolor";
- // IE does not support inserthtml, so it's always enabled
- if (!ie || command != "inserthtml") {
- try {enabled = queryObj.queryCommandEnabled(command);}
- catch (err) {enabled = false;}
- }
- }
-
- // Enable or disable the button
- if (enabled) {
- $elem.removeClass(DISABLED_CLASS);
- $elem.removeAttr(DISABLED);
- }
- else {
- $elem.addClass(DISABLED_CLASS);
- $elem.attr(DISABLED, DISABLED);
- }
-
- });
- }
-
- // restoreRange - restores the current ie selection
- function restoreRange(editor) {
- if (ie && editor.range)
- editor.range[0].select();
- }
-
- // select - selects all the text in either the textarea or iframe
- function select(editor) {
- setTimeout(function() {
- if (sourceMode(editor)) editor.$area.select();
- else execCommand(editor, "selectall");
- }, 0);
- }
-
- // selectedHTML - returns the current HTML selection or and empty string
- function selectedHTML(editor) {
- restoreRange(editor);
- var range = getRange(editor);
- if (ie)
- return range.htmlText;
- var layer = $("<layer>")[0];
- layer.appendChild(range.cloneContents());
- var html = layer.innerHTML;
- layer = null;
- return html;
- }
-
- // selectedText - returns the current text selection or and empty string
- function selectedText(editor) {
- restoreRange(editor);
- if (ie) return getRange(editor).text;
- return getSelection(editor).toString();
- }
-
- // showMessage - alert replacement
- function showMessage(editor, message, button) {
- var popup = createPopup("msg", editor.options, MSG_CLASS);
- popup.innerHTML = message;
- showPopup(editor, popup, button);
- }
-
- // showPopup - shows a popup
- function showPopup(editor, popup, button) {
-
- var offset, left, top, $popup = $(popup);
-
- // Determine the popup location
- if (button) {
- var $button = $(button);
- offset = $button.offset();
- left = --offset.left;
- top = offset.top + $button.height();
- }
- else {
- var $toolbar = editor.$toolbar;
- offset = $toolbar.offset();
- left = Math.floor(($toolbar.width() - $popup.width()) / 2) + offset.left;
- top = offset.top + $toolbar.height() - 2;
- }
-
- // Position and show the popup
- hidePopups();
- $popup.css({left: left, top: top})
- .show();
-
- // Assign the popup button and click event handler
- if (button) {
- $.data(popup, BUTTON, button);
- $popup.bind(CLICK, {popup: popup}, $.proxy(popupClick, editor));
- }
-
- // Focus the first input element if any
- setTimeout(function() {
- $popup.find(":text,textarea").eq(0).focus().select();
- }, 100);
-
- }
-
- // sourceMode - returns true if the textarea is showing
- function sourceMode(editor) {
- return editor.$area.is(":visible");
- }
-
- // updateFrame - updates the iframe with the textarea contents
- function updateFrame(editor, checkForChange) {
-
- var code = editor.$area.val(),
- options = editor.options,
- updateFrameCallback = options.updateFrame,
- $body = $(editor.doc.body);
-
- // Check for textarea change to avoid unnecessary firing
- // of potentially heavy updateFrame callbacks.
- if (updateFrameCallback) {
- var sum = checksum(code);
- if (checkForChange && editor.areaChecksum == sum)
- return;
- editor.areaChecksum = sum;
- }
-
- // Convert the textarea source code into iframe html
- var html = updateFrameCallback ? updateFrameCallback(code) : code;
-
- // Prevent script injection attacks by html encoding script tags
- html = html.replace(/<(?=\/?script)/ig, "&lt;");
-
- // Update the iframe checksum
- if (options.updateTextArea)
- editor.frameChecksum = checksum(html);
-
- // Update the iframe and trigger the change event
- if (html != $body.html()) {
- $body.html(html);
- $(editor).triggerHandler(CHANGE);
- }
-
- }
-
- // updateTextArea - updates the textarea with the iframe contents
- function updateTextArea(editor, checkForChange) {
-
- var html = $(editor.doc.body).html(),
- options = editor.options,
- updateTextAreaCallback = options.updateTextArea,
- $area = editor.$area;
-
- // Check for iframe change to avoid unnecessary firing
- // of potentially heavy updateTextArea callbacks.
- if (updateTextAreaCallback) {
- var sum = checksum(html);
- if (checkForChange && editor.frameChecksum == sum)
- return;
- editor.frameChecksum = sum;
- }
-
- // Convert the iframe html into textarea source code
- var code = updateTextAreaCallback ? updateTextAreaCallback(html) : html;
-
- // Update the textarea checksum
- if (options.updateFrame)
- editor.areaChecksum = checksum(code);
-
- // Update the textarea and trigger the change event
- if (code != $area.val()) {
- $area.val(code);
- $(editor).triggerHandler(CHANGE);
- }
-
- }
-
-})(jQuery);
diff --git a/data/ext/editorHTML_/extension.js b/data/ext/editorHTML_/extension.js
deleted file mode 100644
index 6670335f6..000000000
--- a/data/ext/editorHTML_/extension.js
+++ /dev/null
@@ -1,125 +0,0 @@
-/* Copyright (c) 2013 The Tagspaces Authors. All rights reserved.
- * Use of this source code is governed by a AGPL3 license that
- * can be found in the LICENSE file. */
-
-define(function(require, exports, module) {
-"use strict";
-
- console.log("Loading editorHTML");
- exports.id = "editorHTML"; // ID should be equal to the directory name where the ext. is located
- exports.title = "HTML Editor";
- exports.type = "editor";
- exports.supportedFileTypes = [ "htm", "html" ];
-
- var TSCORE = require("tscore");
-
- var htmlEditor = undefined;
- var extensionDirectory = TSCORE.Config.getExtensionPath()+"/"+exports.id;
-
- exports.init1 = function(filePath, containerElementID) {
- console.log("Initalization HTML Text Editor...");
- require([
- extensionDirectory+'/wysihtml5/advanced.js',
- extensionDirectory+'/wysihtml5/wysihtml5-0.4.0pre.min.js',
- 'css!'+extensionDirectory+'/wysihtml5/stylesheet.css'
- ], function() {
- generateUI(containerElementID);
- htmlEditor = new wysihtml5.Editor("htmlEditor", {
- toolbar : "toolbar",
- parserRules : wysihtml5ParserRules
- });
- TSCORE.IO.loadTextFile(filePath);
- });
- }
-
- exports.init2 = function(filePath, containerElementID) {
- console.log("Initalization HTML Text Editor...");
- require([
- extensionDirectory+'/jwysiwyg/jquery.wysiwyg.js',
- 'css!'+extensionDirectory+'/jwysiwyg/jquery.wysiwyg.css'
- ], function() {
- $("#"+containerElementID).append('<textarea id="htmlEditor" style="border-width: 0px; width: 100%; height: 100%"></textarea>');
- $('#htmlEditor').wysiwyg();
- TSCORE.IO.loadTextFile(filePath);
- });
- }
-
- exports.init = function(filePath, containerElementID) {
- console.log("Initalization HTML Text Editor...");
- require([
- extensionDirectory+'/cleditor/jquery.cleditor.js',
- ], function() {
- $("#"+containerElementID).append('<textarea id="htmlEditor" style="border-width: 0px; width: 100%; height: 100%; overflow: auto;"></textarea>');
- $("#"+containerElementID).append($('<link>', {
- "rel": "stylesheet",
- "type": "text/css",
- "href": extensionDirectory+"/cleditor/jquery.cleditor.css"
- }));
- $.cleditor.defaultOptions.width = '100%';
- $.cleditor.defaultOptions.height = '100%';
- TSCORE.IO.loadTextFile(filePath);
- });
- }
-
- exports.setFileType = function(fileType) {
- console.log("setFileType not supported on this extension");
- }
-
- exports.viewerMode = function(isViewerMode) {
- // set readonly
- }
-
- exports.setContent = function(content) {
- // htmlEditor.setValue(content);
- // $("#htmlEditor").wysiwyg("setContent", content);
-
- $('#htmlEditor').val(content);
- $('#htmlEditor').cleditor();
- //$('#htmlEditor').html(content);
- //$('#htmlEditor').cleditor().updateFrame()
- }
-
- exports.getContent = function() {
- // return htmlEditor.getValue();
- return $('#htmlEditor').val();
- }
-
- var generateUI = function(containerElementID) {
- $("#"+containerElementID).append(''+
- '<div id="toolbar" >'+
- '<a data-wysihtml5-command="bold" title="CTRL+B">bold</a> |'+
- '<a data-wysihtml5-command="italic" title="CTRL+I">italic</a> |'+
- '<a data-wysihtml5-command="createLink">insert link</a> |'+
- '<a data-wysihtml5-command="insertImage">insert image</a> |'+
- '<a data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="h1">h1</a> |'+
- '<a data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="h2">h2</a> |'+
- '<a data-wysihtml5-command="insertUnorderedList">insertUnorderedList</a> |'+
- '<a data-wysihtml5-command="insertOrderedList">insertOrderedList</a> |'+
- '<a data-wysihtml5-command="foreColor" data-wysihtml5-command-value="red">red</a> |'+
- '<a data-wysihtml5-command="foreColor" data-wysihtml5-command-value="green">green</a> |'+
- '<a data-wysihtml5-command="foreColor" data-wysihtml5-command-value="blue">blue</a> |'+
- '<a data-wysihtml5-command="undo">undo</a> |'+
- '<a data-wysihtml5-command="redo">redo</a> |'+
- '<a data-wysihtml5-command="insertSpeech">speech</a>'+
- '<a data-wysihtml5-action="change_view">switch to html view</a>'+
- '<div data-wysihtml5-dialog="createLink" style="display: none;">'+
- '<label>Link:<input data-wysihtml5-dialog-field="href" value="http://"></label>'+
- '<a data-wysihtml5-dialog-action="save">OK</a>&nbsp;<a data-wysihtml5-dialog-action="cancel">Cancel</a>'+
- '</div> '+
- '<div data-wysihtml5-dialog="insertImage" style="display: none;">'+
- '<label>Image:<input data-wysihtml5-dialog-field="src" value="http://"></label>'+
- '<label>Align:'+
- '<select data-wysihtml5-dialog-field="className">'+
- '<option value="">default</option>'+
- '<option value="wysiwyg-float-left">left</option>'+
- '<option value="wysiwyg-float-right">right</option>'+
- '</select>'+
- '</label>'+
- '<a data-wysihtml5-dialog-action="save">OK</a>&nbsp;<a data-wysihtml5-dialog-action="cancel">Cancel</a>'+
- '</div>'+
- '</div>'+
- '');
- $("#"+containerElementID).append('<textarea id="wysihtml5Editor" style="border-width: 0px; width: 100%; height: 100%"></textarea>');
- }
-
-});
\ No newline at end of file