New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

kityminder-editor

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kityminder-editor - npm Package Compare versions

Comparing version 1.0.21 to 1.0.55

less/_navigator.less

7

bower.json
{
"name": "kityminder-editor",
"version": "1.0.21",
"version": "1.0.55",
"authors": [

@@ -47,3 +47,3 @@ "fex<fex@baidu.com>"

"kityminder-core": "~1.4.3",
"angular-bootstrap-colorpicker": "~3.0.17"
"color-picker": "~1.0.2"
},

@@ -64,3 +64,6 @@ "overrides": {

}
},
"resolutions": {
"angular": "~1.3.8"
}
}

@@ -61,3 +61,3 @@ /* global require, module */

],
dest: '.tmp/scripts/kityminder.editor.js'
dest: '.tmp/scripts/kityminder.editor.logic.js'
}]

@@ -76,3 +76,3 @@ }

'dist/kityminder.editor.js': [
'.tmp/scripts/kityminder.editor.js',
'.tmp/scripts/kityminder.editor.logic.js',
'.tmp/scripts/kityminder.app.annotated.js',

@@ -82,2 +82,3 @@ '.tmp/scripts/templates.annotated.js',

'.tmp/scripts/filter/*.js',
'.tmp/scripts/dialog/**/*.js',
'.tmp/scripts/directive/**/*.js'

@@ -125,3 +126,3 @@ ]

kityminderEditor: {
src: 'ui/directive/**/*.html',
src: ['ui/directive/**/*.html', 'ui/dialog/**/*.html'],
dest: 'ui/templates.js',

@@ -182,5 +183,9 @@ options: {

// Build task(s).
grunt.registerTask('build', ['clean:last', 'wiredep:dist', 'ngtemplates', 'dependence', 'ngAnnotate', 'concat', 'uglify', 'less', 'cssmin', 'copy', 'clean:clstmp']);
grunt.registerTask('dev', ['clean:last', 'wiredep:dev', 'ngtemplates', 'dependence', 'ngAnnotate', 'concat', 'uglify', 'less', 'cssmin', 'copy', 'clean:clstmp']);
grunt.registerTask('build', ['clean:last',
//'wiredep:dist',
'ngtemplates', 'dependence', 'ngAnnotate', 'concat', 'uglify', 'less', 'cssmin', 'copy', 'clean:clstmp']);
grunt.registerTask('dev', ['clean:last',
//'wiredep:dev',
'ngtemplates', 'dependence', 'ngAnnotate', 'concat', 'uglify', 'less', 'cssmin', 'copy', 'clean:clstmp']);
};
{
"name": "kityminder-editor",
"version": "1.0.21",
"version": "1.0.55",
"description": "A powerful mind map editor",
"main": "kityminder.editor.js",
"scripts": {
"init": "git submodule update --init && npm i -g wr && npm install -g less && npm install -g bower && bower install && npm install",
"init": "npm i -g wr && npm install -g less && npm install -g bower && bower install && npm install",
"dev": "npm run watch-less",

@@ -29,17 +29,23 @@ "watch-less": "wr --exec \"lessc --source-map less/editor.less dist/kityminder.editor.css\" less"

"devDependencies": {
"cz-conventional-changelog": "^1.1.5",
"grunt": "~0.4.1",
"grunt-angular-templates": "~0.5.0",
"grunt-contrib-clean": "^0.5.0",
"grunt-contrib-concat": "~0.5.0",
"grunt-contrib-copy": "^0.5.0",
"grunt-contrib-cssmin": "^0.12.0",
"grunt-contrib-less": "^1.0.0",
"grunt-contrib-uglify": "^0.4.1",
"grunt-contrib-cssmin": "^0.12.0",
"grunt-module-dependence": "~0.2.0",
"grunt-ng-annotate": "^0.9.2",
"grunt-replace": "~0.8.0",
"grunt-angular-templates": "~0.5.0",
"load-grunt-tasks": "^3.1.0",
"grunt-wiredep": "^2.0.0",
"jshint-stylish": "^1.0.0",
"grunt-ng-annotate": "^0.9.2"
"load-grunt-tasks": "^3.1.0"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
}

@@ -6,6 +6,14 @@ KityMinder Editor

KityMinder Editor 是一款强大、简介、体验优秀的脑图编辑工具,适合用于编辑树/图/网等结构的数据。
KityMinder Editor 是一款强大、简洁、体验优秀的脑图编辑工具,适合用于编辑树/图/网等结构的数据。
编辑器由百度 [FEX](https://github.com/fex-team) 基于 [kityminder-core](https://github.com/fex-team/kityminder-core) 搭建,并且在[百度脑图](http://naotu.baidu.com)中使用。
他们的区别与联系如下:
![KityMinder 联系](relations.png "KityMinder 联系")
- [kityminder-core](https://github.com/fex-team/kityminder-core) 是 kityminder 的核心部分,基于百度 [FEX](https://github.com/fex-team) 开发的矢量图形库 [kity](https://github.com/fex-team/kity)。包含了脑图数据的可视化展现,简单编辑功能等所有底层支持。
- [kityminder-editor](https://github.com/fex-team/kityminder-editor) 基于 kityminder-core 搭建,依赖于 AngularJS,包含 UI 和热盒 [hotbox](https://github.com/fex-team/hotbox) 等方便用户输入的功能,简单来说,就是一款编辑器。
- [百度脑图](http://naotu.baidu.com) 基于 kityminder-editor,加入了第三方格式导入导出 (FreeMind, XMind, MindManager) 、文件储存、用户认证、文件分享、历史版本等业务逻辑。
## 功能

@@ -27,43 +35,20 @@

## 使用
根目录下的 `index.html` 为开发环境,`dist` 目录下的 `index.html` 使用打包好的代码,适用于线上环境。
可参照 `demo` 目录下的两种使用方式,`dev.html` 使用 [CMD](https://github.com/seajs/seajs/issues/242) 的方式来加载,适用于开发环境;而 `editor.html` 使用打包压缩好的代码,适用于线上环境。
1. 安装 [nodejs](http://nodejs.org) 和 [npm](https://docs.npmjs.com/getting-started/installing-node)
2. 初始化:切到 kityminder-editor 根目录下运行 `npm run init`
3. 你可以基于根目录的 `index.html` 开发,或者查看 `dist` 目录下用于生产环境的 `index.html`,Enjoy it!
### dev.html
另外,kityminder-editor 还提供了 bower 包,方便开发者直接使用。你可以在需要用到 kityminder-editor 的工程目录下
运行 `bower install kityminder-editor`,接着手动引入 kityminder-editor 所依赖的 css 和 js 文件,具体文件见
`dist` 目录下的 `index.html`,推荐使用 npm 包 [wireDep](https://www.npmjs.com/package/wiredep) 自动进行,
可参考根目录下 `Gruntfile.js`。
```html
<script src="../lib/kity/dist/kity.js"></script>
<script src="../bower_components/seajs/dist/sea-debug.js"></script>
<script>
/* global seajs */
## 构建
运行 `grunt build`,完成后 `dist` 目录里就是可用运行的 kityminder-editor
seajs.config({
base: '../src'
});
define('demo', function(require) {
var Editor = require('editor');
window.editor = new Editor('#minder-editor');
});
seajs.use('demo');
</script>
```
### editor.html
```html
<script src="../lib/kity/dist/kity.js"></script>
<script src="../kityminder.editor.js"></script>
<script>
/* global kityminder */
window.editor = new kityminder.Editor('#minder-editor');
</script>
```
## 数据导入导出
由于 kityminder-editor 是基于 kityminder-core 搭建的,而 kityminder-core 内置了五种常见
格式的导入或导出,在创建编辑器实例之后,可以使用四个接口进行数据的导入导出。
创建编辑器实例之后,可以使用四个接口进行数据的导入导出。
* `editor.minder.exportJson()` - 导出脑图数据为 JSON 对象

@@ -82,2 +67,13 @@ * `editor.minder.importJson(json)` - 导入 JSON 对象为当前脑图数据

数据格式的具体信息,可参考 [kityminder-core-wiki 的中的说明](https://github.com/fex-team/kityminder-core/wiki)。
更多格式的支持,可以加载 [kityminder-protocol](https://github.com/fex-team/kityminder-protocol) 来扩展第三方格式支持。
数据格式的具体信息,可参考 [kityminder-core-wiki 的中的说明](https://github.com/fex-team/kityminder-core/wiki)。
## 联系我们
问题和建议反馈:
[Github issues](https://github.com/fex-team/kityminder-editor/issues)
邮件组:kity@baidu.com
QQ 讨论群:475962105

@@ -29,2 +29,5 @@ define(function(require, exports, module) {

assemble(require('./runtime/input'));
assemble(require('./runtime/clipboard-mimetype'));
assemble(require('./runtime/clipboard'));
assemble(require('./runtime/drag'));
assemble(require('./runtime/node'));

@@ -31,0 +34,0 @@ assemble(require('./runtime/history'));

@@ -63,3 +63,3 @@ /**

var redoDiff = redoDiffs.pop();
if (redoDiffs) {
if (redoDiff) {
minder.applyPatches(redoDiff);

@@ -66,0 +66,0 @@ makeUndoDiff();

@@ -20,2 +20,4 @@ /**

hotbox.setParentFSM(fsm);
fsm.when('normal -> hotbox', function(exit, enter, reason) {

@@ -45,2 +47,8 @@ var node = minder.getSelectedNode();

fsm.when('modal -> normal', function(exit, enter, reason, e) {
if (reason == 'import-text-finish') {
receiver.element.focus();
}
});
this.hotbox = hotbox;

@@ -47,0 +55,0 @@ }

@@ -22,2 +22,3 @@ /**

var receiverElement = receiver.element;
var isGecko = window.kity.Browser.gecko;

@@ -51,3 +52,3 @@ // setup everything to go

// lost focus to commit
minder.on('beforemousedown', function() {
receiver.onblur(function (e) {
if (fsm.state() == 'input') {

@@ -58,2 +59,8 @@ fsm.jump('normal', 'input-commit');

minder.on('beforemousedown', function () {
if (fsm.state() == 'input') {
fsm.jump('normal', 'input-commit');
}
});
minder.on('dblclick', function() {

@@ -103,5 +110,30 @@ if (minder.getSelectedNode()) {

// edit for the selected node
/**
* 增加对字体的鉴别,以保证用户在编辑状态ctrl/cmd + b/i所触发的加粗斜体与显示一致
* @editor Naixor
* @Date 2015-12-2
*/
// edit for the selected node
function editText() {
receiverElement.innerText = minder.queryCommandValue('text');
var node = minder.getSelectedNode();
if (!node) {
return;
}
var textContainer = receiverElement;
receiverElement.innerText = "";
if (node.getData('font-weight') === 'bold') {
var b = document.createElement('b');
textContainer.appendChild(b);
textContainer = b;
}
if (node.getData('font-style') === 'italic') {
var i = document.createElement('i');
textContainer.appendChild(i);
textContainer = i;
}
textContainer.innerText = minder.queryCommandValue('text');
if (isGecko) {
receiver.fixFFCaretDisappeared();
};
fsm.jump('input', 'input-request');

@@ -111,2 +143,7 @@ receiver.selectAll();

/**
* 增加对字体的鉴别,以保证用户在编辑状态ctrl/cmd + b/i所触发的加粗斜体与显示一致
* @editor Naixor
* @Date 2015-12-2
*/
function enterInputMode() {

@@ -119,2 +156,4 @@ var node = minder.getSelectedNode();

receiverElement.style.minWidth = receiverElement.clientWidth + 'px';
receiverElement.style.fontWeight = node.getData('font-weight') || '';
receiverElement.style.fontStyle = node.getData('font-style') || '';
receiverElement.classList.add('input');

@@ -125,8 +164,215 @@ receiverElement.focus();

function commitInputResult() {
var text = receiverElement.innerText;
minder.execCommand('text', text.replace(/^\n*|\n*$/g, ''));
/**
* 按照文本提交操作处理
* @Desc: 从其他节点复制文字到另一个节点时部分浏览器(chrome)会自动包裹一个span标签,这样试用一下逻辑出来的就不是text节点二是span节点因此导致undefined的情况发生
* @Warning: 下方代码使用[].slice.call来将HTMLDomCollection处理成为Array,ie8及以下会有问题
* @Editor: Naixor
* @Date: 2015.9.16
*/
function commitInputText (textNodes) {
var text = '';
var TAB_CHAR = '\t',
ENTER_CHAR = '\n',
STR_CHECK = /\S/,
SPACE_CHAR = '\u0020',
// 针对FF,SG,BD,LB,IE等浏览器下SPACE的charCode存在为32和160的情况做处理
SPACE_CHAR_REGEXP = new RegExp('(\u0020|' + String.fromCharCode(160) + ')'),
BR = document.createElement('br');
var isBold = false,
isItalic = false;
for (var str,
_divChildNodes,
space_l, space_num, tab_num,
i = 0, l = textNodes.length; i < l; i++) {
str = textNodes[i];
switch (Object.prototype.toString.call(str)) {
// 正常情况处理
case '[object HTMLBRElement]': {
text += ENTER_CHAR;
break;
}
case '[object Text]': {
// SG下会莫名其妙的加上&nbsp;影响后续判断,干掉!
/**
* FF下的wholeText会导致如下问题:
* |123| -> 在一个节点中输入一段字符,此时TextNode为[#Text 123]
* 提交并重新编辑,在后面追加几个字符
* |123abc| -> 此时123为一个TextNode为[#Text 123, #Text abc],但是对这两个任意取值wholeText均为全部内容123abc
* 上述BUG仅存在在FF中,故将wholeText更改为textContent
*/
str = str.textContent.replace("&nbsp;", " ");
if (!STR_CHECK.test(str)) {
space_l = str.length;
while (space_l--) {
if (SPACE_CHAR_REGEXP.test(str[space_l])) {
text += SPACE_CHAR;
} else if (str[space_l] === TAB_CHAR) {
text += TAB_CHAR;
}
}
} else {
text += str;
}
break;
}
// ctrl + b/i 会给字体加上<b>/<i>标签来实现黑体和斜体
case '[object HTMLElement]': {
switch (str.nodeName) {
case "B": {
isBold = true;
break;
}
case "I": {
isItalic = true;
break;
}
default: {}
}
[].splice.apply(textNodes, [i, 1].concat([].slice.call(str.childNodes)));
l = textNodes.length;
i--;
break;
}
// 被增加span标签的情况会被处理成正常情况并会推交给上面处理
case '[object HTMLSpanElement]': {
[].splice.apply(textNodes, [i, 1].concat([].slice.call(str.childNodes)));
l = textNodes.length;
i--;
break;
}
// 若标签为image标签,则判断是否为合法url,是将其加载进来
case '[object HTMLImageElement]': {
if (str.src) {
if (/http(|s):\/\//.test(str.src)) {
minder.execCommand("Image", str.src, str.alt);
} else {
// data:image协议情况
}
};
break;
}
// 被增加div标签的情况会被处理成正常情况并会推交给上面处理
case '[object HTMLDivElement]': {
_divChildNodes = [];
for (var di = 0, l = str.childNodes.length; di < l; di++) {
_divChildNodes.push(str.childNodes[di]);
}
_divChildNodes.push(BR);
[].splice.apply(textNodes, [i, 1].concat(_divChildNodes));
l = textNodes.length;
i--;
break;
}
default: {
if (str && str.childNodes.length) {
_divChildNodes = [];
for (var di = 0, l = str.childNodes.length; di < l; di++) {
_divChildNodes.push(str.childNodes[di]);
}
_divChildNodes.push(BR);
[].splice.apply(textNodes, [i, 1].concat(_divChildNodes));
l = textNodes.length;
i--;
} else {
if (str && str.textContent !== undefined) {
text += str.textContent;
} else {
text += "";
}
}
// // 其他带有样式的节点被粘贴进来,则直接取textContent,若取不出来则置空
}
}
};
text = text.replace(/^\n*|\n*$/g, '');
text = text.replace(new RegExp('(\n|\r|\n\r)(\u0020|' + String.fromCharCode(160) + '){4}', 'g'), '$1\t');
minder.getSelectedNode().setText(text);
if (isBold) {
minder.queryCommandState('bold') || minder.execCommand('bold');
} else {
minder.queryCommandState('bold') && minder.execCommand('bold');
}
if (isItalic) {
minder.queryCommandState('italic') || minder.execCommand('italic');
} else {
minder.queryCommandState('italic') && minder.execCommand('italic');
}
exitInputMode();
return text;
}
/**
* 判断节点的文本信息是否是
* @Desc: 从其他节点复制文字到另一个节点时部分浏览器(chrome)会自动包裹一个span标签,这样使用以下逻辑出来的就不是text节点二是span节点因此导致undefined的情况发生
* @Notice: 此处逻辑应该拆分到 kityminder-core/core/data中去,单独增加一个对某个节点importJson的事件
* @Editor: Naixor
* @Date: 2015.9.16
*/
function commitInputNode(node, text) {
try {
minder.decodeData('text', text).then(function(json) {
function importText(node, json, minder) {
var data = json.data;
node.setText(data.text || '');
var childrenTreeData = json.children || [];
for (var i = 0; i < childrenTreeData.length; i++) {
var childNode = minder.createNode(null, node);
importText(childNode, childrenTreeData[i], minder);
}
return node;
}
importText(node, json, minder);
minder.fire("contentchange");
minder.getRoot().renderTree();
minder.layout(300);
});
} catch (e) {
minder.fire("contentchange");
minder.getRoot().renderTree();
// 无法被转换成脑图节点则不处理
if (e.toString() !== 'Error: Invalid local format') {
throw e;
}
}
}
function commitInputResult() {
/**
* @Desc: 进行如下处理:
* 根据用户的输入判断是否生成新的节点
* fix #83 https://github.com/fex-team/kityminder-editor/issues/83
* @Editor: Naixor
* @Date: 2015.9.16
*/
var textNodes = [].slice.call(receiverElement.childNodes);
/**
* @Desc: 增加setTimeout的原因:ie下receiverElement.innerHTML=""会导致后
* 面commitInputText中使用textContent报错,不要问我什么原因!
* @Editor: Naixor
* @Date: 2015.12.14
*/
setTimeout(function () {
// 解决过大内容导致SVG窜位问题
receiverElement.innerHTML = "";
}, 0);
var node = minder.getSelectedNode();
textNodes = commitInputText(textNodes);
commitInputNode(node, textNodes);
if (node.type == 'root') {
var rootText = minder.getRoot().getText();
minder.fire('initChangeRoot', {text: rootText});
}
}
function exitInputMode() {

@@ -156,2 +402,2 @@ receiverElement.classList.remove('input');

return module.exports = InputRuntime;
});
});

@@ -23,7 +23,23 @@ /**

if (e.keyCode >= 48 && e.keyCode <= 57) return true;
// 小键盘区域 (除回车外)
if (e.keyCode != 108 && e.keyCode >= 96 && e.keyCode <= 111) return true;
// 小键盘区域 (除回车外)
// @yinheli from pull request
if (e.keyCode != 108 && e.keyCode >= 96 && e.keyCode <= 111) return true;
// 输入法
if (e.keyCode == 229) return true;
if (e.keyCode == 229 || e.keyCode === 0) return true;
return false;
}
/**
* @Desc: 下方使用receiver.enable()和receiver.disable()通过
* 修改div contenteditable属性的hack来解决开启热核后依然无法屏蔽浏览器输入的bug;
* 特别: win下FF对于此种情况必须要先blur在focus才能解决,但是由于这样做会导致用户
* 输入法状态丢失,因此对FF暂不做处理
* @Editor: Naixor
* @Date: 2015.09.14
*/
function JumpingRuntime() {

@@ -39,19 +55,37 @@ var fsm = this.fsm;

receiver.listen('normal', function(e) {
// 为了防止处理进入edit模式而丢失处理的首字母,此时receiver必须为enable
receiver.enable();
// normal -> hotbox
if (e.type == 'keydown' && e.is('Space')) {
if (e.is('Space')) {
e.preventDefault();
// safari下Space触发hotbox,然而这时Space已在receiver上留下作案痕迹,因此抹掉
if (kity.Browser.safari) {
receiverElement.innerHTML = '';
}
return fsm.jump('hotbox', 'space-trigger');
}
// normal -> input
if (e.type == 'keydown' && isIntendToInput(e)) {
if (minder.getSelectedNode()) {
return fsm.jump('input', 'user-input');
} else {
receiverElement.innerHTML = '';
/**
* check
* @editor Naixor
* @Date 2015-12-2
*/
switch (e.type) {
case 'keydown': {
if (minder.getSelectedNode()) {
if (isIntendToInput(e)) {
return fsm.jump('input', 'user-input');
};
} else {
receiverElement.innerHTML = '';
}
// normal -> normal shortcut
fsm.jump('normal', 'shortcut-handle', e);
break;
}
case 'keyup': {
break;
}
default: {}
}
// normal -> normal
if (e.type == 'keydown') {
return fsm.jump('normal', 'shortcut-handle', e);
}
});

@@ -61,2 +95,3 @@

receiver.listen('hotbox', function(e) {
receiver.disable();
e.preventDefault();

@@ -71,2 +106,3 @@ var handleResult = hotbox.dispatch(e);

receiver.listen('input', function(e) {
receiver.enable();
if (e.type == 'keydown') {

@@ -84,2 +120,5 @@ if (e.is('Enter')) {

}
} else if (e.type == 'keyup' && e.is('Esc')) {
e.preventDefault();
return fsm.jump('normal', 'input-cancel');
}

@@ -109,2 +148,9 @@ });

container.addEventListener('mousewheel', function(e) {
if (fsm.state() == 'hotbox') {
hotbox.active(Hotbox.STATE_IDLE);
fsm.jump('normal', 'mousemove-blur');
}
}, false);
container.addEventListener('contextmenu', function(e) {

@@ -134,2 +180,2 @@ e.preventDefault();

return module.exports = JumpingRuntime;
});
});

@@ -17,3 +17,3 @@ /**

enableKeyReceiver: false,
enableAnimation: false
enableAnimation: true
});

@@ -20,0 +20,0 @@

@@ -13,9 +13,12 @@ define(function(require, exports, module) {

'前移:Alt+Up:ArrangeUp',
'下级:Tab:AppendChildNode',
'下级:Tab|Insert:AppendChildNode',
'同级:Enter:AppendSiblingNode',
'后移:Alt+Down:ArrangeDown',
'删除:Delete|Backspace:RemoveNode',
'归纳:Shift+Tab|Shift+Insert:AppendParentNode'
'上级:Shift+Tab|Shift+Insert:AppendParentNode'
//'全选:Ctrl+A:SelectAll'
];
var AppendLock = 0;
buttons.forEach(function(button) {

@@ -32,6 +35,13 @@ var parts = button.split(':');

if (command.indexOf('Append') === 0) {
minder.execCommand(command, '新主题');
AppendLock++;
minder.execCommand(command, '分支主题');
// provide in input runtime
runtime.editText();
function afterAppend () {
if (!--AppendLock) {
runtime.editText();
}
minder.off('layoutallfinish', afterAppend);
}
minder.on('layoutallfinish', afterAppend);
} else {

@@ -49,25 +59,57 @@ minder.execCommand(command);

main.button({
position: 'ring',
key: '/',
action: function(){
if (!minder.queryCommandState('expand')) {
minder.execCommand('expand');
} else if (!minder.queryCommandState('collapse')) {
minder.execCommand('collapse');
}
position: 'bottom',
label: '导入节点',
key: 'Alt + V',
enable: function() {
var selectedNodes = minder.getSelectedNodes();
return selectedNodes.length == 1;
},
action: importNodeData,
next: 'idle'
});
main.button({
position: 'bottom',
label: '导出节点',
key: 'Alt + C',
enable: function() {
return minder.queryCommandState('expand') != -1 || minder.queryCommandState('collapse') != -1;
var selectedNodes = minder.getSelectedNodes();
return selectedNodes.length == 1;
},
beforeShow: function() {
if (!minder.queryCommandState('expand')) {
this.$button.children[0].innerHTML = '展开';
} else {
this.$button.children[0].innerHTML = '收起';
}
}
})
action: exportNodeData,
next: 'idle'
});
function importNodeData() {
minder.fire('importNodeData');
}
function exportNodeData() {
minder.fire('exportNodeData');
}
//main.button({
// position: 'ring',
// key: '/',
// action: function(){
// if (!minder.queryCommandState('expand')) {
// minder.execCommand('expand');
// } else if (!minder.queryCommandState('collapse')) {
// minder.execCommand('collapse');
// }
// },
// enable: function() {
// return minder.queryCommandState('expand') != -1 || minder.queryCommandState('collapse') != -1;
// },
// beforeShow: function() {
// if (!minder.queryCommandState('expand')) {
// this.$button.children[0].innerHTML = '展开';
// } else {
// this.$button.children[0].innerHTML = '收起';
// }
// }
//})
}
return module.exports = NodeRuntime;
});
});

@@ -13,3 +13,6 @@ define(function(require, exports, module){

key: 'P',
next: 'priority'
next: 'priority',
enable: function() {
return minder.queryCommandState('priority') != -1;
}
});

@@ -16,0 +19,0 @@

@@ -13,3 +13,6 @@ define(function(require, exports, module){

key: 'G',
next: 'progress'
next: 'progress',
enable: function() {
return minder.queryCommandState('progress') != -1;
}
});

@@ -16,0 +19,0 @@

@@ -12,2 +12,3 @@ /**

var key = require('../tool/key');
var hotbox = require('hotbox');

@@ -17,2 +18,3 @@ function ReceiverRuntime() {

var minder = this.minder;
var me = this;

@@ -22,2 +24,8 @@ // 接收事件的 div

element.contentEditable = true;
/**
* @Desc: 增加tabindex属性使得element的contenteditable不管是trur还是false都能有focus和blur事件
* @Editor: Naixor
* @Date: 2015.09.14
*/
element.setAttribute("tabindex", -1);
element.classList.add('receiver');

@@ -39,2 +47,32 @@ element.onkeydown = element.onkeypress = element.onkeyup = dispatchKeyEvent;

element.focus();
},
/**
* @Desc: 增加enable和disable方法用于解决热核态的输入法屏蔽问题
* @Editor: Naixor
* @Date: 2015.09.14
*/
enable: function() {
element.setAttribute("contenteditable", true);
},
disable: function() {
element.setAttribute("contenteditable", false);
},
/**
* @Desc: hack FF下div contenteditable的光标丢失BUG
* @Editor: Naixor
* @Date: 2015.10.15
*/
fixFFCaretDisappeared: function() {
element.removeAttribute("contenteditable");
element.setAttribute("contenteditable", "true");
element.blur();
element.focus();
},
/**
* 以此事件代替通过mouse事件来判断receiver丢失焦点的事件
* @editor Naixor
* @Date 2015-12-2
*/
onblur: function (handler) {
element.onblur = handler;
}

@@ -45,2 +83,9 @@ };

minder.on('beforemousedown', receiver.selectAll);
minder.on('receiverfocus', receiver.selectAll);
minder.on('readonly', function() {
// 屏蔽minder的事件接受,删除receiver和hotbox
minder.disable();
editor.receiver.element.parentElement.removeChild(editor.receiver.element);
editor.hotbox.$container.removeChild(editor.hotbox.$element);
});

@@ -61,3 +106,2 @@ // 侦听器,接收到的事件会派发给所有侦听器

function dispatchKeyEvent(e) {
e.is = function(keyExpression) {

@@ -70,3 +114,2 @@ var subs = keyExpression.split('|');

};
var listener, jumpState;

@@ -76,3 +119,2 @@ for (var i = 0; i < listeners.length; i++) {

listener = listeners[i];
// 忽略不在侦听状态的侦听器

@@ -110,2 +152,2 @@ if (listener.notifyState != '*' && listener.notifyState != fsm.state()) {

});
});

@@ -46,5 +46,10 @@ /**

HTMLElement.prototype.__defineSetter__('innerText', function(text) {
this.innerHTML = text.replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\n/g, '<br>');
/**
* @Desc: 解决FireFox节点内容删除后text为null,出现报错的问题
* @Editor: Naixor
* @Date: 2015.9.16
*/
this.innerHTML = (text || '').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\n/g, '<br>');
});
}
});

@@ -33,3 +33,13 @@ define(function(require, exports, module) {

// Shift, Control, Alt KeyCode ignored.
if ([16, 17, 18, 91].indexOf(keyEvent.keyCode) == -1) {
if ([16, 17, 18, 91].indexOf(keyEvent.keyCode) === -1) {
/**
* 解决浏览器输入法状态下对keyDown的keyCode判断不准确的问题,使用keyIdentifier,
* 可以解决chrome和safari下的各种问题,其他浏览器依旧有问题,然而那并不影响我们对特
* 需判断的按键进行判断(比如Space在safari输入法态下就是229,其他的就不是)
* @editor Naixor
* @Date 2015-12-2
*/
if (keyEvent.keyCode === 229 && keyEvent.keyIdentifier) {
return hashCode |= parseInt(keyEvent.keyIdentifier.substr(2), 16);
}
hashCode |= keyEvent.keyCode;

@@ -60,2 +70,2 @@ }

}
});
});

@@ -9,2 +9,3 @@ angular.module('kityminderEditor')

},
replace: true,
link: function(scope) {

@@ -15,22 +16,20 @@

scope.hexPicker = scope.hexPicker || currentTheme['background'] ;
scope.$on('colorPicked', function(event, color) {
event.stopPropagation();
scope.bgColor = color;
minder.execCommand('background', color);
});
scope.seriesColor = ['#e75d66', '#fac75b', '#99ca6a', '#00c5ad', '#3bbce0', '#425b71', '#ffffff'];
scope.setDefaultBg = function() {
var currentNode = minder.getSelectedNode();
var bgColor = minder.getNodeStyle(currentNode, 'background');
scope.$on('colorpicker-selected', function(e, msg) {
// 有可能是 kity 的颜色类
return typeof bgColor === 'object' ? bgColor.toHEX() : bgColor;
};
// colorPicker 的 bug : 初次选择 value 为 undefined
minder.execCommand('background', msg.value);
scope.bgColor = scope.setDefaultBg() || '#fff';
scope.customColor = msg.value;
});
minder.on('interactchange', function() {
var currentColor = minder.queryCommandValue('background') || '#000000';
scope.customColor = scope.seriesColor.indexOf(currentColor) == -1 ? currentColor : null;
});
}
}
});

@@ -9,2 +9,3 @@ angular.module('kityminderEditor')

},
replace: true,
link: function(scope) {

@@ -14,17 +15,71 @@ var minder = scope.minder;

scope.hexPicker = scope.hexPicker || currentTheme['main-color'] ;
scope.fontSizeList = [10, 12, 16, 18, 24, 32, 48];
scope.fontFamilyList = [{
name: '宋体',
val: '宋体,SimSun'
}, {
name: '微软雅黑',
val: '微软雅黑,Microsoft YaHei'
}, {
name: '楷体',
val: '楷体,楷体_GB2312,SimKai'
}, {
name: '黑体',
val: '黑体, SimHei'
}, {
name: '隶书',
val: '隶书, SimLi'
}, {
name: 'Andale Mono',
val: 'andale mono'
}, {
name: 'Arial',
val: 'arial,helvetica,sans-serif'
}, {
name: 'arialBlack',
val: 'arial black,avant garde'
}, {
name: 'Comic Sans Ms',
val: 'comic sans ms'
}, {
name: 'Impact',
val: 'impact,chicago'
}, {
name: 'Times New Roman',
val: 'times new roman'
}, {
name: 'Sans-Serif',
val: 'sans-serif'
}];
scope.$on('colorPicked', function(event, color) {
event.stopPropagation();
scope.fontSizeList = [10, 12, 16, 18, 24, 32, 48];
scope.foreColor = color;
minder.execCommand('forecolor', color);
});
scope.$on('colorpicker-selected', function(e, msg) {
minder.execCommand('forecolor', msg.value);
scope.customColor = msg.value;
});
scope.setDefaultColor = function() {
var currentNode = minder.getSelectedNode();
var fontColor = minder.getNodeStyle(currentNode, 'color');
minder.on('interactchange', function() {
scope.customColor = minder.queryCommandValue('forecolor') || '#000000';
});
// 有可能是 kity 的颜色类
return typeof fontColor === 'object' ? fontColor.toHEX() : fontColor;
};
scope.foreColor = scope.setDefaultColor() || '#000';
scope.getFontfamilyName = function(val) {
var fontName = '';
scope.fontFamilyList.forEach(function(ele, idx, arr) {
if (ele.val === val) {
fontName = ele.name;
return '';
}
});
return fontName;
}
}
}
});
angular.module('kityminderEditor')
.directive('kityminderEditor', ['config', function(config) {
.directive('kityminderEditor', ['config', 'minder.service', 'revokeDialog', function(config, minderService, revokeDialog) {
return {

@@ -19,2 +19,4 @@ restrict: 'EA',

});
minderService.executeCallback();
}

@@ -45,2 +47,5 @@

scope.minder = minder;
scope.config = config.getConfig();
//scope.minder.setDefaultOptions(scope.config);
scope.$apply();

@@ -59,9 +64,11 @@

onInit(editor, editor.minder);
}
scope.config = config.getConfig();
scope.config = config.getConfig();
//scope.minder.setDefaultOptions(config.getConfig());
onInit(editor, editor.minder);
}
}
}
}]);

@@ -9,2 +9,3 @@ angular.module('kityminderEditor')

},
replace: true,
link: function(scope) {

@@ -11,0 +12,0 @@

angular.module('kityminderEditor')
.directive('noteEditor', function() {
.directive('noteEditor', ['valueTransfer', function(valueTransfer) {
return {
restrict: 'E',
restrict: 'A',
templateUrl: 'ui/directive/noteEditor/noteEditor.html',

@@ -10,5 +10,5 @@ scope: {

},
replace: true,
controller: function($scope) {
var minder = $scope.minder;
var isInteracting = false;

@@ -50,13 +50,29 @@ var cmEditor;

$scope.$on('notePanelActived', function() {
setTimeout(function() {
cmEditor.refresh();
cmEditor.focus();
});
});
var noteEditorOpen = function() {
return valueTransfer.noteEditorOpen;
};
// 监听面板状态变量的改变
$scope.$watch(noteEditorOpen, function(newVal, oldVal) {
if (newVal) {
setTimeout(function() {
cmEditor.refresh();
cmEditor.focus();
});
}
$scope.noteEditorOpen = valueTransfer.noteEditorOpen;
}, true);
$scope.closeNoteEditor = function() {
valueTransfer.noteEditorOpen = false;
editor.receiver.selectAll();
};
minder.on('interactchange', updateNote);
}
}
});
}]);
// TODO: 使用一个 div 容器作为 previewer,而不是两个
angular.module('kityminderEditor')
.directive('notePreviewer', ['$sce', function($sce) {
.directive('notePreviewer', ['$sce', 'valueTransfer', function($sce, valueTransfer) {
return {

@@ -15,5 +15,10 @@ restrict: 'A',

marked.setOptions({
gfm: true,
breaks: true
});
gfm: true,
tables: true,
breaks: true,
pedantic: false,
sanitize: true,
smartLists: true,
smartypants: false
});

@@ -25,3 +30,3 @@

previewTimer = setTimeout(function() {
preview(e.node);
preview(e.node, e.keyword);
}, 300);

@@ -31,2 +36,5 @@ });

clearTimeout(previewTimer);
scope.showNotePreviewer = false;
//scope.$apply();
});

@@ -33,0 +41,0 @@

@@ -10,2 +10,3 @@ angular.module('kityminderEditor')

},
replace: true,
link: function($scope) {

@@ -12,0 +13,0 @@ var minder = $scope.minder;

@@ -9,2 +9,3 @@ angular.module('kityminderEditor')

},
replace: true,
link: function($scope) {

@@ -11,0 +12,0 @@ var minder = $scope.minder;

angular.module('kityminderEditor')
.directive('resourceEditor', function () {

@@ -10,2 +9,3 @@ return {

},
replace: true,
controller: function ($scope) {

@@ -64,5 +64,30 @@ var minder = $scope.minder;

$scope.newResourceName = null;
}
};
}
};
});
})
.directive('clickAnywhereButHere', ['$document', function ($document) {
return {
link: function(scope, element, attrs) {
var onClick = function (event) {
var isChild = $('#resource-dropdown').has(event.target).length > 0;
var isSelf = $('#resource-dropdown') == event.target;
var isInside = isChild || isSelf;
if (!isInside) {
scope.$apply(attrs.clickAnywhereButHere)
}
};
scope.$watch(attrs.isActive, function(newValue, oldValue) {
if (newValue !== oldValue && newValue == true) {
$document.bind('click', onClick);
}
else if (newValue !== oldValue && newValue == false) {
$document.unbind('click', onClick);
}
});
}
};
}]);

@@ -8,4 +8,5 @@ angular.module('kityminderEditor')

minder: '='
}
},
replace: true
}
});

@@ -9,2 +9,3 @@ angular.module('kityminderEditor')

},
replace: true,
link: function($scope) {

@@ -11,0 +12,0 @@ $scope.templateList = kityminder.Minder.getTemplateList();

@@ -6,2 +6,3 @@ angular.module('kityminderEditor')

templateUrl: 'ui/directive/themeList/themeList.html',
replace: true,
link: function($scope) {

@@ -14,2 +15,5 @@ var themeList = kityminder.Minder.getThemeList();

var themeObj = themeList[theme];
if (!themeObj) {
return;
}
var style = {

@@ -25,3 +29,3 @@ 'color': themeObj['root-color'],

return style;
}
};

@@ -46,2 +50,4 @@ // 维护 theme key 列表以保证列表美观(不按字母顺序排序)

'snow-compact',
'tianpan',
'tianpan-compact',
'fish',

@@ -48,0 +54,0 @@ 'wire'

angular.module('kityminderEditor', [
'ui.bootstrap',
'ui.codemirror',
'colorpicker.module'
'ui.colorpicker'
])

@@ -12,4 +12,5 @@ .config(function($sceDelegateProvider) {

'http://agroup.baidu.com:8910/**',
'http://agroup.baidu.com:8911/**'
'http://cq01-fe-rdtest01.vm.baidu.com:8910/**',
'http://agroup.baidu.com:8911/**'
]);
});

@@ -6,6 +6,17 @@ angular.module('kityminderEditor')

_default: {
// 右侧面板最小宽度
ctrlPanelMin: 250,
// 右侧面板宽度
ctrlPanelWidth: parseInt(window.localStorage.__dev_minder_ctrlPanelWidth) || 250,
dividerWidth: 3,
defaultLang: 'zh-cn'
// 分割线宽度
dividerWidth: 3,
// 默认语言
defaultLang: 'zh-cn',
// 放大缩小比例
zoom: [10, 20, 30, 50, 80, 100, 120, 150, 200]
},

@@ -12,0 +23,0 @@ getConfig: function(key) {

@@ -162,2 +162,3 @@ angular.module('kityminderEditor')

'appendsiblingnode': '插入同级主题',
'appendparentnode': '插入上级主题',
'appendchildnode': '插入下级主题',

@@ -180,2 +181,4 @@ 'removenode': '删除',

'search':'搜索',
'expandtoleaf': '展开',

@@ -331,2 +334,5 @@

'note': '备注',
'insertlink': '插入链接',
'insertimage': '插入图片',
'insertnote': '插入备注',
'removelink': '移除已有连接',

@@ -333,0 +339,0 @@ 'removeimage': '移除已有图片',

angular.module('kityminderEditor').run(['$templateCache', function($templateCache) {
'use strict';
$templateCache.put('ui/directive/appendNode/appendNode.html',
"<div class=\"km-btn-group append-group\"><div class=\"km-btn-item append-child-node\" ng-disabled=\"minder.queryCommandState('AppendChildNode') === -1\" ng-click=\"minder.queryCommandState('AppendChildNode') === -1 || execCommand('AppendChildNode')\" title=\"{{ 'appendchildnode' | lang:'ui/command' }}\"><i class=\"km-btn-icon\"></i> <span class=\"km-btn-caption\">{{ 'appendchildnode' | lang:'ui/command' }}</span></div><div class=\"km-btn-item append-parent-node\" ng-disabled=\"minder.queryCommandState('AppendParentNode') === -1\" ng-click=\"minder.queryCommandState('AppendParentNode') === -1 || execCommand('AppendParentNode')\" title=\"{{ 'appendparentnode' | lang:'ui/command' }}\"><i class=\"km-btn-icon\"></i> <span class=\"km-btn-caption\">{{ 'appendparentnode' | lang:'ui/command' }}</span></div><div class=\"km-btn-item append-sibling-node\" ng-disabled=\"minder.queryCommandState('AppendSiblingNode') === -1\" ng-click=\"minder.queryCommandState('AppendSiblingNode') === -1 ||execCommand('AppendSiblingNode')\" title=\"{{ 'appendsiblingnode' | lang:'ui/command' }}\"><i class=\"km-btn-icon\"></i> <span class=\"km-btn-caption\">{{ 'appendsiblingnode' | lang:'ui/command' }}</span></div></div>"
);
$templateCache.put('ui/directive/arrange/arrange.html',
"<div class=\"km-btn-group arrange-group\"><div class=\"km-btn-item arrange-up\" ng-disabled=\"minder.queryCommandState('ArrangeUp') === -1\" ng-click=\"minder.queryCommandState('ArrangeUp') === -1 || minder.execCommand('ArrangeUp')\" title=\"{{ 'arrangeup' | lang:'ui/command' }}\"><i class=\"km-btn-icon\"></i> <span class=\"km-btn-caption\">{{ 'arrangeup' | lang:'ui/command' }}</span></div><div class=\"km-btn-item arrange-down\" ng-disabled=\"minder.queryCommandState('ArrangeDown') === -1\" ng-click=\"minder.queryCommandState('ArrangeDown') === -1 || minder.execCommand('ArrangeDown');\" title=\"{{ 'arrangedown' | lang:'ui/command' }}\"><i class=\"km-btn-icon\"></i> <span class=\"km-btn-caption\">{{ 'arrangedown' | lang:'ui/command' }}</span></div></div>"
);
$templateCache.put('ui/directive/colorPanel/colorPanel.html',
"<ul class=\"color-list\"><li ng-repeat=\"c in seriesColor\" class=\"color-wrap\" ng-class=\"{'color-wrap-selected': minder.queryCommandValue('background') == c}\" ng-disabled=\"minder.queryCommandState('background') === -1\"><span ng-click=\"minder.execCommand('background', c)\" ng-style=\"{ 'background-color': c }\" class=\"color-item\" title=\"{{ c }}\"></span></li><li class=\"color-wrap\" ng-class=\"{'color-wrap-selected': minder.queryCommandValue('background') == customColor}\"><span colorpicker class=\"color-item\" ng-model=\"hexPicker\" ng-style=\"{ 'background-color': customColor }\" title=\"{{ hexPicker }}\"></span></li></ul>"
"<div class=\"bg-color-wrap\"><span class=\"quick-bg-color\" ng-click=\"minder.queryCommandState('background') === -1 || minder.execCommand('background', bgColor)\" ng-disabled=\"minder.queryCommandState('background') === -1\"></span> <span color-picker class=\"bg-color\" set-color=\"setDefaultBg()\" ng-disabled=\"minder.queryCommandState('background') === -1\"><span class=\"caret\"></span></span> <span class=\"bg-color-preview\" ng-style=\"{ 'background-color': bgColor }\" ng-click=\"minder.queryCommandState('background') === -1 || minder.execCommand('background', bgColor)\" ng-disabled=\"minder.queryCommandState('background') === -1\"></span></div>"
);
$templateCache.put('ui/directive/controlPanel/controlPanel.html',
"<div class=\"divider\"></div><tabset><tab heading=\"{{ 'idea' | lang: 'ui/tabs'; }}\"><accordion close-others=\"false\"><accordion-group heading=\"{{ 'priority' | lang: 'panels'; }}\" is-open=\"true\"><priority-editor minder=\"minder\"></priority-editor></accordion-group><accordion-group heading=\"{{ 'progress' | lang: 'panels'; }}\" is-open=\"true\"><progress-editor minder=\"minder\"></progress-editor></accordion-group><accordion-group heading=\"{{ 'resource' | lang: 'panels'; }}\" is-open=\"true\"><resource-editor minder=\"minder\"></resource-editor></accordion-group></accordion></tab><tab heading=\"{{ 'appearence' | lang: 'ui/tabs'; }}\"><accordion close-others=\"false\"><accordion-group heading=\"{{ 'template' | lang: 'panels'; }}\" is-open=\"true\"><template-list minder=\"minder\" class=\"inline-directive\"></template-list><layout minder=\"minder\" class=\"inline-directive\"></layout></accordion-group></accordion><accordion close-others=\"false\"><accordion-group heading=\"{{ 'theme' | lang: 'panels'; }}\" is-open=\"true\"><theme-list minder=\"minder\"></theme-list></accordion-group></accordion><accordion close-others=\"false\"><accordion-group heading=\"{{ 'style' | lang: 'panels'; }}\" is-open=\"true\"><style-operator minder=\"minder\" class=\"inline-directive\"></style-operator></accordion-group></accordion><accordion close-others=\"false\"><accordion-group heading=\"{{ 'font' | lang: 'panels'; }}\" is-open=\"true\"><font-operator minder=\"minder\" class=\"inline-directive\"></font-operator></accordion-group></accordion><accordion close-others=\"false\"><accordion-group heading=\"{{ 'background' | lang: 'panels'; }}\" is-open=\"true\"><color-panel minder=\"minder\" class=\"inline-directive\"></color-panel></accordion-group></accordion></tab><tab heading=\"{{ 'note' | lang: 'panels'; }}\" select=\"refreshNotePanel()\"><note-editor minder=\"minder\" class=\"km-note\"></note-editor></tab></tabset>"
$templateCache.put('ui/directive/expandLevel/expandLevel.html',
"<div class=\"btn-group-vertical\" dropdown is-open=\"isopen\"><button type=\"button\" class=\"btn btn-default expand\" title=\"{{ 'expandtoleaf' | lang:'ui' }}\" ng-class=\"{'active': isopen}\" ng-click=\"minder.execCommand('ExpandToLevel', 9999)\"></button> <button type=\"button\" class=\"btn btn-default expand-caption dropdown-toggle\" title=\"{{ 'expandtoleaf' | lang:'ui' }}\" dropdown-toggle><span class=\"caption\">{{ 'expandtoleaf' | lang:'ui' }}</span> <span class=\"caret\"></span> <span class=\"sr-only\">{{ 'expandtoleaf' | lang:'ui' }}</span></button><ul class=\"dropdown-menu\" role=\"menu\"><li ng-repeat=\"level in levels\"><a href ng-click=\"minder.execCommand('ExpandToLevel', level)\">{{ 'expandtolevel' + level | lang:'ui/command' }}</a></li></ul></div>"
);

@@ -15,25 +25,53 @@

$templateCache.put('ui/directive/fontOperator/fontOperator.html',
"<span class=\"dropdown font-size-list\" dropdown><div class=\"dropdown-toggle current-font-item\" dropdown-toggle ng-disabled=\"minder.queryCommandState('fontsize') === -1\"><a href class=\"current-font-item\" title=\"{{ 'fontsize' | lang: 'ui' }}\">{{ minder.queryCommandValue('fontsize') || '默认字号' }}</a> <span class=\"caret\"></span></div><ul class=\"dropdown-menu font-list\"><li ng-repeat=\"f in fontSizeList\" class=\"font-item-wrap\"><a ng-click=\"minder.execCommand('fontsize', f)\" class=\"font-item\" ng-class=\"{ 'font-item-selected' : f == minder.queryCommandValue('fontsize') }\" ng-style=\"{'font-size': f + 'px'}\">{{ f }}</a></li></ul></span> <span class=\"s-btn-icon font-bold\" ng-click=\"minder.execCommand('bold')\" ng-class=\"{'font-bold-selected' : minder.queryCommandState('bold') == 1}\" ng-disabled=\"minder.queryCommandState('bold') === -1\"></span> <span class=\"s-btn-icon font-italics\" ng-click=\"minder.execCommand('italic')\" ng-class=\"{'font-italics-selected' : minder.queryCommandState('italic') == 1}\" ng-disabled=\"minder.queryCommandState('italic') === -1\"></span><div class=\"font-color-wrap\"><span colorpicker class=\"font-color\" ng-model=\"hexPicker\" ng-style=\"{ 'background-color': customColor }\" title=\"{{ hexPicker }}\"></span></div>"
"<div class=\"font-operator\"><div class=\"dropdown font-family-list\" dropdown><div class=\"dropdown-toggle current-font-item\" dropdown-toggle ng-disabled=\"minder.queryCommandState('fontfamily') === -1\"><a href class=\"current-font-family\" title=\"{{ 'fontfamily' | lang: 'ui' }}\">{{ getFontfamilyName(minder.queryCommandValue('fontfamily')) || '字体' }}</a> <span class=\"caret\"></span></div><ul class=\"dropdown-menu font-list\"><li ng-repeat=\"f in fontFamilyList\" class=\"font-item-wrap\"><a ng-click=\"minder.execCommand('fontfamily', f.val)\" class=\"font-item\" ng-class=\"{ 'font-item-selected' : f == minder.queryCommandValue('fontfamily') }\" ng-style=\"{'font-family': f.val }\">{{ f.name }}</a></li></ul></div><div class=\"dropdown font-size-list\" dropdown><div class=\"dropdown-toggle current-font-item\" dropdown-toggle ng-disabled=\"minder.queryCommandState('fontsize') === -1\"><a href class=\"current-font-size\" title=\"{{ 'fontsize' | lang: 'ui' }}\">{{ minder.queryCommandValue('fontsize') || '字号' }}</a> <span class=\"caret\"></span></div><ul class=\"dropdown-menu font-list\"><li ng-repeat=\"f in fontSizeList\" class=\"font-item-wrap\"><a ng-click=\"minder.execCommand('fontsize', f)\" class=\"font-item\" ng-class=\"{ 'font-item-selected' : f == minder.queryCommandValue('fontsize') }\" ng-style=\"{'font-size': f + 'px'}\">{{ f }}</a></li></ul></div><span class=\"s-btn-icon font-bold\" ng-click=\"minder.queryCommandState('bold') === -1 || minder.execCommand('bold')\" ng-class=\"{'font-bold-selected' : minder.queryCommandState('bold') == 1}\" ng-disabled=\"minder.queryCommandState('bold') === -1\"></span> <span class=\"s-btn-icon font-italics\" ng-click=\"minder.queryCommandState('italic') === -1 || minder.execCommand('italic')\" ng-class=\"{'font-italics-selected' : minder.queryCommandState('italic') == 1}\" ng-disabled=\"minder.queryCommandState('italic') === -1\"></span><div class=\"font-color-wrap\"><span class=\"quick-font-color\" ng-click=\"minder.queryCommandState('forecolor') === -1 || minder.execCommand('forecolor', foreColor)\" ng-disabled=\"minder.queryCommandState('forecolor') === -1\">A</span> <span color-picker class=\"font-color\" set-color=\"setDefaultColor()\" ng-disabled=\"minder.queryCommandState('forecolor') === -1\"><span class=\"caret\"></span></span> <span class=\"font-color-preview\" ng-style=\"{ 'background-color': foreColor }\" ng-click=\"minder.queryCommandState('forecolor') === -1 || minder.execCommand('forecolor', foreColor)\" ng-disabled=\"minder.queryCommandState('forecolor') === -1\"></span></div><color-panel minder=\"minder\" class=\"inline-directive\"></color-panel></div>"
);
$templateCache.put('ui/directive/hyperLink/hyperLink.html',
"<div class=\"btn-group-vertical\" dropdown is-open=\"isopen\"><button type=\"button\" class=\"btn btn-default hyperlink\" title=\"{{ 'link' | lang:'ui' }}\" ng-class=\"{'active': isopen}\" ng-click=\"addHyperlink()\" ng-disabled=\"minder.queryCommandState('HyperLink') === -1\"></button> <button type=\"button\" class=\"btn btn-default hyperlink-caption dropdown-toggle\" ng-disabled=\"minder.queryCommandState('HyperLink') === -1\" title=\"{{ 'link' | lang:'ui' }}\" dropdown-toggle><span class=\"caption\">{{ 'link' | lang:'ui' }}</span> <span class=\"caret\"></span> <span class=\"sr-only\">{{ 'link' | lang:'ui' }}</span></button><ul class=\"dropdown-menu\" role=\"menu\"><li><a href ng-click=\"addHyperlink()\">{{ 'insertlink' | lang:'ui' }}</a></li><li><a href ng-click=\"minder.execCommand('HyperLink', null)\">{{ 'removelink' | lang:'ui' }}</a></li></ul></div>"
);
$templateCache.put('ui/directive/imageBtn/imageBtn.html',
"<div class=\"btn-group-vertical\" dropdown is-open=\"isopen\"><button type=\"button\" class=\"btn btn-default image-btn\" title=\"{{ 'image' | lang:'ui' }}\" ng-class=\"{'active': isopen}\" ng-click=\"addImage()\" ng-disabled=\"minder.queryCommandState('Image') === -1\"></button> <button type=\"button\" class=\"btn btn-default image-btn-caption dropdown-toggle\" ng-disabled=\"minder.queryCommandState('Image') === -1\" title=\"{{ 'image' | lang:'ui' }}\" dropdown-toggle><span class=\"caption\">{{ 'image' | lang:'ui' }}</span> <span class=\"caret\"></span> <span class=\"sr-only\">{{ 'image' | lang:'ui' }}</span></button><ul class=\"dropdown-menu\" role=\"menu\"><li><a href ng-click=\"addImage()\">{{ 'insertimage' | lang:'ui' }}</a></li><li><a href ng-click=\"minder.execCommand('Image', '')\">{{ 'removeimage' | lang:'ui' }}</a></li></ul></div>"
);
$templateCache.put('ui/directive/kityminderEditor/kityminderEditor.html',
"<div class=\"minder-editor-container\"><div class=\"minder-editor\" ng-style=\"{'right': (config.dividerWidth + config.ctrlPanelWidth) + 'px' }\"></div><div class=\"minder-divider\" minder-divider=\"config\" minder=\"minder\" ng-if=\"minder\" ng-style=\"{'width': config.dividerWidth + 'px', 'right': config.ctrlPanelWidth + 'px'}\"></div><div class=\"control-panel\" control-panel ng-if=\"minder\" ng-style=\"{'width': config.ctrlPanelWidth + 'px'}\"></div><div class=\"note-previewer\" note-previewer ng-if=\"minder\"></div></div>"
"<div class=\"minder-editor-container\"><div class=\"top-tab\" top-tab=\"minder\" editor=\"editor\" ng-if=\"minder\"></div><div search-box minder=\"minder\" ng-if=\"minder\"></div><div class=\"minder-editor\"></div><div class=\"km-note\" note-editor minder=\"minder\" ng-if=\"minder\"></div><div class=\"note-previewer\" note-previewer ng-if=\"minder\"></div><div class=\"navigator\" navigator minder=\"minder\" ng-if=\"minder\"></div></div>"
);
$templateCache.put('ui/directive/kityminderViewer/kityminderViewer.html',
"<div class=\"minder-editor-container\"><div class=\"minder-viewer\"></div><div class=\"note-previewer\" note-previewer ng-if=\"minder\"></div><div class=\"navigator\" navigator minder=\"minder\" ng-if=\"minder\"></div></div>"
);
$templateCache.put('ui/directive/layout/layout.html',
"<a ng-click=\"minder.execCommand('resetlayout')\" class=\"btn-wrap\"><span class=\"btn-icon reset-layout-icon\"></span> <span class=\"btn-label\">{{ 'resetlayout' | lang: 'ui/command' }}</span></a>"
"<div class=\"readjust-layout\"><a ng-click=\"minder.queryCommandState('resetlayout') === -1 || minder.execCommand('resetlayout')\" class=\"btn-wrap\" ng-disabled=\"minder.queryCommandState('resetlayout') === -1\"><span class=\"btn-icon reset-layout-icon\"></span> <span class=\"btn-label\">{{ 'resetlayout' | lang: 'ui/command' }}</span></a></div>"
);
$templateCache.put('ui/directive/navigator/navigator.html',
"<div class=\"nav-bar\"><div class=\"nav-btn zoom-in\" ng-click=\"minder.execCommand('zoomIn')\" title=\"{{ 'zoom-in' | lang : 'ui' }}\" ng-class=\"{ 'active' : getZoomRadio(zoom) == 0 }\"><div class=\"icon\"></div></div><div class=\"zoom-pan\"><div class=\"origin\" ng-style=\"{'transform': 'translate(0, ' + getHeight(100) + 'px)'}\" ng-click=\"minder.execCommand('zoom', 100);\"></div><div class=\"indicator\" ng-style=\"{\n" +
" 'transform': 'translate(0, ' + getHeight(zoom) + 'px)',\n" +
" 'transition': 'transform 200ms'\n" +
" }\"></div></div><div class=\"nav-btn zoom-out\" ng-click=\"minder.execCommand('zoomOut')\" title=\"{{ 'zoom-out' | lang : 'ui' }}\" ng-class=\"{ 'active' : getZoomRadio(zoom) == 1 }\"><div class=\"icon\"></div></div><div class=\"nav-btn hand\" ng-click=\"minder.execCommand('hand')\" title=\"{{ 'hand' | lang : 'ui' }}\" ng-class=\"{ 'active' : minder.queryCommandState('hand') == 1 }\"><div class=\"icon\"></div></div><div class=\"nav-btn camera\" ng-click=\"minder.execCommand('camera', minder.getRoot(), 600);\" title=\"{{ 'camera' | lang : 'ui' }}\"><div class=\"icon\"></div></div><div class=\"nav-btn nav-trigger\" ng-class=\"{'active' : isNavOpen}\" ng-click=\"toggleNavOpen()\" title=\"{{ 'navigator' | lang : 'ui' }}\"><div class=\"icon\"></div></div></div><div class=\"nav-previewer\" ng-show=\"isNavOpen\"></div>"
);
$templateCache.put('ui/directive/noteBtn/noteBtn.html',
"<div class=\"btn-group-vertical note-btn-group\" dropdown is-open=\"isopen\"><button type=\"button\" class=\"btn btn-default note-btn\" title=\"{{ 'note' | lang:'ui' }}\" ng-class=\"{'active': isopen}\" ng-click=\"addNote()\" ng-disabled=\"minder.queryCommandState('note') === -1\"></button> <button type=\"button\" class=\"btn btn-default note-btn-caption dropdown-toggle\" ng-disabled=\"minder.queryCommandState('note') === -1\" title=\"{{ 'note' | lang:'ui' }}\" dropdown-toggle><span class=\"caption\">{{ 'note' | lang:'ui' }}</span> <span class=\"caret\"></span> <span class=\"sr-only\">{{ 'note' | lang:'ui' }}</span></button><ul class=\"dropdown-menu\" role=\"menu\"><li><a href ng-click=\"addNote()\">{{ 'insertnote' | lang:'ui' }}</a></li><li><a href ng-click=\"minder.execCommand('note', null)\">{{ 'removenote' | lang:'ui' }}</a></li></ul></div>"
);
$templateCache.put('ui/directive/noteEditor/noteEditor.html',
"<div class=\"km-note\" ng-show=\"noteEnabled\" ui-codemirror=\"{ onLoad: codemirrorLoaded }\" ng-model=\"noteContent\" ui-codemirror-opts=\"{\n" +
"\t\tgfm: true,\n" +
"\t\tbreaks: true,\n" +
"\t\tlineWrapping : true,\n" +
"\t\tmode: 'gfm',\n" +
" dragDrop: false,\n" +
" lineNumbers:true\n" +
"\t }\"></div><p ng-show=\"!noteEnabled\" class=\"km-note-tips\">请选择节点编辑备注</p>"
"<div class=\"panel panel-default\" ng-init=\"noteEditorOpen = false\" ng-show=\"noteEditorOpen\"><div class=\"panel-heading\"><h3 class=\"panel-title\">备注</h3><span>(<a class=\"help\" href=\"https://www.zybuluo.com/techird/note/46064\" target=\"_blank\">支持 GFM 语法书写</a>)</span> <i class=\"close-note-editor glyphicon glyphicon-remove\" ng-click=\"closeNoteEditor()\"></i></div><div class=\"panel-body\"><div ng-show=\"noteEnabled\" ui-codemirror=\"{ onLoad: codemirrorLoaded }\" ng-model=\"noteContent\" ui-codemirror-opts=\"{\n" +
" gfm: true,\n" +
" breaks: true,\n" +
" lineWrapping : true,\n" +
" mode: 'gfm',\n" +
" dragDrop: false,\n" +
" lineNumbers:true\n" +
" }\"></div><p ng-show=\"!noteEnabled\" class=\"km-note-tips\">请选择节点编辑备注</p></div></div>"
);

@@ -47,4 +85,9 @@

$templateCache.put('ui/directive/operation/operation.html',
"<div class=\"km-btn-group operation-group\"><div class=\"km-btn-item edit-node\" ng-disabled=\"minder.queryCommandState('text') === -1\" ng-click=\"minder.queryCommandState('text') === -1 || editNode()\" title=\"{{ 'editnode' | lang:'ui/command' }}\"><i class=\"km-btn-icon\"></i> <span class=\"km-btn-caption\">{{ 'editnode' | lang:'ui/command' }}</span></div><div class=\"km-btn-item remove-node\" ng-disabled=\"minder.queryCommandState('RemoveNode') === -1\" ng-click=\"minder.queryCommandState('RemoveNode') === -1 || minder.execCommand('RemoveNode');\" title=\"{{ 'removenode' | lang:'ui/command' }}\"><i class=\"km-btn-icon\"></i> <span class=\"km-btn-caption\">{{ 'removenode' | lang:'ui/command' }}</span></div></div>"
);
$templateCache.put('ui/directive/priorityEditor/priorityEditor.html',
"<ul class=\"km-priority tool-group\" ng-disabled=\"commandDisabled\"><li class=\"km-priority-item tool-group-item\" ng-repeat=\"p in priorities\" ng-click=\"minder.execCommand('priority', p)\" ng-class=\"{ active: commandValue == p }\" title=\"{{ getPriorityTitle(p) }}\"><div class=\"km-priority-icon tool-group-icon priority-{{p}}\"></div></li></ul>"
"<ul class=\"km-priority tool-group\" ng-disabled=\"commandDisabled\"><li class=\"km-priority-item tool-group-item\" ng-repeat=\"p in priorities\" ng-click=\"commandDisabled || minder.execCommand('priority', p)\" ng-class=\"{ active: commandValue == p }\" title=\"{{ getPriorityTitle(p) }}\"><div class=\"km-priority-icon tool-group-icon priority-{{p}}\"></div></li></ul>"
);

@@ -54,3 +97,3 @@

$templateCache.put('ui/directive/progressEditor/progressEditor.html',
"<ul class=\"km-progress tool-group\" ng-disabled=\"commandDisabled\"><li class=\"km-progress-item tool-group-item\" ng-repeat=\"p in progresses\" ng-click=\"minder.execCommand('progress', p)\" ng-class=\"{ active: commandValue == p }\" title=\"{{ getProgressTitle(p) }}\"><div class=\"km-progress-icon tool-group-icon progress-{{p}}\"></div></li></ul>"
"<ul class=\"km-progress tool-group\" ng-disabled=\"commandDisabled\"><li class=\"km-progress-item tool-group-item\" ng-repeat=\"p in progresses\" ng-click=\"commandDisabled || minder.execCommand('progress', p)\" ng-class=\"{ active: commandValue == p }\" title=\"{{ getProgressTitle(p) }}\"><div class=\"km-progress-icon tool-group-icon progress-{{p}}\"></div></li></ul>"
);

@@ -60,8 +103,23 @@

$templateCache.put('ui/directive/resourceEditor/resourceEditor.html',
"<div><div class=\"input-group\"><input class=\"form-control\" type=\"text\" ng-model=\"newResourceName\" ng-required ng-keypress=\"$event.keyCode == 13 && addResource(newResourceName)\" ng-disabled=\"!enabled\"> <span class=\"input-group-btn\"><button class=\"btn btn-default\" ng-click=\"addResource(newResourceName)\" ng-disabled=\"!enabled\">添加</button></span></div><ul class=\"km-resource\"><li ng-repeat=\"resource in used\" ng-disabled=\"!enabled\"><label style=\"background: {{resourceColor(resource.name)}}\"><input type=\"checkbox\" ng-model=\"resource.selected\" ng-disabled=\"!enabled\"> <span>{{resource.name}}</span></label></li></ul></div>"
"<div class=\"resource-editor\"><div class=\"input-group\"><input class=\"form-control\" type=\"text\" ng-model=\"newResourceName\" ng-required ng-keypress=\"$event.keyCode == 13 && addResource(newResourceName)\" ng-disabled=\"!enabled\"> <span class=\"input-group-btn\"><button class=\"btn btn-default\" ng-click=\"addResource(newResourceName)\" ng-disabled=\"!enabled\">添加</button></span></div><div class=\"resource-dropdown clearfix\" id=\"resource-dropdown\"><ul class=\"km-resource\" ng-init=\"resourceListOpen = false\" ng-class=\"{'open': resourceListOpen}\"><li ng-repeat=\"resource in used\" ng-disabled=\"!enabled\" ng-blur=\"blurCB()\"><label style=\"background: {{resourceColor(resource.name)}}\"><input type=\"checkbox\" ng-model=\"resource.selected\" ng-disabled=\"!enabled\"> <span>{{resource.name}}</span></label></li></ul><div class=\"resource-caret\" click-anywhere-but-here=\"resourceListOpen = false\" is-active=\"resourceListOpen\" ng-click=\"resourceListOpen = !resourceListOpen\"><span class=\"caret\"></span></div></div></div>"
);
$templateCache.put('ui/directive/searchBox/searchBox.html',
"<div id=\"search\" class=\"search-box clearfix\" ng-show=\"showSearch\"><div class=\"input-group input-group-sm search-input-wrap\"><input type=\"text\" id=\"search-input\" class=\"form-control search-input\" ng-model=\"keyword\" ng-keydown=\"handleKeyDown($event)\" aria-describedby=\"basic-addon2\"> <span class=\"input-group-addon search-addon\" id=\"basic-addon2\" ng-show=\"showTip\" ng-bind=\"'第 ' + curIndex + ' 条,共 ' + resultNum + ' 条'\"></span></div><div class=\"btn-group btn-group-sm prev-and-next-btn\" role=\"group\"><button type=\"button\" class=\"btn btn-default\" ng-click=\"doSearch(keyword, 'prev')\"><span class=\"glyphicon glyphicon-chevron-up\"></span></button> <button type=\"button\" class=\"btn btn-default\" ng-click=\"doSearch(keyword, 'next')\"><span class=\"glyphicon glyphicon-chevron-down\"></span></button></div><div class=\"close-search\" ng-click=\"exitSearch()\"><span class=\"glyphicon glyphicon-remove\"></span></div></div>"
);
$templateCache.put('ui/directive/searchBtn/searchBtn.html',
"<div class=\"btn-group-vertical\" dropdown is-open=\"isopen\"><button type=\"button\" class=\"btn btn-default search\" title=\"{{ 'search' | lang:'ui' }}\" ng-class=\"{'active': isopen}\" ng-click=\"enterSearch()\"></button> <button type=\"button\" class=\"btn btn-default search-caption dropdown-toggle\" ng-click=\"enterSearch()\" title=\"{{ 'search' | lang:'ui' }}\"><span class=\"caption\">{{ 'search' | lang:'ui' }}</span> <span class=\"sr-only\">{{ 'search' | lang:'ui' }}</span></button></div>"
);
$templateCache.put('ui/directive/selectAll/selectAll.html',
"<div class=\"btn-group-vertical\" dropdown is-open=\"isopen\"><button type=\"button\" class=\"btn btn-default select\" title=\"{{ 'selectall' | lang:'ui' }}\" ng-class=\"{'active': isopen}\" ng-click=\"select['all']()\"></button> <button type=\"button\" class=\"btn btn-default select-caption dropdown-toggle\" title=\"{{ 'selectall' | lang:'ui' }}\" dropdown-toggle><span class=\"caption\">{{ 'selectall' | lang:'ui' }}</span> <span class=\"caret\"></span> <span class=\"sr-only\">{{ 'selectall' | lang:'ui' }}</span></button><ul class=\"dropdown-menu\" role=\"menu\"><li ng-repeat=\"item in items\"><a href ng-click=\"select[item]()\">{{ 'select' + item | lang:'ui' }}</a></li></ul></div>"
);
$templateCache.put('ui/directive/styleOperator/styleOperator.html',
"<a ng-click=\"minder.execCommand('clearstyle')\" class=\"btn-wrap\" ng-disabled=\"minder.queryCommandState('clearstyle') === -1;\"><span class=\"btn-icon clear-style-icon\"></span> <span class=\"btn-label\">{{ 'clearstyle' | lang: 'ui' }}</span></a><div class=\"s-btn-group-vertical\"><a class=\"s-btn-wrap\" href ng-click=\"minder.execCommand('copystyle')\" ng-disabled=\"minder.queryCommandState('copystyle') === -1;\"><span class=\"s-btn-icon copy-style-icon\"></span> <span class=\"s-btn-label\">{{ 'copystyle' | lang: 'ui' }}</span></a> <a class=\"s-btn-wrap paste-style-wrap\" href ng-click=\"minder.execCommand('pastestyle')\" ng-disabled=\"minder.queryCommandState('pastestyle') === -1;\"><span class=\"s-btn-icon paste-style-icon\"></span> <span class=\"s-btn-label\">{{ 'pastestyle' | lang: 'ui' }}</span></a></div>"
"<div class=\"style-operator\"><a ng-click=\"minder.queryCommandState('clearstyle') === -1 || minder.execCommand('clearstyle')\" class=\"btn-wrap clear-style\" ng-disabled=\"minder.queryCommandState('clearstyle') === -1\"><span class=\"btn-icon clear-style-icon\"></span> <span class=\"btn-label\">{{ 'clearstyle' | lang: 'ui' }}</span></a><div class=\"s-btn-group-vertical\"><a class=\"s-btn-wrap\" href ng-click=\"minder.queryCommandState('copystyle') === -1 || minder.execCommand('copystyle')\" ng-disabled=\"minder.queryCommandState('copystyle') === -1\"><span class=\"s-btn-icon copy-style-icon\"></span> <span class=\"s-btn-label\">{{ 'copystyle' | lang: 'ui' }}</span></a> <a class=\"s-btn-wrap paste-style-wrap\" href ng-click=\"minder.queryCommandState('pastestyle') === -1 || minder.execCommand('pastestyle')\" ng-disabled=\"minder.queryCommandState('pastestyle') === -1\"><span class=\"s-btn-icon paste-style-icon\"></span> <span class=\"s-btn-label\">{{ 'pastestyle' | lang: 'ui' }}</span></a></div></div>"
);

@@ -71,3 +129,3 @@

$templateCache.put('ui/directive/templateList/templateList.html',
"<span class=\"dropdown\" dropdown on-toggle=\"toggled(open)\"><div class=\"dropdown-toggle current-temp-item\" dropdown-toggle><a href class=\"temp-item {{ minder.queryCommandValue('template') }}\" title=\"{{ minder.queryCommandValue('template') | lang: 'template' }}\"></a> <span class=\"caret\"></span></div><ul class=\"dropdown-menu temp-list\"><li ng-repeat=\"(key, templateObj) in templateList\" class=\"temp-item-wrap\"><a ng-click=\"minder.execCommand('template', key);\" class=\"temp-item {{key}}\" ng-class=\"{ 'temp-item-selected' : key == minder.queryCommandValue('template') }\" title=\"{{ key | lang: 'template' }}\"></a></li></ul></span>"
"<div class=\"dropdown temp-panel\" dropdown on-toggle=\"toggled(open)\"><div class=\"dropdown-toggle current-temp-item\" ng-disabled=\"minder.queryCommandState('template') === -1\" dropdown-toggle><a href class=\"temp-item {{ minder.queryCommandValue('template') }}\" title=\"{{ minder.queryCommandValue('template') | lang: 'template' }}\"></a> <span class=\"caret\"></span></div><ul class=\"dropdown-menu temp-list\"><li ng-repeat=\"(key, templateObj) in templateList\" class=\"temp-item-wrap\"><a ng-click=\"minder.execCommand('template', key);\" class=\"temp-item {{key}}\" ng-class=\"{ 'temp-item-selected' : key == minder.queryCommandValue('template') }\" title=\"{{ key | lang: 'template' }}\"></a></li></ul></div>"
);

@@ -77,5 +135,31 @@

$templateCache.put('ui/directive/themeList/themeList.html',
"<span class=\"dropdown\" dropdown><div class=\"dropdown-toggle theme-item-selected\" dropdown-toggle><a href class=\"theme-item\" ng-style=\"getThemeThumbStyle(minder.queryCommandValue('theme'))\" title=\"{{ minder.queryCommandValue('theme') | lang: 'theme'; }}\">{{ minder.queryCommandValue('theme') | lang: 'theme'; }}</a> <span class=\"caret\"></span></div><ul class=\"dropdown-menu theme-list\"><li ng-repeat=\"key in themeKeyList\" class=\"theme-item-wrap\"><a ng-click=\"minder.execCommand('theme', key);\" class=\"theme-item\" ng-style=\"getThemeThumbStyle(key)\" title=\"{{ key | lang: 'theme'; }}\">{{ key | lang: 'theme'; }}</a></li></ul></span>"
"<div class=\"dropdown theme-panel\" dropdown><div class=\"dropdown-toggle theme-item-selected\" dropdown-toggle ng-disabled=\"minder.queryCommandState('theme') === -1\"><a href class=\"theme-item\" ng-style=\"getThemeThumbStyle(minder.queryCommandValue('theme'))\" title=\"{{ minder.queryCommandValue('theme') | lang: 'theme'; }}\">{{ minder.queryCommandValue('theme') | lang: 'theme'; }}</a> <span class=\"caret\"></span></div><ul class=\"dropdown-menu theme-list\"><li ng-repeat=\"key in themeKeyList\" class=\"theme-item-wrap\"><a ng-click=\"minder.execCommand('theme', key);\" class=\"theme-item\" ng-style=\"getThemeThumbStyle(key)\" title=\"{{ key | lang: 'theme'; }}\">{{ key | lang: 'theme'; }}</a></li></ul></div>"
);
$templateCache.put('ui/directive/topTab/topTab.html',
"<tabset><tab heading=\"{{ 'idea' | lang: 'ui/tabs'; }}\" ng-click=\"toggleTopTab('idea')\" select=\"setCurTab('idea')\"><undo-redo editor=\"editor\"></undo-redo><append-node minder=\"minder\"></append-node><arrange minder=\"minder\"></arrange><operation minder=\"minder\"></operation><hyper-link minder=\"minder\"></hyper-link><image-btn minder=\"minder\"></image-btn><note-btn minder=\"minder\"></note-btn><priority-editor minder=\"minder\"></priority-editor><progress-editor minder=\"minder\"></progress-editor><resource-editor minder=\"minder\"></resource-editor></tab><tab heading=\"{{ 'appearence' | lang: 'ui/tabs'; }}\" ng-click=\"toggleTopTab('appearance')\" select=\"setCurTab('appearance')\"><template-list minder=\"minder\" class=\"inline-directive\"></template-list><theme-list minder=\"minder\"></theme-list><layout minder=\"minder\" class=\"inline-directive\"></layout><style-operator minder=\"minder\" class=\"inline-directive\"></style-operator><font-operator minder=\"minder\" class=\"inline-directive\"></font-operator></tab><tab heading=\"{{ 'view' | lang: 'ui/tabs'; }}\" ng-click=\"toggleTopTab('view')\" select=\"setCurTab('view')\"><expand-level minder=\"minder\"></expand-level><select-all minder=\"minder\"></select-all><search-btn minder=\"minder\"></search-btn></tab></tabset>"
);
$templateCache.put('ui/directive/undoRedo/undoRedo.html',
"<div class=\"km-btn-group do-group\"><div class=\"km-btn-item undo\" ng-disabled=\"editor.history.hasUndo() == false\" ng-click=\"editor.history.hasUndo() == false || editor.history.undo();\" title=\"{{ 'undo' | lang:'ui' }}\"><i class=\"km-btn-icon\"></i></div><div class=\"km-btn-item redo\" ng-disabled=\"editor.history.hasRedo() == false\" ng-click=\"editor.history.hasRedo() == false || editor.history.redo()\" title=\"{{ 'redo' | lang:'ui' }}\"><i class=\"km-btn-icon\"></i></div></div>"
);
$templateCache.put('ui/dialog/hyperlink/hyperlink.tpl.html',
"<div class=\"modal-header\"><h3 class=\"modal-title\">链接</h3></div><div class=\"modal-body\"><form><div class=\"form-group\" id=\"link-url-wrap\" ng-class=\"{true: 'has-success', false: 'has-error'}[urlPassed]\"><label for=\"link-url\">链接地址:</label><input type=\"text\" class=\"form-control\" ng-model=\"url\" ng-blur=\"urlPassed = R_URL.test(url)\" ng-focus=\"this.value = url\" ng-keydown=\"shortCut($event)\" id=\"link-url\" placeholder=\"必填:以 http(s):// 或 ftp:// 开头\"></div><div class=\"form-group\" ng-class=\"{'has-success' : titlePassed}\"><label for=\"link-title\">提示文本:</label><input type=\"text\" class=\"form-control\" ng-model=\"title\" ng-blur=\"titlePassed = true\" id=\"link-title\" placeholder=\"选填:鼠标在链接上悬停时提示的文本\"></div></form></div><div class=\"modal-footer\"><button class=\"btn btn-primary\" ng-click=\"ok()\">确定</button> <button class=\"btn btn-warning\" ng-click=\"cancel()\">取消</button></div>"
);
$templateCache.put('ui/dialog/imExportNode/imExportNode.tpl.html',
"<div class=\"modal-header\"><h3 class=\"modal-title\">{{ title }}</h3></div><div class=\"modal-body\"><textarea type=\"text\" class=\"form-control single-input\" rows=\"8\" ng-keydown=\"shortCut($event);\" ng-model=\"value\" ng-readonly=\"type === 'export'\">\n" +
" </textarea></div><div class=\"modal-footer\"><button class=\"btn btn-primary\" ng-click=\"ok()\" ng-disabled=\"type === 'import' && value == ''\">OK</button> <button class=\"btn btn-warning\" ng-click=\"cancel()\">Cancel</button></div>"
);
$templateCache.put('ui/dialog/image/image.tpl.html',
"<div class=\"modal-header\"><h3 class=\"modal-title\">图片</h3></div><div class=\"modal-body\"><tabset><tab heading=\"图片搜索\"><form class=\"form-inline\"><div class=\"form-group\"><label for=\"search-keyword\">关键词:</label><input type=\"text\" class=\"form-control\" ng-model=\"data.searchKeyword2\" id=\"search-keyword\" placeholder=\"请输入搜索的关键词\"></div><button class=\"btn btn-primary\" ng-click=\"searchImage()\">百度一下</button></form><div class=\"search-result\" id=\"search-result\"><ul><li ng-repeat=\"image in list\" id=\"{{ 'img-item' + $index }}\" ng-class=\"{'selected' : isSelected}\" ng-click=\"selectImage($event)\"><img id=\"{{ 'img-' + $index }}\" ng-src=\"{{ image.src || '' }}\" alt=\"{{ image.title }}\" onerror=\"this.parentNode.removeChild(this)\"> <span>{{ image.title }}</span></li></ul></div></tab><tab heading=\"插入图片\" active=\"true\"><form><div class=\"form-group\" ng-class=\"{true: 'has-success', false: 'has-error'}[urlPassed]\"><label for=\"image-url\">链接地址:</label><input type=\"text\" class=\"form-control\" ng-model=\"data.url\" ng-blur=\"urlPassed = data.R_URL.test(data.url)\" ng-focus=\"this.value = data.url\" ng-keydown=\"shortCut($event)\" id=\"image-url\" placeholder=\"必填:以 http(s):// 开头\"></div><div class=\"form-group\" ng-class=\"{'has-success' : titlePassed}\"><label for=\"image-title\">提示文本:</label><input type=\"text\" class=\"form-control\" ng-model=\"data.title\" ng-blur=\"titlePassed = true\" id=\"image-title\" placeholder=\"选填:鼠标在图片上悬停时提示的文本\"></div><div class=\"form-group\"><label for=\"image-preview\">图片预览:</label><img class=\"image-preview\" id=\"image-preview\" ng-src=\"{{ data.url }}\" alt=\"{{ data.title }}\"></div></form></tab></tabset></div><div class=\"modal-footer\"><button class=\"btn btn-primary\" ng-click=\"ok()\">确定</button> <button class=\"btn btn-warning\" ng-click=\"cancel()\">取消</button></div>"
);
}]);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc