no message
This commit is contained in:
119
node_modules/mavon-editor/src/components/auto-textarea.vue
generated
vendored
Normal file
119
node_modules/mavon-editor/src/components/auto-textarea.vue
generated
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<div :style="{fontSize: fontSize , lineHeight: lineHeight, height: fullHeight ? '100%': 'auto'}" class="auto-textarea-wrapper">
|
||||
<pre :style="{fontSize: fontSize , lineHeight: lineHeight, minHeight: fullHeight ? '100%': 'auto'}" class="auto-textarea-block"><br/>{{temp_value}} </pre>
|
||||
<textarea ref="vTextarea" :autofocus="s_autofocus" @keyup="change" spellcheck="false" :placeholder="placeholder" v-model="temp_value" :style="{fontSize: fontSize , lineHeight: lineHeight}" :class="{'no-border': !border , 'no-resize': !resize}" class="auto-textarea-input">
|
||||
</textarea>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script type="text/ecmascript-6">
|
||||
export default {
|
||||
emits: ["update:modelValue"],
|
||||
|
||||
data() {
|
||||
return {
|
||||
temp_value: (() => {
|
||||
return this.modelValue;
|
||||
})(),
|
||||
s_autofocus: (() => {
|
||||
if (this.autofocus) {
|
||||
return 'autofocus'
|
||||
}
|
||||
})()
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
},
|
||||
|
||||
props: {
|
||||
fullHeight: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
autofocus: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
modelValue: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
border: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
resize: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
onchange: {
|
||||
type: Function,
|
||||
default: null
|
||||
},
|
||||
fontSize: {
|
||||
type: String,
|
||||
default: '14px'
|
||||
},
|
||||
lineHeight: {
|
||||
type: String,
|
||||
default: '18px'
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
change($event) {
|
||||
if (this.onchange) {
|
||||
this.onchange(this.temp_value , $event)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
modelValue: function (val, oldVal) {
|
||||
this.temp_value = val
|
||||
},
|
||||
temp_value: function (val, oldVal) {
|
||||
this.$emit('update:modelValue' , val)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="stylus" rel="stylesheet/stylus">
|
||||
.auto-textarea-wrapper
|
||||
position relative
|
||||
width 100%
|
||||
margin 0
|
||||
padding 0
|
||||
line-height normal
|
||||
.auto-textarea-block
|
||||
display block
|
||||
white-space pre-wrap
|
||||
word-wrap break-word !important
|
||||
visibility hidden
|
||||
overflow hidden
|
||||
margin 0
|
||||
padding 0
|
||||
box-sizing border-box
|
||||
font-size 100%
|
||||
.auto-textarea-input
|
||||
font-family Menlo, "Ubuntu Mono", Consolas, "Courier New", "Microsoft Yahei", "Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif
|
||||
position absolute
|
||||
width 100%
|
||||
height 100%
|
||||
top 0
|
||||
left 0
|
||||
margin 0
|
||||
padding 0
|
||||
overflow-y hidden
|
||||
color #2C3E50
|
||||
&.no-border
|
||||
outline 0 none
|
||||
border none !important
|
||||
&.no-resize
|
||||
resize none
|
||||
</style>
|
||||
750
node_modules/mavon-editor/src/components/md-toolbar-left.vue
generated
vendored
Normal file
750
node_modules/mavon-editor/src/components/md-toolbar-left.vue
generated
vendored
Normal file
@@ -0,0 +1,750 @@
|
||||
<template>
|
||||
<div class="v-left-item">
|
||||
<slot name="left-toolbar-before" />
|
||||
<button
|
||||
:disabled="!editable"
|
||||
type="button"
|
||||
v-if="toolbars.bold"
|
||||
@click="$clicks('bold')"
|
||||
class="op-icon fa fa-mavon-bold"
|
||||
aria-hidden="true"
|
||||
:title="`${d_words.tl_bold} (ctrl+b)`"
|
||||
></button>
|
||||
<button
|
||||
:disabled="!editable"
|
||||
type="button"
|
||||
v-if="toolbars.italic"
|
||||
@click="$clicks('italic')"
|
||||
class="op-icon fa fa-mavon-italic"
|
||||
aria-hidden="true"
|
||||
:title="`${d_words.tl_italic} (ctrl+i)`"
|
||||
></button>
|
||||
<div
|
||||
:class="{ selected: s_header_dropdown_open }"
|
||||
:disabled="!editable"
|
||||
type="button"
|
||||
v-if="toolbars.header"
|
||||
@mouseleave="$mouseleave_header_dropdown"
|
||||
@mouseenter="$mouseenter_header_dropdown"
|
||||
class="op-icon fa fa-mavon-header dropdown dropdown-wrapper"
|
||||
aria-hidden="true"
|
||||
:title="`${d_words.tl_header} (ctrl+h)`"
|
||||
>
|
||||
<transition name="fade">
|
||||
<div
|
||||
class="op-header popup-dropdown"
|
||||
:class="{ transition: transition }"
|
||||
v-show="s_header_dropdown_open"
|
||||
@mouseenter="$mouseenter_header_dropdown"
|
||||
@mouseleave="$mouseleave_header_dropdown"
|
||||
>
|
||||
<div
|
||||
title="#"
|
||||
class="dropdown-item"
|
||||
@click.stop="$click_header('header1')"
|
||||
>
|
||||
<span>{{ d_words.tl_header_one }}</span>
|
||||
</div>
|
||||
<div
|
||||
title="## "
|
||||
class="dropdown-item"
|
||||
@click.stop="$click_header('header2')"
|
||||
>
|
||||
<span>{{ d_words.tl_header_two }}</span>
|
||||
</div>
|
||||
<div
|
||||
title="### "
|
||||
class="dropdown-item"
|
||||
@click.stop="$click_header('header3')"
|
||||
>
|
||||
<span>{{ d_words.tl_header_three }}</span>
|
||||
</div>
|
||||
<div
|
||||
title="#### "
|
||||
class="dropdown-item"
|
||||
@click.stop="$click_header('header4')"
|
||||
>
|
||||
<span>{{ d_words.tl_header_four }}</span>
|
||||
</div>
|
||||
<div
|
||||
title="##### "
|
||||
class="dropdown-item"
|
||||
@click.stop="$click_header('header5')"
|
||||
>
|
||||
<span>{{ d_words.tl_header_five }}</span>
|
||||
</div>
|
||||
<div
|
||||
title="###### "
|
||||
class="dropdown-item"
|
||||
@click.stop="$click_header('header6')"
|
||||
>
|
||||
<span>{{ d_words.tl_header_six }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
<span
|
||||
v-if="toolbars.header || toolbars.italic || toolbars.bold"
|
||||
class="op-icon-divider"
|
||||
></span>
|
||||
<button
|
||||
:disabled="!editable"
|
||||
type="button"
|
||||
v-if="toolbars.underline"
|
||||
@click="$clicks('underline')"
|
||||
class="op-icon fa fa-mavon-underline"
|
||||
:title="`${d_words.tl_underline} (ctrl+u)`"
|
||||
aria-hidden="true"
|
||||
></button>
|
||||
<button
|
||||
:disabled="!editable"
|
||||
type="button"
|
||||
v-if="toolbars.strikethrough"
|
||||
@click="$clicks('strikethrough')"
|
||||
class="op-icon fa fa-mavon-strikethrough"
|
||||
:title="`${d_words.tl_strikethrough} (ctrl+shift+d)`"
|
||||
aria-hidden="true"
|
||||
></button>
|
||||
<button
|
||||
:disabled="!editable"
|
||||
type="button"
|
||||
v-if="toolbars.mark"
|
||||
@click="$clicks('mark')"
|
||||
class="op-icon fa fa-mavon-thumb-tack"
|
||||
:title="`${d_words.tl_mark} (ctrl+m)`"
|
||||
aria-hidden="true"
|
||||
></button>
|
||||
<button
|
||||
:disabled="!editable"
|
||||
type="button"
|
||||
v-if="toolbars.superscript"
|
||||
@click="$clicks('superscript')"
|
||||
class="op-icon fa fa-mavon-superscript"
|
||||
aria-hidden="true"
|
||||
:title="`${d_words.tl_superscript} (ctrl+alt+s)`"
|
||||
></button>
|
||||
<button
|
||||
:disabled="!editable"
|
||||
type="button"
|
||||
v-if="toolbars.subscript"
|
||||
@click="$clicks('subscript')"
|
||||
class="op-icon fa fa-mavon-subscript"
|
||||
aria-hidden="true"
|
||||
:title="`${d_words.tl_subscript} (ctrl+shift+s)`"
|
||||
></button>
|
||||
<button
|
||||
:disabled="!editable"
|
||||
type="button"
|
||||
v-if="toolbars.alignleft"
|
||||
@click="$clicks('alignleft')"
|
||||
class="op-icon fa fa-mavon-align-left"
|
||||
aria-hidden="true"
|
||||
:title="`${d_words.tl_alignleft} (ctrl+l)`"
|
||||
></button>
|
||||
<button
|
||||
:disabled="!editable"
|
||||
type="button"
|
||||
v-if="toolbars.aligncenter"
|
||||
@click="$clicks('aligncenter')"
|
||||
class="op-icon fa fa-mavon-align-center"
|
||||
aria-hidden="true"
|
||||
:title="`${d_words.tl_aligncenter} (ctrl+e)`"
|
||||
></button>
|
||||
<button
|
||||
:disabled="!editable"
|
||||
type="button"
|
||||
v-if="toolbars.alignright"
|
||||
@click="$clicks('alignright')"
|
||||
class="op-icon fa fa-mavon-align-right"
|
||||
aria-hidden="true"
|
||||
:title="`${d_words.tl_alignright} (ctrl+r)`"
|
||||
></button>
|
||||
<span
|
||||
v-if="
|
||||
toolbars.superscript ||
|
||||
toolbars.subscript ||
|
||||
toolbars.underline ||
|
||||
toolbars.strikethrough ||
|
||||
toolbars.mark
|
||||
"
|
||||
class="op-icon-divider"
|
||||
></span>
|
||||
<button
|
||||
:disabled="!editable"
|
||||
type="button"
|
||||
v-if="toolbars.quote"
|
||||
@click="$clicks('quote')"
|
||||
class="op-icon fa fa-mavon-quote-left"
|
||||
aria-hidden="true"
|
||||
:title="`${d_words.tl_quote} (ctrl+q)`"
|
||||
></button>
|
||||
<button
|
||||
:disabled="!editable"
|
||||
type="button"
|
||||
v-if="toolbars.ol"
|
||||
@click="$clicks('ol')"
|
||||
class="op-icon fa fa-mavon-list-ol"
|
||||
aria-hidden="true"
|
||||
:title="`${d_words.tl_ol} (ctrl+o)`"
|
||||
></button>
|
||||
<button
|
||||
:disabled="!editable"
|
||||
type="button"
|
||||
v-if="toolbars.ul"
|
||||
@click="$clicks('ul')"
|
||||
class="op-icon fa fa-mavon-list-ul"
|
||||
aria-hidden="true"
|
||||
:title="`${d_words.tl_ul} (ctrl+alt+u)`"
|
||||
></button>
|
||||
<span
|
||||
v-if="toolbars.ul || toolbars.ol || toolbars.quote"
|
||||
class="op-icon-divider"
|
||||
></span>
|
||||
<button
|
||||
:disabled="!editable"
|
||||
type="button"
|
||||
v-if="toolbars.link"
|
||||
@click.stop="$toggle_imgLinkAdd('link')"
|
||||
class="op-icon fa fa-mavon-link"
|
||||
aria-hidden="true"
|
||||
:title="`${d_words.tl_link} (ctrl+l)`"
|
||||
></button>
|
||||
|
||||
<div
|
||||
:disabled="!editable"
|
||||
:class="{ selected: s_img_dropdown_open }"
|
||||
type="button"
|
||||
v-if="toolbars.imagelink"
|
||||
@mouseleave="$mouseleave_img_dropdown"
|
||||
@mouseenter="$mouseenter_img_dropdown"
|
||||
class="op-icon fa fa-mavon-picture-o dropdown dropdown-wrapper"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<transition name="fade">
|
||||
<div
|
||||
class="op-image popup-dropdown"
|
||||
:class="{ transition: transition }"
|
||||
v-show="s_img_dropdown_open"
|
||||
@mouseleave="$mouseleave_img_dropdown"
|
||||
@mouseenter="$mouseenter_img_dropdown"
|
||||
>
|
||||
<div
|
||||
class="dropdown-item"
|
||||
@click.stop="$toggle_imgLinkAdd('imagelink')"
|
||||
>
|
||||
<span>{{ d_words.tl_image }}</span>
|
||||
</div>
|
||||
<div class="dropdown-item" style="overflow: hidden">
|
||||
<input
|
||||
type="file"
|
||||
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"
|
||||
@change="$imgAdd($event)"
|
||||
multiple="multiple"
|
||||
/>{{ d_words.tl_upload }}
|
||||
</div>
|
||||
|
||||
<template v-for="(item, index) in img_file" :key="index">
|
||||
<div
|
||||
v-if="item && item[1]"
|
||||
class="dropdown-item dropdown-images"
|
||||
:title="item[1].name"
|
||||
@click.stop="$imgFileListClick(index)"
|
||||
>
|
||||
<span>{{ item[1].name }}</span>
|
||||
<button
|
||||
type="button"
|
||||
@click.stop="$imgDel(index)"
|
||||
class="op-icon fa fa-mavon-times"
|
||||
aria-hidden="true"
|
||||
:title="d_words.tl_upload_remove"
|
||||
></button>
|
||||
|
||||
<!-- 缩略图展示 -->
|
||||
<img
|
||||
class="image-show"
|
||||
:class="{ transition: transition }"
|
||||
:src="item[1].miniurl"
|
||||
alt="none"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
<button
|
||||
:disabled="!editable"
|
||||
type="button"
|
||||
v-if="toolbars.code"
|
||||
@click="$clicks('code')"
|
||||
class="op-icon fa fa-mavon-code"
|
||||
aria-hidden="true"
|
||||
:title="`${d_words.tl_code} (ctrl+alt+c)`"
|
||||
></button>
|
||||
<button
|
||||
:disabled="!editable"
|
||||
type="button"
|
||||
v-if="toolbars.table"
|
||||
@click="$clicks('table')"
|
||||
class="op-icon fa fa-mavon-table"
|
||||
aria-hidden="true"
|
||||
:title="`${d_words.tl_table} (ctrl+alt+t)`"
|
||||
></button>
|
||||
<span
|
||||
v-if="
|
||||
toolbars.link || toolbars.imagelink || toolbars.code || toolbars.table
|
||||
"
|
||||
class="op-icon-divider"
|
||||
></span>
|
||||
<button
|
||||
type="button"
|
||||
v-if="toolbars.undo"
|
||||
@click="$clicks('undo')"
|
||||
class="op-icon fa fa-mavon-undo"
|
||||
aria-hidden="true"
|
||||
:title="`${d_words.tl_undo} (ctrl+z)`"
|
||||
></button>
|
||||
<button
|
||||
type="button"
|
||||
v-if="toolbars.redo"
|
||||
@click="$clicks('redo')"
|
||||
class="op-icon fa fa-mavon-repeat"
|
||||
aria-hidden="true"
|
||||
:title="`${d_words.tl_redo} (ctrl+y)`"
|
||||
></button>
|
||||
<button
|
||||
type="button"
|
||||
v-if="toolbars.trash"
|
||||
@click="$clicks('trash')"
|
||||
class="op-icon fa fa-mavon-trash-o"
|
||||
aria-hidden="true"
|
||||
:title="`${d_words.tl_trash} (ctrl+breakspace)`"
|
||||
></button>
|
||||
<button
|
||||
type="button"
|
||||
v-if="toolbars.save"
|
||||
@click="$clicks('save')"
|
||||
class="op-icon fa fa-mavon-floppy-o"
|
||||
aria-hidden="true"
|
||||
:title="`${d_words.tl_save} (ctrl+s)`"
|
||||
></button>
|
||||
<slot name="left-toolbar-after" />
|
||||
|
||||
<!-- 添加image链接 -->
|
||||
<transition name="fade">
|
||||
<div class="add-image-link-wrapper" v-if="s_img_link_open">
|
||||
<div class="add-image-link">
|
||||
<i
|
||||
@click.stop.prevent="s_img_link_open = false"
|
||||
class="fa fa-mavon-times"
|
||||
aria-hidden="true"
|
||||
></i>
|
||||
<h3 class="title">
|
||||
{{
|
||||
link_type == "link"
|
||||
? d_words.tl_popup_link_title
|
||||
: d_words.tl_popup_img_link_title
|
||||
}}
|
||||
</h3>
|
||||
<div class="link-text input-wrapper">
|
||||
<input
|
||||
ref="linkTextInput"
|
||||
type="text"
|
||||
v-model="link_text"
|
||||
:placeholder="
|
||||
link_type == 'link'
|
||||
? d_words.tl_popup_link_text
|
||||
: d_words.tl_popup_img_link_text
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div class="link-addr input-wrapper">
|
||||
<input
|
||||
type="text"
|
||||
v-model="link_addr"
|
||||
:placeholder="
|
||||
link_type == 'link'
|
||||
? d_words.tl_popup_link_addr
|
||||
: d_words.tl_popup_img_link_addr
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div class="op-btn cancel" @click.stop="s_img_link_open = false">
|
||||
{{ d_words.tl_popup_link_cancel }}
|
||||
</div>
|
||||
<div class="op-btn sure" @click.stop="$imgLinkAdd()">
|
||||
{{ d_words.tl_popup_link_sure }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
<script type="text/ecmascript-6">
|
||||
export default {
|
||||
emits: [
|
||||
"toolbar_left_addlink",
|
||||
"imgTouch",
|
||||
"imgAdd",
|
||||
"imgDel",
|
||||
"imgAdd",
|
||||
"imgAdd",
|
||||
"toolbar_left_click",
|
||||
"toolbar_left_click"
|
||||
],
|
||||
|
||||
name: 's-md-toolbar-left',
|
||||
|
||||
props: {
|
||||
editable: { // 是否开启编辑
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
transition: { // TODO: 是否开启动画过渡
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
toolbars: { // 工具栏
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
d_words: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
image_filter: {
|
||||
type: Function,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
// [index, file]
|
||||
img_file: [[0, null]],
|
||||
img_timer: null,
|
||||
header_timer: null,
|
||||
s_img_dropdown_open: false,
|
||||
s_header_dropdown_open: false,
|
||||
s_img_link_open: false,
|
||||
trigger: null,
|
||||
num: 0,
|
||||
link_text: '',
|
||||
link_addr: '',
|
||||
link_type: 'link'
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
$imgLinkAdd() {
|
||||
this.$emit('toolbar_left_addlink', this.link_type, this.link_text, this.link_addr);
|
||||
this.s_img_link_open = false;
|
||||
},
|
||||
$toggle_imgLinkAdd(type) {
|
||||
this.link_type = type;
|
||||
this.link_text = this.link_addr = '';
|
||||
this.s_img_link_open = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.linkTextInput.focus()
|
||||
})
|
||||
this.s_img_dropdown_open = false;
|
||||
},
|
||||
$imgFileListClick(pos) {
|
||||
this.$emit('imgTouch', this.img_file[pos]);
|
||||
},
|
||||
$changeUrl(index,url) {
|
||||
this.img_file[index][0] = url;
|
||||
},
|
||||
$imgFileAdd($file) {
|
||||
// this.img_file[0][0] = this.num;
|
||||
// this.img_file[0][1] = $file;
|
||||
// this.img_file.unshift([(this.num + 1), null]);
|
||||
// this.num = this.num + 1;
|
||||
this.img_file.push([++this.num, $file])
|
||||
this.$emit('imgAdd', this.num, $file);
|
||||
this.s_img_dropdown_open = false;
|
||||
},
|
||||
$imgFilesAdd($files) {
|
||||
// valid means if the image_filter exist.
|
||||
let valid = (typeof this.image_filter === 'function');
|
||||
for (let i = 0; i < $files.length; i++) {
|
||||
if (valid && this.image_filter($files[i]) === true) {
|
||||
this.$imgFileAdd($files[i]);
|
||||
} else if (!valid && $files[i].type.match(/^image\//i)) {
|
||||
this.$imgFileAdd($files[i]);
|
||||
}
|
||||
}
|
||||
},
|
||||
$imgAdd($e) {
|
||||
this.$imgFilesAdd($e.target.files);
|
||||
$e.target.value = ''; // 初始化
|
||||
},
|
||||
$imgDel(pos) {
|
||||
this.$emit('imgDel', this.img_file[pos]);
|
||||
this.img_file.splice(pos, 1);
|
||||
this.num--;
|
||||
|
||||
this.s_img_dropdown_open = false;
|
||||
},
|
||||
isEqualName(filename, pos) {
|
||||
if (this.img_file[pos][1]) {
|
||||
if (this.img_file[pos][1].name === filename || this.img_file[pos][1]._name === filename) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
},
|
||||
$imgDelByFilename(filename) {
|
||||
var pos = 0;
|
||||
while (this.img_file.length > pos) {
|
||||
if (this.img_file[pos][1] === filename || this.isEqualName(filename, pos)) {
|
||||
this.$imgDel(pos);
|
||||
return true;
|
||||
}
|
||||
pos += 1;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
$imgAddByFilename(filename, $file) {
|
||||
for (var i = 0; i < this.img_file.length; i++)
|
||||
{ if (this.img_file[i][0] === filename) return false; }
|
||||
this.img_file[0][0] = filename;
|
||||
this.img_file[0][1] = $file;
|
||||
this.img_file[0][2] = filename;
|
||||
this.img_file.unshift(['./' + (this.num), null])
|
||||
this.$emit('imgAdd', this.img_file[1][0], $file, false);
|
||||
return true;
|
||||
},
|
||||
$imgAddByUrl(filename, $url) {
|
||||
for (var i = 0; i < this.img_file.length; i++)
|
||||
{ if (this.img_file[i][0] === filename) return false; }
|
||||
this.img_file[0][0] = filename;
|
||||
this.img_file[0][1] = $url;
|
||||
this.img_file.unshift(['./' + (this.num), null])
|
||||
return true;
|
||||
},
|
||||
$imgUpdateByFilename(filename, $file) {
|
||||
for (var i = 0; i < this.img_file.length; i++) {
|
||||
if (this.img_file[i][0] === filename || this.isEqualName(filename, i)) {
|
||||
this.img_file[i][1] = $file;
|
||||
this.$emit('imgAdd', filename, $file, false);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
// 工具栏功能图标click-----------------
|
||||
$mouseenter_img_dropdown() {
|
||||
if (this.editable) {
|
||||
clearTimeout(this.img_timer)
|
||||
this.s_img_dropdown_open = true
|
||||
}
|
||||
},
|
||||
$mouseleave_img_dropdown() {
|
||||
let vm = this
|
||||
this.img_timer = setTimeout(function() {
|
||||
vm.s_img_dropdown_open = false
|
||||
},200)
|
||||
},
|
||||
$mouseenter_header_dropdown() {
|
||||
if (this.editable) {
|
||||
clearTimeout(this.header_timer)
|
||||
this.s_header_dropdown_open = true
|
||||
}
|
||||
},
|
||||
$mouseleave_header_dropdown() {
|
||||
let vm = this
|
||||
this.header_timer = setTimeout(function() {
|
||||
vm.s_header_dropdown_open = false
|
||||
},200)
|
||||
},
|
||||
$clicks(_type) {
|
||||
// 让父节点来绑定事件并
|
||||
if (this.editable) {
|
||||
this.$emit('toolbar_left_click', _type);
|
||||
}
|
||||
},
|
||||
$click_header(_type) {
|
||||
// 让父节点来绑定事件并
|
||||
this.$emit('toolbar_left_click', _type);
|
||||
this.s_header_dropdown_open = false
|
||||
},
|
||||
handleClose(e) {
|
||||
this.s_img_dropdown_open = false;
|
||||
}
|
||||
},
|
||||
|
||||
watch:{
|
||||
s_img_link_open(newVlaue) {
|
||||
// fix issue #644
|
||||
this.$parent.$el.style.zIndex = newVlaue ? 1501 : 1500;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="stylus" scoped>
|
||||
.op-icon.dropdown-wrapper.dropdown
|
||||
position relative
|
||||
&[type=button]
|
||||
-webkit-appearance unset
|
||||
.popup-dropdown
|
||||
position absolute
|
||||
display block
|
||||
background #fff
|
||||
top 32px
|
||||
left -45px
|
||||
min-width 130px
|
||||
z-index 1600
|
||||
border 1px solid #ebeef5
|
||||
border-radius 4px
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)
|
||||
.dropdown-item:first-child
|
||||
border-top-left-radius 3px
|
||||
border-top-right-radius 3px
|
||||
.dropdown-item:last-child
|
||||
border-bottom-left-radius 3px
|
||||
border-bottom-right-radius 3px
|
||||
&.op-header
|
||||
left -30px
|
||||
min-width 90px
|
||||
&.fade-enter-active, &.fade-leave-active
|
||||
opacity 1
|
||||
&.fade-enter, &.fade-leave-active
|
||||
opacity 0
|
||||
&.transition
|
||||
&, .dropdown-item
|
||||
transition all 0.2s linear 0s
|
||||
.dropdown-item
|
||||
height 40px
|
||||
line-height @height
|
||||
font-size 14px
|
||||
color #606266
|
||||
position relative
|
||||
&:hover
|
||||
color #303133
|
||||
background-color #e9e9eb
|
||||
input
|
||||
position absolute
|
||||
font-size 100px
|
||||
right 0
|
||||
top 0
|
||||
opacity 0
|
||||
cursor pointer
|
||||
.dropdown-images
|
||||
box-sizing border-box
|
||||
button
|
||||
position absolute
|
||||
top -1px
|
||||
right 5px
|
||||
font-size: 14px
|
||||
&:hover
|
||||
color #F56C6C
|
||||
background-color: transparent
|
||||
span
|
||||
display inline-block
|
||||
width 80px
|
||||
white-space nowrap
|
||||
overflow hidden
|
||||
text-overflow ellipsis
|
||||
&:hover
|
||||
.image-show
|
||||
display block !important
|
||||
.image-show
|
||||
display none
|
||||
position absolute
|
||||
left -128px
|
||||
top 0
|
||||
width 120px
|
||||
height 90px
|
||||
object-fit contain
|
||||
border 1px solid #F2F6FC
|
||||
&.transition
|
||||
transition all 0.2s linear 0s
|
||||
&.transition
|
||||
transition all 0.2s linear 0s
|
||||
.add-image-link-wrapper
|
||||
position fixed
|
||||
left 0
|
||||
right 0
|
||||
top 0
|
||||
bottom 0
|
||||
background rgba(0, 0, 0, 0.7)
|
||||
z-index 1600
|
||||
transition all 0.1s linear 0s
|
||||
&.fade-enter-active, &.fade-leave-active
|
||||
opacity 1
|
||||
&.fade-enter, &.fade-leave-active
|
||||
opacity 0
|
||||
.add-image-link
|
||||
position fixed
|
||||
box-sizing border-box
|
||||
text-align center
|
||||
width 24%
|
||||
left 38%
|
||||
@media only screen and (max-width 1500px)
|
||||
width 34%
|
||||
left 33%
|
||||
@media only screen and (max-width 1000px)
|
||||
width 50%
|
||||
left 25%
|
||||
@media only screen and (max-width 600px)
|
||||
width 80%
|
||||
left 10%
|
||||
height auto
|
||||
padding 40px
|
||||
top 25%
|
||||
transition all 0.1s linear 0s
|
||||
z-index 3
|
||||
background #fff
|
||||
border-radius 2px
|
||||
|
||||
i
|
||||
font-size 24px
|
||||
position absolute
|
||||
right 8px
|
||||
top 6px
|
||||
color rgba(0, 0, 0, 0.7)
|
||||
cursor pointer
|
||||
.title
|
||||
font-size 20px
|
||||
margin-bottom 30px
|
||||
margin-top 10px
|
||||
font-weight 500 !important
|
||||
.input-wrapper
|
||||
margin-top 10px
|
||||
width 80%
|
||||
border 1px solid #eeece8
|
||||
text-align left
|
||||
margin-left 10%
|
||||
height 35px
|
||||
input
|
||||
height 32px
|
||||
line-height 32px
|
||||
font-size 15px
|
||||
width 90%
|
||||
margin-left 8px
|
||||
border none
|
||||
outline none
|
||||
.op-btn
|
||||
width 100px
|
||||
height 35px
|
||||
display inline-block
|
||||
margin-top 30px
|
||||
cursor pointer
|
||||
text-align center
|
||||
line-height @height
|
||||
opacity 0.9
|
||||
border-radius 2px
|
||||
letter-spacing 1px
|
||||
font-size 15px
|
||||
.op-btn.sure
|
||||
background #2185d0
|
||||
color #fff
|
||||
margin-left 5%
|
||||
&:hover
|
||||
opacity 1
|
||||
.op-btn.cancel
|
||||
border 1px solid #bcbcbc
|
||||
color #bcbcbc
|
||||
&:hover
|
||||
color #000
|
||||
</style>
|
||||
71
node_modules/mavon-editor/src/components/md-toolbar-right.vue
generated
vendored
Normal file
71
node_modules/mavon-editor/src/components/md-toolbar-right.vue
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<div class="v-right-item">
|
||||
<slot name="right-toolbar-before" />
|
||||
<button type="button" v-if="toolbars.navigation" @click="$clicks('navigation')" v-show="!s_navigation"
|
||||
class="op-icon fa fa-mavon-bars"
|
||||
aria-hidden="true" :title="`${d_words.tl_navigation_on} (F8)`"></button>
|
||||
<button type="button" v-if="toolbars.navigation" @click="$clicks('navigation')" v-show="s_navigation"
|
||||
class="op-icon fa fa-mavon-bars selected"
|
||||
aria-hidden="true" :title="`${d_words.tl_navigation_off} (F8)`"></button>
|
||||
<button type="button" v-if="toolbars.preview" @click="$clicks('preview')" v-show="s_preview_switch"
|
||||
class="op-icon fa fa-mavon-eye-slash selected"
|
||||
aria-hidden="true" :title="`${d_words.tl_edit} (F9)`"></button>
|
||||
<button type="button" v-if="toolbars.preview" @click="$clicks('preview')" v-show="!s_preview_switch"
|
||||
class="op-icon fa fa-mavon-eye"
|
||||
aria-hidden="true" :title="`${d_words.tl_preview} (F9)`"></button>
|
||||
<button type="button" v-if="toolbars.fullscreen" @click="$clicks('fullscreen')" v-show="!s_fullScreen"
|
||||
class="op-icon fa fa-mavon-arrows-alt"
|
||||
:title="`${d_words.tl_fullscreen_on} (F10)`" aria-hidden="true"></button>
|
||||
<button type="button" v-if="toolbars.fullscreen" @click="$clicks('fullscreen')" v-show="s_fullScreen"
|
||||
class="op-icon fa fa-mavon-compress selected"
|
||||
:title="`${d_words.tl_fullscreen_off} (F10)`" aria-hidden="true"></button>
|
||||
<button type="button" v-if="toolbars.readmodel" @click="$clicks('read')" class="op-icon fa fa-mavon-window-maximize" aria-hidden="true"
|
||||
:title="`${d_words.tl_read} (F11)`"></button>
|
||||
<button type="button" v-if="toolbars.subfield" @click="$clicks('subfield')" class="op-icon fa fa-mavon-columns" aria-hidden="true"
|
||||
:class = "{'selected': s_subfield}" :title="`${s_subfield ? d_words.tl_single_column : d_words.tl_double_column} (F12)`"></button>
|
||||
<span
|
||||
v-if=" toolbars.help && toolbars.htmlcode && toolbars.readmodel && toolbars.fullscreen && toolbars.subfield && toolbars.navigation"
|
||||
class="op-icon-divider"></span>
|
||||
<button type="button" v-if="toolbars.htmlcode" @click="$clicks('html')" v-show="!s_html_code" class="op-icon fa fa-mavon-code"
|
||||
:title="d_words.tl_html_on"
|
||||
aria-hidden="true"></button>
|
||||
<button type="button" v-if="toolbars.htmlcode" @click="$clicks('html')" v-show="s_html_code"
|
||||
class="op-icon fa fa-mavon-code selected"
|
||||
:title="d_words.tl_html_off" aria-hidden="true"></button>
|
||||
<button type="button" v-if="toolbars.help" @click="$clicks('help')" class="op-icon fa fa-mavon-question-circle"
|
||||
style="font-size: 17px;padding: 5px 6px 5px 3px"
|
||||
:title="d_words.tl_help" aria-hidden="true"></button>
|
||||
<slot name="right-toolbar-after" />
|
||||
</div>
|
||||
</template>
|
||||
<script type="text/ecmascript-6">
|
||||
export default {
|
||||
emits: ["toolbar_right_click"],
|
||||
name: 's-md-toolbar-right',
|
||||
|
||||
props: {
|
||||
// 工具栏
|
||||
s_subfield: {
|
||||
type: Boolean ,
|
||||
required: true
|
||||
},
|
||||
toolbars: { type: Object, required: true },
|
||||
s_preview_switch: { type: Boolean, required: true },
|
||||
s_fullScreen: { type: Boolean, required: true },
|
||||
s_html_code: { type: Boolean, required: true },
|
||||
s_navigation: { type: Boolean, required: true },
|
||||
d_words: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 工具栏功能图标click-----------------
|
||||
$clicks(_type) {
|
||||
// 让父节点来绑定事件并
|
||||
this.$emit('toolbar_right_click', _type);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
354
node_modules/mavon-editor/src/dev/app.vue
generated
vendored
Normal file
354
node_modules/mavon-editor/src/dev/app.vue
generated
vendored
Normal file
@@ -0,0 +1,354 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<select @change="opchange" class="page-lang">
|
||||
<option value="zh-CN">简体中文</option>
|
||||
<option value="zh-TW">正體中文</option>
|
||||
<option value="en">English</option>
|
||||
<option value="fr">Français</option>
|
||||
<option value="de">Deutsch</option>
|
||||
<option value="ja">日本語 </option>
|
||||
<option value="pt-BR">Português</option>
|
||||
<option value="ru">Русский</option>
|
||||
</select>
|
||||
<section class="page-header">
|
||||
<h1 class="project-name">mavonEditor</h1>
|
||||
<h3 class="project-tagline">{{d_words.sub_title}}</h3>
|
||||
<a href="https://github.com/hinesboy/mavonEditor" class="btn">View on GitHub</a>
|
||||
<a href="https://github.com/hinesboy/mavonEditor/zipball/master" class="btn">Download .zip</a>
|
||||
<a href="https://github.com/hinesboy/mavonEditor/master" class="btn">Download .tar.gz</a>
|
||||
</section>
|
||||
<div v-if="!screen_phone" class="item">
|
||||
<h2 class="item-header">
|
||||
{{d_words.default_setting}}
|
||||
</h2>
|
||||
<div class="item-button">
|
||||
<button @click="clearCache">clear cache</button>
|
||||
<button @click="uploadimg">upload</button>
|
||||
<button @click="imgreplace">imgreplace</button>
|
||||
<input type="text" v-model="imgName" />
|
||||
<button @click="imgdelete">delete</button>
|
||||
<div class="switch-code-style">
|
||||
<span>code style:</span>
|
||||
<select v-model="codeStyle">
|
||||
<option v-for="(val, key) in styles" :value="key">{{ key }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<mavon-editor ref="md" :subfield="subfield" :toolbarsFlag="toolbarsFlag" :editable="editable"
|
||||
:language="d_language" @change="change" @save="saveone" :ishljs="true" class="item-editor" v-model="help1"
|
||||
:autofocus="autofocus"
|
||||
:shortCut="true"
|
||||
@imgAdd="$imgAdd" @imgDel="$imgDel" @subfieldtoggle="$subfieldtoggle" @previewtoggle="$previewtoggle"
|
||||
:imageFilter="image_filter"
|
||||
:boxShadow="true"
|
||||
:scrollStyle="true"
|
||||
:transition="true"
|
||||
:codeStyle="codeStyle"
|
||||
box-shadow-style="0 2px 12px 0 rgba(0, 0, 0, 0.1)"
|
||||
toolbars-background="#ffffff"
|
||||
preview-background="#fbfbfb">
|
||||
<!-- <template slot="left-toolbar-before">
|
||||
左工具栏前
|
||||
</template>
|
||||
<template slot="left-toolbar-after">
|
||||
左工具栏后
|
||||
</template>
|
||||
|
||||
<template slot="right-toolbar-before">
|
||||
右工具栏前
|
||||
</template>
|
||||
<template slot="right-toolbar-after">
|
||||
右工具栏后
|
||||
</template> -->
|
||||
</mavon-editor>
|
||||
<button ref="diy" type="button" @click="$click('selftest')" class="op-icon fa fa-mavon-align-left"
|
||||
aria-hidden="true" title="自定义"></button>
|
||||
</div>
|
||||
<!--自定义-->
|
||||
<div v-if="screen_phone" class="item">
|
||||
<h2 class="item-header">
|
||||
{{d_words.customize_setting}}
|
||||
</h2>
|
||||
<mavon-editor :language="d_language" @save="savetwo" :toolbars="toolbars" class="item-editor"
|
||||
v-model="help2"></mavon-editor>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span style="display: block;margin: 30px 0 15px 0;color: #1e6bb8" class="">
|
||||
{{d_words.mark}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<h2 class="item-header">
|
||||
{{d_words.detail}}<a href="https://github.com/hinesboy/mavonEditor">GitHub</a>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script type="text/ecmascript-6">
|
||||
// import {CONFIG} from './assets/config.js'
|
||||
import {CONFIG} from '../lib/config.js'
|
||||
import styles from '../lib/core/hljs/lang.hljs.css.js'
|
||||
export default {
|
||||
name: 'app',
|
||||
data () {
|
||||
return {
|
||||
d_language: 'zh-CN',
|
||||
help1: '',
|
||||
help2: '',
|
||||
d_words: {},
|
||||
screen_phone: false,
|
||||
toolbars: {
|
||||
underline: true, // 下划线
|
||||
strikethrough: true, // 中划线
|
||||
alignCenter: true, // 中划线
|
||||
undo: true,
|
||||
save: true,
|
||||
fullscreen: true, // 全屏编辑
|
||||
navigation: true,
|
||||
preview: true,
|
||||
subfield: false
|
||||
},
|
||||
autofocus: true,
|
||||
subfield: true,
|
||||
editable: true,
|
||||
toolbarsFlag: true,
|
||||
img_file: {},
|
||||
toolbar_settings: {
|
||||
undo: true, // 上一步
|
||||
redo: true, // 下一步
|
||||
bold: true, // 粗体
|
||||
italic: true, // 斜体
|
||||
header: true, // 标题
|
||||
underline: true, // 下划线
|
||||
strikethrough: true, // 中划线
|
||||
quote: true, // 引用
|
||||
ol: true, // 有序列表
|
||||
ul: true, // 无序列表
|
||||
link: true, // 链接
|
||||
code: true, // code
|
||||
readmodel: true, // 沉浸式阅读
|
||||
htmlcode: true, // 展示html源码
|
||||
/* 2.1.8 */
|
||||
alignleft: true, // 左对齐
|
||||
aligncenter: true, // 居中
|
||||
alignright: true, // 右对齐
|
||||
/* 2.2.1 */
|
||||
subfield: true, // 单双栏模式
|
||||
preview: true, // 预览
|
||||
/* 1.4.2 */
|
||||
navigation: true // 导航目录
|
||||
},
|
||||
image_filter: function($files) {
|
||||
console.log('image_filter files:', $files);
|
||||
// console.log('here for you', $files);
|
||||
return true;
|
||||
},
|
||||
imageClick: function (file) {
|
||||
console.log(file);
|
||||
},
|
||||
imgName: '',
|
||||
codeStyle: "github",
|
||||
styles
|
||||
}
|
||||
},
|
||||
created () {
|
||||
var $vm = this;
|
||||
this.initLanguage();
|
||||
this.sizeToStatus()
|
||||
window.addEventListener('resize', function() {
|
||||
// 媒介查询
|
||||
$vm.sizeToStatus()
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
var md = this.$refs.md;
|
||||
var toolbar_left = md.$refs.toolbar_left;
|
||||
var diy = this.$refs.diy;
|
||||
toolbar_left.$el.append(diy)
|
||||
// toolbar_left.$el.append(diy.$el)
|
||||
// console.log(toolbar_left)
|
||||
},
|
||||
methods: {
|
||||
clearCache() {
|
||||
this.$refs.md.$emptyHistory()
|
||||
},
|
||||
$click(val) {
|
||||
console.log(val);
|
||||
},
|
||||
imgreplace($e) {
|
||||
console.log('here');
|
||||
this.$refs.md.$imglst2Url([
|
||||
[0, 'https://raw.githubusercontent.com/hinesboy/mavonEditor/master/img/cn/cn-common.png'],
|
||||
[1, 'https://raw.githubusercontent.com/hinesboy/mavonEditor/master/img/cn/cn-common.png']
|
||||
]);
|
||||
},
|
||||
uploadimg($e) {
|
||||
console.log(this.img_file);
|
||||
for (var _img in this.img_file) {
|
||||
this.$refs.md.$img2Url(_img, 'https://raw.githubusercontent.com/hinesboy/mavonEditor/master/img/cn/cn-common.png')
|
||||
}
|
||||
/* var formdata = new FormData();
|
||||
for (var _img in this.img_file) {
|
||||
formdata.append(_img, this.img_file[_img]);
|
||||
// _imglst.push([_img, this.img_file[_img]]);
|
||||
}
|
||||
axios({
|
||||
url: 'http://127.0.0.1/index.php',
|
||||
method: 'post',
|
||||
data: formdata,
|
||||
headers: {'Content-Type': 'multipart/form-data'},
|
||||
}).then((res) => {
|
||||
console.log(res);
|
||||
}) */
|
||||
},
|
||||
$imgAdd(pos, $file) {
|
||||
console.log('imgAdd', pos, $file);
|
||||
this.img_file[pos] = $file;
|
||||
// console.log(this.$refs.md.$refs.toolbar_left.$imgDelByFilename(pos));
|
||||
// console.log(this.$refs.md.$refs.toolbar_left.$imgAddByFilename('./test', $file))
|
||||
// console.log(this.$refs.md.$refs.toolbar_left.$imgUpdateByFilename('./test', $file))
|
||||
// console.log(this.$refs.md.$refs.toolbar_left.$imgAddByFilename('./test', $file))
|
||||
// console.log(this.$refs.md);
|
||||
// this.$refs.md.$imgUpdateByUrl(pos, 'http://pic.58pic.com/58pic/13/46/50/61758PICWZY_1024.jpg');
|
||||
},
|
||||
$imgDel(pos) {
|
||||
console.log('imgDel', pos);
|
||||
delete this.img_file[pos];
|
||||
},
|
||||
sizeToStatus () {
|
||||
if (window.matchMedia('(min-width:768px)').matches) {
|
||||
// > 768
|
||||
this.screen_phone = false
|
||||
} else {
|
||||
// < 768
|
||||
this.screen_phone = true
|
||||
}
|
||||
},
|
||||
saveone (val, render) {
|
||||
alert('save one')
|
||||
},
|
||||
savetwo (val, render) {
|
||||
alert('save two')
|
||||
},
|
||||
change (val, render) {
|
||||
console.log(val)
|
||||
},
|
||||
opchange (event) {
|
||||
this.d_language = event.target.value;
|
||||
},
|
||||
initLanguage() {
|
||||
this.d_words = CONFIG[`words_${this.d_language}`]
|
||||
this.help1 = CONFIG[`help_${this.d_language}`]
|
||||
this.help2 = CONFIG[`help_${this.d_language}`]
|
||||
},
|
||||
$subfieldtoggle(flag , value) {
|
||||
console.log('sufield toggle' + flag)
|
||||
},
|
||||
$previewtoggle(flag , value) {
|
||||
console.log('preview toggle' + flag)
|
||||
},
|
||||
imgdelete() {
|
||||
var md = this.$refs.md;
|
||||
var toolbar_left = md.$refs.toolbar_left;
|
||||
toolbar_left.$imgDelByFilename(this.imgName);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
d_language: function () {
|
||||
this.initLanguage();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" rel="stylesheet/stylus">
|
||||
body
|
||||
margin 0
|
||||
padding 0
|
||||
padding-bottom 50px
|
||||
.switch-code-style
|
||||
display inline
|
||||
margin-left 8px
|
||||
.page-lang
|
||||
position absolute
|
||||
top 15px
|
||||
right 2%
|
||||
.page-header
|
||||
box-sizing border-box
|
||||
padding 90px 15px
|
||||
width 100%
|
||||
height 380px
|
||||
color #fff
|
||||
text-align center
|
||||
background-color #159957
|
||||
background-image linear-gradient(120deg, #155799, #159957)
|
||||
@media only screen and (max-width 958px)
|
||||
height 300px
|
||||
padding 60px 15px
|
||||
@media only screen and (max-width 768px)
|
||||
height 370px
|
||||
padding 50px 15px
|
||||
.project-name
|
||||
margin-top 0
|
||||
margin-bottom 0.1rem
|
||||
font-size 2.25rem
|
||||
@media only screen and (max-width 768px)
|
||||
font-size 25px
|
||||
.project-tagline
|
||||
margin-bottom 2rem
|
||||
font-weight normal
|
||||
opacity 0.7
|
||||
@media only screen and (max-width 768px)
|
||||
font-size 16px
|
||||
.btn
|
||||
padding: 0.6rem 0.9rem
|
||||
font-size: 0.9rem
|
||||
display: inline-block
|
||||
margin-bottom: 1rem
|
||||
color: rgba(255, 255, 255, 0.7)
|
||||
background-color: rgba(255, 255, 255, 0.08)
|
||||
border-color: rgba(255, 255, 255, 0.2)
|
||||
border-style: solid
|
||||
border-width: 1px
|
||||
border-radius: 0.3rem
|
||||
transition: color 0.2s, background-color 0.2s, border-color 0.2s
|
||||
text-decoration: none
|
||||
margin-left 20px
|
||||
box-sizing border-box
|
||||
&:hover
|
||||
color: rgba(255, 255, 255, 0.8)
|
||||
text-decoration: none
|
||||
background-color: rgba(255, 255, 255, 0.2)
|
||||
border-color: rgba(255, 255, 255, 0.3)
|
||||
@media only screen and (max-width 768px)
|
||||
display: block
|
||||
width: 90%
|
||||
padding: 0.75rem
|
||||
font-size: 0.9rem
|
||||
margin-left 5%
|
||||
.item
|
||||
width 75%
|
||||
margin-left 12.5%
|
||||
@media only screen and (max-width 1100px)
|
||||
width 85%
|
||||
margin-left 7.5%
|
||||
@media only screen and (max-width 768px)
|
||||
width 92%
|
||||
margin-left 4%
|
||||
.item-header
|
||||
margin-top: 3.5rem
|
||||
margin-bottom: 2rem
|
||||
font-weight: normal
|
||||
color: #159957
|
||||
@media only screen and (max-width 768px)
|
||||
margin-top: 2rem
|
||||
margin-bottom: 1rem
|
||||
.item-button
|
||||
margin-bottom: 4rem
|
||||
.item-editor
|
||||
width 100%
|
||||
height 700px
|
||||
@media only screen and (max-width 1600px)
|
||||
height 550px
|
||||
</style>
|
||||
35
node_modules/mavon-editor/src/dev/assets/config.js
generated
vendored
Normal file
35
node_modules/mavon-editor/src/dev/assets/config.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* Created by zhy on 2017/5/11.
|
||||
*/
|
||||
import help_zh_CN from './lang/zh-CN/help_zh-CN.md'
|
||||
import help_zh_TW from './lang/zh-TW/help_zh-TW.md'
|
||||
import help_en from './lang/en/help_en.md'
|
||||
import help_fr from './lang/fr/help_fr.md'
|
||||
import help_pt_BR from './lang/pt-BR/help_pt-BR.md'
|
||||
import help_ru from './lang/ru/help_ru.md'
|
||||
import help_de from './lang/de/help_de.md'
|
||||
|
||||
import words_zh_CN from './lang/zh-CN/words_zh-CN.json'
|
||||
import words_zh_TW from './lang/zh-TW/words_zh-TW.json'
|
||||
import words_en from './lang/en/words_en.json'
|
||||
import words_fr from './lang/fr/words_fr.json'
|
||||
import words_pt_BR from './lang/pt-BR/words_pt-BR.json'
|
||||
import words_ru from './lang/ru/words_ru.json'
|
||||
import words_de from './lang/de/words_de.json'
|
||||
|
||||
export const CONFIG = {
|
||||
'help_zh-CN': help_zh_CN,
|
||||
'help_zh-TW': help_zh_TW,
|
||||
'help_pt-BR': help_pt_BR,
|
||||
'help_en': help_en,
|
||||
'help_fr': help_fr,
|
||||
'help_ru': help_ru,
|
||||
'help_de': help_de,
|
||||
'words_zh-CN': words_zh_CN,
|
||||
'words_zh-TW': words_zh_TW,
|
||||
'words_pt-BR': words_pt_BR,
|
||||
'words_en': words_en,
|
||||
'words_fr': words_fr,
|
||||
'words_ru': words_ru,
|
||||
'words_de': words_de
|
||||
}
|
||||
BIN
node_modules/mavon-editor/src/dev/assets/img/1.png
generated
vendored
Normal file
BIN
node_modules/mavon-editor/src/dev/assets/img/1.png
generated
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
node_modules/mavon-editor/src/dev/assets/img/2.png
generated
vendored
Normal file
BIN
node_modules/mavon-editor/src/dev/assets/img/2.png
generated
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
204
node_modules/mavon-editor/src/dev/assets/lang/de/help_de.md
generated
vendored
Normal file
204
node_modules/mavon-editor/src/dev/assets/lang/de/help_de.md
generated
vendored
Normal file
@@ -0,0 +1,204 @@
|
||||
@[toc](Catalog)
|
||||
|
||||
Markdown Handbuch
|
||||
===
|
||||
> Details: [http://commonmark.org/help/](http://commonmark.org/help/)
|
||||
|
||||
## **Fett**
|
||||
```
|
||||
**fett**
|
||||
__fett__
|
||||
```
|
||||
## *Kursiv*
|
||||
```
|
||||
*kursiv*
|
||||
_kursiv_
|
||||
```
|
||||
## Überschriften
|
||||
```
|
||||
# h1 #
|
||||
h1
|
||||
====
|
||||
## h2 ##
|
||||
h2
|
||||
----
|
||||
### h3 ###
|
||||
#### h4 ####
|
||||
##### h5 #####
|
||||
###### h6 ######
|
||||
```
|
||||
## Trennlinien
|
||||
```
|
||||
***
|
||||
---
|
||||
```
|
||||
****
|
||||
## ^Hoch^gestellt & ~Tief~gestellt
|
||||
```
|
||||
hochgestellt x^2^
|
||||
tiefgestellt H~2~0
|
||||
```
|
||||
## ++Unterstrichen++ & ~~Durchgestrichen~~
|
||||
```
|
||||
++unterstrichen++
|
||||
~~durchgestrichen~~
|
||||
```
|
||||
## ==Markiert==
|
||||
```
|
||||
==markiert==
|
||||
```
|
||||
## Zitat
|
||||
|
||||
```
|
||||
> zitat 1
|
||||
>> zitat 2
|
||||
>>> zitat 3
|
||||
...
|
||||
```
|
||||
|
||||
## Liste
|
||||
```
|
||||
ol
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
|
||||
ul
|
||||
-
|
||||
-
|
||||
...
|
||||
```
|
||||
|
||||
## Todo Liste
|
||||
|
||||
- [x] aufgabe 1
|
||||
- [ ] aufgabe 2
|
||||
|
||||
```
|
||||
- [x] aufgabe 1
|
||||
- [ ] aufgabe 2
|
||||
```
|
||||
|
||||
## Link
|
||||
```
|
||||
Text Link
|
||||
[Text](www.baidu.com)
|
||||
|
||||
Link mit Bild
|
||||

|
||||
```
|
||||
## Code
|
||||
\``` Typ
|
||||
|
||||
Codeblock
|
||||
|
||||
\```
|
||||
|
||||
\` code \`
|
||||
|
||||
```c++
|
||||
int main()
|
||||
{
|
||||
printf("hello world!");
|
||||
}
|
||||
```
|
||||
`code`
|
||||
|
||||
## Tabelle
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| links | mitte | rechts |
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| links | mitte | rechts |
|
||||
| ---------------------- | ------------- | ----------------- |
|
||||
## Fußnote
|
||||
```
|
||||
hallo[^hallo]
|
||||
```
|
||||
|
||||
Schau zum unteren Rand[^hallo]
|
||||
|
||||
[^hallo]: fussnote
|
||||
|
||||
## Emojis
|
||||
Details: [https://www.webpagefx.com/tools/emoji-cheat-sheet/](https://www.webpagefx.com/tools/emoji-cheat-sheet/)
|
||||
```
|
||||
:laughing:
|
||||
:blush:
|
||||
:smiley:
|
||||
:)
|
||||
...
|
||||
```
|
||||
:laughing::blush::smiley::)
|
||||
|
||||
## $\KaTeX$ Mathematik
|
||||
|
||||
Formeln lassen sich darstellen z.b. :$x_i + y_i = z_i$ und $\sum_{i=1}^n a_i=0$
|
||||
Formeln können auf einer eigenen Zeile gerendert werden
|
||||
$$\sum_{i=1}^n a_i=0$$
|
||||
Details: [katex](http://www.intmath.com/cg5/katex-mathjax-comparison.php)和[katex function](https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX)以及[latex](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference)
|
||||
|
||||
## Layout
|
||||
|
||||
::: hljs-left
|
||||
`::: hljs-left`
|
||||
`links`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-center
|
||||
`::: hljs-center`
|
||||
`mitte`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-right
|
||||
`::: hljs-right`
|
||||
`rechts`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
## Liste von Definitionen
|
||||
|
||||
Term 1
|
||||
|
||||
: Definition 1
|
||||
|
||||
Term 2 mit *inline markup*
|
||||
|
||||
: Definition 2
|
||||
|
||||
{ ein wenig code, teil von Definition 2 }
|
||||
|
||||
Dritter Absatz von Definition 2.
|
||||
|
||||
```
|
||||
Term 1
|
||||
|
||||
: Definition 1
|
||||
|
||||
Term 2 mit *inline markup*
|
||||
|
||||
: Definition 2
|
||||
|
||||
{ ein wenig code, teil von Definition 2 }
|
||||
|
||||
Dritter Absatz von Definition 2.
|
||||
|
||||
```
|
||||
|
||||
## Abkürzungen
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
Die HTML Spezifikation
|
||||
wird gepflegt vom W3C.
|
||||
```
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
Die HTML Spezifikation
|
||||
wird gepflegt vom W3C.
|
||||
```
|
||||
54
node_modules/mavon-editor/src/dev/assets/lang/de/words_de.json
generated
vendored
Normal file
54
node_modules/mavon-editor/src/dev/assets/lang/de/words_de.json
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"start_editor": "Bearbeitung beginnen...",
|
||||
"navigation_title": "Navigation",
|
||||
"tl_bold": "Fett",
|
||||
"tl_italic": "Kursiv",
|
||||
"tl_header": "Überschrift",
|
||||
"tl_header_one": "Überschrift 1",
|
||||
"tl_header_two": "Überschrift 2",
|
||||
"tl_header_three": "Überschrift 3",
|
||||
"tl_header_four": "Überschrift 4",
|
||||
"tl_header_five": "Überschrift 5",
|
||||
"tl_header_six": "Überschrift 6",
|
||||
"tl_underline": "Unterstrichen",
|
||||
"tl_strikethrough": "Durchgestrichen",
|
||||
"tl_mark": "Markiert",
|
||||
"tl_superscript": "Hochgestellt",
|
||||
"tl_subscript": "Tiefgestellt",
|
||||
"tl_quote": "Zitat",
|
||||
"tl_ol": "Ol",
|
||||
"tl_ul": "Ul",
|
||||
"tl_link": "Link",
|
||||
"tl_image": "Link mit Bild",
|
||||
"tl_code": "Code",
|
||||
"tl_table": "Tabelle",
|
||||
"tl_undo": "Rückgängig",
|
||||
"tl_redo": "Wiederherstellen",
|
||||
"tl_trash": "Mülleimer",
|
||||
"tl_save": "Speichern",
|
||||
"tl_navigation_on": "Navigation AN",
|
||||
"tl_navigation_off": "Navigation AUS",
|
||||
"tl_preview": "Vorschau",
|
||||
"tl_aligncenter": "Text zentrieren",
|
||||
"tl_alignleft": "Nach links ausrichten",
|
||||
"tl_alignright": "Nach rechts ausrichten",
|
||||
"tl_edit": "Bearbeiten",
|
||||
"tl_single_column": "Einspaltig",
|
||||
"tl_double_column": "Zweispaltig",
|
||||
"tl_fullscreen_on": "Vollbild AN",
|
||||
"tl_fullscreen_off": "Vollbild AUS",
|
||||
"tl_read": "Lesemodus",
|
||||
"tl_html_on": "HTML AN",
|
||||
"tl_html_off": "HTML AUS",
|
||||
"tl_help": "Markdown Handbuch",
|
||||
"tl_upload": "Bilder-Upload",
|
||||
"tl_upload_remove": "Entfernen",
|
||||
"tl_popup_link_title": "Link hinzufügen",
|
||||
"tl_popup_link_text": "Text des Links",
|
||||
"tl_popup_link_addr": "Linkziel",
|
||||
"tl_popup_img_link_title": "Bild hinzufügen",
|
||||
"tl_popup_img_link_text": "Text des Bildes",
|
||||
"tl_popup_img_link_addr": "Link auf Bild",
|
||||
"tl_popup_link_sure": "Ja",
|
||||
"tl_popup_link_cancel": "Abbruch"
|
||||
}
|
||||
204
node_modules/mavon-editor/src/dev/assets/lang/en/help_en.md
generated
vendored
Normal file
204
node_modules/mavon-editor/src/dev/assets/lang/en/help_en.md
generated
vendored
Normal file
@@ -0,0 +1,204 @@
|
||||
@[toc](Catalog)
|
||||
|
||||
Markdown Guide
|
||||
===
|
||||
> Detailed: [http://commonmark.org/help/](http://commonmark.org/help/)
|
||||
|
||||
## **Bold**
|
||||
```
|
||||
**bold**
|
||||
__bold__
|
||||
```
|
||||
## *Italic*
|
||||
```
|
||||
*italic*
|
||||
_italic_
|
||||
```
|
||||
## Header
|
||||
```
|
||||
# h1 #
|
||||
h1
|
||||
====
|
||||
## h2 ##
|
||||
h2
|
||||
----
|
||||
### h3 ###
|
||||
#### h4 ####
|
||||
##### h5 #####
|
||||
###### h6 ######
|
||||
```
|
||||
## Dividing line
|
||||
```
|
||||
***
|
||||
---
|
||||
```
|
||||
****
|
||||
## ^Super^script & ~Sub~script
|
||||
```
|
||||
super x^2^
|
||||
sub H~2~0
|
||||
```
|
||||
## ++Underline++ & ~~Strikethrough~~
|
||||
```
|
||||
++underline++
|
||||
~~strikethrough~~
|
||||
```
|
||||
## ==Mark==
|
||||
```
|
||||
==mark==
|
||||
```
|
||||
## Quote
|
||||
|
||||
```
|
||||
> quote 1
|
||||
>> quote 2
|
||||
>>> quote 3
|
||||
...
|
||||
```
|
||||
|
||||
## List
|
||||
```
|
||||
ol
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
|
||||
ul
|
||||
-
|
||||
-
|
||||
...
|
||||
```
|
||||
|
||||
## Todo List
|
||||
|
||||
- [x] task 1
|
||||
- [ ] task 2
|
||||
|
||||
```
|
||||
- [x] task 1
|
||||
- [ ] task 2
|
||||
```
|
||||
|
||||
## Link
|
||||
```
|
||||
Text Link
|
||||
[Text](www.baidu.com)
|
||||
|
||||
Image Link
|
||||

|
||||
```
|
||||
## Code
|
||||
\``` type
|
||||
|
||||
code block
|
||||
|
||||
\```
|
||||
|
||||
\` code \`
|
||||
|
||||
```c++
|
||||
int main()
|
||||
{
|
||||
printf("hello world!");
|
||||
}
|
||||
```
|
||||
`code`
|
||||
|
||||
## Table
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| left | center | right |
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| left | center | right |
|
||||
| ---------------------- | ------------- | ----------------- |
|
||||
## Footnote
|
||||
```
|
||||
hello[^hello]
|
||||
```
|
||||
|
||||
Look at the bottom[^hello]
|
||||
|
||||
[^hello]: footnote
|
||||
|
||||
## Emojis
|
||||
Detailed: [https://www.webpagefx.com/tools/emoji-cheat-sheet/](https://www.webpagefx.com/tools/emoji-cheat-sheet/)
|
||||
```
|
||||
:laughing:
|
||||
:blush:
|
||||
:smiley:
|
||||
:)
|
||||
...
|
||||
```
|
||||
:laughing::blush::smiley::)
|
||||
|
||||
## $\KaTeX$ Mathematics
|
||||
|
||||
We can render formulas for example:$x_i + y_i = z_i$ and $\sum_{i=1}^n a_i=0$
|
||||
We can also single-line rendering
|
||||
$$\sum_{i=1}^n a_i=0$$
|
||||
Detailed: [katex](http://www.intmath.com/cg5/katex-mathjax-comparison.php)和[katex function](https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX)以及[latex](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference)
|
||||
|
||||
## Layout
|
||||
|
||||
::: hljs-left
|
||||
`::: hljs-left`
|
||||
`left`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-center
|
||||
`::: hljs-center`
|
||||
`center`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-right
|
||||
`::: hljs-right`
|
||||
`right`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
## deflist
|
||||
|
||||
Term 1
|
||||
|
||||
: Definition 1
|
||||
|
||||
Term 2 with *inline markup*
|
||||
|
||||
: Definition 2
|
||||
|
||||
{ some code, part of Definition 2 }
|
||||
|
||||
Third paragraph of definition 2.
|
||||
|
||||
```
|
||||
Term 1
|
||||
|
||||
: Definition 1
|
||||
|
||||
Term 2 with *inline markup*
|
||||
|
||||
: Definition 2
|
||||
|
||||
{ some code, part of Definition 2 }
|
||||
|
||||
Third paragraph of definition 2.
|
||||
|
||||
```
|
||||
|
||||
## abbr
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
The HTML specification
|
||||
is maintained by the W3C.
|
||||
```
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
The HTML specification
|
||||
is maintained by the W3C.
|
||||
```
|
||||
54
node_modules/mavon-editor/src/dev/assets/lang/en/words_en.json
generated
vendored
Normal file
54
node_modules/mavon-editor/src/dev/assets/lang/en/words_en.json
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"start_editor": "Begin editing...",
|
||||
"navigation_title": "Navigation",
|
||||
"tl_bold": "Bold",
|
||||
"tl_italic": "Italic",
|
||||
"tl_header": "Header",
|
||||
"tl_header_one": "Header 1",
|
||||
"tl_header_two": "Header 2",
|
||||
"tl_header_three": "Header 3",
|
||||
"tl_header_four": "Header 4",
|
||||
"tl_header_five": "Header 5",
|
||||
"tl_header_six": "Header 6",
|
||||
"tl_underline": "Underline",
|
||||
"tl_strikethrough": "Strikethrough",
|
||||
"tl_mark": "Mark",
|
||||
"tl_superscript": "Superscript",
|
||||
"tl_subscript": "Subscript",
|
||||
"tl_quote": "Quote",
|
||||
"tl_ol": "Ol",
|
||||
"tl_ul": "Ul",
|
||||
"tl_link": "Link",
|
||||
"tl_image": "Image Link",
|
||||
"tl_code": "Code",
|
||||
"tl_table": "Table",
|
||||
"tl_undo": "Undo",
|
||||
"tl_redo": "Redo",
|
||||
"tl_trash": "Trash",
|
||||
"tl_save": "Save",
|
||||
"tl_navigation_on": "Navigation ON",
|
||||
"tl_navigation_off": "Navigation OFF",
|
||||
"tl_preview": "Preview",
|
||||
"tl_aligncenter": "Center text",
|
||||
"tl_alignleft": "Clamp text to the left",
|
||||
"tl_alignright": "Clamp text to the right",
|
||||
"tl_edit": "Edit",
|
||||
"tl_single_column": "Single Column",
|
||||
"tl_double_column": "Double Columns",
|
||||
"tl_fullscreen_on": "FullScreen ON",
|
||||
"tl_fullscreen_off": "FullScreen OFF",
|
||||
"tl_read": "Read Model",
|
||||
"tl_html_on": "HTML ON",
|
||||
"tl_html_off": "HTML OFF",
|
||||
"tl_help": "Markdown Guide",
|
||||
"tl_upload": "Upload Images",
|
||||
"tl_upload_remove": "Remove",
|
||||
"tl_popup_link_title": "Add Link",
|
||||
"tl_popup_link_text": "Link text",
|
||||
"tl_popup_link_addr": "Link address",
|
||||
"tl_popup_img_link_title": "Add Image",
|
||||
"tl_popup_img_link_text": "Image Text",
|
||||
"tl_popup_img_link_addr": "Image Link",
|
||||
"tl_popup_link_sure": "Sure",
|
||||
"tl_popup_link_cancel": "Cancel"
|
||||
}
|
||||
204
node_modules/mavon-editor/src/dev/assets/lang/fr/help_fr.md
generated
vendored
Normal file
204
node_modules/mavon-editor/src/dev/assets/lang/fr/help_fr.md
generated
vendored
Normal file
@@ -0,0 +1,204 @@
|
||||
@[toc](Catalogue)
|
||||
|
||||
Guide Markdown
|
||||
==============
|
||||
> Détail : [http://commonmark.org/help/](http://commonmark.org/help/)
|
||||
|
||||
## **Bold**
|
||||
```
|
||||
**bold**
|
||||
__bold__
|
||||
```
|
||||
## *Italic*
|
||||
```
|
||||
*italic*
|
||||
_italic_
|
||||
```
|
||||
## Header
|
||||
```
|
||||
# h1 #
|
||||
h1
|
||||
====
|
||||
## h2 ##
|
||||
h2
|
||||
----
|
||||
### h3 ###
|
||||
#### h4 ####
|
||||
##### h5 #####
|
||||
###### h6 ######
|
||||
```
|
||||
## Dividing line
|
||||
```
|
||||
***
|
||||
---
|
||||
```
|
||||
****
|
||||
## ^Super^script & ~Sub~script
|
||||
```
|
||||
super x^2^
|
||||
sub H~2~0
|
||||
```
|
||||
## ++Underline++ & ~~Strikethrough~~
|
||||
```
|
||||
++underline++
|
||||
~~strikethrough~~
|
||||
```
|
||||
## ==Mark==
|
||||
```
|
||||
==mark==
|
||||
```
|
||||
## Quote
|
||||
|
||||
```
|
||||
> quote 1
|
||||
>> quote 2
|
||||
>>> quote 3
|
||||
...
|
||||
```
|
||||
|
||||
## List
|
||||
```
|
||||
ol
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
|
||||
ul
|
||||
-
|
||||
-
|
||||
...
|
||||
```
|
||||
## Link
|
||||
|
||||
## Todo List
|
||||
|
||||
- [x] Équipe 1
|
||||
- [ ] Équipe 2
|
||||
|
||||
```
|
||||
- [x] Équipe 1
|
||||
- [ ] Équipe 2
|
||||
```
|
||||
|
||||
```
|
||||
Text Link
|
||||
[Text](www.baidu.com)
|
||||
|
||||
Image Link
|
||||

|
||||
```
|
||||
## Code
|
||||
\``` type
|
||||
|
||||
code block
|
||||
|
||||
\```
|
||||
|
||||
\` code \`
|
||||
|
||||
```c++
|
||||
int main()
|
||||
{
|
||||
printf("hello world!");
|
||||
}
|
||||
```
|
||||
`code`
|
||||
|
||||
## Table
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| left | center | right |
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| left | center | right |
|
||||
| ---------------------- | ------------- | ----------------- |
|
||||
## Footnote
|
||||
```
|
||||
hello[^hello]
|
||||
```
|
||||
|
||||
Look at the bottom[^hello]
|
||||
|
||||
[^hello]: footnote
|
||||
|
||||
## Emojis
|
||||
Detailed: [https://www.webpagefx.com/tools/emoji-cheat-sheet/](https://www.webpagefx.com/tools/emoji-cheat-sheet/)
|
||||
```
|
||||
:laughing:
|
||||
:blush:
|
||||
:smiley:
|
||||
:)
|
||||
...
|
||||
```
|
||||
:laughing::blush::smiley::)
|
||||
|
||||
## $\KaTeX$ Mathematics
|
||||
|
||||
We can render formulas for example:$x_i + y_i = z_i$ and $\sum_{i=1}^n a_i=0$
|
||||
We can also single-line rendering
|
||||
$$\sum_{i=1}^n a_i=0$$
|
||||
Detailed: [katex](http://www.intmath.com/cg5/katex-mathjax-comparison.php)和[katex function](https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX)以及[latex](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference)
|
||||
|
||||
## Layout
|
||||
|
||||
::: hljs-left
|
||||
`::: hljs-left`
|
||||
`left`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-center
|
||||
`::: hljs-center`
|
||||
`center`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-right
|
||||
`::: hljs-right`
|
||||
`right`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
## deflist
|
||||
|
||||
Term 1
|
||||
|
||||
: Definition 1
|
||||
|
||||
Term 2 with *inline markup*
|
||||
|
||||
: Definition 2
|
||||
|
||||
{ some code, part of Definition 2 }
|
||||
|
||||
Third paragraph of definition 2.
|
||||
|
||||
```
|
||||
Term 1
|
||||
|
||||
: Definition 1
|
||||
|
||||
Term 2 with *inline markup*
|
||||
|
||||
: Definition 2
|
||||
|
||||
{ some code, part of Definition 2 }
|
||||
|
||||
Third paragraph of definition 2.
|
||||
|
||||
```
|
||||
|
||||
## abbr
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
The HTML specification
|
||||
is maintained by the W3C.
|
||||
```
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
The HTML specification
|
||||
is maintained by the W3C.
|
||||
```
|
||||
55
node_modules/mavon-editor/src/dev/assets/lang/fr/words_fr.json
generated
vendored
Normal file
55
node_modules/mavon-editor/src/dev/assets/lang/fr/words_fr.json
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"start_editor": "Début d'édition...",
|
||||
"navigation_title": "Navigation",
|
||||
"tl_bold": "Gras",
|
||||
"tl_italic": "Italique",
|
||||
"tl_header": "Entête",
|
||||
"tl_header_one": "Entête 1",
|
||||
"tl_header_two": "Entête 2",
|
||||
"tl_header_three": "Entête 3",
|
||||
"tl_header_four": "Entête 4",
|
||||
"tl_header_five": "Entête 5",
|
||||
"tl_header_six": "Entête 6",
|
||||
"tl_underline": "Souligné",
|
||||
"tl_strikethrough": "Barré",
|
||||
"tl_mark": "Mark",
|
||||
"tl_superscript": "Exposant",
|
||||
"tl_subscript": "Sous-exposant",
|
||||
"tl_quote": "Quote",
|
||||
"tl_ol": "Liste ",
|
||||
"tl_ul": "Puce",
|
||||
"tl_link": "Lien",
|
||||
"tl_image": "Image Lien",
|
||||
"tl_code": "Code",
|
||||
"tl_table": "Table",
|
||||
"tl_undo": "Annuler",
|
||||
"tl_redo": "Refaire",
|
||||
"tl_trash": "Supprimer",
|
||||
"tl_save": "Sauver",
|
||||
"tl_navigation_on": "Activer la navigation",
|
||||
"tl_navigation_off": "Désactiver le navigation",
|
||||
"tl_preview": "Previsualisé",
|
||||
"tl_aligncenter": "Center le texte",
|
||||
"tl_alignleft": "Férer le texte à gauche",
|
||||
"tl_alignright": "Férer le texte à droite",
|
||||
"tl_preview": "Previsualisé",
|
||||
"tl_edit": "Editer",
|
||||
"tl_single_column": "Seule Colonne",
|
||||
"tl_double_column": "Colonnes Doubles",
|
||||
"tl_fullscreen_on": "Activer le mode plein écran",
|
||||
"tl_fullscreen_off": "Désactiver le mode plein écran",
|
||||
"tl_read": "Lire le modèle",
|
||||
"tl_html_on": "Activer le mode HTML",
|
||||
"tl_html_off": "Désactiver le mode HTML",
|
||||
"tl_help": "Guide Markdown",
|
||||
"tl_upload": "Télécharger les images",
|
||||
"tl_upload_remove": "Supprimer",
|
||||
"tl_popup_link_title": "Ajouter un lien",
|
||||
"tl_popup_link_text": "Description",
|
||||
"tl_popup_link_addr": "Link",
|
||||
"tl_popup_img_link_title": "Ajouter une image",
|
||||
"tl_popup_img_link_text": "Description",
|
||||
"tl_popup_img_link_addr": "Link",
|
||||
"tl_popup_link_sure": "sûr",
|
||||
"tl_popup_link_cancel": "Annuler"
|
||||
}
|
||||
204
node_modules/mavon-editor/src/dev/assets/lang/pt-BR/help_pt-BR.md
generated
vendored
Normal file
204
node_modules/mavon-editor/src/dev/assets/lang/pt-BR/help_pt-BR.md
generated
vendored
Normal file
@@ -0,0 +1,204 @@
|
||||
@[toc](Directory)
|
||||
|
||||
Guia Markdown
|
||||
===
|
||||
> Detalhes: [http://commonmark.org/help/](http://commonmark.org/help/)
|
||||
|
||||
## **Negrito**
|
||||
```
|
||||
**negrito**
|
||||
__negrito__
|
||||
```
|
||||
## *Itálico*
|
||||
```
|
||||
*itálico*
|
||||
_itálico_
|
||||
```
|
||||
## Cabeçalho
|
||||
```
|
||||
# h1 #
|
||||
h1
|
||||
====
|
||||
## h2 ##
|
||||
h2
|
||||
----
|
||||
### h3 ###
|
||||
#### h4 ####
|
||||
##### h5 #####
|
||||
###### h6 ######
|
||||
```
|
||||
## Linha Divisora
|
||||
```
|
||||
***
|
||||
---
|
||||
```
|
||||
****
|
||||
## ^Sobre^scrito & ~Sub~scrito
|
||||
```
|
||||
sobre x^2^
|
||||
sub H~2~0
|
||||
```
|
||||
## ++Sublinhar++ & ~~Tachar~~
|
||||
```
|
||||
++sublinhar++
|
||||
~~tachar~~
|
||||
```
|
||||
## ==Marcador==
|
||||
```
|
||||
==marcador==
|
||||
```
|
||||
## Citação
|
||||
|
||||
```
|
||||
> citação 1
|
||||
>> citação 2
|
||||
>>> citação 3
|
||||
...
|
||||
```
|
||||
|
||||
## Listas
|
||||
```
|
||||
lista Numerada
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
|
||||
lista com marcadores
|
||||
-
|
||||
-
|
||||
...
|
||||
```
|
||||
|
||||
## Todo Listas
|
||||
|
||||
- [x] Tarefa 1
|
||||
- [ ] Tarefa 2
|
||||
|
||||
```
|
||||
- [x] Tarefa 1
|
||||
- [ ] Tarefa 2
|
||||
```
|
||||
|
||||
## Link
|
||||
```
|
||||
Link Texto
|
||||
[Text](www.baidu.com)
|
||||
|
||||
Link Imagem
|
||||

|
||||
```
|
||||
## Código
|
||||
\``` tipo
|
||||
|
||||
bloco de código
|
||||
|
||||
\```
|
||||
|
||||
\` código \`
|
||||
|
||||
```c++
|
||||
int main()
|
||||
{
|
||||
printf("hello world!");
|
||||
}
|
||||
```
|
||||
`code`
|
||||
|
||||
## Tabela
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| esquerda | centro | direita |
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| esquerda | centro | direita |
|
||||
| ---------------------- | ------------- | ----------------- |
|
||||
## Rodapé
|
||||
```
|
||||
olá[^olá]
|
||||
```
|
||||
|
||||
Olhe para baixo[^olá]
|
||||
|
||||
[^olá]: rodapé
|
||||
|
||||
## Emojis
|
||||
Detalhes: [https://www.webpagefx.com/tools/emoji-cheat-sheet/](https://www.webpagefx.com/tools/emoji-cheat-sheet/)
|
||||
```
|
||||
:laughing:
|
||||
:blush:
|
||||
:smiley:
|
||||
:)
|
||||
...
|
||||
```
|
||||
:laughing::blush::smiley::)
|
||||
|
||||
## $\KaTeX$ Mathematics
|
||||
|
||||
Podemos mostrar fórmulas por exemplo:$x_i + y_i = z_i$ and $\sum_{i=1}^n a_i=0$
|
||||
Podemos também mostrar em uma única linha:
|
||||
$$\sum_{i=1}^n a_i=0$$
|
||||
Detalhes: [katex](http://www.intmath.com/cg5/katex-mathjax-comparison.php)和[katex function](https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX)以及[latex](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference)
|
||||
|
||||
## Layout
|
||||
|
||||
::: hljs-left
|
||||
`::: hljs-left`
|
||||
`esquerda`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-center
|
||||
`::: hljs-center`
|
||||
`centro`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-right
|
||||
`::: hljs-right`
|
||||
`direita`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
## Definições
|
||||
|
||||
Termo 1
|
||||
|
||||
: Definição 1
|
||||
|
||||
Termo 2 com *markup inline*
|
||||
|
||||
: Definição 2
|
||||
|
||||
{ um pouco de código, parte da Definição 2 }
|
||||
|
||||
Terceiro parágrafo da definição 2.
|
||||
|
||||
```
|
||||
Termo 1
|
||||
|
||||
: Definição 1
|
||||
|
||||
Termo 2 com *markup inline*
|
||||
|
||||
: Definição 2
|
||||
|
||||
{ um pouco de código, parte da Definição 2 }
|
||||
|
||||
Terceiro parágrafo da definição 2.
|
||||
|
||||
```
|
||||
|
||||
## Abreviações
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
A especificação HTML
|
||||
é mantida pela W3C.
|
||||
```
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
The HTML specification
|
||||
é mantida pela W3C.
|
||||
```
|
||||
54
node_modules/mavon-editor/src/dev/assets/lang/pt-BR/words_pt-BR.json
generated
vendored
Normal file
54
node_modules/mavon-editor/src/dev/assets/lang/pt-BR/words_pt-BR.json
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"start_editor": "Começar edição...",
|
||||
"navigation_title": "Navegação",
|
||||
"tl_bold": "Negrito",
|
||||
"tl_italic": "Itálico",
|
||||
"tl_header": "Cabeçalho",
|
||||
"tl_header_one": "Cabeçalho 1",
|
||||
"tl_header_two": "Cabeçalho 2",
|
||||
"tl_header_three": "Cabeçalho 3",
|
||||
"tl_header_four": "Cabeçalho 4",
|
||||
"tl_header_five": "Cabeçalho 5",
|
||||
"tl_header_six": "Cabeçalho 6",
|
||||
"tl_underline": "Sublinhar",
|
||||
"tl_strikethrough": "Tachar",
|
||||
"tl_mark": "Marcação",
|
||||
"tl_superscript": "Sobrescrito",
|
||||
"tl_subscript": "Subscrito",
|
||||
"tl_quote": "Citação",
|
||||
"tl_ol": "Lista Numerada",
|
||||
"tl_ul": "Lista com marcadores",
|
||||
"tl_link": "Link",
|
||||
"tl_image": "Link de imagem",
|
||||
"tl_code": "Código",
|
||||
"tl_table": "Tabela",
|
||||
"tl_undo": "Desfazer",
|
||||
"tl_redo": "Refazer",
|
||||
"tl_trash": "Lixo",
|
||||
"tl_save": "Salvar",
|
||||
"tl_navigation_on": "Mostrar Navegação",
|
||||
"tl_navigation_off": "Esconder Navegação",
|
||||
"tl_preview": "Preview",
|
||||
"tl_aligncenter": "Alinhar no centro",
|
||||
"tl_alignleft": "Alinhar à esquerda",
|
||||
"tl_alignright": "Alinhar à direita",
|
||||
"tl_edit": "Editar",
|
||||
"tl_single_column": "Coluna Única",
|
||||
"tl_double_column": "Duas Colunas",
|
||||
"tl_fullscreen_on": "Ligar Tela Cheia",
|
||||
"tl_fullscreen_off": "Desligar Tela Cheia",
|
||||
"tl_read": "Modo de Leitura",
|
||||
"tl_html_on": "Ligar HTML",
|
||||
"tl_html_off": "Desligar HTML",
|
||||
"tl_help": "Guia Markdown",
|
||||
"tl_upload": "Upload de Imagens",
|
||||
"tl_upload_remove": "Remover",
|
||||
"tl_popup_link_title": "Adicionar Link",
|
||||
"tl_popup_link_text": "Descrição",
|
||||
"tl_popup_link_addr": "Link",
|
||||
"tl_popup_img_link_title": "Adicionar fotos",
|
||||
"tl_popup_img_link_text": "Descrição",
|
||||
"tl_popup_img_link_addr": "Link",
|
||||
"tl_popup_link_sure": "Confirmar",
|
||||
"tl_popup_link_cancel": "Cancelar"
|
||||
}
|
||||
202
node_modules/mavon-editor/src/dev/assets/lang/ru/help_ru.md
generated
vendored
Normal file
202
node_modules/mavon-editor/src/dev/assets/lang/ru/help_ru.md
generated
vendored
Normal file
@@ -0,0 +1,202 @@
|
||||
@[toc](Catalog)
|
||||
|
||||
Markdown помощь
|
||||
===
|
||||
> Подробнее: [http://commonmark.org/help/](http://commonmark.org/help/)
|
||||
|
||||
## **Полужирный**
|
||||
```
|
||||
**Полужирный**
|
||||
__Полужирный__
|
||||
```
|
||||
## *Курсив*
|
||||
```
|
||||
*Курсив*
|
||||
_Курсив_
|
||||
```
|
||||
## Заголовок
|
||||
```
|
||||
# h1 #
|
||||
h1
|
||||
====
|
||||
## h2 ##
|
||||
h2
|
||||
----
|
||||
### h3 ###
|
||||
#### h4 ####
|
||||
##### h5 #####
|
||||
###### h6 ######
|
||||
```
|
||||
## Разделительная линия
|
||||
```
|
||||
***
|
||||
---
|
||||
```
|
||||
****
|
||||
## ^Верхний^индекс & ~Нижний~индекс
|
||||
```
|
||||
верхний x^2^
|
||||
нижний H~2~0
|
||||
```
|
||||
## ++Подчеркнутый++ & ~~Зачеркнутый~~
|
||||
```
|
||||
++Подчеркнутый++
|
||||
~~Зачеркнутый~~
|
||||
```
|
||||
## ==Отметка==
|
||||
```
|
||||
==Отметка==
|
||||
```
|
||||
## Цитата
|
||||
|
||||
```
|
||||
> Цитата
|
||||
>> Цитата 2
|
||||
>>> Цитата 3
|
||||
...
|
||||
```
|
||||
|
||||
## Список
|
||||
```
|
||||
ol
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
|
||||
ul
|
||||
-
|
||||
-
|
||||
...
|
||||
```
|
||||
|
||||
## Список задач
|
||||
|
||||
- [x] Задача 1
|
||||
- [ ] Задача 2
|
||||
|
||||
```
|
||||
- [x] Задача 1
|
||||
- [ ] Задача 2
|
||||
```
|
||||
|
||||
## Ссылка
|
||||
```
|
||||
Ссылка
|
||||
[Текст](www.baidu.com)
|
||||
|
||||
Ссылка изображения
|
||||

|
||||
```
|
||||
## Код
|
||||
\``` type
|
||||
|
||||
code block
|
||||
|
||||
\```
|
||||
|
||||
\` code \`
|
||||
|
||||
```c++
|
||||
int main()
|
||||
{
|
||||
printf("hello world!");}
|
||||
```
|
||||
`code`
|
||||
|
||||
## Таблица
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| left | center | right |
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| left | center | right |
|
||||
| ---------------------- | ------------- | ----------------- |
|
||||
## Сноска
|
||||
```
|
||||
Привет[^Привет]
|
||||
```
|
||||
|
||||
Тут что-то непонятное[^Привет]
|
||||
|
||||
[^Привет]: А тут объяснение
|
||||
|
||||
## Emojis
|
||||
Подробнее: [https://www.webpagefx.com/tools/emoji-cheat-sheet/](https://www.webpagefx.com/tools/emoji-cheat-sheet/)
|
||||
```
|
||||
:laughing:
|
||||
:blush:
|
||||
:smiley:
|
||||
:)
|
||||
...
|
||||
```
|
||||
:laughing::blush::smiley::)
|
||||
|
||||
## $\KaTeX$ Mathematics
|
||||
|
||||
Можно выводить такие формулы:$x_i + y_i = z_i$ and $\sum_{i=1}^n a_i=0$
|
||||
А также в одну строку:
|
||||
$$\sum_{i=1}^n a_i=0$$
|
||||
Подробнее:
|
||||
- [katex](http://www.intmath.com/cg5/katex-mathjax-comparison.php)
|
||||
- [katex function](https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX)
|
||||
- [latex](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference)
|
||||
|
||||
## Разметка
|
||||
|
||||
::: hljs-left
|
||||
`::: hljs-left`
|
||||
`left`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-center
|
||||
`::: hljs-center`
|
||||
`center`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-right
|
||||
`::: hljs-right`
|
||||
`right`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
## Список определений
|
||||
|
||||
Термин 1
|
||||
|
||||
: Определение 1
|
||||
|
||||
Термин 2 с использованием *разметки*
|
||||
|
||||
: Определение 2
|
||||
|
||||
{ Какой-нибудь код, часть определения 2 }
|
||||
Третий параграф определения 2.
|
||||
```
|
||||
Термин 1
|
||||
|
||||
: Определение 1
|
||||
|
||||
Термин 2 с использованием *разметки*
|
||||
|
||||
: Определение 2
|
||||
|
||||
{ Какой-нибудь код, часть определения 2 }
|
||||
Третий параграф определения 2.
|
||||
```
|
||||
|
||||
## Сокращения
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
The HTML specification
|
||||
is maintained by the W3C.
|
||||
```
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
The HTML specification
|
||||
is maintained by the W3C.
|
||||
```
|
||||
54
node_modules/mavon-editor/src/dev/assets/lang/ru/words_ru.json
generated
vendored
Normal file
54
node_modules/mavon-editor/src/dev/assets/lang/ru/words_ru.json
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"start_editor": "Начните редактирование...",
|
||||
"navigation_title": "Навигация",
|
||||
"tl_bold": "Полужирный",
|
||||
"tl_italic": "Курсив",
|
||||
"tl_header": "Заголовки",
|
||||
"tl_header_one": "Заголовок 1",
|
||||
"tl_header_two": "Заголовок 2",
|
||||
"tl_header_three": "Заголовок 3",
|
||||
"tl_header_four": "Заголовок 4",
|
||||
"tl_header_five": "Заголовок 5",
|
||||
"tl_header_six": "Заголовок 6",
|
||||
"tl_underline": "Подчеркнутый",
|
||||
"tl_strikethrough": "Зачеркнутый",
|
||||
"tl_mark": "Отметка",
|
||||
"tl_superscript": "Верхний индекс",
|
||||
"tl_subscript": "Нижний индекс",
|
||||
"tl_quote": "Цитата",
|
||||
"tl_ol": "Нумерованный список",
|
||||
"tl_ul": "Список",
|
||||
"tl_link": "Ссылка",
|
||||
"tl_image": "Ссылка изображения",
|
||||
"tl_code": "Код",
|
||||
"tl_table": "Таблица",
|
||||
"tl_undo": "Отменить",
|
||||
"tl_redo": "Вернуть",
|
||||
"tl_trash": "Удалить",
|
||||
"tl_save": "Сохранить",
|
||||
"tl_navigation_on": "Показать навигацию",
|
||||
"tl_navigation_off": "Скрыть навигацию",
|
||||
"tl_preview": "Предпросмотр",
|
||||
"tl_aligncenter": "Выровнять по центру",
|
||||
"tl_alignleft": "Выровнять по левому краю",
|
||||
"tl_alignright": "Выровнять по правому краю",
|
||||
"tl_edit": "Редактор",
|
||||
"tl_single_column": "Одно поле",
|
||||
"tl_double_column": "Два поля",
|
||||
"tl_fullscreen_on": "Полноэкранный режим",
|
||||
"tl_fullscreen_off": "Выключить полноэкранный режим",
|
||||
"tl_read": "Режим чтения",
|
||||
"tl_html_on": "Показать HTML",
|
||||
"tl_html_off": "Убрать HTML",
|
||||
"tl_help": "Markdown помощь",
|
||||
"tl_upload": "Загрузить изображение",
|
||||
"tl_upload_remove": "Удалить",
|
||||
"tl_popup_link_title": "Добавить ссылку",
|
||||
"tl_popup_link_text": "Текст ссылки",
|
||||
"tl_popup_link_addr": "Адрес ссылки",
|
||||
"tl_popup_img_link_title": "Локальное изображение",
|
||||
"tl_popup_img_link_text": "Текст изображения",
|
||||
"tl_popup_img_link_addr": "Ссылка изображения",
|
||||
"tl_popup_link_sure": "Добавить",
|
||||
"tl_popup_link_cancel": "Отменить"
|
||||
}
|
||||
198
node_modules/mavon-editor/src/dev/assets/lang/zh-CN/help_zh-CN.md
generated
vendored
Normal file
198
node_modules/mavon-editor/src/dev/assets/lang/zh-CN/help_zh-CN.md
generated
vendored
Normal file
@@ -0,0 +1,198 @@
|
||||
@[toc](目录)
|
||||
|
||||
Markdown 语法简介
|
||||
=============
|
||||
> [语法详解](http://commonmark.org/help/)
|
||||
|
||||
## **粗体**
|
||||
```
|
||||
**粗体**
|
||||
__粗体__
|
||||
```
|
||||
## *斜体*
|
||||
```
|
||||
*斜体*
|
||||
_斜体_
|
||||
```
|
||||
## 标题
|
||||
```
|
||||
# 一级标题 #
|
||||
一级标题
|
||||
====
|
||||
## 二级标题 ##
|
||||
二级标题
|
||||
----
|
||||
### 三级标题 ###
|
||||
#### 四级标题 ####
|
||||
##### 五级标题 #####
|
||||
###### 六级标题 ######
|
||||
```
|
||||
## 分割线
|
||||
```
|
||||
***
|
||||
---
|
||||
```
|
||||
****
|
||||
## ^上^角~下~标
|
||||
```
|
||||
上角标 x^2^
|
||||
下角标 H~2~0
|
||||
```
|
||||
## ++下划线++ ~~中划线~~
|
||||
```
|
||||
++下划线++
|
||||
~~中划线~~
|
||||
```
|
||||
## ==标记==
|
||||
```
|
||||
==标记==
|
||||
```
|
||||
## 段落引用
|
||||
```
|
||||
> 一级
|
||||
>> 二级
|
||||
>>> 三级
|
||||
...
|
||||
```
|
||||
|
||||
## 列表
|
||||
```
|
||||
有序列表
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
无序列表
|
||||
-
|
||||
-
|
||||
...
|
||||
```
|
||||
|
||||
## 任务列表
|
||||
|
||||
- [x] 已完成任务
|
||||
- [ ] 未完成任务
|
||||
|
||||
```
|
||||
- [x] 已完成任务
|
||||
- [ ] 未完成任务
|
||||
```
|
||||
|
||||
## 链接
|
||||
```
|
||||
[链接](www.baidu.com)
|
||||

|
||||
```
|
||||
## 代码段落
|
||||
\``` type
|
||||
|
||||
代码段落
|
||||
|
||||
\```
|
||||
|
||||
\` 代码块 \`
|
||||
|
||||
```c++
|
||||
int main()
|
||||
{
|
||||
printf("hello world!");
|
||||
}
|
||||
```
|
||||
`code`
|
||||
## 表格(table)
|
||||
```
|
||||
| 标题1 | 标题2 | 标题3 |
|
||||
| :-- | :--: | ----: |
|
||||
| 左对齐 | 居中 | 右对齐 |
|
||||
| ---------------------- | ------------- | ----------------- |
|
||||
```
|
||||
| 标题1 | 标题2 | 标题3 |
|
||||
| :-- | :--: | ----: |
|
||||
| 左对齐 | 居中 | 右对齐 |
|
||||
| ---------------------- | ------------- | ----------------- |
|
||||
## 脚注(footnote)
|
||||
```
|
||||
hello[^hello]
|
||||
```
|
||||
|
||||
见底部脚注[^hello]
|
||||
|
||||
[^hello]: 一个注脚
|
||||
|
||||
## 表情(emoji)
|
||||
[参考网站: https://www.webpagefx.com/tools/emoji-cheat-sheet/](https://www.webpagefx.com/tools/emoji-cheat-sheet/)
|
||||
```
|
||||
:laughing:
|
||||
:blush:
|
||||
:smiley:
|
||||
:)
|
||||
...
|
||||
```
|
||||
:laughing::blush::smiley::)
|
||||
|
||||
## $\KaTeX$公式
|
||||
|
||||
我们可以渲染公式例如:$x_i + y_i = z_i$和$\sum_{i=1}^n a_i=0$
|
||||
我们也可以单行渲染
|
||||
$$\sum_{i=1}^n a_i=0$$
|
||||
具体可参照[katex文档](http://www.intmath.com/cg5/katex-mathjax-comparison.php)和[katex支持的函数](https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX)以及[latex文档](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference)
|
||||
|
||||
## 布局
|
||||
|
||||
::: hljs-left
|
||||
`::: hljs-left`
|
||||
`居左`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-center
|
||||
`::: hljs-center`
|
||||
`居中`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-right
|
||||
`::: hljs-right`
|
||||
`居右`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
## 定义
|
||||
|
||||
术语一
|
||||
|
||||
: 定义一
|
||||
|
||||
包含有*行内标记*的术语二
|
||||
|
||||
: 定义二
|
||||
|
||||
{一些定义二的文字或代码}
|
||||
|
||||
定义二的第三段
|
||||
|
||||
```
|
||||
术语一
|
||||
|
||||
: 定义一
|
||||
|
||||
包含有*行内标记*的术语二
|
||||
|
||||
: 定义二
|
||||
|
||||
{一些定义二的文字或代码}
|
||||
|
||||
定义二的第三段
|
||||
|
||||
```
|
||||
|
||||
## abbr
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
HTML 规范由 W3C 维护
|
||||
```
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
HTML 规范由 W3C 维护
|
||||
```
|
||||
|
||||
54
node_modules/mavon-editor/src/dev/assets/lang/zh-CN/words_zh-CN.json
generated
vendored
Normal file
54
node_modules/mavon-editor/src/dev/assets/lang/zh-CN/words_zh-CN.json
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"start_editor": "开始编辑...",
|
||||
"navigation_title": "导航目录",
|
||||
"tl_bold": "粗体",
|
||||
"tl_italic": "斜体",
|
||||
"tl_header": "标题",
|
||||
"tl_header_one": "一级标题",
|
||||
"tl_header_two": "二级标题",
|
||||
"tl_header_three": "三级标题",
|
||||
"tl_header_four": "四级标题",
|
||||
"tl_header_five": "五级标题",
|
||||
"tl_header_six": "六级标题",
|
||||
"tl_underline": "下划线",
|
||||
"tl_strikethrough": "中划线",
|
||||
"tl_mark": "标记",
|
||||
"tl_superscript": "上角标",
|
||||
"tl_subscript": "下角标",
|
||||
"tl_quote": "段落引用",
|
||||
"tl_ol": "有序列表",
|
||||
"tl_ul": "无序列表",
|
||||
"tl_link": "链接",
|
||||
"tl_image": "添加图片链接",
|
||||
"tl_code": "代码块",
|
||||
"tl_table": "表格",
|
||||
"tl_undo": "上一步",
|
||||
"tl_redo": "下一步",
|
||||
"tl_trash": "清空",
|
||||
"tl_save": "保存",
|
||||
"tl_navigation_on": "开启标题导航",
|
||||
"tl_navigation_off": "关闭标题导航",
|
||||
"tl_preview": "预览",
|
||||
"tl_aligncenter": "居中",
|
||||
"tl_alignleft": "居左",
|
||||
"tl_alignright": "居右",
|
||||
"tl_edit": "编辑",
|
||||
"tl_single_column": "单栏",
|
||||
"tl_double_column": "双栏",
|
||||
"tl_fullscreen_on": "全屏编辑",
|
||||
"tl_fullscreen_off": "退出全屏",
|
||||
"tl_read": "沉浸式阅读",
|
||||
"tl_html_on": "查看html文本",
|
||||
"tl_html_off": "返回markdown文本",
|
||||
"tl_help": "markdown语法帮助",
|
||||
"tl_upload": "上传图片",
|
||||
"tl_upload_remove": "删除",
|
||||
"tl_popup_link_title": "添加链接",
|
||||
"tl_popup_link_text": "链接描述",
|
||||
"tl_popup_link_addr": "链接地址",
|
||||
"tl_popup_img_link_title": "添加图片",
|
||||
"tl_popup_img_link_text": "图片描述",
|
||||
"tl_popup_img_link_addr": "图片链接",
|
||||
"tl_popup_link_sure": "确定",
|
||||
"tl_popup_link_cancel": "取消"
|
||||
}
|
||||
198
node_modules/mavon-editor/src/dev/assets/lang/zh-TW/help_zh-TW.md
generated
vendored
Normal file
198
node_modules/mavon-editor/src/dev/assets/lang/zh-TW/help_zh-TW.md
generated
vendored
Normal file
@@ -0,0 +1,198 @@
|
||||
@[toc](目錄)
|
||||
|
||||
Markdown 語法簡介
|
||||
=============
|
||||
> [語法詳解](http://commonmark.org/help/)
|
||||
|
||||
## **粗體**
|
||||
```
|
||||
**粗體**
|
||||
__粗體__
|
||||
```
|
||||
## *斜體*
|
||||
```
|
||||
*斜體*
|
||||
_斜體_
|
||||
```
|
||||
## 標題
|
||||
```
|
||||
# 一級標題 #
|
||||
一級標題
|
||||
====
|
||||
## 二級標題 ##
|
||||
二級標題
|
||||
----
|
||||
### 三級標題 ###
|
||||
#### 四級標題 ####
|
||||
##### 五級標題 #####
|
||||
###### 六級標題 ######
|
||||
```
|
||||
## 分割線
|
||||
```
|
||||
***
|
||||
---
|
||||
```
|
||||
****
|
||||
## ^上^角~下~標
|
||||
```
|
||||
上角標 x^2^
|
||||
下角標 H~2~0
|
||||
```
|
||||
## ++下劃線++ ~~中劃線~~
|
||||
```
|
||||
++下劃線++
|
||||
~~中劃線~~
|
||||
```
|
||||
## ==標記==
|
||||
```
|
||||
==標記==
|
||||
```
|
||||
## 段落引用
|
||||
```
|
||||
> 一級
|
||||
>> 二級
|
||||
>>> 三級
|
||||
...
|
||||
```
|
||||
|
||||
## 列表
|
||||
```
|
||||
有序列表
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
無序列表
|
||||
-
|
||||
-
|
||||
...
|
||||
```
|
||||
|
||||
## 任務列表
|
||||
|
||||
- [x] 已完成任務
|
||||
- [ ] 未完成任務
|
||||
|
||||
```
|
||||
- [x] 已完成任務
|
||||
- [ ] 未完成任務
|
||||
```
|
||||
|
||||
## 鏈接
|
||||
```
|
||||
[鏈接](www.baidu.com)
|
||||

|
||||
```
|
||||
## 代碼段落
|
||||
\``` type
|
||||
|
||||
代碼段落
|
||||
|
||||
\```
|
||||
|
||||
\` 代碼塊 \`
|
||||
|
||||
```c++
|
||||
int main()
|
||||
{
|
||||
printf("hello world!");
|
||||
}
|
||||
```
|
||||
`code`
|
||||
## 表格(table)
|
||||
```
|
||||
| 標題1 | 標題2 | 標題3 |
|
||||
| :-- | :--: | ----: |
|
||||
| 左對齊 | 居中 | 右對齊 |
|
||||
| ---------------------- | ------------- | ----------------- |
|
||||
```
|
||||
| 標題1 | 標題2 | 標題3 |
|
||||
| :-- | :--: | ----: |
|
||||
| 左對齊 | 居中 | 右對齊 |
|
||||
| ---------------------- | ------------- | ----------------- |
|
||||
## 腳註(footnote)
|
||||
```
|
||||
hello[^hello]
|
||||
```
|
||||
|
||||
見底部腳註[^hello]
|
||||
|
||||
[^hello]: 一個註腳
|
||||
|
||||
## 表情(emoji)
|
||||
[參考網站: https://www.webpagefx.com/tools/emoji-cheat-sheet/](https://www.webpagefx.com/tools/emoji-cheat-sheet/)
|
||||
```
|
||||
:laughing:
|
||||
:blush:
|
||||
:smiley:
|
||||
:)
|
||||
...
|
||||
```
|
||||
:laughing::blush::smiley::)
|
||||
|
||||
## $\KaTeX$公式
|
||||
|
||||
我們可以渲染公式例如:$x_i + y_i = z_i$和$\sum_{i=1}^n a_i=0$
|
||||
我們也可以單行渲染
|
||||
$$\sum_{i=1}^n a_i=0$$
|
||||
具體可參照[katex文檔](http://www.intmath.com/cg5/katex-mathjax-comparison.php)和[katex支持的函數](https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX)以及[latex文檔](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference)
|
||||
|
||||
## 布局
|
||||
|
||||
::: hljs-left
|
||||
`::: hljs-left`
|
||||
`居左`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-center
|
||||
`::: hljs-center`
|
||||
`居中`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-right
|
||||
`::: hljs-right`
|
||||
`居右`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
## 定義
|
||||
|
||||
術語一
|
||||
|
||||
: 定義一
|
||||
|
||||
包含有*行內標記*的術語二
|
||||
|
||||
: 定義二
|
||||
|
||||
{一些定義二的文字或代碼}
|
||||
|
||||
定義二的第三段
|
||||
|
||||
```
|
||||
術語一
|
||||
|
||||
: 定義一
|
||||
|
||||
包含有*行內標記*的術語二
|
||||
|
||||
: 定義二
|
||||
|
||||
{一些定義二的文字或代碼}
|
||||
|
||||
定義二的第三段
|
||||
|
||||
```
|
||||
|
||||
## abbr
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
HTML 規範由 W3C 維護
|
||||
```
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
HTML 規範由 W3C 維護
|
||||
```
|
||||
|
||||
54
node_modules/mavon-editor/src/dev/assets/lang/zh-TW/words_zh-TW.json
generated
vendored
Normal file
54
node_modules/mavon-editor/src/dev/assets/lang/zh-TW/words_zh-TW.json
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"start_editor": "開始編輯...",
|
||||
"navigation_title": "導航目錄",
|
||||
"tl_bold": "粗體",
|
||||
"tl_italic": "斜體",
|
||||
"tl_header": "標題",
|
||||
"tl_header_one": "一級標題",
|
||||
"tl_header_two": "二級標題",
|
||||
"tl_header_three": "三級標題",
|
||||
"tl_header_four": "四級標題",
|
||||
"tl_header_five": "五級標題",
|
||||
"tl_header_six": "六級標題",
|
||||
"tl_underline": "下劃線",
|
||||
"tl_strikethrough": "中劃線",
|
||||
"tl_mark": "標記",
|
||||
"tl_superscript": "上角標",
|
||||
"tl_subscript": "下角標",
|
||||
"tl_quote": "段落引用",
|
||||
"tl_ol": "有序列表",
|
||||
"tl_ul": "無序列表",
|
||||
"tl_link": "鏈接",
|
||||
"tl_image": "添加圖片鏈接",
|
||||
"tl_code": "代碼塊",
|
||||
"tl_table": "表格",
|
||||
"tl_undo": "上一步",
|
||||
"tl_redo": "下一步",
|
||||
"tl_trash": "清空",
|
||||
"tl_save": "保存",
|
||||
"tl_navigation_on": "開啟標題導航",
|
||||
"tl_navigation_off": "關閉標題導航",
|
||||
"tl_preview": "預覽",
|
||||
"tl_aligncenter": "居中",
|
||||
"tl_alignleft": "居左",
|
||||
"tl_alignright": "居右",
|
||||
"tl_edit": "編輯",
|
||||
"tl_single_column": "單欄",
|
||||
"tl_double_column": "雙欄",
|
||||
"tl_fullscreen_on": "全屏編輯",
|
||||
"tl_fullscreen_off": "退出全屏",
|
||||
"tl_read": "沈浸式閱讀",
|
||||
"tl_html_on": "查看html文本",
|
||||
"tl_html_off": "返回markdown文本",
|
||||
"tl_help": "markdown語法幫助",
|
||||
"tl_upload": "上傳圖片",
|
||||
"tl_upload_remove": "刪除",
|
||||
"tl_popup_link_title": "添加鏈接",
|
||||
"tl_popup_link_text": "鏈接描述",
|
||||
"tl_popup_link_addr": "鏈接地址",
|
||||
"tl_popup_img_link_title": "添加圖片",
|
||||
"tl_popup_img_link_text": "圖片描述",
|
||||
"tl_popup_img_link_addr": "圖片鏈接",
|
||||
"tl_popup_link_sure": "確定",
|
||||
"tl_popup_link_cancel": "取消"
|
||||
}
|
||||
34
node_modules/mavon-editor/src/dev/demo.vue
generated
vendored
Normal file
34
node_modules/mavon-editor/src/dev/demo.vue
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="navigate">
|
||||
<span @click="viewIndex = 1">Full demo</span>
|
||||
<span @click="viewIndex = 2">Simple demo</span>
|
||||
</div>
|
||||
<div>
|
||||
<App v-if="viewIndex == 1"></App>
|
||||
<Editor v-else-if="viewIndex == 2"></Editor>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import App from './app.vue';
|
||||
import Editor from './editor.vue';
|
||||
import {ref} from "vue"
|
||||
|
||||
const viewIndex = ref(1)
|
||||
</script>
|
||||
<style>
|
||||
.navigate {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
color: blue;
|
||||
}
|
||||
.navigate span {
|
||||
margin-right: 5px;
|
||||
}
|
||||
.navigate span:hover {
|
||||
cursor: pointer;
|
||||
font-weight: bolder;
|
||||
}
|
||||
</style>
|
||||
66
node_modules/mavon-editor/src/dev/editor.vue
generated
vendored
Normal file
66
node_modules/mavon-editor/src/dev/editor.vue
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div id="editor">
|
||||
<mavon-editor style="height: 100%" v-model="code" :codeStyle="codeStyle" :xssOptions="xssOptions"></mavon-editor>
|
||||
</div>
|
||||
<div class="switch-code-style">
|
||||
<span>code style:</span>
|
||||
<select v-model="codeStyle">
|
||||
<option v-for="(val, key) in styles" :value="key">{{ key }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import styles from '../lib/core/hljs/lang.hljs.css.js'
|
||||
const code = `java
|
||||
/**
|
||||
* @author John Smith <john.smith@example.com>
|
||||
*/
|
||||
package l2f.gameserver.model;
|
||||
public abstract strictfp class L2Char extends L2Object {
|
||||
public static final Short ERROR = 0x0001;
|
||||
public void moveTo(int x, int y, int z) {
|
||||
_ai = null;
|
||||
log("Should not be called");
|
||||
if (1 > 5) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}`;
|
||||
|
||||
module.exports = {
|
||||
name: 'editor',
|
||||
data: function() {
|
||||
return {
|
||||
codeStyle: "github",
|
||||
styles,
|
||||
code: '<span style="color:red;font-size:36px;">A</span> \n```' + code + '\n```',
|
||||
xssOptions:{
|
||||
whiteList: {
|
||||
span: ['style']
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.container {
|
||||
margin: auto;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
#editor {
|
||||
height: 580px;
|
||||
}
|
||||
|
||||
.switch-code-style {
|
||||
margin-top: 10px;
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
12
node_modules/mavon-editor/src/dev/index.html
generated
vendored
Normal file
12
node_modules/mavon-editor/src/dev/index.html
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>md-test</title>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
|
||||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
18
node_modules/mavon-editor/src/dev/index.js
generated
vendored
Normal file
18
node_modules/mavon-editor/src/dev/index.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* @Author: HuaChao Chen <CHC>
|
||||
* @Date: 2017-05-04T23:26:08+08:00
|
||||
* @Email: chenhuachaoxyz@gmail.com
|
||||
* @Filename: index.js
|
||||
* @Last modified by: chc
|
||||
* @Last modified time: 2017-11-25T12:14:56+08:00
|
||||
* @License: MIT
|
||||
* @Copyright: 2017
|
||||
*/
|
||||
|
||||
import { createApp, h } from 'vue';
|
||||
import demo from './demo.vue';
|
||||
import sMd from '../index'
|
||||
|
||||
createApp({
|
||||
render: () => h(demo)
|
||||
}).use(sMd).mount('#main');
|
||||
25
node_modules/mavon-editor/src/index.js
generated
vendored
Normal file
25
node_modules/mavon-editor/src/index.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Created by zhy on 2017/4/1.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* mavonEditor
|
||||
* @author hinesboy
|
||||
*/
|
||||
const mavonEditor = require('./mavon-editor.vue').default;
|
||||
const VueMavonEditor = {
|
||||
/**
|
||||
* @deprecated
|
||||
* @see mavonEditor.getMarkdownIt()
|
||||
*/
|
||||
markdownIt: mavonEditor.mixins[0].data().markdownIt,
|
||||
mavonEditor: mavonEditor,
|
||||
LeftToolbar: require('./components/md-toolbar-left').default,
|
||||
RightToolbar: require('./components/md-toolbar-right').default,
|
||||
install: function(Vue) {
|
||||
Vue.component('mavon-editor', mavonEditor);
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = VueMavonEditor;
|
||||
79
node_modules/mavon-editor/src/lib/config.js
generated
vendored
Normal file
79
node_modules/mavon-editor/src/lib/config.js
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
/**
|
||||
* @Author: HuaChao Chen <CHC>
|
||||
* @Date: 2017-05-06T21:40:39+08:00
|
||||
* @Email: chenhuachaoxyz@gmail.com
|
||||
* @Filename: config.js
|
||||
* @Last modified by: CHC
|
||||
* @Last modified time: 2017-05-06T22:12:49+08:00
|
||||
* @License: MIT
|
||||
* @Copyright: 2017
|
||||
* @desc 初始化配置项
|
||||
*/
|
||||
|
||||
import help_zh_CN from './lang/zh-CN/help_zh-CN.md'
|
||||
import help_zh_TW from './lang/zh-TW/help_zh-TW.md'
|
||||
import help_en from './lang/en/help_en.md'
|
||||
import help_fr from './lang/fr/help_fr.md'
|
||||
import help_pt_BR from './lang/pt-BR/help_pt-BR.md'
|
||||
import help_ru from './lang/ru/help_ru.md'
|
||||
import help_de from './lang/de/help_de.md'
|
||||
import help_ja from './lang/ja/help_ja.md'
|
||||
|
||||
import words_zh_CN from './lang/zh-CN/words_zh-CN.json'
|
||||
import words_zh_TW from './lang/zh-TW/words_zh-TW.json'
|
||||
import words_en from './lang/en/words_en.json'
|
||||
import words_fr from './lang/fr/words_fr.json'
|
||||
import words_pt_BR from './lang/pt-BR/words_pt-BR.json'
|
||||
import words_ru from './lang/ru/words_ru.json'
|
||||
import words_de from './lang/de/words_de.json'
|
||||
import words_ja from './lang/ja/words_ja.json'
|
||||
export const CONFIG = {
|
||||
'help_zh-CN': help_zh_CN,
|
||||
'help_zh-TW': help_zh_TW,
|
||||
'help_pt-BR': help_pt_BR,
|
||||
'help_en': help_en,
|
||||
'help_fr': help_fr,
|
||||
'help_ru': help_ru,
|
||||
'help_de': help_de,
|
||||
'help_ja': help_ja,
|
||||
'words_zh-CN': words_zh_CN,
|
||||
'words_zh-TW': words_zh_TW,
|
||||
'words_pt-BR': words_pt_BR,
|
||||
'words_en': words_en,
|
||||
'words_fr': words_fr,
|
||||
'words_ru': words_ru,
|
||||
'words_de': words_de,
|
||||
'words_ja': words_ja,
|
||||
'langList': ['en', 'zh-CN', 'zh-TW', 'fr', 'pt-BR', 'ru', 'de', 'ja'],
|
||||
'toolbars': {
|
||||
'bold': true,
|
||||
'italic': true,
|
||||
'header': true,
|
||||
'underline': true,
|
||||
'strikethrough': true,
|
||||
'mark': true,
|
||||
'superscript': true,
|
||||
'subscript': true,
|
||||
'quote': true,
|
||||
'ol': true,
|
||||
'ul': true,
|
||||
'link': true,
|
||||
'imagelink': true,
|
||||
'code': true,
|
||||
'table': true,
|
||||
'undo': true,
|
||||
'redo': true,
|
||||
'trash': true,
|
||||
'save': true,
|
||||
'alignleft': true,
|
||||
'aligncenter': true,
|
||||
'alignright': true,
|
||||
'navigation': true,
|
||||
'subfield': true,
|
||||
'fullscreen': true,
|
||||
'readmodel': true,
|
||||
'htmlcode': true,
|
||||
'help': true,
|
||||
'preview': true
|
||||
}
|
||||
};
|
||||
538
node_modules/mavon-editor/src/lib/core/extra-function.js
generated
vendored
Normal file
538
node_modules/mavon-editor/src/lib/core/extra-function.js
generated
vendored
Normal file
@@ -0,0 +1,538 @@
|
||||
/**
|
||||
* @Author: HuaChao Chen <chc>
|
||||
* @Date: 2017-06-14T23:04:34+08:00
|
||||
* @Email: chenhuachaoxyz@gmail.com
|
||||
* @Filename: extra-function.js
|
||||
* @Last modified by: CHC
|
||||
* @Last modified time: 2017-12-19T17:46:48+08:00
|
||||
* @License: MIT
|
||||
* @Copyright: 2017
|
||||
*/
|
||||
|
||||
/**
|
||||
* Created by zhy on 2017/4/24.
|
||||
*/
|
||||
/**
|
||||
* textarea 插入内容
|
||||
*/
|
||||
export const insertTextAtCaret = (obj, {prefix, subfix, str, type}, $vm) => {
|
||||
obj.focus()
|
||||
if (isExistSelectionObj(obj)) {
|
||||
var startPos = obj.selectionStart;
|
||||
var endPos = obj.selectionEnd;
|
||||
var tmpStr = obj.value;
|
||||
if (startPos === endPos) {
|
||||
// 直接插入
|
||||
obj.value = tmpStr.substring(0, startPos) + prefix + str + subfix + tmpStr.substring(endPos, tmpStr.length);
|
||||
obj.selectionStart = startPos + prefix.length;
|
||||
obj.selectionEnd = startPos + (str.length + prefix.length);
|
||||
} else {
|
||||
// 存在选中区域
|
||||
if (tmpStr.substring(startPos - prefix.length, startPos) === prefix && tmpStr.substring(endPos, endPos + subfix.length) === subfix && judgeItalicAndBold(prefix, subfix, tmpStr, startPos, endPos)) {
|
||||
// 取消
|
||||
obj.value = tmpStr.substring(0, startPos - prefix.length) + tmpStr.substring(startPos, endPos) + tmpStr.substring(endPos + subfix.length, tmpStr.length);
|
||||
obj.selectionStart = startPos - prefix.length;
|
||||
obj.selectionEnd = endPos - prefix.length;
|
||||
} else {
|
||||
// 确定
|
||||
obj.value = tmpStr.substring(0, startPos) + prefix + tmpStr.substring(startPos, endPos) + subfix + tmpStr.substring(endPos, tmpStr.length);
|
||||
obj.selectionStart = startPos + prefix.length;
|
||||
obj.selectionEnd = startPos + (endPos - startPos + prefix.length);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
alert('Error: Browser version is too low')
|
||||
// obj.value += str;
|
||||
}
|
||||
// 触发change事件
|
||||
$vm.d_value = obj.value
|
||||
obj.focus()
|
||||
}
|
||||
|
||||
const code_structure = {
|
||||
prefix: "```",
|
||||
subfix: "\n```\n",
|
||||
defaultLanguageText: "language"
|
||||
}
|
||||
|
||||
export const insertCodeBlock = ($vm) => {
|
||||
let obj = $vm.getTextareaDom();
|
||||
|
||||
if (isExistSelectionObj(obj)) {
|
||||
const {defaultLanguageText: language} = code_structure;
|
||||
let { selectionStart: startPos, selectionEnd: endPos, value: tmpStr } = obj;
|
||||
|
||||
if (startPos === endPos) {
|
||||
// 直接插入
|
||||
insertCodeBlockToVM(language, "", obj);
|
||||
} else {
|
||||
// 存在选中区域
|
||||
if (isCancelCodeBlock(obj)) {
|
||||
// 取消
|
||||
removeCodeBlockFromVM(obj);
|
||||
} else {
|
||||
// 确定
|
||||
let value = tmpStr.substring(startPos, endPos);
|
||||
insertCodeBlockToVM("", value, obj);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
alert('Error: Browser version is too low');
|
||||
return;
|
||||
}
|
||||
|
||||
// 触发change事件
|
||||
$vm.d_value = obj.value
|
||||
obj.focus();
|
||||
}
|
||||
|
||||
function insertCodeBlockToVM(language, content, selectionObj) {
|
||||
const {prefix, subfix} = code_structure;
|
||||
let { selectionStart: startPos, selectionEnd: endPos, value: tmpStr } = selectionObj;
|
||||
|
||||
let value = tmpStr.substring(0, startPos);
|
||||
value += prefix + language + "\n";
|
||||
value += content;
|
||||
value += subfix;
|
||||
value += tmpStr.substring(endPos, tmpStr.length);
|
||||
|
||||
selectionObj.value = value;
|
||||
selectionObj.selectionStart = startPos + prefix.length + (language ? 0 : 1);
|
||||
selectionObj.selectionEnd = selectionObj.selectionStart + language.length + content.length;
|
||||
}
|
||||
|
||||
function removeCodeBlockFromVM(selectionObj) {
|
||||
let {prefix, subfix, defaultLanguageText: language} = code_structure;
|
||||
let { selectionStart: startPos, selectionEnd: endPos, value: content } = selectionObj;
|
||||
let selectedValue = content.substring(startPos, endPos);
|
||||
|
||||
if (content.substring(startPos - 1, startPos) === "\n")
|
||||
{
|
||||
prefix = prefix + "\n";
|
||||
} else {
|
||||
subfix = "\n" + subfix;
|
||||
if (prefix + language + subfix === content.substring(startPos - prefix.length,endPos + subfix.length)) {
|
||||
let value = content.substring(0, startPos - prefix.length);
|
||||
value += content.substring(endPos + subfix.length, content.length)
|
||||
|
||||
selectionObj.value = value;
|
||||
selectionObj.selectionStart = startPos - prefix.length;
|
||||
selectionObj.selectionEnd = selectionObj.selectionStart;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let value = content.substring(0, startPos - prefix.length);
|
||||
value += selectedValue;
|
||||
value += content.substring(endPos + subfix.length, content.length)
|
||||
|
||||
selectionObj.value = value;
|
||||
selectionObj.selectionStart = startPos - prefix.length;
|
||||
selectionObj.selectionEnd = selectionObj.selectionStart + selectedValue.length;
|
||||
}
|
||||
|
||||
function isExistSelectionObj(textareaDom) {
|
||||
return typeof textareaDom.selectionStart === 'number' && typeof textareaDom.selectionEnd === 'number';
|
||||
}
|
||||
|
||||
function isCancelCodeBlock(selectionObj) {
|
||||
let { selectionStart: startPos, selectionEnd: endPos, value: content } = selectionObj;
|
||||
let {prefix, subfix} = code_structure;
|
||||
|
||||
if (content.substring(startPos - 1, startPos) === "\n")
|
||||
{
|
||||
prefix = prefix + "\n";
|
||||
} else {
|
||||
subfix = "\n" + subfix;
|
||||
}
|
||||
|
||||
return content.substring(startPos - prefix.length, startPos) === prefix &&
|
||||
content.substring(endPos, endPos + subfix.length) === subfix;
|
||||
}
|
||||
|
||||
// 处理粗体与斜体冲突问题
|
||||
function judgeItalicAndBold(prefix, subfix, tmpStr, startPos, endPos) {
|
||||
if (prefix === '*' && subfix === '*') {
|
||||
if (tmpStr.substring(startPos - 2, startPos - 1) === '*' && tmpStr.substring(endPos + 1, endPos + 2) === '*') {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
// 插入有序列表
|
||||
export const insertOl = ($vm) => {
|
||||
let obj = $vm.getTextareaDom();
|
||||
if (isExistSelectionObj(obj)) {
|
||||
var startPos = obj.selectionStart;
|
||||
var endPos = obj.selectionEnd;
|
||||
var tmpStr = obj.value;
|
||||
if (startPos === endPos) {
|
||||
// 直接插入
|
||||
obj.value = tmpStr.substring(0, startPos) + '1. ' + tmpStr.substring(endPos, tmpStr.length);
|
||||
obj.selectionEnd = obj.selectionStart = startPos + 3;
|
||||
} else {
|
||||
// 存在选中区域
|
||||
let start = startPos
|
||||
while (start > 0 && tmpStr.substring(start - 1, start) !== '\n') {
|
||||
start--
|
||||
}
|
||||
let selectStr = tmpStr.substring(start, endPos)
|
||||
let selectStrs = selectStr.split('\n')
|
||||
for (let i = 0; i < selectStrs.length; i++) {
|
||||
selectStrs[i] = (i + 1) + '. ' + selectStrs[i]
|
||||
}
|
||||
let newSelectStr = selectStrs.join('\n')
|
||||
obj.value = tmpStr.substring(0, start) + newSelectStr + tmpStr.substring(endPos, tmpStr.length);
|
||||
obj.selectionStart = start
|
||||
obj.selectionEnd = endPos + newSelectStr.length - selectStr.length;
|
||||
}
|
||||
} else {
|
||||
alert('Error: Browser version is too low')
|
||||
// obj.value += str;
|
||||
}
|
||||
// 触发change事件
|
||||
$vm.d_value = obj.value
|
||||
obj.focus();
|
||||
}
|
||||
// 删除行
|
||||
export const removeLine = ($vm) => {
|
||||
let obj = $vm.getTextareaDom();
|
||||
if (isExistSelectionObj(obj)) {
|
||||
var startPos = obj.selectionStart;
|
||||
var endPos = obj.selectionEnd;
|
||||
var tmpStr = obj.value;
|
||||
// 找到行首、行尾
|
||||
let start = startPos
|
||||
while (start > 0 && tmpStr.substring(start - 1, start) !== '\n') {
|
||||
start--
|
||||
}
|
||||
let end = endPos
|
||||
while (end < tmpStr.length && tmpStr.substring(end, end + 1) !== '\n') {
|
||||
end++
|
||||
}
|
||||
if (end < tmpStr.length) {
|
||||
end++
|
||||
}
|
||||
obj.value = tmpStr.substring(0, start) + tmpStr.substring(end, tmpStr.length);
|
||||
obj.selectionEnd = obj.selectionStart = start === 0 ? 0 : start - 1;
|
||||
} else {
|
||||
alert('Error: Browser version is too low')
|
||||
// obj.value += str;
|
||||
}
|
||||
// 触发change事件
|
||||
$vm.d_value = obj.value
|
||||
obj.focus();
|
||||
}
|
||||
// 插入无序列表
|
||||
export const insertUl = ($vm) => {
|
||||
let obj = $vm.getTextareaDom();
|
||||
if (isExistSelectionObj(obj)) {
|
||||
var startPos = obj.selectionStart;
|
||||
var endPos = obj.selectionEnd;
|
||||
var tmpStr = obj.value;
|
||||
if (startPos === endPos) {
|
||||
// 直接插入
|
||||
obj.value = tmpStr.substring(0, startPos) + '- ' + tmpStr.substring(endPos, tmpStr.length);
|
||||
obj.selectionEnd = obj.selectionStart = startPos + 2;
|
||||
} else {
|
||||
// 存在选中区域
|
||||
let start = startPos
|
||||
while (start > 0 && tmpStr.substring(start - 1, start) !== '\n') {
|
||||
start--
|
||||
}
|
||||
let selectStr = tmpStr.substring(start, endPos)
|
||||
let newSelectStr = selectStr.replace(/\n/g, '\n- ')
|
||||
newSelectStr = '- ' + newSelectStr
|
||||
obj.value = tmpStr.substring(0, start) + newSelectStr + tmpStr.substring(endPos, tmpStr.length);
|
||||
obj.selectionStart = start
|
||||
obj.selectionEnd = endPos + newSelectStr.length - selectStr.length;
|
||||
}
|
||||
} else {
|
||||
alert('Error: Browser version is too low')
|
||||
// obj.value += str;
|
||||
}
|
||||
// 触发change事件
|
||||
$vm.d_value = obj.value
|
||||
obj.focus();
|
||||
}
|
||||
// 插入tab
|
||||
export const insertTab = ($vm, tab) => {
|
||||
tab = tab ? (new Array(tab)).fill(' ').join('') : '\t'
|
||||
let obj = $vm.getTextareaDom();
|
||||
if (isExistSelectionObj(obj)) {
|
||||
var startPos = obj.selectionStart;
|
||||
var endPos = obj.selectionEnd;
|
||||
var tmpStr = obj.value;
|
||||
let lastLine = tmpStr.substring(0, startPos).split('\n').pop()
|
||||
if (lastLine.match(/^\s*[0-9]+\.\s+\S*/)) {
|
||||
// 有序列表
|
||||
let temp = lastLine.replace(/(\d+)/, 1)
|
||||
obj.value = tmpStr.substring(0, startPos - temp.length) + tab + temp + tmpStr.substring(endPos, tmpStr.length);
|
||||
} else if (lastLine.match(/^\s*-\s+\S*/)) {
|
||||
// 无序列表
|
||||
obj.value = tmpStr.substring(0, startPos - lastLine.length) + tab + lastLine + tmpStr.substring(endPos, tmpStr.length);
|
||||
} else {
|
||||
obj.value = tmpStr.substring(0, startPos) + tab + tmpStr.substring(endPos, tmpStr.length);
|
||||
}
|
||||
obj.selectionStart = obj.selectionEnd = startPos + tab.length;
|
||||
} else {
|
||||
alert('Error: Browser version is too low')
|
||||
// obj.value += str;
|
||||
}
|
||||
// 触发change事件
|
||||
$vm.d_value = obj.value
|
||||
obj.focus();
|
||||
}
|
||||
// shift + tab
|
||||
export const unInsertTab = ($vm, tab) => {
|
||||
let regTab = new RegExp(tab ? `\\s{${tab}}` : '\t')
|
||||
console.log(`regTab:`, regTab)
|
||||
let obj = $vm.getTextareaDom();
|
||||
if (isExistSelectionObj(obj)) {
|
||||
var startPos = obj.selectionStart;
|
||||
var endPos = obj.selectionEnd;
|
||||
var tmpStr = obj.value;
|
||||
let lastLine = tmpStr.substring(0, startPos).split('\n').pop()
|
||||
if (lastLine.search(regTab) >= 0) {
|
||||
// 替换最后一个制表符为空
|
||||
obj.value = tmpStr.substring(0, startPos - lastLine.length) + lastLine.replace(regTab, '') + tmpStr.substring(endPos, tmpStr.length);
|
||||
obj.selectionStart = obj.selectionEnd = startPos - (tab || 1);
|
||||
}
|
||||
} else {
|
||||
alert('Error: Browser version is too low')
|
||||
// obj.value += str;
|
||||
}
|
||||
// 触发change事件
|
||||
$vm.d_value = obj.value
|
||||
obj.focus();
|
||||
}
|
||||
// 插入enter
|
||||
export const insertEnter = ($vm, event) => {
|
||||
let obj = $vm.getTextareaDom()
|
||||
if (isExistSelectionObj(obj)) {
|
||||
var startPos = obj.selectionStart;
|
||||
var endPos = obj.selectionEnd;
|
||||
var tmpStr = obj.value;
|
||||
// 获取光标前最后一行字符串
|
||||
let lastLine = tmpStr.substring(0, startPos).split('\n').pop()
|
||||
let matchListNeedChangeLine = lastLine.match(/^\s*(?:[0-9]+\.|-)\s+\S+/)
|
||||
if (matchListNeedChangeLine) {
|
||||
// 需要自动产生下一个列表项
|
||||
event.preventDefault()
|
||||
// eg: [1. test] 仅获取[1. ]
|
||||
let subfix = matchListNeedChangeLine.shift().match(/^\s*(?:[0-9]+\.|-)\s/).shift()
|
||||
if (subfix.search(/-/) >= 0) {
|
||||
// 无序列表
|
||||
obj.value = tmpStr.substring(0, startPos) + '\n' + subfix + tmpStr.substring(endPos, tmpStr.length);
|
||||
obj.selectionStart = obj.selectionEnd = startPos + subfix.length + 1
|
||||
} else {
|
||||
// 有序列表
|
||||
let temp = subfix.replace(/(\d+)/, parseInt(subfix) + 1)
|
||||
obj.value = tmpStr.substring(0, startPos) + '\n' + temp + tmpStr.substring(endPos, tmpStr.length);
|
||||
obj.selectionStart = obj.selectionEnd = startPos + temp.length + 1
|
||||
}
|
||||
} else {
|
||||
let matchListNeedRemoveLine = lastLine.match(/^\s*(?:[0-9]+\.|-)\s+$/)
|
||||
if (matchListNeedRemoveLine) {
|
||||
// 需要跳出列表
|
||||
event.preventDefault()
|
||||
let preLength = matchListNeedRemoveLine.shift().length
|
||||
obj.value = tmpStr.substring(0, startPos - preLength) + '\n' + tmpStr.substring(endPos, tmpStr.length);
|
||||
obj.selectionStart = obj.selectionEnd = startPos - preLength
|
||||
// TODO 检测是否存在嵌套列表,自动生成上一级
|
||||
}
|
||||
}
|
||||
} else {
|
||||
alert('Error: Browser version is too low')
|
||||
}
|
||||
$vm.d_value = obj.value
|
||||
obj.focus();
|
||||
}
|
||||
/**
|
||||
* 生成导航目录
|
||||
*/
|
||||
export const getNavigation = ($vm , full) => {
|
||||
let navigationContent;
|
||||
|
||||
navigationContent = $vm.$refs.navigationContent
|
||||
|
||||
navigationContent.innerHTML = $vm.d_render
|
||||
let nodes = navigationContent.children
|
||||
if (nodes.length) {
|
||||
for (let i = 0; i < nodes.length; i++) {
|
||||
judageH(nodes[i] , i , nodes)
|
||||
}
|
||||
}
|
||||
function judageH(node , i , nodes) {
|
||||
let reg = /^H[1-6]{1}$/;
|
||||
if (!reg.exec(node.tagName)) {
|
||||
node.style.display = 'none'
|
||||
} else {
|
||||
node.onclick = function () {
|
||||
let vShowContent = $vm.$refs.vShowContent;
|
||||
let vNoteEdit = $vm.$refs.vNoteEdit;
|
||||
if ($vm.s_subfield) {
|
||||
// 双栏
|
||||
if ($vm.s_preview_switch) {
|
||||
// 编辑预览
|
||||
vNoteEdit.scrollTop = vShowContent.children[i].offsetTop * (vNoteEdit.scrollHeight - vNoteEdit.offsetHeight) / (vShowContent.scrollHeight - vShowContent.offsetHeight);
|
||||
} else {
|
||||
// todo 编辑
|
||||
}
|
||||
} else {
|
||||
// 单栏
|
||||
if ($vm.s_preview_switch) {
|
||||
// 预览
|
||||
vShowContent.scrollTop = vShowContent.children[i].offsetTop;
|
||||
} else {
|
||||
// todo 编辑
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 滚动条联动
|
||||
*/
|
||||
export const scrollLink = ($event, $vm) => {
|
||||
let element = $event.srcElement ? $event.srcElement : $event.target
|
||||
let ratio = element.scrollTop / (element.scrollHeight - element.offsetHeight)
|
||||
if ($vm.edit_scroll_height >= 0 && element.scrollHeight !== $vm.edit_scroll_height && (element.scrollHeight - element.offsetHeight - element.scrollTop <= 30)) {
|
||||
// star 内容变化 导致 高度增加 且滚动条距离底部小于25px 自动滚动到底部
|
||||
$vm.$refs.vNoteEdit.scrollTop = element.scrollHeight - element.offsetHeight
|
||||
ratio = 1
|
||||
}
|
||||
$vm.edit_scroll_height = element.scrollHeight
|
||||
// end ----
|
||||
if ($vm.$refs.vShowContent.scrollHeight > $vm.$refs.vShowContent.offsetHeight) {
|
||||
$vm.$refs.vShowContent.scrollTop = ($vm.$refs.vShowContent.scrollHeight - $vm.$refs.vShowContent.offsetHeight) * ratio
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 监听浏览器fullscreen
|
||||
* @param $vm
|
||||
*/
|
||||
export const fullscreenchange = ($vm) => {
|
||||
// 阅读模式 全屏监听事件
|
||||
$vm.$el.addEventListener('fullscreenchange', function (e) {
|
||||
$vm.$toolbar_right_read_change_status()
|
||||
}, false);
|
||||
$vm.$el.addEventListener('mozfullscreenchange', function (e) {
|
||||
$vm.$toolbar_right_read_change_status()
|
||||
}, false);
|
||||
$vm.$el.addEventListener('webkitfullscreenchange', function (e) {
|
||||
$vm.$toolbar_right_read_change_status()
|
||||
}, false);
|
||||
$vm.$el.addEventListener('msfullscreenchange', function (e) {
|
||||
$vm.$toolbar_right_read_change_status()
|
||||
}, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 监听浏览器onresize
|
||||
* @param $vm
|
||||
*/
|
||||
export const windowResize = ($vm) => {
|
||||
function sizeToStatus() {
|
||||
if ($vm.$el.clientWidth > 768) {
|
||||
// > 768
|
||||
$vm.s_subfield = $vm.subfield;
|
||||
}
|
||||
else {
|
||||
// < 768
|
||||
$vm.s_subfield = false;
|
||||
}
|
||||
}
|
||||
|
||||
sizeToStatus();
|
||||
window.addEventListener('resize', sizeToStatus);
|
||||
}
|
||||
|
||||
export function loadScript(src, callback) {
|
||||
if (!(typeof callback === 'function')) {
|
||||
callback = function() {};
|
||||
}
|
||||
var check = document.querySelectorAll("script[src='" + src + "']");
|
||||
if (check.length > 0) {
|
||||
check[0].addEventListener('load', function() {
|
||||
callback();
|
||||
});
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
var script = document.createElement('script');
|
||||
var head = document.getElementsByTagName('head')[0];
|
||||
script.type = 'text/javascript';
|
||||
script.charset = 'UTF-8';
|
||||
script.src = src;
|
||||
if (script.addEventListener) {
|
||||
script.addEventListener('load', function () {
|
||||
callback();
|
||||
}, false);
|
||||
} else if (script.attachEvent) {
|
||||
script.attachEvent('onreadystatechange', function () {
|
||||
var target = window.event.srcElement;
|
||||
if (target.readyState === 'loaded') {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
head.appendChild(script);
|
||||
}
|
||||
|
||||
// <link href="https://cdn.bootcss.com/highlight.js/9.12.0/styles/agate.min.css" rel="stylesheet">
|
||||
export function loadLink(src, callback, id) {
|
||||
if (!(typeof callback === 'function')) {
|
||||
callback = function() {};
|
||||
}
|
||||
var check = document.querySelectorAll("link[href='" + src + "']");
|
||||
if (check.length > 0) {
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
|
||||
if (id) {
|
||||
var styles = document.querySelectorAll("link#" + id);
|
||||
if (styles.length) {
|
||||
styles[0].href = src;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var link = document.createElement('link');
|
||||
var head = document.getElementsByTagName('head')[0];
|
||||
link.rel = 'stylesheet';
|
||||
link.href = src;
|
||||
id && (link['id'] = id);
|
||||
if (link.addEventListener) {
|
||||
link.addEventListener('load', function () {
|
||||
callback();
|
||||
}, false);
|
||||
} else if (link.attachEvent) {
|
||||
link.attachEvent('onreadystatechange', function () {
|
||||
var target = window.event.srcElement;
|
||||
if (target.readyState === 'loaded') {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
head.appendChild(link);
|
||||
}
|
||||
|
||||
export const ImagePreviewListener = ($vm) => {
|
||||
// vShowContent
|
||||
$vm.$refs.vShowContent.addEventListener('click', function (event) {
|
||||
event = event ? event : window.event;
|
||||
let ele = event.srcElement ? event.srcElement : event.target;
|
||||
if (ele.tagName === 'IMG') {
|
||||
if ($vm.imageClick != null) {
|
||||
// 覆盖图片点击事件
|
||||
$vm.imageClick(ele);
|
||||
} else {
|
||||
$vm.d_preview_imgsrc = ele.src;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
95
node_modules/mavon-editor/src/lib/core/highlight.js
generated
vendored
Normal file
95
node_modules/mavon-editor/src/lib/core/highlight.js
generated
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
/**
|
||||
* @Author: HuaChao Chen <CHC>
|
||||
* @Date: 2017-06-16T21:01:47+08:00
|
||||
* @Email: chenhuachaoxyz@gmail.com
|
||||
* @Filename: highlight.js
|
||||
* @Last modified by: chc
|
||||
* @Last modified time: 2017-11-24T19:55:22+08:00
|
||||
* @License: MIT
|
||||
* @Copyright: 2017
|
||||
*/
|
||||
|
||||
import {
|
||||
loadScript
|
||||
} from './extra-function.js'
|
||||
function highLightCode(str, callback, hljsLangFuc, hljsFuc) {
|
||||
var hljs = window.hljs;
|
||||
if (!hljs) {
|
||||
if (typeof hljsFuc !== 'function') {
|
||||
console.warn('external_link.hljs_js is not a function, hljs can not load by mavon-editor, if you want to disabled this log, set external_link.hljs_js to function');
|
||||
callback(str);
|
||||
return;
|
||||
}
|
||||
var url = hljsFuc();
|
||||
console.warn('hljs parsing file is missing. mavon-editor will autoload', url);
|
||||
loadScript(url, function() {
|
||||
_highLightCode(str, callback, hljsLangFuc);
|
||||
});
|
||||
} else {
|
||||
if (typeof hljsLangFuc === 'function') {
|
||||
_highLightCode(str, callback, hljsLangFuc);
|
||||
} else {
|
||||
console.warn('external_link.hljs_lang is not a function, hljs will not to work');
|
||||
callback(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
function _highLightCode(str, callback, hljsLangFuc) {
|
||||
var dom = document.createElement('div');
|
||||
var hljs = window.hljs;
|
||||
dom.innerHTML = str;
|
||||
var pre_code = dom.querySelectorAll('pre > div.hljs > code');
|
||||
if (pre_code && hljs && (typeof hljsLangFuc === 'function')) {
|
||||
var flag = 0;
|
||||
var i = 0;
|
||||
var deal = 0;
|
||||
var not_include_lang = {}; // these lang parse file need to be include.
|
||||
var url = '';
|
||||
for (i = 0; i < pre_code.length; i++) {
|
||||
var lang = pre_code[i].className.toLowerCase();
|
||||
if (lang.length > 0) {
|
||||
// if this lang parse file missing
|
||||
url = hljsLangFuc(lang);
|
||||
if (!hljs.getLanguage(lang) && !not_include_lang.hasOwnProperty(lang) && url.length > 0) {
|
||||
not_include_lang[lang] = url;
|
||||
}
|
||||
}
|
||||
}
|
||||
// we need to include these lang parse file manually
|
||||
var need_langs = [];
|
||||
for (var key in not_include_lang) {
|
||||
if (not_include_lang.hasOwnProperty(key)) {
|
||||
need_langs.push(key);
|
||||
}
|
||||
}
|
||||
for (i = 0; i < need_langs.length; i++) {
|
||||
url = not_include_lang[need_langs[i]];
|
||||
loadScript(url, function() {
|
||||
deal = deal + 1;
|
||||
if (deal === need_langs.length) {
|
||||
for (var i = 0; i < pre_code.length; i++) {
|
||||
var lang = pre_code[i].className;
|
||||
// if lang is valid.
|
||||
if (lang.length > 0 && hljs.getLanguage(lang)) {
|
||||
hljs.highlightBlock(pre_code[i])
|
||||
}
|
||||
}
|
||||
callback(dom.innerHTML);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (need_langs.length === 0) {
|
||||
for (i = 0; i < pre_code.length; i++) {
|
||||
lang = pre_code[i].className;
|
||||
// if lang is valid.
|
||||
if (lang.length > 0 && hljs.getLanguage(lang)) {
|
||||
hljs.highlightBlock(pre_code[i])
|
||||
}
|
||||
}
|
||||
callback(dom.innerHTML);
|
||||
}
|
||||
} else {
|
||||
callback(dom.innerHTML);
|
||||
}
|
||||
}
|
||||
export default highLightCode;
|
||||
70
node_modules/mavon-editor/src/lib/core/hljs/lang.hljs.css.js
generated
vendored
Normal file
70
node_modules/mavon-editor/src/lib/core/hljs/lang.hljs.css.js
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
export default {
|
||||
agate: 1,
|
||||
androidstudio: 1,
|
||||
'arduino-light': 1,
|
||||
arta: 1,
|
||||
ascetic: 1,
|
||||
'atom-one-dark': 1,
|
||||
'atom-one-light': 1,
|
||||
'brown-paper': 1,
|
||||
'codepen-embed': 1,
|
||||
'color-brewer': 1,
|
||||
dark: 1,
|
||||
default: 1,
|
||||
docco: 1,
|
||||
far: 1,
|
||||
foundation: 1,
|
||||
github: 1,
|
||||
googlecode: 1,
|
||||
grayscale: 1,
|
||||
hybrid: 1,
|
||||
idea: 1,
|
||||
'ir-black': 1,
|
||||
magula: 1,
|
||||
'mono-blue': 1,
|
||||
'monokai-sublime': 1,
|
||||
monokai: 1,
|
||||
obsidian: 1,
|
||||
'paraiso-dark': 1,
|
||||
'paraiso-light': 1,
|
||||
pojoaque: 1,
|
||||
purebasic: 1,
|
||||
rainbow: 1,
|
||||
routeros: 1,
|
||||
'school-book': 1,
|
||||
sunburst: 1,
|
||||
'tomorrow-night-blue': 1,
|
||||
'tomorrow-night-bright': 1,
|
||||
vs: 1,
|
||||
vs2015: 1,
|
||||
xcode: 1,
|
||||
xt256: 1,
|
||||
'a11y-dark': 1,
|
||||
'a11y-light': 1,
|
||||
'an-old-hope': 1,
|
||||
'atom-one-dark-reasonable': 1,
|
||||
'brown-pap': 1,
|
||||
devibeans: 1,
|
||||
'github-dark': 1,
|
||||
'github-dark-dimmed': 1,
|
||||
gml: 1,
|
||||
'gradient-dark': 1,
|
||||
'gradient-light': 1,
|
||||
'isbl-editor-dark': 1,
|
||||
'isbl-editor-light': 1,
|
||||
'kimbie-dark': 1,
|
||||
'kimbie-light': 1,
|
||||
lightfair: 1,
|
||||
lioshi: 1,
|
||||
'night-owl': 1,
|
||||
'nnfx-dark': 1,
|
||||
'nnfx-light': 1,
|
||||
nord: 1,
|
||||
pojo: 1,
|
||||
'qtcreator-dark': 1,
|
||||
'qtcreator-light': 1,
|
||||
'shades-of-purple': 1,
|
||||
srcery: 1,
|
||||
'stackoverflow-dark': 1,
|
||||
'stackoverflow-light': 1
|
||||
};
|
||||
322
node_modules/mavon-editor/src/lib/core/hljs/lang.hljs.js
generated
vendored
Normal file
322
node_modules/mavon-editor/src/lib/core/hljs/lang.hljs.js
generated
vendored
Normal file
@@ -0,0 +1,322 @@
|
||||
export default {
|
||||
'1c': '1c',
|
||||
'abnf': 'abnf',
|
||||
'accesslog': 'accesslog',
|
||||
'actionscript': 'actionscript',
|
||||
'as': 'actionscript',
|
||||
'ada': 'ada',
|
||||
'apache': 'apache',
|
||||
'apacheconf': 'apache',
|
||||
'applescript': 'applescript',
|
||||
'osascript': 'applescript',
|
||||
'arduino': 'arduino',
|
||||
'armasm': 'armasm',
|
||||
'arm': 'armasm',
|
||||
'asciidoc': 'asciidoc',
|
||||
'adoc': 'asciidoc',
|
||||
'aspectj': 'aspectj',
|
||||
'autohotkey': 'autohotkey',
|
||||
'ahk': 'autohotkey',
|
||||
'autoit': 'autoit',
|
||||
'avrasm': 'avrasm',
|
||||
'awk': 'awk',
|
||||
'axapta': 'axapta',
|
||||
'bash': 'bash',
|
||||
'sh': 'bash',
|
||||
'zsh': 'bash',
|
||||
'basic': 'basic',
|
||||
'bnf': 'bnf',
|
||||
'brainfuck': 'brainfuck',
|
||||
'bf': 'brainfuck',
|
||||
'cal': 'cal',
|
||||
'capnproto': 'capnproto',
|
||||
'capnp': 'capnproto',
|
||||
'ceylon': 'ceylon',
|
||||
'clean': 'clean',
|
||||
'icl': 'clean',
|
||||
'dcl': 'clean',
|
||||
'clojure-repl': 'clojure-repl',
|
||||
'clojure': 'clojure',
|
||||
'clj': 'clojure',
|
||||
'cmake': 'cmake',
|
||||
'cmake.in': 'cmake',
|
||||
'coffeescript': 'coffeescript',
|
||||
'coffee': 'coffeescript',
|
||||
'cson': 'coffeescript',
|
||||
'iced': 'coffeescript',
|
||||
'coq': 'coq',
|
||||
'cos': 'cos',
|
||||
'cls': 'cos',
|
||||
'cpp': 'cpp',
|
||||
'c': 'cpp',
|
||||
'cc': 'cpp',
|
||||
'h': 'cpp',
|
||||
'c++': 'cpp',
|
||||
'h++': 'cpp',
|
||||
'hpp': 'cpp',
|
||||
'crmsh': 'crmsh',
|
||||
'crm': 'crmsh',
|
||||
'pcmk': 'crmsh',
|
||||
'crystal': 'crystal',
|
||||
'cr': 'crystal',
|
||||
'cs': 'cs',
|
||||
'csharp': 'cs',
|
||||
'csp': 'csp',
|
||||
'css': 'css',
|
||||
'd': 'd',
|
||||
'dart': 'dart',
|
||||
'delphi': 'delphi',
|
||||
'dpr': 'delphi',
|
||||
'dfm': 'delphi',
|
||||
'pas': 'delphi',
|
||||
'pascal': 'delphi',
|
||||
'freepascal': 'delphi',
|
||||
'lazarus': 'delphi',
|
||||
'lpr': 'delphi',
|
||||
'lfm': 'delphi',
|
||||
'diff': 'diff',
|
||||
'patch': 'diff',
|
||||
'django': 'django',
|
||||
'jinja': 'django',
|
||||
'dns': 'dns',
|
||||
'bind': 'dns',
|
||||
'zone': 'dns',
|
||||
'dockerfile': 'dockerfile',
|
||||
'docker': 'dockerfile',
|
||||
'dos': 'dos',
|
||||
'bat': 'dos',
|
||||
'cmd': 'dos',
|
||||
'dsconfig': 'dsconfig',
|
||||
'dts': 'dts',
|
||||
'dust': 'dust',
|
||||
'dst': 'dust',
|
||||
'ebnf': 'ebnf',
|
||||
'elixir': 'elixir',
|
||||
'elm': 'elm',
|
||||
'erb': 'erb',
|
||||
'erlang-repl': 'erlang-repl',
|
||||
'erlang': 'erlang',
|
||||
'erl': 'erlang',
|
||||
'excel': 'excel',
|
||||
'xlsx': 'excel',
|
||||
'xls': 'excel',
|
||||
'fix': 'fix',
|
||||
'flix': 'flix',
|
||||
'fortran': 'fortran',
|
||||
'f90': 'fortran',
|
||||
'f95': 'fortran',
|
||||
'fsharp': 'fsharp',
|
||||
'fs': 'fsharp',
|
||||
'gams': 'gams',
|
||||
'gms': 'gams',
|
||||
'gauss': 'gauss',
|
||||
'gss': 'gauss',
|
||||
'gcode': 'gcode',
|
||||
'nc': 'gcode',
|
||||
'gherkin': 'gherkin',
|
||||
'feature': 'gherkin',
|
||||
'glsl': 'glsl',
|
||||
'go': 'go',
|
||||
'golang': 'go',
|
||||
'golo': 'golo',
|
||||
'gradle': 'gradle',
|
||||
'groovy': 'groovy',
|
||||
'haml': 'haml',
|
||||
'handlebars': 'handlebars',
|
||||
'hbs': 'handlebars',
|
||||
'html.hbs': 'handlebars',
|
||||
'html.handlebars': 'handlebars',
|
||||
'haskell': 'haskell',
|
||||
'hs': 'haskell',
|
||||
'haxe': 'haxe',
|
||||
'hx': 'haxe',
|
||||
'hsp': 'hsp',
|
||||
'htmlbars': 'htmlbars',
|
||||
'http': 'http',
|
||||
'https': 'http',
|
||||
'hy': 'hy',
|
||||
'hylang': 'hy',
|
||||
'inform7': 'inform7',
|
||||
'i7': 'inform7',
|
||||
'ini': 'ini',
|
||||
'toml': 'ini',
|
||||
'irpf90': 'irpf90',
|
||||
'java': 'java',
|
||||
'jsp': 'java',
|
||||
'javascript': 'javascript',
|
||||
'js': 'javascript',
|
||||
'jsx': 'javascript',
|
||||
'jboss-cli': 'jboss-cli',
|
||||
'wildfly-cli': 'jboss-cli',
|
||||
'json': 'json',
|
||||
'julia-repl': 'julia-repl',
|
||||
'julia': 'julia',
|
||||
'kotlin': 'kotlin',
|
||||
'lasso': 'lasso',
|
||||
'ls': 'livescript',
|
||||
'lassoscript': 'lasso',
|
||||
'ldif': 'ldif',
|
||||
'leaf': 'leaf',
|
||||
'less': 'less',
|
||||
'lisp': 'lisp',
|
||||
'livecodeserver': 'livecodeserver',
|
||||
'livescript': 'livescript',
|
||||
'llvm': 'llvm',
|
||||
'lsl': 'lsl',
|
||||
'lua': 'lua',
|
||||
'makefile': 'makefile',
|
||||
'mk': 'makefile',
|
||||
'mak': 'makefile',
|
||||
'markdown': 'markdown',
|
||||
'md': 'markdown',
|
||||
'mkdown': 'markdown',
|
||||
'mkd': 'markdown',
|
||||
'mathematica': 'mathematica',
|
||||
'mma': 'mathematica',
|
||||
'matlab': 'matlab',
|
||||
'maxima': 'maxima',
|
||||
'mel': 'mel',
|
||||
'mercury': 'mercury',
|
||||
'm': 'mercury',
|
||||
'moo': 'mercury',
|
||||
'mipsasm': 'mipsasm',
|
||||
'mips': 'mipsasm',
|
||||
'mizar': 'mizar',
|
||||
'mojolicious': 'mojolicious',
|
||||
'monkey': 'monkey',
|
||||
'moonscript': 'moonscript',
|
||||
'moon': 'moonscript',
|
||||
'n1ql': 'n1ql',
|
||||
'nginx': 'nginx',
|
||||
'nginxconf': 'nginx',
|
||||
'nimrod': 'nimrod',
|
||||
'nim': 'nimrod',
|
||||
'nix': 'nix',
|
||||
'nixos': 'nix',
|
||||
'nsis': 'nsis',
|
||||
'objectivec': 'objectivec',
|
||||
'mm': 'objectivec',
|
||||
'objc': 'objectivec',
|
||||
'obj-c': 'objectivec',
|
||||
'ocaml': 'ocaml',
|
||||
'ml': 'sml',
|
||||
'openscad': 'openscad',
|
||||
'scad': 'openscad',
|
||||
'oxygene': 'oxygene',
|
||||
'parser3': 'parser3',
|
||||
'perl': 'perl',
|
||||
'pl': 'perl',
|
||||
'pm': 'perl',
|
||||
'pf': 'pf',
|
||||
'pf.conf': 'pf',
|
||||
'php': 'php',
|
||||
'php3': 'php',
|
||||
'php4': 'php',
|
||||
'php5': 'php',
|
||||
'php6': 'php',
|
||||
'pony': 'pony',
|
||||
'powershell': 'powershell',
|
||||
'ps': 'powershell',
|
||||
'processing': 'processing',
|
||||
'profile': 'profile',
|
||||
'prolog': 'prolog',
|
||||
'protobuf': 'protobuf',
|
||||
'puppet': 'puppet',
|
||||
'pp': 'puppet',
|
||||
'purebasic': 'purebasic',
|
||||
'pb': 'purebasic',
|
||||
'pbi': 'purebasic',
|
||||
'python': 'python',
|
||||
'py': 'python',
|
||||
'gyp': 'python',
|
||||
'q': 'q',
|
||||
'k': 'q',
|
||||
'kdb': 'q',
|
||||
'qml': 'qml',
|
||||
'qt': 'qml',
|
||||
'r': 'r',
|
||||
'rib': 'rib',
|
||||
'roboconf': 'roboconf',
|
||||
'graph': 'roboconf',
|
||||
'instances': 'roboconf',
|
||||
'routeros': 'routeros',
|
||||
'mikrotik': 'routeros',
|
||||
'rsl': 'rsl',
|
||||
'ruby': 'ruby',
|
||||
'rb': 'ruby',
|
||||
'gemspec': 'ruby',
|
||||
'podspec': 'ruby',
|
||||
'thor': 'ruby',
|
||||
'irb': 'ruby',
|
||||
'ruleslanguage': 'ruleslanguage',
|
||||
'rust': 'rust',
|
||||
'rs': 'rust',
|
||||
'scala': 'scala',
|
||||
'scheme': 'scheme',
|
||||
'scilab': 'scilab',
|
||||
'sci': 'scilab',
|
||||
'scss': 'scss',
|
||||
'shell': 'shell',
|
||||
'console': 'shell',
|
||||
'smali': 'smali',
|
||||
'smalltalk': 'smalltalk',
|
||||
'st': 'smalltalk',
|
||||
'sml': 'sml',
|
||||
'sqf': 'sqf',
|
||||
'sql': 'sql',
|
||||
'stan': 'stan',
|
||||
'stata': 'stata',
|
||||
'do': 'stata',
|
||||
'ado': 'stata',
|
||||
'step21': 'step21',
|
||||
'p21': 'step21',
|
||||
'step': 'step21',
|
||||
'stp': 'step21',
|
||||
'stylus': 'stylus',
|
||||
'styl': 'stylus',
|
||||
'subunit': 'subunit',
|
||||
'swift': 'swift',
|
||||
'taggerscript': 'taggerscript',
|
||||
'tap': 'tap',
|
||||
'tcl': 'tcl',
|
||||
'tk': 'tcl',
|
||||
'tex': 'tex',
|
||||
'thrift': 'thrift',
|
||||
'tp': 'tp',
|
||||
'twig': 'twig',
|
||||
'craftcms': 'twig',
|
||||
'typescript': 'typescript',
|
||||
'ts': 'typescript',
|
||||
'vala': 'vala',
|
||||
'vbnet': 'vbnet',
|
||||
'vb': 'vbnet',
|
||||
'vbscript-html': 'vbscript-html',
|
||||
'vbscript': 'vbscript',
|
||||
'vbs': 'vbscript',
|
||||
'verilog': 'verilog',
|
||||
'v': 'verilog',
|
||||
'sv': 'verilog',
|
||||
'svh': 'verilog',
|
||||
'vhdl': 'vhdl',
|
||||
'vim': 'vim',
|
||||
'x86asm': 'x86asm',
|
||||
'xl': 'xl',
|
||||
'tao': 'xl',
|
||||
'xml': 'xml',
|
||||
'html': 'xml',
|
||||
'xhtml': 'xml',
|
||||
'rss': 'xml',
|
||||
'atom': 'xml',
|
||||
'xjb': 'xml',
|
||||
'xsd': 'xml',
|
||||
'xsl': 'xml',
|
||||
'plist': 'xml',
|
||||
'xquery': 'xquery',
|
||||
'xpath': 'xquery',
|
||||
'xq': 'xquery',
|
||||
'yaml': 'yaml',
|
||||
'yml': 'yaml',
|
||||
'YAML': 'yaml',
|
||||
'zephir': 'zephir',
|
||||
'zep': 'zephir'
|
||||
};
|
||||
359
node_modules/mavon-editor/src/lib/core/keydown-listen.js
generated
vendored
Normal file
359
node_modules/mavon-editor/src/lib/core/keydown-listen.js
generated
vendored
Normal file
@@ -0,0 +1,359 @@
|
||||
/**
|
||||
* @Author: HuaChao Chen <CHC>
|
||||
* @Date: 2017-05-03T00:31:20+08:00
|
||||
* @Email: chenhuachaoxyz@gmail.com
|
||||
* @Filename: keydown-listen.js
|
||||
* @Last modified by: chenhuachao
|
||||
* @Last modified time: 2017-12-04T00:03:33+08:00
|
||||
* @License: MIT
|
||||
* @Copyright: 2017
|
||||
*/
|
||||
|
||||
/**
|
||||
* Created by zhy on 2017/4/24.
|
||||
*/
|
||||
const KEY_CODE = {
|
||||
F8: 119,
|
||||
F9: 120,
|
||||
F10: 121,
|
||||
F11: 122,
|
||||
F12: 123,
|
||||
B: 66,
|
||||
I: 73,
|
||||
H: 72,
|
||||
U: 85,
|
||||
D: 68,
|
||||
M:77 ,
|
||||
Q: 81,
|
||||
O: 79,
|
||||
L: 76,
|
||||
S: 83,
|
||||
Z: 90,
|
||||
Y: 89,
|
||||
C: 67,
|
||||
T: 84,
|
||||
R: 82,
|
||||
DELETE: 8,
|
||||
TAB: 9,
|
||||
ENTER: 13,
|
||||
ONE: 97,
|
||||
TWO: 98,
|
||||
THREE: 99,
|
||||
FOUR: 100,
|
||||
FIVE: 101,
|
||||
SIX: 102,
|
||||
_ONE: 49,
|
||||
_TWO: 50,
|
||||
_THREE: 51,
|
||||
_FOUR: 52,
|
||||
_FIVE: 53,
|
||||
_SIX: 54
|
||||
};
|
||||
export const keydownListen = ($vm) => {
|
||||
if (!$vm.shortCut)
|
||||
{
|
||||
return
|
||||
}
|
||||
$vm.$el.addEventListener('keydown', function (e) {
|
||||
// 注册监听键盘事件
|
||||
if (!(e.ctrlKey || e.metaKey) && !e.altKey && !e.shiftKey) {
|
||||
// one key
|
||||
switch (e.keyCode) {
|
||||
case KEY_CODE.F8: {
|
||||
// F8 导航
|
||||
if ($vm.toolbars.navigation) {
|
||||
e.preventDefault()
|
||||
$vm.toolbar_right_click('navigation')
|
||||
}
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.F9: {
|
||||
// F9 预览模式
|
||||
if ($vm.toolbars.preview) {
|
||||
e.preventDefault()
|
||||
$vm.toolbar_right_click('preview')
|
||||
}
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.F10: {
|
||||
// F10 全屏
|
||||
if ($vm.toolbars.fullscreen) {
|
||||
e.preventDefault()
|
||||
$vm.toolbar_right_click('fullscreen')
|
||||
}
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.F11: {
|
||||
// F11 阅读
|
||||
if ($vm.toolbars.readmodel) {
|
||||
e.preventDefault()
|
||||
$vm.toolbar_right_click('read')
|
||||
}
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.F12: {
|
||||
// F12 单双栏切换
|
||||
if ($vm.toolbars.subfield) {
|
||||
e.preventDefault()
|
||||
$vm.toolbar_right_click('subfield')
|
||||
}
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.TAB: {
|
||||
// TAB
|
||||
if (!$vm.$refs.toolbar_left.s_img_link_open) {
|
||||
e.preventDefault()
|
||||
$vm.insertTab();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.ENTER: {
|
||||
// enter
|
||||
if ($vm.$refs.toolbar_left.s_img_link_open) {
|
||||
// 当添加外部链接的弹出层打开时, enter表示确定输入此链接
|
||||
e.preventDefault()
|
||||
$vm.$refs.toolbar_left.$imgLinkAdd();
|
||||
} else {
|
||||
// 在文本框中输入enter
|
||||
$vm.insertEnter(e)
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if ((e.ctrlKey || e.metaKey) && !e.altKey && !e.shiftKey) {
|
||||
// ctrl +
|
||||
switch (e.keyCode) {
|
||||
case KEY_CODE.B: {
|
||||
// B
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('bold')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.I: {
|
||||
// I
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('italic')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.H: {
|
||||
// H
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('header')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.U: {
|
||||
// U
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('underline')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.D: {
|
||||
// D
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('removeLine')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.M: {
|
||||
// M
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('mark')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.Q: {
|
||||
// Q
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('quote')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.O: {
|
||||
// O
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('ol')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.L: {
|
||||
// L
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('link')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.S: {
|
||||
// S
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('save')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.Z: {
|
||||
// Z
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('undo')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.Y: {
|
||||
// Y
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('redo')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.DELETE: {
|
||||
// delete
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('trash')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.ONE: {
|
||||
// ONE
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('header1')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.TWO: {
|
||||
// TWO
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('header2')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.THREE: {
|
||||
// THREE
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('header3')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.FOUR: {
|
||||
// FOUR
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('header4')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.FIVE: {
|
||||
// FIVE
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('header5')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.SIX: {
|
||||
// SIX
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('header6')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE._ONE: {
|
||||
// ONE
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('header1')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE._TWO: {
|
||||
// TWO
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('header2')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE._THREE: {
|
||||
// THREE
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('header3')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE._FOUR: {
|
||||
// FOUR
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('header4')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE._FIVE: {
|
||||
// FIVE
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('header5')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE._SIX: {
|
||||
// SIX
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('header6')
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if ((e.ctrlKey || e.metaKey) && e.altKey && !e.shiftKey) {
|
||||
// ctrl + alt +
|
||||
switch (e.keyCode) {
|
||||
case KEY_CODE.S: {
|
||||
// S
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('superscript')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.U: {
|
||||
// U
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('ul')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.L: {
|
||||
// L
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('imagelink')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.C: {
|
||||
// C
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('code')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.T: {
|
||||
// T
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('table')
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if ((e.ctrlKey || e.metaKey) && e.shiftKey && !e.altKey) {
|
||||
// ctrl + shift
|
||||
switch (e.keyCode) {
|
||||
case KEY_CODE.S: {
|
||||
// S
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('subscript')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.D: {
|
||||
// D
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('strikethrough')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.L: {
|
||||
// D
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('alignleft')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.R: {
|
||||
// D
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('alignright')
|
||||
break;
|
||||
}
|
||||
case KEY_CODE.C: {
|
||||
// D
|
||||
e.preventDefault()
|
||||
$vm.toolbar_left_click('aligncenter')
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (!(e.ctrlKey || e.metaKey) && e.shiftKey && !e.altKey) {
|
||||
// shift +
|
||||
switch (e.keyCode) {
|
||||
case KEY_CODE.TAB: {
|
||||
// TAB
|
||||
if (!$vm.$refs.toolbar_left.s_img_link_open) {
|
||||
e.preventDefault()
|
||||
$vm.unInsertTab();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
90
node_modules/mavon-editor/src/lib/core/markdown.js
generated
vendored
Normal file
90
node_modules/mavon-editor/src/lib/core/markdown.js
generated
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* @Author: HuaChao Chen <CHC>
|
||||
* @Date: 2017-05-03T00:31:20+08:00
|
||||
* @Email: chenhuachaoxyz@gmail.com
|
||||
* @Filename: markdown.js
|
||||
* @Last modified by: chc
|
||||
* @Last modified time: 2017-11-26T16:40:54+08:00
|
||||
* @License: MIT
|
||||
* @Copyright: 2017
|
||||
*/
|
||||
|
||||
import hljsLangs from './hljs/lang.hljs.js'
|
||||
|
||||
/**
|
||||
* Created by zhy on 2017/3/30.
|
||||
*/
|
||||
// default mode
|
||||
var markdown_config = {
|
||||
html: true, // Enable HTML tags in source
|
||||
xhtmlOut: true, // Use '/' to close single tags (<br />).
|
||||
breaks: true, // Convert '\n' in paragraphs into <br>
|
||||
langPrefix: 'language-', // CSS language prefix for fenced blocks. Can be
|
||||
linkify: false, // 自动识别url
|
||||
typographer: true,
|
||||
quotes: '“”‘’',
|
||||
highlight: function (str, lang) {
|
||||
if (lang && hljsLangs[lang]) {
|
||||
return '<pre><div class="hljs"><code class="' + lang + '">' + markdown.utils.escapeHtml(str) + '</code></div></pre>';
|
||||
}
|
||||
return '<pre><code class="' + lang + '">' + markdown.utils.escapeHtml(str) + '</code></pre>';
|
||||
}
|
||||
}
|
||||
var markdown = require('markdown-it')(markdown_config);
|
||||
// 表情
|
||||
var emoji = require('markdown-it-emoji');
|
||||
// 下标
|
||||
var sub = require('markdown-it-sub')
|
||||
// 上标
|
||||
var sup = require('markdown-it-sup')
|
||||
// <dl/>
|
||||
var deflist = require('markdown-it-deflist')
|
||||
// <abbr/>
|
||||
var abbr = require('markdown-it-abbr')
|
||||
// footnote
|
||||
var footnote = require('markdown-it-footnote')
|
||||
// insert 带有下划线 样式 ++ ++
|
||||
var insert = require('markdown-it-ins')
|
||||
// mark
|
||||
var mark = require('markdown-it-mark')
|
||||
// taskLists
|
||||
var taskLists = require('markdown-it-task-lists')
|
||||
//
|
||||
var container = require('markdown-it-container')
|
||||
// add target="_blank" to all link
|
||||
var defaultRender = markdown.renderer.rules.link_open || function(tokens, idx, options, env, self) {
|
||||
return self.renderToken(tokens, idx, options);
|
||||
};
|
||||
markdown.renderer.rules.link_open = function (tokens, idx, options, env, self) {
|
||||
// If you are sure other plugins can't add `target` - drop check below
|
||||
var aIndex = tokens[idx].attrIndex('target');
|
||||
|
||||
if (aIndex < 0) {
|
||||
tokens[idx].attrPush(['target', '_blank']); // add new attribute
|
||||
} else {
|
||||
tokens[idx].attrs[aIndex][1] = '_blank'; // replace value of existing attr
|
||||
}
|
||||
|
||||
// pass token to default renderer.
|
||||
return defaultRender(tokens, idx, options, env, self);
|
||||
};
|
||||
// math katex
|
||||
var katex = require('markdown-it-katex-external');
|
||||
var miip = require('markdown-it-images-preview');
|
||||
markdown.use(emoji)
|
||||
.use(taskLists)
|
||||
.use(sup)
|
||||
.use(sub)
|
||||
.use(container)
|
||||
.use(container, 'hljs-left') /* align left */
|
||||
.use(container, 'hljs-center')/* align center */
|
||||
.use(container, 'hljs-right')/* align right */
|
||||
.use(deflist)
|
||||
.use(abbr)
|
||||
.use(footnote)
|
||||
.use(insert)
|
||||
.use(mark)
|
||||
.use(container)
|
||||
.use(miip)
|
||||
.use(katex)
|
||||
export default markdown
|
||||
159
node_modules/mavon-editor/src/lib/core/onecolumn-event.js
generated
vendored
Normal file
159
node_modules/mavon-editor/src/lib/core/onecolumn-event.js
generated
vendored
Normal file
@@ -0,0 +1,159 @@
|
||||
/**
|
||||
* Created by zhy on 2017/4/24.
|
||||
*/
|
||||
/**
|
||||
* keydown enter
|
||||
*/
|
||||
export const onecolumnKeyDownEnter = ($event , $vm , tomarkdown) => {
|
||||
let element = $event.srcElement ? $event.srcElement : $event.target
|
||||
let sel = window.getSelection();
|
||||
let range = sel.getRangeAt(0);
|
||||
// code中回车处理
|
||||
if (range.startContainer.tagName === 'CODE' || range.startContainer.tagName === 'PRE') {
|
||||
$event.preventDefault()
|
||||
onecolumnInsert(range.startContainer , '\n')
|
||||
} else if (range.startContainer.parentElement.tagName === 'CODE' || range.startContainer.parentElement.tagName === 'PRE') {
|
||||
$event.preventDefault()
|
||||
onecolumnInsert(range.startContainer.parentElement , '\n')
|
||||
} else if (!blockQuoteDoubleEnter(range.startContainer , $event , range.startContainer)) {
|
||||
$vm.s_table_enter = false
|
||||
judgeRender(range.startContainer , $event , range.startContainer , range.startContainer , $vm)
|
||||
/* if (result) {
|
||||
range = range.cloneRange();
|
||||
// code的渲染
|
||||
if (result.children !== null && result.children.length > 0 && result.children[0].tagName === 'PRE') {
|
||||
result.children[0].children[0].innerHTML = '\n'
|
||||
result.innerHTML += '<div><br/></div>'
|
||||
range.setStartAfter(result.children[0].children[0]);
|
||||
} else if (result.lastChild) {
|
||||
range.setStartAfter(result.lastChild);
|
||||
} else {
|
||||
range.setStartAfter(result);
|
||||
}
|
||||
range.collapse(true);
|
||||
sel.removeAllRanges();
|
||||
sel.addRange(range);
|
||||
} */
|
||||
}
|
||||
$vm.d_value = tomarkdown(element.innerHTML)
|
||||
}
|
||||
/**
|
||||
* insert
|
||||
*/
|
||||
export const onecolumnInsert = (dom , html) => {
|
||||
dom.focus()
|
||||
var sel
|
||||
var range
|
||||
if (window.getSelection) {
|
||||
// IE9 and non-IE
|
||||
sel = window.getSelection();
|
||||
if (sel.getRangeAt && sel.rangeCount) {
|
||||
range = sel.getRangeAt(0);
|
||||
range.deleteContents();
|
||||
// Range.createContextualFragment() would be useful here but is
|
||||
// non-standard and not supported in all browsers (IE9, for one)
|
||||
var el = document.createElement('div');
|
||||
el.innerHTML = html;
|
||||
var frag = document.createDocumentFragment()
|
||||
var node
|
||||
var lastNode
|
||||
while ((node = el.firstChild)) {
|
||||
lastNode = frag.appendChild(node);
|
||||
}
|
||||
range.insertNode(frag);
|
||||
// Preserve the selection
|
||||
if (lastNode) {
|
||||
range = range.cloneRange();
|
||||
range.setStartAfter(lastNode);
|
||||
range.collapse(true);
|
||||
sel.removeAllRanges();
|
||||
sel.addRange(range);
|
||||
}
|
||||
}
|
||||
} else if (document.selection && document.selection.type !== 'Control') {
|
||||
// IE < 9
|
||||
document.selection.createRange().pasteHTML(html);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 连续两次在段落中换行 跳出段落
|
||||
*/
|
||||
export const blockQuoteDoubleEnter = (dom , $event , self) => {
|
||||
if (dom.tagName) {
|
||||
if (dom.getAttribute('class') === 'content-div content-div-edit') {
|
||||
return false
|
||||
} else if (dom.tagName === 'BLOCKQUOTE') {
|
||||
if (!self.innerText || self.innerText === '\n' || self.innerText === '') {
|
||||
$event.preventDefault()
|
||||
let sel = window.getSelection();
|
||||
let range = sel.getRangeAt(0);
|
||||
let next = dom.nextSibling
|
||||
self.outerHTML = ''
|
||||
dom.outerHTML += '<div><br/></div>'
|
||||
range = range.cloneRange()
|
||||
range.setStartAfter(next.previousSibling.lastChild);
|
||||
range.collapse(true);
|
||||
sel.removeAllRanges();
|
||||
sel.addRange(range);
|
||||
}
|
||||
return true
|
||||
}
|
||||
return blockQuoteDoubleEnter(dom.parentElement, $event , dom)
|
||||
} else {
|
||||
return blockQuoteDoubleEnter(dom.parentElement, $event , dom)
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 在表格中回车特殊处理(暂时只做表格回车 , 后续可能拓展)
|
||||
*/
|
||||
export const judgeRender = (dom , $event , self , pre , $vm) => {
|
||||
if (dom.tagName) {
|
||||
if (dom.tagName === 'TABLE') {
|
||||
$vm.s_table_enter = true
|
||||
self = dom
|
||||
}
|
||||
if (dom.getAttribute('class') === 'content-div content-div-edit') {
|
||||
// 在表格中回车 在表格后换行
|
||||
if ($vm.s_table_enter) {
|
||||
let sel = window.getSelection();
|
||||
let range = sel.getRangeAt(0);
|
||||
range = range.cloneRange()
|
||||
$event.preventDefault()
|
||||
let next = self.nextSibling
|
||||
self.outerHTML += '<div><br/></div>'
|
||||
range.setStartAfter(next.previousSibling.lastChild);
|
||||
range.collapse(true);
|
||||
sel.removeAllRanges();
|
||||
sel.addRange(range);
|
||||
}
|
||||
return;
|
||||
}
|
||||
judgeRender(dom.parentElement , $event , self , dom , $vm)
|
||||
/* let obj = document.createElement('div')
|
||||
obj.innerHTML = markdown.render(dom.innerHTML.replace('>' , '>'))
|
||||
var objText = obj.innerText
|
||||
var domText = dom.innerText
|
||||
var objTextNoSpaceEnter = objText.replace(/\s+/g, '').replace(/[\r\n]/g, '')
|
||||
var domTextNoSpaceEnter = domText.replace(/\s+/g, '').replace(/[\r\n]/g, '')
|
||||
if (obj.children.length > 0) {
|
||||
if (obj.children[0].innerText.replace(/\s+/g, '').replace(/[\r\n]/g, '') === domTextNoSpaceEnter || obj.children[0].innerText === domText || objText === domText || domTextNoSpaceEnter === objTextNoSpaceEnter) {
|
||||
return judgeRender(dom.parentElement , $event , self ,dom , $vm)
|
||||
} else {
|
||||
// 有变化
|
||||
$event.preventDefault()
|
||||
dom.innerHTML = markdown.render(tomarkdown(dom.innerHTML))
|
||||
return dom
|
||||
}
|
||||
} else {
|
||||
if (objText === domText || objTextNoSpaceEnter === domTextNoSpaceEnter) {
|
||||
return judgeRender(dom.parentElement , $event , self , dom , $vm)
|
||||
} else {
|
||||
// 有变化
|
||||
dom.innerHTML = markdown.render(tomarkdown(obj.innerHTML))
|
||||
return dom
|
||||
}
|
||||
} */
|
||||
} else {
|
||||
judgeRender(dom.parentElement , $event , self , dom , $vm)
|
||||
}
|
||||
}
|
||||
31
node_modules/mavon-editor/src/lib/core/sanitizer.js
generated
vendored
Normal file
31
node_modules/mavon-editor/src/lib/core/sanitizer.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
import { FilterXSS } from 'xss';
|
||||
|
||||
let xssHandler;
|
||||
|
||||
function mavoneditor_sanitizer(state) {
|
||||
if (!xssHandler) {
|
||||
return;
|
||||
}
|
||||
sanitizer(state.tokens, ['inline', 'html_block']);
|
||||
}
|
||||
|
||||
function sanitizer(tokens, types) {
|
||||
let originContent, children;
|
||||
for (let i = 0; i < tokens.length; i++) {
|
||||
if (types.indexOf(tokens[i].type) !== -1) {
|
||||
originContent = tokens[i].content;
|
||||
children = tokens[i].children;
|
||||
tokens[i].content = xssHandler.process(originContent);
|
||||
if (children && children.length && originContent !== tokens[i].content) {
|
||||
sanitizer(children, ['html_inline']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default function (md, xssOptions) {
|
||||
if (md.options.html) {
|
||||
xssHandler = new FilterXSS(xssOptions);
|
||||
md.core.ruler.push('mavoneditor_sanitizer', mavoneditor_sanitizer);
|
||||
}
|
||||
}
|
||||
171
node_modules/mavon-editor/src/lib/core/to-markdown.js
generated
vendored
Normal file
171
node_modules/mavon-editor/src/lib/core/to-markdown.js
generated
vendored
Normal file
@@ -0,0 +1,171 @@
|
||||
/**
|
||||
* @Author: HuaChao Chen <chc>
|
||||
* @Date: 2017-05-03T00:31:20+08:00
|
||||
* @Email: chenhuachaoxyz@gmail.com
|
||||
* @Filename: to-markdown.js
|
||||
* @Last modified by: chc
|
||||
* @Last modified time: 2017-06-12T20:42:27+08:00
|
||||
* @License: MIT
|
||||
* @Copyright: 2017
|
||||
*/
|
||||
|
||||
/**
|
||||
* Created by zhy on 2017/4/9.
|
||||
*/
|
||||
var toMarkdown = require('to-markdown');
|
||||
//
|
||||
const coverterP = {
|
||||
filter: 'P',
|
||||
replacement: function (content) {
|
||||
return '\n' + content
|
||||
}
|
||||
}
|
||||
const coverterp = {
|
||||
filter: 'p',
|
||||
replacement: function (content) {
|
||||
return '\n' + content
|
||||
}
|
||||
}
|
||||
const coverterDiv = {
|
||||
filter: 'DIV',
|
||||
replacement: function (content) {
|
||||
return '\n' + content
|
||||
}
|
||||
}
|
||||
const coverterdiv = {
|
||||
filter: 'div',
|
||||
replacement: function (content) {
|
||||
return '\n' + content
|
||||
}
|
||||
}
|
||||
// 解析代码块
|
||||
const coverterCode = {
|
||||
filter: 'pre',
|
||||
replacement: function (content) {
|
||||
let objE = document.createElement('div');
|
||||
objE.innerHTML = content;
|
||||
let codes = objE.getElementsByTagName('code')
|
||||
if (codes !== null && codes.length > 0) {
|
||||
let code = codes[0]
|
||||
let codeType = code.getAttribute('class') === null ? '' : code.getAttribute('class')
|
||||
let codeContent = code.innerText
|
||||
return '\n```' + codeType + '\n' + codeContent + '\n```\n';
|
||||
}
|
||||
return '\n```\n' + content + '\n```\n';
|
||||
}
|
||||
}
|
||||
// 解析表格
|
||||
const coverterTable = {
|
||||
filter: 'table',
|
||||
replacement: function (content) {
|
||||
let table = document.createElement('table');
|
||||
table.innerHTML = content;
|
||||
let dom = '\n';
|
||||
let tableMark = '';
|
||||
let thead = table.getElementsByTagName('thead')[0];
|
||||
let thead_tr = thead.getElementsByTagName('tr')[0];
|
||||
let thead_th = thead_tr.getElementsByTagName('th')
|
||||
for (let i = 0; i < thead_th.length; i++) {
|
||||
dom += '| ' + thead_th[i].innerText + ' '
|
||||
let text_align = thead_th[i].style.textAlign
|
||||
if (text_align === 'left') {
|
||||
tableMark += '| :- '
|
||||
} else if (text_align === 'center') {
|
||||
tableMark += '| :-: '
|
||||
} else if (text_align === 'right') {
|
||||
tableMark += '| -: '
|
||||
} else {
|
||||
tableMark += '| - '
|
||||
}
|
||||
if (i === thead_th.length - 1) {
|
||||
dom += '|\n' + tableMark + ' |\n'
|
||||
}
|
||||
}
|
||||
let tbody
|
||||
if (table.getElementsByTagName('tbody')) {
|
||||
tbody = table.getElementsByTagName('tbody')[0];
|
||||
let tbody_tr = tbody.getElementsByTagName('tr')
|
||||
if (tbody_tr.length > 0) {
|
||||
for (let i = 0; i < tbody_tr.length; i++) {
|
||||
let tbody_td = tbody_tr[i].getElementsByTagName('td')
|
||||
for (let j = 0; j < tbody_td.length; j++) {
|
||||
dom += '| ' + tbody_td[j].innerText + ' ';
|
||||
if (j === tbody_td.length - 1) {
|
||||
dom += '|\n';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return dom
|
||||
}
|
||||
}
|
||||
// 上角标
|
||||
const coverterSup = {
|
||||
filter: 'sup',
|
||||
replacement: function (content) {
|
||||
return '^' + content + '^';
|
||||
}
|
||||
}
|
||||
// 下角标
|
||||
const coverterSub = {
|
||||
filter: 'sub',
|
||||
replacement: function (content) {
|
||||
return '~' + content + '~';
|
||||
}
|
||||
}
|
||||
// 下划线
|
||||
const coverterUnderline = {
|
||||
filter: 'ins',
|
||||
replacement: function (content) {
|
||||
return '++' + content + '++';
|
||||
}
|
||||
}
|
||||
// 中画线
|
||||
const coverterStrikethrough = {
|
||||
filter: 's',
|
||||
replacement: function (content) {
|
||||
return '~~' + content + '~~';
|
||||
}
|
||||
}
|
||||
// 标记
|
||||
const coverterMark = {
|
||||
filter: 'mark',
|
||||
replacement: function (content) {
|
||||
return '==' + content + '==';
|
||||
}
|
||||
}
|
||||
// 图片
|
||||
const converterImg = {
|
||||
filter: 'img',
|
||||
replacement: function(content, tag) {
|
||||
var rel = tag.getAttribute('rel');
|
||||
var alt = tag.getAttribute('alt');
|
||||
if (rel && alt) {
|
||||
return '![' + alt + ']' + '(' + rel + ')'
|
||||
}
|
||||
else {
|
||||
var src = tag.getAttribute('src');
|
||||
return '![' + alt + ']' + '(' + src + ')'
|
||||
}
|
||||
}
|
||||
}
|
||||
var tomarkdown = function (str) {
|
||||
return toMarkdown(str, {
|
||||
converters: [
|
||||
coverterCode,
|
||||
coverterTable,
|
||||
coverterSup,
|
||||
coverterSub,
|
||||
coverterUnderline,
|
||||
coverterStrikethrough,
|
||||
coverterMark,
|
||||
coverterP,
|
||||
coverterp,
|
||||
coverterDiv,
|
||||
coverterdiv,
|
||||
converterImg
|
||||
]
|
||||
});
|
||||
}
|
||||
export default tomarkdown
|
||||
783
node_modules/mavon-editor/src/lib/css/markdown.css
generated
vendored
Normal file
783
node_modules/mavon-editor/src/lib/css/markdown.css
generated
vendored
Normal file
@@ -0,0 +1,783 @@
|
||||
@font-face {
|
||||
font-family: octicons-link;
|
||||
src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAAizAFoAAABiAGIAznjaY2BkYGAA4in8zwXi+W2+MjCzMIDApSwvXzC97Z4Ig8N/BxYGZgcgl52BCSQKAA3jCV8CAABfAAAAAAQAAEB42mNgZGBg4f3vACQZQABIMjKgAmYAKEgBXgAAeNpjYGY6wTiBgZWBg2kmUxoDA4MPhGZMYzBi1AHygVLYQUCaawqDA4PChxhmh/8ODDEsvAwHgMKMIDnGL0x7gJQCAwMAJd4MFwAAAHjaY2BgYGaA4DAGRgYQkAHyGMF8NgYrIM3JIAGVYYDT+AEjAwuDFpBmA9KMDEwMCh9i/v8H8sH0/4dQc1iAmAkALaUKLgAAAHjaTY9LDsIgEIbtgqHUPpDi3gPoBVyRTmTddOmqTXThEXqrob2gQ1FjwpDvfwCBdmdXC5AVKFu3e5MfNFJ29KTQT48Ob9/lqYwOGZxeUelN2U2R6+cArgtCJpauW7UQBqnFkUsjAY/kOU1cP+DAgvxwn1chZDwUbd6CFimGXwzwF6tPbFIcjEl+vvmM/byA48e6tWrKArm4ZJlCbdsrxksL1AwWn/yBSJKpYbq8AXaaTb8AAHja28jAwOC00ZrBeQNDQOWO//sdBBgYGRiYWYAEELEwMTE4uzo5Zzo5b2BxdnFOcALxNjA6b2ByTswC8jYwg0VlNuoCTWAMqNzMzsoK1rEhNqByEyerg5PMJlYuVueETKcd/89uBpnpvIEVomeHLoMsAAe1Id4AAAAAAAB42oWQT07CQBTGv0JBhagk7HQzKxca2sJCE1hDt4QF+9JOS0nbaaYDCQfwCJ7Au3AHj+LO13FMmm6cl7785vven0kBjHCBhfpYuNa5Ph1c0e2Xu3jEvWG7UdPDLZ4N92nOm+EBXuAbHmIMSRMs+4aUEd4Nd3CHD8NdvOLTsA2GL8M9PODbcL+hD7C1xoaHeLJSEao0FEW14ckxC+TU8TxvsY6X0eLPmRhry2WVioLpkrbp84LLQPGI7c6sOiUzpWIWS5GzlSgUzzLBSikOPFTOXqly7rqx0Z1Q5BAIoZBSFihQYQOOBEdkCOgXTOHA07HAGjGWiIjaPZNW13/+lm6S9FT7rLHFJ6fQbkATOG1j2OFMucKJJsxIVfQORl+9Jyda6Sl1dUYhSCm1dyClfoeDve4qMYdLEbfqHf3O/AdDumsjAAB42mNgYoAAZQYjBmyAGYQZmdhL8zLdDEydARfoAqIAAAABAAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==) format('woff');
|
||||
}
|
||||
|
||||
.markdown-body {
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
line-height: 1.5;
|
||||
color: #24292e;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.markdown-body .pl-c {
|
||||
color: #969896;
|
||||
}
|
||||
|
||||
.markdown-body .pl-c1,
|
||||
.markdown-body .pl-s .pl-v {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
.markdown-body .pl-e,
|
||||
.markdown-body .pl-en {
|
||||
color: #795da3;
|
||||
}
|
||||
|
||||
.markdown-body .pl-smi,
|
||||
.markdown-body .pl-s .pl-s1 {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.markdown-body .pl-ent {
|
||||
color: #63a35c;
|
||||
}
|
||||
|
||||
.markdown-body .pl-k {
|
||||
color: #a71d5d;
|
||||
}
|
||||
|
||||
.markdown-body .pl-s,
|
||||
.markdown-body .pl-pds,
|
||||
.markdown-body .pl-s .pl-pse .pl-s1,
|
||||
.markdown-body .pl-sr,
|
||||
.markdown-body .pl-sr .pl-cce,
|
||||
.markdown-body .pl-sr .pl-sre,
|
||||
.markdown-body .pl-sr .pl-sra {
|
||||
color: #183691;
|
||||
}
|
||||
|
||||
.markdown-body .pl-v,
|
||||
.markdown-body .pl-smw {
|
||||
color: #ed6a43;
|
||||
}
|
||||
|
||||
.markdown-body .pl-bu {
|
||||
color: #b52a1d;
|
||||
}
|
||||
|
||||
.markdown-body .pl-ii {
|
||||
color: #f8f8f8;
|
||||
background-color: #b52a1d;
|
||||
}
|
||||
|
||||
.markdown-body .pl-c2 {
|
||||
color: #f8f8f8;
|
||||
background-color: #b52a1d;
|
||||
}
|
||||
|
||||
.markdown-body .pl-c2::before {
|
||||
content: "^M";
|
||||
}
|
||||
|
||||
.markdown-body .pl-sr .pl-cce {
|
||||
font-weight: bold;
|
||||
color: #63a35c;
|
||||
}
|
||||
|
||||
.markdown-body .pl-ml {
|
||||
color: #693a17;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mh,
|
||||
.markdown-body .pl-mh .pl-en,
|
||||
.markdown-body .pl-ms {
|
||||
font-weight: bold;
|
||||
color: #1d3e81;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mq {
|
||||
color: #008080;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mi {
|
||||
font-style: italic;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mb {
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.markdown-body .pl-md {
|
||||
color: #bd2c00;
|
||||
background-color: #ffecec;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mi1 {
|
||||
color: #55a532;
|
||||
background-color: #eaffea;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mc {
|
||||
color: #ef9700;
|
||||
background-color: #ffe3b4;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mi2 {
|
||||
color: #d8d8d8;
|
||||
background-color: #808080;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mdr {
|
||||
font-weight: bold;
|
||||
color: #795da3;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mo {
|
||||
color: #1d3e81;
|
||||
}
|
||||
|
||||
.markdown-body .pl-ba {
|
||||
color: #595e62;
|
||||
}
|
||||
|
||||
.markdown-body .pl-sg {
|
||||
color: #c0c0c0;
|
||||
}
|
||||
|
||||
.markdown-body .pl-corl {
|
||||
text-decoration: underline;
|
||||
color: #183691;
|
||||
}
|
||||
|
||||
.markdown-body .octicon {
|
||||
display: inline-block;
|
||||
vertical-align: text-top;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
.markdown-body a {
|
||||
background-color: transparent;
|
||||
-webkit-text-decoration-skip: objects;
|
||||
}
|
||||
|
||||
.markdown-body a:active,
|
||||
.markdown-body a:hover {
|
||||
outline-width: 0;
|
||||
}
|
||||
|
||||
.markdown-body strong {
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
.markdown-body strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.markdown-body h1 {
|
||||
font-size: 2.4em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
.markdown-body img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
.markdown-body svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.markdown-body code,
|
||||
.markdown-body kbd,
|
||||
.markdown-body pre {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.markdown-body hr {
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.markdown-body input {
|
||||
font: inherit;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.markdown-body input {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.markdown-body [type="checkbox"] {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.markdown-body * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.markdown-body input {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.markdown-body a {
|
||||
color: #0366d6;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.markdown-body a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.markdown-body strong {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown-body hr {
|
||||
height: 0;
|
||||
margin: 15px 0;
|
||||
overflow: hidden;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
border-bottom: 1px solid #dfe2e5;
|
||||
}
|
||||
|
||||
.markdown-body hr::before {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.markdown-body hr::after {
|
||||
display: table;
|
||||
clear: both;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.markdown-body table {
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.markdown-body td,
|
||||
.markdown-body th {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.markdown-body h1,
|
||||
.markdown-body h2,
|
||||
.markdown-body h3,
|
||||
.markdown-body h4,
|
||||
.markdown-body h5,
|
||||
.markdown-body h6 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.markdown-body h1 {
|
||||
font-size: 36px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.markdown-body h2 {
|
||||
font-size: 28px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown-body h3 {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown-body h4 {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown-body h5 {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown-body h6 {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown-body p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.markdown-body blockquote {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.markdown-body ul,
|
||||
.markdown-body ol {
|
||||
padding-left: 0;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.markdown-body ol ol,
|
||||
.markdown-body ul ol {
|
||||
list-style-type: lower-roman;
|
||||
}
|
||||
.markdown-body ul ul ol,
|
||||
.markdown-body ul ol ol,
|
||||
.markdown-body ol ul ol,
|
||||
.markdown-body ol ol ol {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
|
||||
.markdown-body dd {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.markdown-body code {
|
||||
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.markdown-body pre {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
font: 12px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||
}
|
||||
|
||||
.markdown-body .octicon {
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
.markdown-body .pl-0 {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
.markdown-body .pl-1 {
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.markdown-body .pl-2 {
|
||||
padding-left: 8px !important;
|
||||
}
|
||||
|
||||
.markdown-body .pl-3 {
|
||||
padding-left: 16px !important;
|
||||
}
|
||||
|
||||
.markdown-body .pl-4 {
|
||||
padding-left: 24px !important;
|
||||
}
|
||||
|
||||
.markdown-body .pl-5 {
|
||||
padding-left: 32px !important;
|
||||
}
|
||||
|
||||
.markdown-body .pl-6 {
|
||||
padding-left: 40px !important;
|
||||
}
|
||||
|
||||
.markdown-body::before {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.markdown-body::after {
|
||||
display: table;
|
||||
clear: both;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.markdown-body > *:first-child {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.markdown-body > *:last-child {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.markdown-body a:not([href]) {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.markdown-body .anchor {
|
||||
float: left;
|
||||
padding-right: 4px;
|
||||
margin-left: -20px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.markdown-body .anchor:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.markdown-body blockquote,
|
||||
.markdown-body ul,
|
||||
.markdown-body ol,
|
||||
.markdown-body dl,
|
||||
.markdown-body table,
|
||||
.markdown-body pre {
|
||||
margin-top: 0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.markdown-body hr {
|
||||
height: 0.25em;
|
||||
padding: 0;
|
||||
margin: 24px 0;
|
||||
background-color: #e1e4e8;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.markdown-body blockquote {
|
||||
padding: 0 1em;
|
||||
color: #6a737d;
|
||||
border-left: 0.25em solid #dfe2e5;
|
||||
}
|
||||
|
||||
.markdown-body blockquote > :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.markdown-body blockquote > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.markdown-body kbd {
|
||||
display: inline-block;
|
||||
padding: 3px 5px;
|
||||
font-size: 11px;
|
||||
line-height: 10px;
|
||||
color: #444d56;
|
||||
vertical-align: middle;
|
||||
background-color: #fafbfc;
|
||||
border: solid 1px #c6cbd1;
|
||||
border-bottom-color: #959da5;
|
||||
border-radius: 3px;
|
||||
box-shadow: inset 0 -1px 0 #959da5;
|
||||
}
|
||||
|
||||
.markdown-body h1,
|
||||
.markdown-body h2,
|
||||
.markdown-body h3,
|
||||
.markdown-body h4,
|
||||
.markdown-body h5,
|
||||
.markdown-body h6 {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 12px;
|
||||
font-weight: 600;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.markdown-body h1 .octicon-link,
|
||||
.markdown-body h2 .octicon-link,
|
||||
.markdown-body h3 .octicon-link,
|
||||
.markdown-body h4 .octicon-link,
|
||||
.markdown-body h5 .octicon-link,
|
||||
.markdown-body h6 .octicon-link {
|
||||
color: #1b1f23;
|
||||
vertical-align: middle;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.markdown-body h1:hover .anchor,
|
||||
.markdown-body h2:hover .anchor,
|
||||
.markdown-body h3:hover .anchor,
|
||||
.markdown-body h4:hover .anchor,
|
||||
.markdown-body h5:hover .anchor,
|
||||
.markdown-body h6:hover .anchor {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.markdown-body h1:hover .anchor .octicon-link,
|
||||
.markdown-body h2:hover .anchor .octicon-link,
|
||||
.markdown-body h3:hover .anchor .octicon-link,
|
||||
.markdown-body h4:hover .anchor .octicon-link,
|
||||
.markdown-body h5:hover .anchor .octicon-link,
|
||||
.markdown-body h6:hover .anchor .octicon-link {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.markdown-body h1 {
|
||||
padding-bottom: 0.3em;
|
||||
font-size: 2.2em;
|
||||
border-bottom: 1px solid #eaecef;
|
||||
}
|
||||
|
||||
.markdown-body h2 {
|
||||
padding-bottom: 0.3em;
|
||||
font-size: 1.8em;
|
||||
border-bottom: 1px solid #eaecef;
|
||||
}
|
||||
|
||||
.markdown-body h3 {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.markdown-body h4 {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.markdown-body h5 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.markdown-body h6 {
|
||||
font-size: 14px;
|
||||
color: #6a737d;
|
||||
}
|
||||
|
||||
.markdown-body ul,
|
||||
.markdown-body ol {
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
.markdown-body ul ul,
|
||||
.markdown-body ul ol,
|
||||
.markdown-body ol ol,
|
||||
.markdown-body ol ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.markdown-body li > p {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.markdown-body li + li {
|
||||
margin-top: 0.25em;
|
||||
}
|
||||
|
||||
.markdown-body dl {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.markdown-body dl dt {
|
||||
padding: 0;
|
||||
margin-top: 16px;
|
||||
font-size: 1em;
|
||||
font-style: italic;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown-body dl dd {
|
||||
padding: 0 16px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.markdown-body table {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.markdown-body table th {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown-body table th,
|
||||
.markdown-body table td {
|
||||
padding: 6px 13px;
|
||||
border: 1px solid #dfe2e5;
|
||||
}
|
||||
|
||||
.markdown-body table tr {
|
||||
background-color: #fff;
|
||||
border-top: 1px solid #c6cbd1;
|
||||
}
|
||||
|
||||
.markdown-body table tr:nth-child(2n) {
|
||||
background-color: #f6f8fa;
|
||||
}
|
||||
|
||||
.markdown-body img {
|
||||
max-width: 100%;
|
||||
box-sizing: content-box;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.markdown-body code {
|
||||
padding: 0;
|
||||
padding-top: 0.2em;
|
||||
padding-bottom: 0.2em;
|
||||
margin: 0;
|
||||
font-size: 85%;
|
||||
background-color: rgba(27, 31, 35, 0.05);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.markdown-body code::before,
|
||||
.markdown-body code::after {
|
||||
letter-spacing: -0.2em;
|
||||
content: "\00a0";
|
||||
}
|
||||
|
||||
.markdown-body pre {
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
.markdown-body pre > code {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-size: 100%;
|
||||
word-break: normal;
|
||||
white-space: pre;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.markdown-body .highlight {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.markdown-body .highlight pre {
|
||||
margin-bottom: 0;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
.markdown-body .highlight pre,
|
||||
.markdown-body pre {
|
||||
padding: 16px;
|
||||
overflow: auto;
|
||||
font-size: 85%;
|
||||
line-height: 1.45;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.markdown-body pre code {
|
||||
display: inline;
|
||||
max-width: auto;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
line-height: inherit;
|
||||
word-wrap: normal;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.markdown-body pre code::before,
|
||||
.markdown-body pre code::after {
|
||||
content: normal;
|
||||
}
|
||||
|
||||
.markdown-body .full-commit .btn-outline:not(:disabled):hover {
|
||||
color: #005cc5;
|
||||
border-color: #005cc5;
|
||||
}
|
||||
|
||||
.markdown-body kbd {
|
||||
display: inline-block;
|
||||
padding: 3px 5px;
|
||||
font: 11px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||
line-height: 10px;
|
||||
color: #444d56;
|
||||
vertical-align: middle;
|
||||
background-color: #fcfcfc;
|
||||
border: solid 1px #c6cbd1;
|
||||
border-bottom-color: #959da5;
|
||||
border-radius: 3px;
|
||||
box-shadow: inset 0 -1px 0 #959da5;
|
||||
}
|
||||
|
||||
.markdown-body :checked + .radio-label {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
border-color: #0366d6;
|
||||
}
|
||||
|
||||
.markdown-body .task-list-item {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.markdown-body .task-list-item + .task-list-item {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.markdown-body .task-list-item input {
|
||||
margin: 0 0.2em 0.25em -1.6em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.markdown-body hr {
|
||||
border-bottom-color: #eee;
|
||||
}
|
||||
|
||||
/* 高亮 */
|
||||
.markdown-body .hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
color: #333;
|
||||
background: #f2f3f1
|
||||
}
|
||||
|
||||
.markdown-body .hljs-comment, .hljs-quote {
|
||||
color: #998;
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
.markdown-body .hljs-keyword, .hljs-selector-tag, .hljs-subst {
|
||||
color: #333;
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
.markdown-body .hljs-number, .hljs-literal, .hljs-variable, .hljs-template-variable, .hljs-tag .hljs-attr {
|
||||
color: #008080
|
||||
}
|
||||
|
||||
.markdown-body .hljs-string, .hljs-doctag {
|
||||
color: #d14
|
||||
}
|
||||
|
||||
.markdown-body .hljs-title, .hljs-section, .hljs-selector-id {
|
||||
color: #900;
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
.markdown-body .hljs-subst {
|
||||
font-weight: normal
|
||||
}
|
||||
|
||||
.markdown-body .hljs-type, .hljs-class .hljs-title {
|
||||
color: #458;
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
.markdown-body .hljs-tag, .hljs-name, .hljs-attribute {
|
||||
color: #000080;
|
||||
font-weight: normal
|
||||
}
|
||||
|
||||
.markdown-body .hljs-regexp, .hljs-link {
|
||||
color: #009926
|
||||
}
|
||||
|
||||
.markdown-body .hljs-symbol, .hljs-bullet {
|
||||
color: #990073
|
||||
}
|
||||
|
||||
.markdown-body .hljs-built_in, .hljs-builtin-name {
|
||||
color: #0086b3
|
||||
}
|
||||
|
||||
.markdown-body .hljs-meta {
|
||||
color: #999;
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
.markdown-body .hljs-deletion {
|
||||
background: #fdd
|
||||
}
|
||||
|
||||
.markdown-body .hljs-addition {
|
||||
background: #dfd
|
||||
}
|
||||
|
||||
.markdown-body .hljs-emphasis {
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
.markdown-body .hljs-strong {
|
||||
font-weight: bold
|
||||
}
|
||||
297
node_modules/mavon-editor/src/lib/css/mavon-editor.styl
generated
vendored
Normal file
297
node_modules/mavon-editor/src/lib/css/mavon-editor.styl
generated
vendored
Normal file
@@ -0,0 +1,297 @@
|
||||
border-color = 1px solid #F2F6FC
|
||||
op-height = 40px
|
||||
textarea:disabled
|
||||
background-color #ffffff
|
||||
|
||||
/* 路由内容 */
|
||||
.v-note-wrapper
|
||||
position relative
|
||||
min-width 300px
|
||||
min-height 300px
|
||||
display flex
|
||||
flex-direction column
|
||||
background-color #fff
|
||||
z-index 1500
|
||||
text-align left
|
||||
border border-color
|
||||
border-radius 4px
|
||||
&.fullscreen
|
||||
position fixed
|
||||
left 0
|
||||
right 0
|
||||
bottom 0
|
||||
top 0
|
||||
margin 0
|
||||
height auto
|
||||
z-index 1501
|
||||
.v-note-op
|
||||
padding 1px
|
||||
width 100%
|
||||
display flex
|
||||
white-space pre-line
|
||||
flex none
|
||||
min-height op-height
|
||||
user-select none
|
||||
border-bottom border-color
|
||||
border-radius 4px 4px 0 0
|
||||
background-color #fff
|
||||
z-index 1
|
||||
.v-left-item, .v-right-item
|
||||
flex 1
|
||||
min-height op-height
|
||||
box-sizing border-box
|
||||
.op-icon-divider
|
||||
height op-height
|
||||
border-left 1px solid #e5e5e5
|
||||
margin 0 6px 0 4px
|
||||
.op-icon
|
||||
box-sizing border-box
|
||||
display inline-block
|
||||
cursor pointer
|
||||
height 28px
|
||||
width 28px
|
||||
margin 6px 0 5px 0px
|
||||
font-size 14px
|
||||
padding 4.5px 6px 5px 3.5px
|
||||
color #757575
|
||||
border-radius 5px
|
||||
text-align center
|
||||
background none
|
||||
border none
|
||||
outline none
|
||||
line-height 1
|
||||
//vertical-align middle
|
||||
&.dropdown-wrapper
|
||||
line-height 18px
|
||||
&.selected
|
||||
color rgba(0, 0, 0, 0.8)
|
||||
background #eaeaea
|
||||
&:hover
|
||||
color rgba(0, 0, 0, 0.8)
|
||||
background #e9e9eb
|
||||
&.transition
|
||||
.op-icon
|
||||
transition all 0.2s linear 0s
|
||||
.v-right-item
|
||||
text-align right
|
||||
padding-right 6px
|
||||
max-width 30%
|
||||
.v-left-item
|
||||
text-align left
|
||||
padding-left 6px
|
||||
.v-note-panel
|
||||
position relative
|
||||
border-top none
|
||||
display flex
|
||||
flex 1
|
||||
width 100%
|
||||
box-sizing border-box
|
||||
overflow hidden
|
||||
.v-note-edit.divarea-wrapper
|
||||
flex 0 0 50%
|
||||
width 50%
|
||||
padding 0
|
||||
overflow-y scroll
|
||||
overflow-x hidden
|
||||
box-sizing border-box
|
||||
cursor text
|
||||
border-bottom-left-radius: 4px;
|
||||
scrollbar()
|
||||
&.transition
|
||||
transition all 0.2s linear 0s
|
||||
&.single-edit
|
||||
width 100%
|
||||
flex 0 0 100%
|
||||
overflow-y auto
|
||||
&.single-show
|
||||
width 0
|
||||
flex 0 0 0
|
||||
display none
|
||||
.content-div
|
||||
width 100%
|
||||
padding 20px 25px
|
||||
box-sizing border-box
|
||||
outline 0 none
|
||||
border none !important
|
||||
color #2c3e50
|
||||
font-size 16px
|
||||
.content-input-wrapper
|
||||
width 100%
|
||||
padding 8px 25px 15px 25px
|
||||
.v-note-show
|
||||
flex 0 0 50%
|
||||
width 50%
|
||||
overflow-y auto
|
||||
padding 0 0
|
||||
transition all 0.2s linear 0s
|
||||
&.single-show
|
||||
flex 0 0 100%
|
||||
width 100%
|
||||
.v-show-content, .v-show-content-html
|
||||
width 100%
|
||||
height 100%
|
||||
padding 8px 25px 15px 25px
|
||||
overflow-y auto
|
||||
box-sizing border-box
|
||||
overflow-x hidden
|
||||
scrollbar()
|
||||
.v-note-navigation-wrapper
|
||||
display flex
|
||||
position absolute
|
||||
width 250px
|
||||
right 0
|
||||
top 0
|
||||
bottom 0
|
||||
height 100%
|
||||
flex-direction column
|
||||
background-color rgba(255,255,255,0.98)
|
||||
border-left border-color
|
||||
border-right border-color
|
||||
&.transition
|
||||
transition all 0.1s linear 0s
|
||||
@media only screen and (max-width 768px)
|
||||
width 50%
|
||||
&.slideTop-enter-active, &.slideTop-leave-active
|
||||
height 100%
|
||||
&.slideTop-enter, &.slideTop-leave-active
|
||||
height 0
|
||||
.v-note-navigation-title
|
||||
height 50px
|
||||
width 100%
|
||||
border-bottom border-color
|
||||
flex none
|
||||
line-height @height
|
||||
font-size 16px
|
||||
box-sizing border-box
|
||||
padding 0 12px 0 18px
|
||||
.v-note-navigation-close
|
||||
float right
|
||||
color #606266
|
||||
font-size 18px
|
||||
cursor pointer
|
||||
&:hover
|
||||
color #303133
|
||||
.v-note-navigation-content
|
||||
overflow-y auto
|
||||
flex 1
|
||||
scrollbar()
|
||||
padding 8px 0
|
||||
h1, h2, h3, h4, h5, h6
|
||||
margin 2px 0
|
||||
font-weight 500
|
||||
font-size 17px
|
||||
color #2185d0
|
||||
cursor pointer
|
||||
line-height normal
|
||||
overflow hidden
|
||||
text-overflow ellipsis
|
||||
white-space nowrap
|
||||
padding 0 12px
|
||||
border-bottom none
|
||||
&:hover
|
||||
color #483D8B
|
||||
text-decoration-line underline
|
||||
h2
|
||||
padding-left 27px
|
||||
font-size 17px
|
||||
h3
|
||||
padding-left 42px
|
||||
font-size 17px
|
||||
h4
|
||||
padding-left 58px
|
||||
font-size 15px
|
||||
h5
|
||||
padding-left 72px
|
||||
font-size 15px
|
||||
h6
|
||||
padding-left 87px
|
||||
font-size 15px
|
||||
.v-note-read-model
|
||||
position relative
|
||||
display none
|
||||
width 100%
|
||||
height 100%
|
||||
background #fbfbfb
|
||||
padding 30px 8% 50px 8%
|
||||
overflow-y auto
|
||||
scrollbar()
|
||||
box-sizing border-box
|
||||
&.show
|
||||
display block
|
||||
&.shadow
|
||||
border none
|
||||
// box-shadow 0 2px 12px 0 rgba(0, 0, 0, 0.1)
|
||||
.v-note-help-wrapper
|
||||
position fixed
|
||||
left 0
|
||||
right 0
|
||||
top 0
|
||||
bottom 0
|
||||
background rgba(0, 0, 0, 0.7)
|
||||
z-index 1600
|
||||
transition all 0.1s linear 0s
|
||||
&.fade-enter-active, &.fade-leave-active
|
||||
opacity 1
|
||||
&.fade-enter, &.fade-leave-active
|
||||
opacity 0
|
||||
.v-note-help-content
|
||||
position relative
|
||||
width 60%
|
||||
max-width 800px
|
||||
margin 30px auto
|
||||
height 90%
|
||||
min-width 320px
|
||||
transition all 0.1s linear 0s
|
||||
z-index 3
|
||||
border border-color
|
||||
&.shadow
|
||||
border none
|
||||
box-shadow 0 0px 5px rgba(0, 0, 0, .156863), 0 0px 5px rgba(0, 0, 0, .227451)
|
||||
i
|
||||
font-size 28px
|
||||
position absolute
|
||||
right 15px
|
||||
top 8px
|
||||
color rgba(0, 0, 0, 0.7)
|
||||
cursor pointer
|
||||
&:hover
|
||||
color rgba(0, 0, 0, 1)
|
||||
.v-note-help-show
|
||||
width 100%
|
||||
height 100%
|
||||
font-size 18px
|
||||
background #fbfbfb
|
||||
overflow-y auto
|
||||
padding 2% 6%
|
||||
scrollbar()
|
||||
|
||||
|
||||
.v-note-img-wrapper
|
||||
position fixed
|
||||
display flex
|
||||
justify-content center
|
||||
align-items center
|
||||
left 0
|
||||
right 0
|
||||
top 0
|
||||
bottom 0
|
||||
background rgba(0, 0, 0, 0.7)
|
||||
z-index 1600
|
||||
transition all 0.1s linear 0s
|
||||
&.fade-enter-active, &.fade-leave-active
|
||||
opacity 1
|
||||
&.fade-enter, &.fade-leave-active
|
||||
opacity 0
|
||||
img
|
||||
flex 0 0 auto
|
||||
z-index 3
|
||||
i
|
||||
font-size 28px
|
||||
position absolute
|
||||
right 15px
|
||||
top 8px
|
||||
color rgba(255, 255, 255, 0.7)
|
||||
cursor pointer
|
||||
&:hover
|
||||
color rgba(255, 255, 255, 1)
|
||||
align()
|
||||
27
node_modules/mavon-editor/src/lib/css/md.css
generated
vendored
Normal file
27
node_modules/mavon-editor/src/lib/css/md.css
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* @Author: HuaChao Chen <CHC>
|
||||
* @Date: 2017-05-05T15:57:16+08:00
|
||||
* @Email: chenhuachaoxyz@gmail.com
|
||||
* @Filename: md.css
|
||||
* @Last modified by: chc
|
||||
* @Last modified time: 2017-06-15T00:13:34+08:00
|
||||
* @License: MIT
|
||||
* @Copyright: 2017
|
||||
*/
|
||||
|
||||
.markdown-body strong{
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.markdown-body .hljs-center {
|
||||
text-align: center;
|
||||
}
|
||||
.markdown-body .hljs-right {
|
||||
text-align: right;
|
||||
}
|
||||
.markdown-body .hljs-left {
|
||||
text-align: left;
|
||||
}
|
||||
.markdown-body .hljs {
|
||||
overflow: auto;
|
||||
}
|
||||
15
node_modules/mavon-editor/src/lib/css/scroll.styl
generated
vendored
Normal file
15
node_modules/mavon-editor/src/lib/css/scroll.styl
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
scrollbar()
|
||||
&.scroll-style::-webkit-scrollbar
|
||||
width 6px
|
||||
background-color #e5e5e5
|
||||
&.scroll-style::-webkit-scrollbar-thumb
|
||||
background-color #b7b7b7
|
||||
border-radius 4px
|
||||
&.scroll-style::-webkit-scrollbar-thumb:hover
|
||||
background-color #a1a1a1
|
||||
&.scroll-style::-webkit-scrollbar-thumb:active
|
||||
background-color #a1a1a1
|
||||
&.scroll-style::-webkit-scrollbar-track
|
||||
-webkit-box-shadow 0 0 0px gray inset
|
||||
&.scroll-style-border-radius::-webkit-scrollbar
|
||||
border-bottom-right-radius 4px
|
||||
12
node_modules/mavon-editor/src/lib/font/LICENSE.txt
generated
vendored
Normal file
12
node_modules/mavon-editor/src/lib/font/LICENSE.txt
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
Font license info
|
||||
|
||||
|
||||
## Font Awesome
|
||||
|
||||
Copyright (C) 2016 by Dave Gandy
|
||||
|
||||
Author: Dave Gandy
|
||||
License: SIL ()
|
||||
Homepage: http://fortawesome.github.com/Font-Awesome/
|
||||
|
||||
|
||||
75
node_modules/mavon-editor/src/lib/font/README.txt
generated
vendored
Normal file
75
node_modules/mavon-editor/src/lib/font/README.txt
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
This webfont is generated by http://fontello.com open source project.
|
||||
|
||||
|
||||
================================================================================
|
||||
Please, note, that you should obey original font licenses, used to make this
|
||||
webfont pack. Details available in LICENSE.txt file.
|
||||
|
||||
- Usually, it's enough to publish content of LICENSE.txt file somewhere on your
|
||||
site in "About" section.
|
||||
|
||||
- If your project is open-source, usually, it will be ok to make LICENSE.txt
|
||||
file publicly available in your repository.
|
||||
|
||||
- Fonts, used in Fontello, don't require a clickable link on your site.
|
||||
But any kind of additional authors crediting is welcome.
|
||||
================================================================================
|
||||
|
||||
|
||||
Comments on archive content
|
||||
---------------------------
|
||||
|
||||
- /font/* - fonts in different formats
|
||||
|
||||
- /css/* - different kinds of css, for all situations. Should be ok with
|
||||
twitter bootstrap. Also, you can skip <i> style and assign icon classes
|
||||
directly to text elements, if you don't mind about IE7.
|
||||
|
||||
- demo.html - demo file, to show your webfont content
|
||||
|
||||
- LICENSE.txt - license info about source fonts, used to build your one.
|
||||
|
||||
- config.json - keeps your settings. You can import it back into fontello
|
||||
anytime, to continue your work
|
||||
|
||||
|
||||
Why so many CSS files ?
|
||||
-----------------------
|
||||
|
||||
Because we like to fit all your needs :)
|
||||
|
||||
- basic file, <your_font_name>.css - is usually enough, it contains @font-face
|
||||
and character code definitions
|
||||
|
||||
- *-ie7.css - if you need IE7 support, but still don't wish to put char codes
|
||||
directly into html
|
||||
|
||||
- *-codes.css and *-ie7-codes.css - if you like to use your own @font-face
|
||||
rules, but still wish to benefit from css generation. That can be very
|
||||
convenient for automated asset build systems. When you need to update font -
|
||||
no need to manually edit files, just override old version with archive
|
||||
content. See fontello source code for examples.
|
||||
|
||||
- *-embedded.css - basic css file, but with embedded WOFF font, to avoid
|
||||
CORS issues in Firefox and IE9+, when fonts are hosted on the separate domain.
|
||||
We strongly recommend to resolve this issue by `Access-Control-Allow-Origin`
|
||||
server headers. But if you ok with dirty hack - this file is for you. Note,
|
||||
that data url moved to separate @font-face to avoid problems with <IE9, when
|
||||
string is too long.
|
||||
|
||||
- animate.css - use it to get ideas about spinner rotation animation.
|
||||
|
||||
|
||||
Attention for server setup
|
||||
--------------------------
|
||||
|
||||
You MUST setup server to reply with proper `mime-types` for font files -
|
||||
otherwise some browsers will fail to show fonts.
|
||||
|
||||
Usually, `apache` already has necessary settings, but `nginx` and other
|
||||
webservers should be tuned. Here is list of mime types for our file extensions:
|
||||
|
||||
- `application/vnd.ms-fontobject` - eot
|
||||
- `application/x-font-woff` - woff
|
||||
- `application/x-font-ttf` - ttf
|
||||
- `image/svg+xml` - svg
|
||||
196
node_modules/mavon-editor/src/lib/font/config.json
generated
vendored
Normal file
196
node_modules/mavon-editor/src/lib/font/config.json
generated
vendored
Normal file
@@ -0,0 +1,196 @@
|
||||
{
|
||||
"name": "",
|
||||
"css_prefix_text": "fa-mavon-",
|
||||
"css_use_suffix": false,
|
||||
"hinting": true,
|
||||
"units_per_em": 1000,
|
||||
"ascent": 850,
|
||||
"glyphs": [
|
||||
{
|
||||
"uid": "02cca871bb69da75e8ee286b7055832c",
|
||||
"css": "bold",
|
||||
"code": 59392,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "a8cb1c217f02b073db3670c061cc54d2",
|
||||
"css": "italic",
|
||||
"code": 59393,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "0c708edd8fae2376b3370aa56d40cf9e",
|
||||
"css": "header",
|
||||
"code": 61916,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "d4a4a38a40b728f46dad1de4ac950231",
|
||||
"css": "underline",
|
||||
"code": 61645,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "61c242c9e2134d5864d7fdd57b3c9289",
|
||||
"css": "strikethrough",
|
||||
"code": 61644,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "f04a5d24e9e659145b966739c4fde82a",
|
||||
"css": "thumb-tack",
|
||||
"code": 59394,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "4e88371fb8857dacc1f66afe6314e426",
|
||||
"css": "superscript",
|
||||
"code": 61739,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "3d1c929dbc966992185ce749548c1b2c",
|
||||
"css": "subscript",
|
||||
"code": 61740,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "ab95e1351ebaec5850101097cbf7097f",
|
||||
"css": "quote-left",
|
||||
"code": 61709,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "f6766a8b042c2453a4e153af03294383",
|
||||
"css": "list-ol",
|
||||
"code": 61643,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "a2a74f5e7b7d9ba054897d8c795a326a",
|
||||
"css": "list-ul",
|
||||
"code": 61642,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "0ddd3e8201ccc7d41f7b7c9d27eca6c1",
|
||||
"css": "link",
|
||||
"code": 59395,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "381da2c2f7fd51f8de877c044d7f439d",
|
||||
"css": "picture-o",
|
||||
"code": 59396,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "7034e4d22866af82bef811f52fb1ba46",
|
||||
"css": "code",
|
||||
"code": 61729,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "8fb55fd696d9a0f58f3b27c1d8633750",
|
||||
"css": "table",
|
||||
"code": 61646,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "bc71f4c6e53394d5ba46b063040014f1",
|
||||
"css": "repeat",
|
||||
"code": 59397,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "f9c3205df26e7778abac86183aefdc99",
|
||||
"css": "undo",
|
||||
"code": 59398,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "f48ae54adfb27d8ada53d0fd9e34ee10",
|
||||
"css": "trash-o",
|
||||
"code": 59399,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "f4445feb55521283572ee88bc304f928",
|
||||
"css": "floppy-o",
|
||||
"code": 59400,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "559647a6f430b3aeadbecd67194451dd",
|
||||
"css": "bars",
|
||||
"code": 61641,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "53dd31a6cc6438192b2d7b09b1c1dd45",
|
||||
"css": "columns",
|
||||
"code": 61659,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "07f0832c07f3d9713fffb06c8bffa027",
|
||||
"css": "window-maximize",
|
||||
"code": 62160,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "b013f6403e5ab0326614e68d1850fd6b",
|
||||
"css": "arrows-alt",
|
||||
"code": 61618,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "3c24ee33c9487bbf18796ca6dffa1905",
|
||||
"css": "compress",
|
||||
"code": 59401,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "c5fd349cbd3d23e4ade333789c29c729",
|
||||
"css": "eye",
|
||||
"code": 59402,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "7fd683b2c518ceb9e5fa6757f2276faa",
|
||||
"css": "eye-slash",
|
||||
"code": 59403,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "17ebadd1e3f274ff0205601eef7b9cc4",
|
||||
"css": "question-circle",
|
||||
"code": 59404,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "5211af474d3a9848f67f945e2ccaf143",
|
||||
"css": "times",
|
||||
"code": 59405,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "f4f0e849b805be1f6d76b65581cb3b8b",
|
||||
"css": "align-left",
|
||||
"code": 59407,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "ae6336c46d73af999fe7460c089abb4d",
|
||||
"css": "align-center",
|
||||
"code": 59408,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "e1e7306b47c3c5e6faecce9d32571381",
|
||||
"css": "align-right",
|
||||
"code": 59409,
|
||||
"src": "fontawesome"
|
||||
}
|
||||
]
|
||||
}
|
||||
85
node_modules/mavon-editor/src/lib/font/css/animation.css
generated
vendored
Normal file
85
node_modules/mavon-editor/src/lib/font/css/animation.css
generated
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
Animation example, for spinners
|
||||
*/
|
||||
.animate-spin {
|
||||
-moz-animation: spin 2s infinite linear;
|
||||
-o-animation: spin 2s infinite linear;
|
||||
-webkit-animation: spin 2s infinite linear;
|
||||
animation: spin 2s infinite linear;
|
||||
display: inline-block;
|
||||
}
|
||||
@-moz-keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
-o-transform: rotate(359deg);
|
||||
-webkit-transform: rotate(359deg);
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
-o-transform: rotate(359deg);
|
||||
-webkit-transform: rotate(359deg);
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-o-keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
-o-transform: rotate(359deg);
|
||||
-webkit-transform: rotate(359deg);
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-ms-keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
-o-transform: rotate(359deg);
|
||||
-webkit-transform: rotate(359deg);
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
-o-transform: rotate(359deg);
|
||||
-webkit-transform: rotate(359deg);
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
32
node_modules/mavon-editor/src/lib/font/css/fontello-codes.css
generated
vendored
Normal file
32
node_modules/mavon-editor/src/lib/font/css/fontello-codes.css
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
.fa-mavon-bold:before { content: '\e800'; } /* '' */
|
||||
.fa-mavon-italic:before { content: '\e801'; } /* '' */
|
||||
.fa-mavon-thumb-tack:before { content: '\e802'; } /* '' */
|
||||
.fa-mavon-link:before { content: '\e803'; } /* '' */
|
||||
.fa-mavon-picture-o:before { content: '\e804'; } /* '' */
|
||||
.fa-mavon-repeat:before { content: '\e805'; } /* '' */
|
||||
.fa-mavon-undo:before { content: '\e806'; } /* '' */
|
||||
.fa-mavon-trash-o:before { content: '\e807'; } /* '' */
|
||||
.fa-mavon-floppy-o:before { content: '\e808'; } /* '' */
|
||||
.fa-mavon-compress:before { content: '\e809'; } /* '' */
|
||||
.fa-mavon-eye:before { content: '\e80a'; } /* '' */
|
||||
.fa-mavon-eye-slash:before { content: '\e80b'; } /* '' */
|
||||
.fa-mavon-question-circle:before { content: '\e80c'; } /* '' */
|
||||
.fa-mavon-times:before { content: '\e80d'; } /* '' */
|
||||
.fa-mavon-align-left:before { content: '\e80f'; } /* '' */
|
||||
.fa-mavon-align-center:before { content: '\e810'; } /* '' */
|
||||
.fa-mavon-align-right:before { content: '\e811'; } /* '' */
|
||||
.fa-mavon-arrows-alt:before { content: '\f0b2'; } /* '' */
|
||||
.fa-mavon-bars:before { content: '\f0c9'; } /* '' */
|
||||
.fa-mavon-list-ul:before { content: '\f0ca'; } /* '' */
|
||||
.fa-mavon-list-ol:before { content: '\f0cb'; } /* '' */
|
||||
.fa-mavon-strikethrough:before { content: '\f0cc'; } /* '' */
|
||||
.fa-mavon-underline:before { content: '\f0cd'; } /* '' */
|
||||
.fa-mavon-table:before { content: '\f0ce'; } /* '' */
|
||||
.fa-mavon-columns:before { content: '\f0db'; } /* '' */
|
||||
.fa-mavon-quote-left:before { content: '\f10d'; } /* '' */
|
||||
.fa-mavon-code:before { content: '\f121'; } /* '' */
|
||||
.fa-mavon-superscript:before { content: '\f12b'; } /* '' */
|
||||
.fa-mavon-subscript:before { content: '\f12c'; } /* '' */
|
||||
.fa-mavon-header:before { content: '\f1dc'; } /* '' */
|
||||
.fa-mavon-window-maximize:before { content: '\f2d0'; } /* '' */
|
||||
85
node_modules/mavon-editor/src/lib/font/css/fontello-embedded.css
generated
vendored
Normal file
85
node_modules/mavon-editor/src/lib/font/css/fontello-embedded.css
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
32
node_modules/mavon-editor/src/lib/font/css/fontello-ie7-codes.css
generated
vendored
Normal file
32
node_modules/mavon-editor/src/lib/font/css/fontello-ie7-codes.css
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
.fa-mavon-bold { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-italic { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-thumb-tack { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-link { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-picture-o { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-repeat { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-undo { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-trash-o { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-floppy-o { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-compress { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-eye { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-eye-slash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-question-circle { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-times { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-align-left { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-align-center { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-align-right { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-arrows-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-bars { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-list-ul { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-list-ol { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-strikethrough { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-underline { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-table { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-columns { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-quote-left { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-code { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-superscript { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-subscript { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-header { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-window-maximize { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
43
node_modules/mavon-editor/src/lib/font/css/fontello-ie7.css
generated
vendored
Normal file
43
node_modules/mavon-editor/src/lib/font/css/fontello-ie7.css
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
[class^="fa-mavon-"], [class*=" fa-mavon-"] {
|
||||
font-family: 'fontello';
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
|
||||
/* fix buttons height */
|
||||
line-height: 1em;
|
||||
|
||||
/* you can be more comfortable with increased icons size */
|
||||
/* font-size: 120%; */
|
||||
}
|
||||
|
||||
.fa-mavon-bold { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-italic { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-thumb-tack { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-link { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-picture-o { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-repeat { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-undo { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-trash-o { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-floppy-o { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-compress { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-eye { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-eye-slash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-question-circle { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-times { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-align-left { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-align-center { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-align-right { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-arrows-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-bars { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-list-ul { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-list-ol { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-strikethrough { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-underline { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-table { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-columns { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-quote-left { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-code { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-superscript { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-subscript { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-header { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.fa-mavon-window-maximize { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
88
node_modules/mavon-editor/src/lib/font/css/fontello.css
generated
vendored
Normal file
88
node_modules/mavon-editor/src/lib/font/css/fontello.css
generated
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('../font/fontello.eot?60486047');
|
||||
src: url('../font/fontello.eot?60486047#iefix') format('embedded-opentype'),
|
||||
url('../font/fontello.woff2?60486047') format('woff2'),
|
||||
url('../font/fontello.woff?60486047') format('woff'),
|
||||
url('../font/fontello.ttf?60486047') format('truetype'),
|
||||
url('../font/fontello.svg?60486047#fontello') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
|
||||
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
|
||||
/*
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('../font/fontello.svg?60486047#fontello') format('svg');
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
[class^="fa-mavon-"]:before, [class*=" fa-mavon-"]:before {
|
||||
font-family: "fontello";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
speak: none;
|
||||
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
width: 1em;
|
||||
margin-right: .2em;
|
||||
text-align: center;
|
||||
/* opacity: .8; */
|
||||
|
||||
/* For safety - reset parent styles, that can break glyph codes*/
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
|
||||
/* fix buttons height, for twitter bootstrap */
|
||||
line-height: 1em;
|
||||
|
||||
/* Animation center compensation - margins should be symmetric */
|
||||
/* remove if not needed */
|
||||
margin-left: .2em;
|
||||
|
||||
/* you can be more comfortable with increased icons size */
|
||||
/* font-size: 120%; */
|
||||
|
||||
/* Font smoothing. That was taken from TWBS */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Uncomment for 3D effect */
|
||||
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
||||
}
|
||||
|
||||
.fa-mavon-bold:before { content: '\e800'; } /* '' */
|
||||
.fa-mavon-italic:before { content: '\e801'; } /* '' */
|
||||
.fa-mavon-thumb-tack:before { content: '\e802'; } /* '' */
|
||||
.fa-mavon-link:before { content: '\e803'; } /* '' */
|
||||
.fa-mavon-picture-o:before { content: '\e804'; } /* '' */
|
||||
.fa-mavon-repeat:before { content: '\e805'; } /* '' */
|
||||
.fa-mavon-undo:before { content: '\e806'; } /* '' */
|
||||
.fa-mavon-trash-o:before { content: '\e807'; } /* '' */
|
||||
.fa-mavon-floppy-o:before { content: '\e808'; } /* '' */
|
||||
.fa-mavon-compress:before { content: '\e809'; } /* '' */
|
||||
.fa-mavon-eye:before { content: '\e80a'; } /* '' */
|
||||
.fa-mavon-eye-slash:before { content: '\e80b'; } /* '' */
|
||||
.fa-mavon-question-circle:before { content: '\e80c'; } /* '' */
|
||||
.fa-mavon-times:before { content: '\e80d'; } /* '' */
|
||||
.fa-mavon-align-left:before { content: '\e80f'; } /* '' */
|
||||
.fa-mavon-align-center:before { content: '\e810'; } /* '' */
|
||||
.fa-mavon-align-right:before { content: '\e811'; } /* '' */
|
||||
.fa-mavon-arrows-alt:before { content: '\f0b2'; } /* '' */
|
||||
.fa-mavon-bars:before { content: '\f0c9'; } /* '' */
|
||||
.fa-mavon-list-ul:before { content: '\f0ca'; } /* '' */
|
||||
.fa-mavon-list-ol:before { content: '\f0cb'; } /* '' */
|
||||
.fa-mavon-strikethrough:before { content: '\f0cc'; } /* '' */
|
||||
.fa-mavon-underline:before { content: '\f0cd'; } /* '' */
|
||||
.fa-mavon-table:before { content: '\f0ce'; } /* '' */
|
||||
.fa-mavon-columns:before { content: '\f0db'; } /* '' */
|
||||
.fa-mavon-quote-left:before { content: '\f10d'; } /* '' */
|
||||
.fa-mavon-code:before { content: '\f121'; } /* '' */
|
||||
.fa-mavon-superscript:before { content: '\f12b'; } /* '' */
|
||||
.fa-mavon-subscript:before { content: '\f12c'; } /* '' */
|
||||
.fa-mavon-header:before { content: '\f1dc'; } /* '' */
|
||||
.fa-mavon-window-maximize:before { content: '\f2d0'; } /* '' */
|
||||
353
node_modules/mavon-editor/src/lib/font/demo.html
generated
vendored
Normal file
353
node_modules/mavon-editor/src/lib/font/demo.html
generated
vendored
Normal file
@@ -0,0 +1,353 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head><!--[if lt IE 9]><script language="javascript" type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
||||
<meta charset="UTF-8"><style>/*
|
||||
* Bootstrap v2.2.1
|
||||
*
|
||||
* Copyright 2012 Twitter, Inc
|
||||
* Licensed under the Apache License v2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Designed and built with all the love in the world @twitter by @mdo and @fat.
|
||||
*/
|
||||
.clearfix {
|
||||
*zoom: 1;
|
||||
}
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
display: table;
|
||||
content: "";
|
||||
line-height: 0;
|
||||
}
|
||||
.clearfix:after {
|
||||
clear: both;
|
||||
}
|
||||
html {
|
||||
font-size: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
}
|
||||
a:focus {
|
||||
outline: thin dotted #333;
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
a:hover,
|
||||
a:active {
|
||||
outline: 0;
|
||||
}
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-size: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
button,
|
||||
input {
|
||||
*overflow: visible;
|
||||
line-height: normal;
|
||||
}
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
color: #333;
|
||||
background-color: #fff;
|
||||
}
|
||||
a {
|
||||
color: #08c;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
color: #005580;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.row {
|
||||
margin-left: -20px;
|
||||
*zoom: 1;
|
||||
}
|
||||
.row:before,
|
||||
.row:after {
|
||||
display: table;
|
||||
content: "";
|
||||
line-height: 0;
|
||||
}
|
||||
.row:after {
|
||||
clear: both;
|
||||
}
|
||||
[class*="span"] {
|
||||
float: left;
|
||||
min-height: 1px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.container,
|
||||
.navbar-static-top .container,
|
||||
.navbar-fixed-top .container,
|
||||
.navbar-fixed-bottom .container {
|
||||
width: 940px;
|
||||
}
|
||||
.span12 {
|
||||
width: 940px;
|
||||
}
|
||||
.span11 {
|
||||
width: 860px;
|
||||
}
|
||||
.span10 {
|
||||
width: 780px;
|
||||
}
|
||||
.span9 {
|
||||
width: 700px;
|
||||
}
|
||||
.span8 {
|
||||
width: 620px;
|
||||
}
|
||||
.span7 {
|
||||
width: 540px;
|
||||
}
|
||||
.span6 {
|
||||
width: 460px;
|
||||
}
|
||||
.span5 {
|
||||
width: 380px;
|
||||
}
|
||||
.span4 {
|
||||
width: 300px;
|
||||
}
|
||||
.span3 {
|
||||
width: 220px;
|
||||
}
|
||||
.span2 {
|
||||
width: 140px;
|
||||
}
|
||||
.span1 {
|
||||
width: 60px;
|
||||
}
|
||||
[class*="span"].pull-right,
|
||||
.row-fluid [class*="span"].pull-right {
|
||||
float: right;
|
||||
}
|
||||
.container {
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
*zoom: 1;
|
||||
}
|
||||
.container:before,
|
||||
.container:after {
|
||||
display: table;
|
||||
content: "";
|
||||
line-height: 0;
|
||||
}
|
||||
.container:after {
|
||||
clear: both;
|
||||
}
|
||||
p {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
.lead {
|
||||
margin-bottom: 20px;
|
||||
font-size: 21px;
|
||||
font-weight: 200;
|
||||
line-height: 30px;
|
||||
}
|
||||
small {
|
||||
font-size: 85%;
|
||||
}
|
||||
h1 {
|
||||
margin: 10px 0;
|
||||
font-family: inherit;
|
||||
font-weight: bold;
|
||||
line-height: 20px;
|
||||
color: inherit;
|
||||
text-rendering: optimizelegibility;
|
||||
}
|
||||
h1 small {
|
||||
font-weight: normal;
|
||||
line-height: 1;
|
||||
color: #999;
|
||||
}
|
||||
h1 {
|
||||
line-height: 40px;
|
||||
}
|
||||
h1 {
|
||||
font-size: 38.5px;
|
||||
}
|
||||
h1 small {
|
||||
font-size: 24.5px;
|
||||
}
|
||||
body {
|
||||
margin-top: 90px;
|
||||
}
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
margin-left: -480px;
|
||||
background-color: #fff;
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding-top: 10px;
|
||||
z-index: 10;
|
||||
}
|
||||
.footer {
|
||||
color: #ddd;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.footer a {
|
||||
color: #ccc;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.the-icons {
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
}
|
||||
.switch {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 10px;
|
||||
color: #666;
|
||||
}
|
||||
.switch input {
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
.codesOn .i-name {
|
||||
display: none;
|
||||
}
|
||||
.codesOn .i-code {
|
||||
display: inline;
|
||||
}
|
||||
.i-code {
|
||||
display: none;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('./font/fontello.eot?55997964');
|
||||
src: url('./font/fontello.eot?55997964#iefix') format('embedded-opentype'),
|
||||
url('./font/fontello.woff?55997964') format('woff'),
|
||||
url('./font/fontello.ttf?55997964') format('truetype'),
|
||||
url('./font/fontello.svg?55997964#fontello') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
|
||||
.demo-icon
|
||||
{
|
||||
font-family: "fontello";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
speak: none;
|
||||
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
width: 1em;
|
||||
margin-right: .2em;
|
||||
text-align: center;
|
||||
/* opacity: .8; */
|
||||
|
||||
/* For safety - reset parent styles, that can break glyph codes*/
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
|
||||
/* fix buttons height, for twitter bootstrap */
|
||||
line-height: 1em;
|
||||
|
||||
/* Animation center compensation - margins should be symmetric */
|
||||
/* remove if not needed */
|
||||
margin-left: .2em;
|
||||
|
||||
/* You can be more comfortable with increased icons size */
|
||||
/* font-size: 120%; */
|
||||
|
||||
/* Font smoothing. That was taken from TWBS */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Uncomment for 3D effect */
|
||||
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="css/animation.css"><!--[if IE 7]><link rel="stylesheet" href="css/fontello-ie7.css"><![endif]-->
|
||||
<script>
|
||||
function toggleCodes(on) {
|
||||
var obj = document.getElementById('icons');
|
||||
|
||||
if (on) {
|
||||
obj.className += ' codesOn';
|
||||
} else {
|
||||
obj.className = obj.className.replace(' codesOn', '');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container header">
|
||||
<h1>
|
||||
fontello
|
||||
<small>font demo</small>
|
||||
</h1>
|
||||
<label class="switch">
|
||||
<input type="checkbox" onclick="toggleCodes(this.checked)">show codes
|
||||
</label>
|
||||
</div>
|
||||
<div id="icons" class="container">
|
||||
<div class="row">
|
||||
<div title="Code: 0xe800" class="the-icons span3"><i class="demo-icon fa-mavon-bold"></i> <span class="i-name">fa-mavon-bold</span><span class="i-code">0xe800</span></div>
|
||||
<div title="Code: 0xe801" class="the-icons span3"><i class="demo-icon fa-mavon-italic"></i> <span class="i-name">fa-mavon-italic</span><span class="i-code">0xe801</span></div>
|
||||
<div title="Code: 0xe802" class="the-icons span3"><i class="demo-icon fa-mavon-thumb-tack"></i> <span class="i-name">fa-mavon-thumb-tack</span><span class="i-code">0xe802</span></div>
|
||||
<div title="Code: 0xe803" class="the-icons span3"><i class="demo-icon fa-mavon-link"></i> <span class="i-name">fa-mavon-link</span><span class="i-code">0xe803</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe804" class="the-icons span3"><i class="demo-icon fa-mavon-picture-o"></i> <span class="i-name">fa-mavon-picture-o</span><span class="i-code">0xe804</span></div>
|
||||
<div title="Code: 0xe805" class="the-icons span3"><i class="demo-icon fa-mavon-repeat"></i> <span class="i-name">fa-mavon-repeat</span><span class="i-code">0xe805</span></div>
|
||||
<div title="Code: 0xe806" class="the-icons span3"><i class="demo-icon fa-mavon-undo"></i> <span class="i-name">fa-mavon-undo</span><span class="i-code">0xe806</span></div>
|
||||
<div title="Code: 0xe807" class="the-icons span3"><i class="demo-icon fa-mavon-trash-o"></i> <span class="i-name">fa-mavon-trash-o</span><span class="i-code">0xe807</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe808" class="the-icons span3"><i class="demo-icon fa-mavon-floppy-o"></i> <span class="i-name">fa-mavon-floppy-o</span><span class="i-code">0xe808</span></div>
|
||||
<div title="Code: 0xe809" class="the-icons span3"><i class="demo-icon fa-mavon-compress"></i> <span class="i-name">fa-mavon-compress</span><span class="i-code">0xe809</span></div>
|
||||
<div title="Code: 0xe80a" class="the-icons span3"><i class="demo-icon fa-mavon-eye"></i> <span class="i-name">fa-mavon-eye</span><span class="i-code">0xe80a</span></div>
|
||||
<div title="Code: 0xe80b" class="the-icons span3"><i class="demo-icon fa-mavon-eye-slash"></i> <span class="i-name">fa-mavon-eye-slash</span><span class="i-code">0xe80b</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe80c" class="the-icons span3"><i class="demo-icon fa-mavon-question-circle"></i> <span class="i-name">fa-mavon-question-circle</span><span class="i-code">0xe80c</span></div>
|
||||
<div title="Code: 0xe80d" class="the-icons span3"><i class="demo-icon fa-mavon-times"></i> <span class="i-name">fa-mavon-times</span><span class="i-code">0xe80d</span></div>
|
||||
<div title="Code: 0xe80f" class="the-icons span3"><i class="demo-icon fa-mavon-align-left"></i> <span class="i-name">fa-mavon-align-left</span><span class="i-code">0xe80f</span></div>
|
||||
<div title="Code: 0xe810" class="the-icons span3"><i class="demo-icon fa-mavon-align-center"></i> <span class="i-name">fa-mavon-align-center</span><span class="i-code">0xe810</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xe811" class="the-icons span3"><i class="demo-icon fa-mavon-align-right"></i> <span class="i-name">fa-mavon-align-right</span><span class="i-code">0xe811</span></div>
|
||||
<div title="Code: 0xf0b2" class="the-icons span3"><i class="demo-icon fa-mavon-arrows-alt"></i> <span class="i-name">fa-mavon-arrows-alt</span><span class="i-code">0xf0b2</span></div>
|
||||
<div title="Code: 0xf0c9" class="the-icons span3"><i class="demo-icon fa-mavon-bars"></i> <span class="i-name">fa-mavon-bars</span><span class="i-code">0xf0c9</span></div>
|
||||
<div title="Code: 0xf0ca" class="the-icons span3"><i class="demo-icon fa-mavon-list-ul"></i> <span class="i-name">fa-mavon-list-ul</span><span class="i-code">0xf0ca</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xf0cb" class="the-icons span3"><i class="demo-icon fa-mavon-list-ol"></i> <span class="i-name">fa-mavon-list-ol</span><span class="i-code">0xf0cb</span></div>
|
||||
<div title="Code: 0xf0cc" class="the-icons span3"><i class="demo-icon fa-mavon-strikethrough"></i> <span class="i-name">fa-mavon-strikethrough</span><span class="i-code">0xf0cc</span></div>
|
||||
<div title="Code: 0xf0cd" class="the-icons span3"><i class="demo-icon fa-mavon-underline"></i> <span class="i-name">fa-mavon-underline</span><span class="i-code">0xf0cd</span></div>
|
||||
<div title="Code: 0xf0ce" class="the-icons span3"><i class="demo-icon fa-mavon-table"></i> <span class="i-name">fa-mavon-table</span><span class="i-code">0xf0ce</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xf0db" class="the-icons span3"><i class="demo-icon fa-mavon-columns"></i> <span class="i-name">fa-mavon-columns</span><span class="i-code">0xf0db</span></div>
|
||||
<div title="Code: 0xf10d" class="the-icons span3"><i class="demo-icon fa-mavon-quote-left"></i> <span class="i-name">fa-mavon-quote-left</span><span class="i-code">0xf10d</span></div>
|
||||
<div title="Code: 0xf121" class="the-icons span3"><i class="demo-icon fa-mavon-code"></i> <span class="i-name">fa-mavon-code</span><span class="i-code">0xf121</span></div>
|
||||
<div title="Code: 0xf12b" class="the-icons span3"><i class="demo-icon fa-mavon-superscript"></i> <span class="i-name">fa-mavon-superscript</span><span class="i-code">0xf12b</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div title="Code: 0xf12c" class="the-icons span3"><i class="demo-icon fa-mavon-subscript"></i> <span class="i-name">fa-mavon-subscript</span><span class="i-code">0xf12c</span></div>
|
||||
<div title="Code: 0xf1dc" class="the-icons span3"><i class="demo-icon fa-mavon-header"></i> <span class="i-name">fa-mavon-header</span><span class="i-code">0xf1dc</span></div>
|
||||
<div title="Code: 0xf2d0" class="the-icons span3"><i class="demo-icon fa-mavon-window-maximize"></i> <span class="i-name">fa-mavon-window-maximize</span><span class="i-code">0xf2d0</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container footer">Generated by <a href="http://fontello.com">fontello.com</a></div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
node_modules/mavon-editor/src/lib/font/font/fontello.eot
generated
vendored
Normal file
BIN
node_modules/mavon-editor/src/lib/font/font/fontello.eot
generated
vendored
Normal file
Binary file not shown.
72
node_modules/mavon-editor/src/lib/font/font/fontello.svg
generated
vendored
Normal file
72
node_modules/mavon-editor/src/lib/font/font/fontello.svg
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Copyright (C) 2017 by original authors @ fontello.com</metadata>
|
||||
<defs>
|
||||
<font id="fontello" horiz-adv-x="1000" >
|
||||
<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
|
||||
<missing-glyph horiz-adv-x="1000" />
|
||||
<glyph glyph-name="bold" unicode="" d="M310 1q41-18 78-18 210 0 210 187 0 64-23 101-15 24-34 41t-38 26-45 14-47 6-53 1q-40 0-56-6 0-29 0-88t-1-88q0-5 0-38t0-54 2-47 7-37z m-8 417q23-4 61-4 46 0 80 7t61 25 42 50 14 79q0 39-16 68t-45 46-60 24-69 8q-28 0-73-7 0-28 3-84t2-85q0-15 0-45t-1-44q0-26 1-38z m-302-497l1 53q9 2 48 9t59 15q4 7 7 15t4 19 4 18 1 21 0 19v36q0 548-12 572-2 5-12 8t-25 6-28 4-27 3-17 2l-2 46q55 1 190 6t208 6q13 0 38-1t38 0q39 0 76-7t72-24 60-39 41-59 16-76q0-29-9-54t-22-40-36-32-41-25-47-22q86-20 144-75t57-138q0-56-20-101t-52-72-77-48-91-27-98-8q-25 0-74 2t-74 1q-59 0-171-6t-129-7z" horiz-adv-x="785.7" />
|
||||
|
||||
<glyph glyph-name="italic" unicode="" d="M0-78l10 48q12 4 34 9t40 11 33 13q16 19 23 56 1 4 35 162t63 303 29 165v14q-13 8-30 11t-39 4-32 3l10 58q19-1 67-4t84-4 67-1q27 0 55 1t68 4 54 4q-2-22-10-50-17-6-57-16t-60-19q-5-10-8-23t-5-23-4-25-4-24q-15-82-49-234t-43-198q-1-5-7-32t-11-51-9-46-4-32l1-10q9-3 103-18-2-24-9-55-6 0-18-1t-18-1q-16 0-49 6t-48 6q-77 1-115 1-28 0-79-5t-68-7z" horiz-adv-x="571.4" />
|
||||
|
||||
<glyph glyph-name="thumb-tack" unicode="" d="M650 779q12 0 24-5 19-8 29-23t11-35v-719q0-19-11-35t-29-23q-10-4-24-4-27 0-47 18l-246 236-246-236q-20-19-46-19-13 0-25 5-18 7-29 23t-11 35v719q0 19 11 35t29 23q12 5 25 5h585z" horiz-adv-x="714.3" />
|
||||
|
||||
<glyph glyph-name="link" unicode="" d="M813 171q0 23-16 38l-116 116q-16 16-38 16-24 0-40-18 1-1 10-10t12-12 9-11 7-14 2-15q0-23-16-38t-38-16q-8 0-15 2t-14 7-11 9-12 12-10 10q-19-17-19-40 0-23 16-38l115-116q15-15 38-15 22 0 38 15l82 81q16 16 16 37z m-393 394q0 22-15 38l-115 115q-16 16-38 16-22 0-38-15l-82-82q-16-15-16-37 0-22 16-38l116-116q15-15 38-15 23 0 40 17-2 2-11 11t-12 12-8 10-7 14-2 16q0 22 15 38t38 15q9 0 16-2t14-7 11-8 12-12 10-11q18 17 18 41z m500-394q0-66-48-113l-82-81q-46-47-113-47-68 0-114 48l-115 115q-46 47-46 114 0 68 49 116l-49 49q-48-49-116-49-67 0-114 47l-116 116q-47 47-47 114t47 113l82 82q47 46 114 46 67 0 114-47l115-116q46-46 46-113 0-69-49-117l49-49q48 49 116 49 67 0 114-47l116-116q47-47 47-114z" horiz-adv-x="928.6" />
|
||||
|
||||
<glyph glyph-name="picture-o" unicode="" d="M357 529q0-45-31-76t-76-32-76 32-31 76 31 76 76 31 76-31 31-76z m572-215v-250h-786v107l178 179 90-89 285 285z m53 393h-893q-7 0-12-5t-6-13v-678q0-7 6-13t12-5h893q7 0 13 5t5 13v678q0 8-5 13t-13 5z m89-18v-678q0-37-26-63t-63-27h-893q-36 0-63 27t-26 63v678q0 37 26 63t63 27h893q37 0 63-27t26-63z" horiz-adv-x="1071.4" />
|
||||
|
||||
<glyph glyph-name="repeat" unicode="" d="M857 707v-250q0-14-10-25t-26-11h-250q-23 0-32 23-10 22 7 38l77 77q-82 77-194 77-58 0-111-23t-91-61-61-91-23-111 23-111 61-91 91-61 111-23q66 0 125 29t100 82q4 6 13 7 8 0 14-5l76-77q5-4 6-11t-5-13q-60-74-147-114t-182-41q-87 0-167 34t-136 92-92 137-34 166 34 166 92 137 136 92 167 34q82 0 158-31t137-88l72 72q17 18 39 8 22-9 22-33z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="undo" unicode="" d="M857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="trash-o" unicode="" d="M286 439v-321q0-8-5-13t-13-5h-36q-8 0-13 5t-5 13v321q0 8 5 13t13 5h36q8 0 13-5t5-13z m143 0v-321q0-8-5-13t-13-5h-36q-8 0-13 5t-5 13v321q0 8 5 13t13 5h36q8 0 13-5t5-13z m142 0v-321q0-8-5-13t-12-5h-36q-8 0-13 5t-5 13v321q0 8 5 13t13 5h36q7 0 12-5t5-13z m72-404v529h-500v-529q0-12 4-22t8-15 6-5h464q2 0 6 5t8 15 4 22z m-375 601h250l-27 65q-4 5-9 6h-177q-6-1-10-6z m518-18v-36q0-8-5-13t-13-5h-54v-529q0-46-26-80t-63-34h-464q-37 0-63 33t-27 79v531h-53q-8 0-13 5t-5 13v36q0 8 5 13t13 5h172l39 93q9 21 31 35t44 15h178q23 0 44-15t30-35l39-93h173q8 0 13-5t5-13z" horiz-adv-x="785.7" />
|
||||
|
||||
<glyph glyph-name="floppy-o" unicode="" d="M214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-7 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="compress" unicode="" d="M429 314v-250q0-14-11-25t-25-10-25 10l-81 81-185-186q-5-5-13-5t-12 5l-64 64q-6 6-6 13t6 13l185 185-80 80q-11 11-11 25t11 25 25 11h250q14 0 25-11t11-25z m421 375q0-7-6-12l-185-186 80-80q11-11 11-25t-11-25-25-11h-250q-14 0-25 11t-10 25v250q0 14 10 25t25 10 25-10l81-80 185 185q6 5 13 5t13-5l63-64q6-5 6-13z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="eye" unicode="" d="M929 314q-85 132-213 197 34-58 34-125 0-103-73-177t-177-73-177 73-73 177q0 67 34 125-128-65-213-197 75-114 187-182t242-68 243 68 186 182z m-402 215q0 11-8 19t-19 7q-70 0-120-50t-50-119q0-11 8-19t19-8 19 8 8 19q0 48 34 82t82 34q11 0 19 8t8 19z m473-215q0-19-11-38-78-129-210-206t-279-77-279 77-210 206q-11 19-11 38t11 39q78 128 210 205t279 78 279-78 210-205q11-20 11-39z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="eye-slash" unicode="" d="M310 105l43 79q-48 35-76 88t-27 114q0 67 34 125-128-65-213-197 94-144 239-209z m217 424q0 11-8 19t-19 7q-70 0-120-50t-50-119q0-11 8-19t19-8 19 8 8 19q0 48 34 82t82 34q11 0 19 8t8 19z m202 106q0-4 0-5-59-105-176-316t-176-316l-28-50q-5-9-15-9-7 0-75 39-9 6-9 16 0 7 25 49-80 36-147 96t-117 137q-11 17-11 38t11 39q86 131 212 207t277 76q50 0 100-10l31 54q5 9 15 9 3 0 10-3t18-9 18-10 18-10 10-7q9-5 9-15z m21-249q0-78-44-142t-117-91l157 280q4-25 4-47z m250-72q0-19-11-38-22-36-61-81-84-96-194-149t-234-53l41 74q119 10 219 76t169 171q-65 100-158 164l35 63q53-36 102-85t81-103q11-19 11-39z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="question-circle" unicode="" d="M500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-13 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-15-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="times" unicode="" d="M724 112q0-22-15-38l-76-76q-16-15-38-15t-38 15l-164 165-164-165q-16-15-38-15t-38 15l-76 76q-16 16-16 38t16 38l164 164-164 164q-16 16-16 38t16 38l76 76q16 16 38 16t38-16l164-164 164 164q16 16 38 16t38-16l76-76q15-15 15-38t-15-38l-164-164 164-164q15-15 15-38z" horiz-adv-x="785.7" />
|
||||
|
||||
<glyph glyph-name="align-left" unicode="" d="M1000 100v-71q0-15-11-25t-25-11h-928q-15 0-25 11t-11 25v71q0 15 11 25t25 11h928q15 0 25-11t11-25z m-214 214v-71q0-15-11-25t-25-11h-714q-15 0-25 11t-11 25v71q0 15 11 25t25 11h714q15 0 25-11t11-25z m143 215v-72q0-14-11-25t-25-11h-857q-15 0-25 11t-11 25v72q0 14 11 25t25 10h857q14 0 25-10t11-25z m-215 214v-72q0-14-10-25t-25-10h-643q-15 0-25 10t-11 25v72q0 14 11 25t25 11h643q14 0 25-11t10-25z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="align-center" unicode="" d="M1000 100v-71q0-15-11-25t-25-11h-928q-15 0-25 11t-11 25v71q0 15 11 25t25 11h928q15 0 25-11t11-25z m-214 214v-71q0-15-11-25t-25-11h-500q-14 0-25 11t-11 25v71q0 15 11 25t25 11h500q15 0 25-11t11-25z m143 215v-72q0-14-11-25t-25-11h-786q-14 0-25 11t-11 25v72q0 14 11 25t25 10h786q14 0 25-10t11-25z m-215 214v-72q0-14-10-25t-25-10h-358q-14 0-25 10t-10 25v72q0 14 10 25t25 11h358q14 0 25-11t10-25z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="align-right" unicode="" d="M1000 100v-71q0-15-11-25t-25-11h-928q-15 0-25 11t-11 25v71q0 15 11 25t25 11h928q15 0 25-11t11-25z m0 214v-71q0-15-11-25t-25-11h-714q-14 0-25 11t-11 25v71q0 15 11 25t25 11h714q15 0 25-11t11-25z m0 215v-72q0-14-11-25t-25-11h-857q-14 0-25 11t-11 25v72q0 14 11 25t25 10h857q15 0 25-10t11-25z m0 214v-72q0-14-11-25t-25-10h-643q-14 0-25 10t-10 25v72q0 14 10 25t25 11h643q15 0 25-11t11-25z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="arrows-alt" unicode="" d="M716 548l-198-198 198-198 80 80q17 18 39 8 22-9 22-33v-250q0-14-10-25t-26-11h-250q-23 0-32 23-10 21 7 38l81 81-198 198-198-198 80-81q17-17 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l80-80 198 198-198 198-80-80q-11-11-25-11-7 0-14 3-22 9-22 33v250q0 14 11 25t25 11h250q23 0 33-23 9-21-8-38l-80-81 198-198 198 198-81 81q-17 17-7 38 9 23 32 23h250q15 0 26-11t10-25v-250q0-24-22-33-7-3-14-3-14 0-25 11z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="bars" unicode="" d="M857 100v-71q0-15-10-25t-26-11h-785q-15 0-25 11t-11 25v71q0 15 11 25t25 11h785q15 0 26-11t10-25z m0 286v-72q0-14-10-25t-26-10h-785q-15 0-25 10t-11 25v72q0 14 11 25t25 10h785q15 0 26-10t10-25z m0 285v-71q0-14-10-25t-26-11h-785q-15 0-25 11t-11 25v71q0 15 11 26t25 10h785q15 0 26-10t10-26z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="list-ul" unicode="" d="M214 64q0-44-31-76t-76-31-76 31-31 76 31 76 76 31 76-31 31-76z m0 286q0-45-31-76t-76-31-76 31-31 76 31 76 76 31 76-31 31-76z m786-232v-107q0-7-5-13t-13-5h-678q-8 0-13 5t-5 13v107q0 7 5 12t13 6h678q7 0 13-6t5-12z m-786 518q0-45-31-76t-76-31-76 31-31 76 31 76 76 31 76-31 31-76z m786-232v-108q0-7-5-12t-13-5h-678q-8 0-13 5t-5 12v108q0 7 5 12t13 5h678q7 0 13-5t5-12z m0 285v-107q0-7-5-12t-13-6h-678q-8 0-13 6t-5 12v107q0 8 5 13t13 5h678q7 0 13-5t5-13z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="list-ol" unicode="" d="M213-54q0-45-31-70t-75-26q-60 0-96 37l31 49q28-25 60-25 16 0 28 8t12 24q0 35-59 31l-14 31q4 6 18 24t24 31 20 21v1q-9 0-27-1t-27 0v-30h-59v85h186v-49l-53-65q28-6 45-27t17-49z m1 350v-89h-202q-4 20-4 30 0 29 14 52t31 38 37 27 31 24 14 25q0 14-9 22t-22 7q-25 0-45-32l-47 33q13 28 40 44t59 16q40 0 68-23t28-63q0-28-19-51t-42-36-42-28-20-30h71v34h59z m786-178v-107q0-7-5-13t-13-5h-678q-8 0-13 5t-5 13v107q0 8 5 13t13 5h678q7 0 13-6t5-12z m-786 502v-56h-187v56h60q0 22 0 67t1 68v7h-1q-5-10-28-30l-40 42 76 71h59v-225h60z m786-216v-108q0-7-5-12t-13-5h-678q-8 0-13 5t-5 12v108q0 7 5 12t13 5h678q7 0 13-5t5-12z m0 285v-107q0-7-5-12t-13-6h-678q-8 0-13 6t-5 12v107q0 8 5 13t13 5h678q7 0 13-5t5-13z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="strikethrough" unicode="" d="M982 350q8 0 13-5t5-13v-36q0-7-5-12t-13-5h-964q-8 0-13 5t-5 12v36q0 8 5 13t13 5h964z m-712 36q-16 19-29 44-27 55-27 105 0 101 75 173 74 71 219 71 28 0 94-11 36-7 98-27 6-21 12-66 8-68 8-102 0-10-3-25l-7-2-46 4-8 1q-28 83-58 114-49 51-117 51-64 0-101-33-38-32-38-81 0-41 37-78t156-72q38-12 96-37 33-16 53-29h-414z m283-143h229q4-22 4-51 0-62-23-119-13-31-40-58-20-19-61-45-44-27-85-37-45-12-113-12-64 0-109 13l-78 23q-32 8-40 15-5 5-5 12v8q0 60-1 87 0 17 0 38l1 20v25l57 1q8-19 17-40t12-31 7-15q20-32 45-52 24-20 59-32 33-12 73-12 36 0 78 15 43 14 68 48 26 34 26 72 0 47-45 87-19 16-76 40z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="underline" unicode="" d="M27 726q-21 1-25 2l-2 49q7 1 22 1 34 0 63-3 74-4 93-4 47 0 93 2 65 2 82 3 31 0 48 1l-1-8 1-36v-5q-33-5-69-5-33 0-44-14-7-7-7-73 0-7 0-18t0-15l1-127 8-157q3-69 28-112 20-33 54-52 49-26 98-26 59 0 107 16 31 10 55 28 27 20 37 36 20 31 29 63 12 41 12 128 0 44-2 72t-6 68-8 89l-2 33q-3 37-13 49-19 20-43 19l-56-1-8 2 1 48h47l114-6q43-2 110 6l10-1q3-22 3-29 0-4-2-17-25-7-47-8-41-6-44-9-8-8-8-23 0-4 0-15t1-17q5-11 13-221 3-109-9-170-8-42-23-68-21-36-62-69-42-31-102-49-61-19-142-19-93 0-159 26-66 26-99 68-34 42-47 109-9 45-9 132v186q0 105-9 119-14 20-82 22z m830-787v36q0 8-5 13t-13 5h-821q-8 0-13-5t-5-13v-36q0-8 5-13t13-5h821q8 0 13 5t5 13z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="table" unicode="" d="M286 82v107q0 8-5 13t-13 5h-179q-7 0-12-5t-6-13v-107q0-8 6-13t12-5h179q8 0 13 5t5 13z m0 214v108q0 7-5 12t-13 5h-179q-7 0-12-5t-6-12v-108q0-7 6-12t12-5h179q8 0 13 5t5 12z m285-214v107q0 8-5 13t-12 5h-179q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h179q7 0 12 5t5 13z m-285 429v107q0 8-5 13t-13 5h-179q-7 0-12-5t-6-13v-107q0-8 6-13t12-5h179q8 0 13 5t5 13z m285-215v108q0 7-5 12t-12 5h-179q-8 0-13-5t-5-12v-108q0-7 5-12t13-5h179q7 0 12 5t5 12z m286-214v107q0 8-5 13t-13 5h-178q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h178q8 0 13 5t5 13z m-286 429v107q0 8-5 13t-12 5h-179q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h179q7 0 12 5t5 13z m286-215v108q0 7-5 12t-13 5h-178q-8 0-13-5t-5-12v-108q0-7 5-12t13-5h178q8 0 13 5t5 12z m0 215v107q0 8-5 13t-13 5h-178q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h178q8 0 13 5t5 13z m72 178v-607q0-37-27-63t-63-26h-750q-36 0-63 26t-26 63v607q0 37 26 63t63 27h750q37 0 63-27t27-63z" horiz-adv-x="928.6" />
|
||||
|
||||
<glyph glyph-name="columns" unicode="" d="M89-7h340v643h-358v-625q0-7 6-13t12-5z m768 18v625h-357v-643h339q8 0 13 5t5 13z m72 678v-678q0-37-27-63t-63-27h-750q-36 0-63 27t-26 63v678q0 37 26 63t63 27h750q37 0 63-27t27-63z" horiz-adv-x="928.6" />
|
||||
|
||||
<glyph glyph-name="quote-left" unicode="" d="M429 314v-214q0-45-32-76t-76-31h-214q-44 0-76 31t-31 76v393q0 58 23 111t61 91 91 61 111 23h35q15 0 26-11t10-25v-72q0-14-10-25t-26-10h-35q-59 0-101-42t-42-101v-18q0-22 16-38t37-16h125q45 0 76-31t32-76z m500 0v-214q0-45-32-76t-76-31h-214q-44 0-76 31t-31 76v393q0 58 23 111t61 91 91 61 111 23h35q15 0 26-11t10-25v-72q0-14-10-25t-26-10h-35q-59 0-101-42t-42-101v-18q0-22 16-38t37-16h125q45 0 76-31t32-76z" horiz-adv-x="928.6" />
|
||||
|
||||
<glyph glyph-name="code" unicode="" d="M344 69l-28-28q-5-5-12-5t-13 5l-260 261q-6 5-6 12t6 13l260 260q5 6 13 6t12-6l28-28q6-5 6-13t-6-12l-219-220 219-219q6-6 6-13t-6-13z m330 596l-208-721q-2-7-9-11t-13-1l-34 9q-8 3-11 9t-2 14l209 720q2 8 8 11t13 2l35-10q7-2 11-9t1-13z m367-363l-260-261q-6-5-13-5t-13 5l-28 28q-5 6-5 13t5 13l219 219-219 220q-5 5-5 12t5 13l28 28q6 6 13 6t13-6l260-260q5-5 5-13t-5-12z" horiz-adv-x="1071.4" />
|
||||
|
||||
<glyph glyph-name="superscript" unicode="" d="M501 86v-93h-139l-89 141-13 23q-4 5-6 12h-2q0-2-1-4t-2-4-2-4q-5-11-14-25l-86-139h-144v93h71l110 162-103 152h-76v94h154l77-127q1-2 13-24 4-5 6-11h2q1 5 6 11l14 24 78 127h143v-94h-69l-103-149 114-165h61z m355 379v-115h-287l-1 15q-3 16-3 26 0 36 15 65t36 48 47 37 47 30 36 30 15 36q0 21-17 35t-39 13q-29 0-54-21-8-6-20-22l-59 52q15 20 35 37 47 36 105 36 61 0 99-33t38-89q0-31-13-57t-35-43-45-33-46-28-37-28-17-36h130v45h70z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="subscript" unicode="" d="M501 86v-93h-139l-89 141-13 23q-4 5-6 12h-2q0-2-1-4t-2-4-2-4q-5-11-14-25l-86-139h-144v93h71l110 162-103 152h-76v94h154l77-127q1-2 13-24 4-5 6-11h2q1 5 6 11l14 24 78 127h143v-94h-69l-103-149 114-165h61z m356-121v-115h-287l-2 15q-2 25-2 26 0 35 15 65t36 48 47 37 47 30 36 30 15 36q0 21-17 35t-39 13q-28 0-54-21-8-6-20-22l-59 52q15 20 35 37 45 36 105 36 62 0 100-33t37-89q0-37-19-66t-47-48-55-35-49-35-23-41h130v45h70z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="header" unicode="" d="M939-79q-25 0-74 2t-75 2q-24 0-73-2t-74-2q-13 0-21 12t-7 25q0 18 9 26t22 9 29 4 25 9q18 11 18 78l0 218q0 12-1 17-7 3-28 3h-376q-22 0-29-3 0-5 0-17l-1-207q0-79 21-91 9-6 26-8t32-2 25-8 11-26q0-14-6-26t-21-13q-26 0-78 2t-77 2q-24 0-71-2t-71-2q-13 0-20 12t-7 25q0 17 9 25t20 10 26 4 24 9q18 13 18 80l-1 31v454q0 2 1 15t0 20-1 21-2 24-4 20-6 18-9 10q-8 5-25 7t-29 1-23 7-10 26q0 14 6 26t20 13q26 0 78-2t77-2q23 0 71 2t70 2q14 0 21-13t7-26q0-17-9-25t-22-8-27-2-24-7q-20-12-20-90l1-178q0-12 0-18 7-2 22-2h390q14 0 21 2 1 6 1 18l0 178q0 78-19 90-10 6-33 7t-37 7-14 28q0 14 7 26t21 13q24 0 74-2t73-2q24 0 72 2t72 2q14 0 21-13t7-26q0-17-10-25t-22-8-29-2-24-7q-20-13-20-90l1-526q0-66 19-78 9-6 25-8t30-2 23-9 10-25q0-14-6-26t-20-13z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="window-maximize" unicode="" d="M143 64h714v429h-714v-429z m857 625v-678q0-37-26-63t-63-27h-822q-36 0-63 27t-26 63v678q0 37 26 63t63 27h822q37 0 63-27t26-63z" horiz-adv-x="1000" />
|
||||
</font>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 16 KiB |
BIN
node_modules/mavon-editor/src/lib/font/font/fontello.ttf
generated
vendored
Normal file
BIN
node_modules/mavon-editor/src/lib/font/font/fontello.ttf
generated
vendored
Normal file
Binary file not shown.
BIN
node_modules/mavon-editor/src/lib/font/font/fontello.woff
generated
vendored
Normal file
BIN
node_modules/mavon-editor/src/lib/font/font/fontello.woff
generated
vendored
Normal file
Binary file not shown.
BIN
node_modules/mavon-editor/src/lib/font/font/fontello.woff2
generated
vendored
Normal file
BIN
node_modules/mavon-editor/src/lib/font/font/fontello.woff2
generated
vendored
Normal file
Binary file not shown.
204
node_modules/mavon-editor/src/lib/lang/de/help_de.md
generated
vendored
Normal file
204
node_modules/mavon-editor/src/lib/lang/de/help_de.md
generated
vendored
Normal file
@@ -0,0 +1,204 @@
|
||||
@[toc](Catalog)
|
||||
|
||||
Markdown Handbuch
|
||||
===
|
||||
> Details: [http://commonmark.org/help/](http://commonmark.org/help/)
|
||||
|
||||
## **Fett**
|
||||
```
|
||||
**fett**
|
||||
__fett__
|
||||
```
|
||||
## *Kursiv*
|
||||
```
|
||||
*kursiv*
|
||||
_kursiv_
|
||||
```
|
||||
## Überschriften
|
||||
```
|
||||
# h1 #
|
||||
h1
|
||||
====
|
||||
## h2 ##
|
||||
h2
|
||||
----
|
||||
### h3 ###
|
||||
#### h4 ####
|
||||
##### h5 #####
|
||||
###### h6 ######
|
||||
```
|
||||
## Trennlinien
|
||||
```
|
||||
***
|
||||
---
|
||||
```
|
||||
****
|
||||
## ^Hoch^gestellt & ~Tief~gestellt
|
||||
```
|
||||
hochgestellt x^2^
|
||||
tiefgestellt H~2~0
|
||||
```
|
||||
## ++Unterstrichen++ & ~~Durchgestrichen~~
|
||||
```
|
||||
++unterstrichen++
|
||||
~~durchgestrichen~~
|
||||
```
|
||||
## ==Markiert==
|
||||
```
|
||||
==markiert==
|
||||
```
|
||||
## Zitat
|
||||
|
||||
```
|
||||
> zitat 1
|
||||
>> zitat 2
|
||||
>>> zitat 3
|
||||
...
|
||||
```
|
||||
|
||||
## Liste
|
||||
```
|
||||
ol
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
|
||||
ul
|
||||
-
|
||||
-
|
||||
...
|
||||
```
|
||||
|
||||
## Todo Liste
|
||||
|
||||
- [x] aufgabe 1
|
||||
- [ ] aufgabe 2
|
||||
|
||||
```
|
||||
- [x] aufgabe 1
|
||||
- [ ] aufgabe 2
|
||||
```
|
||||
|
||||
## Link
|
||||
```
|
||||
Text Link
|
||||
[Text](www.baidu.com)
|
||||
|
||||
Link mit Bild
|
||||

|
||||
```
|
||||
## Code
|
||||
\``` Typ
|
||||
|
||||
Codeblock
|
||||
|
||||
\```
|
||||
|
||||
\` code \`
|
||||
|
||||
```c++
|
||||
int main()
|
||||
{
|
||||
printf("hello world!");
|
||||
}
|
||||
```
|
||||
`code`
|
||||
|
||||
## Tabelle
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| links | mitte | rechts |
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| links | mitte | rechts |
|
||||
| ---------------------- | ------------- | ----------------- |
|
||||
## Fußnote
|
||||
```
|
||||
hallo[^hallo]
|
||||
```
|
||||
|
||||
Schau zum unteren Rand[^hallo]
|
||||
|
||||
[^hallo]: fussnote
|
||||
|
||||
## Emojis
|
||||
Details: [https://www.webpagefx.com/tools/emoji-cheat-sheet/](https://www.webpagefx.com/tools/emoji-cheat-sheet/)
|
||||
```
|
||||
:laughing:
|
||||
:blush:
|
||||
:smiley:
|
||||
:)
|
||||
...
|
||||
```
|
||||
:laughing::blush::smiley::)
|
||||
|
||||
## $\KaTeX$ Mathematik
|
||||
|
||||
Formeln lassen sich darstellen z.b. :$x_i + y_i = z_i$ und $\sum_{i=1}^n a_i=0$
|
||||
Formeln können auf einer eigenen Zeile gerendert werden
|
||||
$$\sum_{i=1}^n a_i=0$$
|
||||
Details: [katex](http://www.intmath.com/cg5/katex-mathjax-comparison.php)和[katex function](https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX)以及[latex](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference)
|
||||
|
||||
## Layout
|
||||
|
||||
::: hljs-left
|
||||
`::: hljs-left`
|
||||
`links`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-center
|
||||
`::: hljs-center`
|
||||
`mitte`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-right
|
||||
`::: hljs-right`
|
||||
`rechts`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
## Liste von Definitionen
|
||||
|
||||
Term 1
|
||||
|
||||
: Definition 1
|
||||
|
||||
Term 2 mit *inline markup*
|
||||
|
||||
: Definition 2
|
||||
|
||||
{ ein wenig code, teil von Definition 2 }
|
||||
|
||||
Dritter Absatz von Definition 2.
|
||||
|
||||
```
|
||||
Term 1
|
||||
|
||||
: Definition 1
|
||||
|
||||
Term 2 mit *inline markup*
|
||||
|
||||
: Definition 2
|
||||
|
||||
{ ein wenig code, teil von Definition 2 }
|
||||
|
||||
Dritter Absatz von Definition 2.
|
||||
|
||||
```
|
||||
|
||||
## Abkürzungen
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
Die HTML Spezifikation
|
||||
wird gepflegt vom W3C.
|
||||
```
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
Die HTML Spezifikation
|
||||
wird gepflegt vom W3C.
|
||||
```
|
||||
54
node_modules/mavon-editor/src/lib/lang/de/words_de.json
generated
vendored
Normal file
54
node_modules/mavon-editor/src/lib/lang/de/words_de.json
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"start_editor": "Bearbeitung beginnen...",
|
||||
"navigation_title": "Navigation",
|
||||
"tl_bold": "Fett",
|
||||
"tl_italic": "Kursiv",
|
||||
"tl_header": "Überschrift",
|
||||
"tl_header_one": "Überschrift 1",
|
||||
"tl_header_two": "Überschrift 2",
|
||||
"tl_header_three": "Überschrift 3",
|
||||
"tl_header_four": "Überschrift 4",
|
||||
"tl_header_five": "Überschrift 5",
|
||||
"tl_header_six": "Überschrift 6",
|
||||
"tl_underline": "Unterstrichen",
|
||||
"tl_strikethrough": "Durchgestrichen",
|
||||
"tl_mark": "Markiert",
|
||||
"tl_superscript": "Hochgestellt",
|
||||
"tl_subscript": "Tiefgestellt",
|
||||
"tl_quote": "Zitat",
|
||||
"tl_ol": "Ol",
|
||||
"tl_ul": "Ul",
|
||||
"tl_link": "Link",
|
||||
"tl_image": "Link mit Bild",
|
||||
"tl_code": "Code",
|
||||
"tl_table": "Tabelle",
|
||||
"tl_undo": "Rückgängig",
|
||||
"tl_redo": "Wiederherstellen",
|
||||
"tl_trash": "Mülleimer",
|
||||
"tl_save": "Speichern",
|
||||
"tl_navigation_on": "Navigation AN",
|
||||
"tl_navigation_off": "Navigation AUS",
|
||||
"tl_preview": "Vorschau",
|
||||
"tl_aligncenter": "Text zentrieren",
|
||||
"tl_alignleft": "Nach links ausrichten",
|
||||
"tl_alignright": "Nach rechts ausrichten",
|
||||
"tl_edit": "Bearbeiten",
|
||||
"tl_single_column": "Einspaltig",
|
||||
"tl_double_column": "Zweispaltig",
|
||||
"tl_fullscreen_on": "Vollbild AN",
|
||||
"tl_fullscreen_off": "Vollbild AUS",
|
||||
"tl_read": "Lesemodus",
|
||||
"tl_html_on": "HTML AN",
|
||||
"tl_html_off": "HTML AUS",
|
||||
"tl_help": "Markdown Handbuch",
|
||||
"tl_upload": "Bilder-Upload",
|
||||
"tl_upload_remove": "Entfernen",
|
||||
"tl_popup_link_title": "Link hinzufügen",
|
||||
"tl_popup_link_text": "Text des Links",
|
||||
"tl_popup_link_addr": "Linkziel",
|
||||
"tl_popup_img_link_title": "Bild hinzufügen",
|
||||
"tl_popup_img_link_text": "Text des Bildes",
|
||||
"tl_popup_img_link_addr": "Link auf Bild",
|
||||
"tl_popup_link_sure": "Ja",
|
||||
"tl_popup_link_cancel": "Abbruch"
|
||||
}
|
||||
204
node_modules/mavon-editor/src/lib/lang/en/help_en.md
generated
vendored
Normal file
204
node_modules/mavon-editor/src/lib/lang/en/help_en.md
generated
vendored
Normal file
@@ -0,0 +1,204 @@
|
||||
@[toc](Catalog)
|
||||
|
||||
Markdown Guide
|
||||
===
|
||||
> Detailed: [http://commonmark.org/help/](http://commonmark.org/help/)
|
||||
|
||||
## **Bold**
|
||||
```
|
||||
**bold**
|
||||
__bold__
|
||||
```
|
||||
## *Italic*
|
||||
```
|
||||
*italic*
|
||||
_italic_
|
||||
```
|
||||
## Header
|
||||
```
|
||||
# h1 #
|
||||
h1
|
||||
====
|
||||
## h2 ##
|
||||
h2
|
||||
----
|
||||
### h3 ###
|
||||
#### h4 ####
|
||||
##### h5 #####
|
||||
###### h6 ######
|
||||
```
|
||||
## Dividing line
|
||||
```
|
||||
***
|
||||
---
|
||||
```
|
||||
****
|
||||
## ^Super^script & ~Sub~script
|
||||
```
|
||||
super x^2^
|
||||
sub H~2~0
|
||||
```
|
||||
## ++Underline++ & ~~Strikethrough~~
|
||||
```
|
||||
++underline++
|
||||
~~strikethrough~~
|
||||
```
|
||||
## ==Mark==
|
||||
```
|
||||
==mark==
|
||||
```
|
||||
## Quote
|
||||
|
||||
```
|
||||
> quote 1
|
||||
>> quote 2
|
||||
>>> quote 3
|
||||
...
|
||||
```
|
||||
|
||||
## List
|
||||
```
|
||||
ol
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
|
||||
ul
|
||||
-
|
||||
-
|
||||
...
|
||||
```
|
||||
|
||||
## Todo List
|
||||
|
||||
- [x] task 1
|
||||
- [ ] task 2
|
||||
|
||||
```
|
||||
- [x] task 1
|
||||
- [ ] task 2
|
||||
```
|
||||
|
||||
## Link
|
||||
```
|
||||
Text Link
|
||||
[Text](www.baidu.com)
|
||||
|
||||
Image Link
|
||||

|
||||
```
|
||||
## Code
|
||||
\``` type
|
||||
|
||||
code block
|
||||
|
||||
\```
|
||||
|
||||
\` code \`
|
||||
|
||||
```c++
|
||||
int main()
|
||||
{
|
||||
printf("hello world!");
|
||||
}
|
||||
```
|
||||
`code`
|
||||
|
||||
## Table
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| left | center | right |
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| left | center | right |
|
||||
| ---------------------- | ------------- | ----------------- |
|
||||
## Footnote
|
||||
```
|
||||
hello[^hello]
|
||||
```
|
||||
|
||||
Look at the bottom[^hello]
|
||||
|
||||
[^hello]: footnote
|
||||
|
||||
## Emojis
|
||||
Detailed: [https://www.webpagefx.com/tools/emoji-cheat-sheet/](https://www.webpagefx.com/tools/emoji-cheat-sheet/)
|
||||
```
|
||||
:laughing:
|
||||
:blush:
|
||||
:smiley:
|
||||
:)
|
||||
...
|
||||
```
|
||||
:laughing::blush::smiley::)
|
||||
|
||||
## $\KaTeX$ Mathematics
|
||||
|
||||
We can render formulas for example:$x_i + y_i = z_i$ and $\sum_{i=1}^n a_i=0$
|
||||
We can also single-line rendering
|
||||
$$\sum_{i=1}^n a_i=0$$
|
||||
Detailed: [katex](http://www.intmath.com/cg5/katex-mathjax-comparison.php)和[katex function](https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX)以及[latex](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference)
|
||||
|
||||
## Layout
|
||||
|
||||
::: hljs-left
|
||||
`::: hljs-left`
|
||||
`left`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-center
|
||||
`::: hljs-center`
|
||||
`center`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-right
|
||||
`::: hljs-right`
|
||||
`right`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
## deflist
|
||||
|
||||
Term 1
|
||||
|
||||
: Definition 1
|
||||
|
||||
Term 2 with *inline markup*
|
||||
|
||||
: Definition 2
|
||||
|
||||
{ some code, part of Definition 2 }
|
||||
|
||||
Third paragraph of definition 2.
|
||||
|
||||
```
|
||||
Term 1
|
||||
|
||||
: Definition 1
|
||||
|
||||
Term 2 with *inline markup*
|
||||
|
||||
: Definition 2
|
||||
|
||||
{ some code, part of Definition 2 }
|
||||
|
||||
Third paragraph of definition 2.
|
||||
|
||||
```
|
||||
|
||||
## abbr
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
The HTML specification
|
||||
is maintained by the W3C.
|
||||
```
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
The HTML specification
|
||||
is maintained by the W3C.
|
||||
```
|
||||
54
node_modules/mavon-editor/src/lib/lang/en/words_en.json
generated
vendored
Normal file
54
node_modules/mavon-editor/src/lib/lang/en/words_en.json
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"start_editor": "Begin editing...",
|
||||
"navigation_title": "Navigation",
|
||||
"tl_bold": "Bold",
|
||||
"tl_italic": "Italic",
|
||||
"tl_header": "Header",
|
||||
"tl_header_one": "Header 1",
|
||||
"tl_header_two": "Header 2",
|
||||
"tl_header_three": "Header 3",
|
||||
"tl_header_four": "Header 4",
|
||||
"tl_header_five": "Header 5",
|
||||
"tl_header_six": "Header 6",
|
||||
"tl_underline": "Underline",
|
||||
"tl_strikethrough": "Strikethrough",
|
||||
"tl_mark": "Mark",
|
||||
"tl_superscript": "Superscript",
|
||||
"tl_subscript": "Subscript",
|
||||
"tl_quote": "Quote",
|
||||
"tl_ol": "Ol",
|
||||
"tl_ul": "Ul",
|
||||
"tl_link": "Link",
|
||||
"tl_image": "Image Link",
|
||||
"tl_code": "Code",
|
||||
"tl_table": "Table",
|
||||
"tl_undo": "Undo",
|
||||
"tl_redo": "Redo",
|
||||
"tl_trash": "Trash",
|
||||
"tl_save": "Save",
|
||||
"tl_navigation_on": "Navigation ON",
|
||||
"tl_navigation_off": "Navigation OFF",
|
||||
"tl_preview": "Preview",
|
||||
"tl_aligncenter": "Center text",
|
||||
"tl_alignleft": "Clamp text to the left",
|
||||
"tl_alignright": "Clamp text to the right",
|
||||
"tl_edit": "Edit",
|
||||
"tl_single_column": "Single Column",
|
||||
"tl_double_column": "Double Columns",
|
||||
"tl_fullscreen_on": "FullScreen ON",
|
||||
"tl_fullscreen_off": "FullScreen OFF",
|
||||
"tl_read": "Read Model",
|
||||
"tl_html_on": "HTML ON",
|
||||
"tl_html_off": "HTML OFF",
|
||||
"tl_help": "Markdown Guide",
|
||||
"tl_upload": "Upload Images",
|
||||
"tl_upload_remove": "Remove",
|
||||
"tl_popup_link_title": "Add Link",
|
||||
"tl_popup_link_text": "Link text",
|
||||
"tl_popup_link_addr": "Link address",
|
||||
"tl_popup_img_link_title": "Add Image",
|
||||
"tl_popup_img_link_text": "Image Text",
|
||||
"tl_popup_img_link_addr": "Image Link",
|
||||
"tl_popup_link_sure": "Sure",
|
||||
"tl_popup_link_cancel": "Cancel"
|
||||
}
|
||||
204
node_modules/mavon-editor/src/lib/lang/fr/help_fr.md
generated
vendored
Normal file
204
node_modules/mavon-editor/src/lib/lang/fr/help_fr.md
generated
vendored
Normal file
@@ -0,0 +1,204 @@
|
||||
@[toc](Catalogue)
|
||||
|
||||
Guide Markdown
|
||||
==============
|
||||
> Détail : [http://commonmark.org/help/](http://commonmark.org/help/)
|
||||
|
||||
## **Bold**
|
||||
```
|
||||
**bold**
|
||||
__bold__
|
||||
```
|
||||
## *Italic*
|
||||
```
|
||||
*italic*
|
||||
_italic_
|
||||
```
|
||||
## Header
|
||||
```
|
||||
# h1 #
|
||||
h1
|
||||
====
|
||||
## h2 ##
|
||||
h2
|
||||
----
|
||||
### h3 ###
|
||||
#### h4 ####
|
||||
##### h5 #####
|
||||
###### h6 ######
|
||||
```
|
||||
## Dividing line
|
||||
```
|
||||
***
|
||||
---
|
||||
```
|
||||
****
|
||||
## ^Super^script & ~Sub~script
|
||||
```
|
||||
super x^2^
|
||||
sub H~2~0
|
||||
```
|
||||
## ++Underline++ & ~~Strikethrough~~
|
||||
```
|
||||
++underline++
|
||||
~~strikethrough~~
|
||||
```
|
||||
## ==Mark==
|
||||
```
|
||||
==mark==
|
||||
```
|
||||
## Quote
|
||||
|
||||
```
|
||||
> quote 1
|
||||
>> quote 2
|
||||
>>> quote 3
|
||||
...
|
||||
```
|
||||
|
||||
## List
|
||||
```
|
||||
ol
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
|
||||
ul
|
||||
-
|
||||
-
|
||||
...
|
||||
```
|
||||
## Link
|
||||
|
||||
## Todo List
|
||||
|
||||
- [x] Équipe 1
|
||||
- [ ] Équipe 2
|
||||
|
||||
```
|
||||
- [x] Équipe 1
|
||||
- [ ] Équipe 2
|
||||
```
|
||||
|
||||
```
|
||||
Text Link
|
||||
[Text](www.baidu.com)
|
||||
|
||||
Image Link
|
||||

|
||||
```
|
||||
## Code
|
||||
\``` type
|
||||
|
||||
code block
|
||||
|
||||
\```
|
||||
|
||||
\` code \`
|
||||
|
||||
```c++
|
||||
int main()
|
||||
{
|
||||
printf("hello world!");
|
||||
}
|
||||
```
|
||||
`code`
|
||||
|
||||
## Table
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| left | center | right |
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| left | center | right |
|
||||
| ---------------------- | ------------- | ----------------- |
|
||||
## Footnote
|
||||
```
|
||||
hello[^hello]
|
||||
```
|
||||
|
||||
Look at the bottom[^hello]
|
||||
|
||||
[^hello]: footnote
|
||||
|
||||
## Emojis
|
||||
Detailed: [https://www.webpagefx.com/tools/emoji-cheat-sheet/](https://www.webpagefx.com/tools/emoji-cheat-sheet/)
|
||||
```
|
||||
:laughing:
|
||||
:blush:
|
||||
:smiley:
|
||||
:)
|
||||
...
|
||||
```
|
||||
:laughing::blush::smiley::)
|
||||
|
||||
## $\KaTeX$ Mathematics
|
||||
|
||||
We can render formulas for example:$x_i + y_i = z_i$ and $\sum_{i=1}^n a_i=0$
|
||||
We can also single-line rendering
|
||||
$$\sum_{i=1}^n a_i=0$$
|
||||
Detailed: [katex](http://www.intmath.com/cg5/katex-mathjax-comparison.php)和[katex function](https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX)以及[latex](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference)
|
||||
|
||||
## Layout
|
||||
|
||||
::: hljs-left
|
||||
`::: hljs-left`
|
||||
`left`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-center
|
||||
`::: hljs-center`
|
||||
`center`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-right
|
||||
`::: hljs-right`
|
||||
`right`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
## deflist
|
||||
|
||||
Term 1
|
||||
|
||||
: Definition 1
|
||||
|
||||
Term 2 with *inline markup*
|
||||
|
||||
: Definition 2
|
||||
|
||||
{ some code, part of Definition 2 }
|
||||
|
||||
Third paragraph of definition 2.
|
||||
|
||||
```
|
||||
Term 1
|
||||
|
||||
: Definition 1
|
||||
|
||||
Term 2 with *inline markup*
|
||||
|
||||
: Definition 2
|
||||
|
||||
{ some code, part of Definition 2 }
|
||||
|
||||
Third paragraph of definition 2.
|
||||
|
||||
```
|
||||
|
||||
## abbr
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
The HTML specification
|
||||
is maintained by the W3C.
|
||||
```
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
The HTML specification
|
||||
is maintained by the W3C.
|
||||
```
|
||||
55
node_modules/mavon-editor/src/lib/lang/fr/words_fr.json
generated
vendored
Normal file
55
node_modules/mavon-editor/src/lib/lang/fr/words_fr.json
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"start_editor": "Début d'édition...",
|
||||
"navigation_title": "Navigation",
|
||||
"tl_bold": "Gras",
|
||||
"tl_italic": "Italique",
|
||||
"tl_header": "Entête",
|
||||
"tl_header_one": "Entête 1",
|
||||
"tl_header_two": "Entête 2",
|
||||
"tl_header_three": "Entête 3",
|
||||
"tl_header_four": "Entête 4",
|
||||
"tl_header_five": "Entête 5",
|
||||
"tl_header_six": "Entête 6",
|
||||
"tl_underline": "Souligné",
|
||||
"tl_strikethrough": "Barré",
|
||||
"tl_mark": "Mark",
|
||||
"tl_superscript": "Exposant",
|
||||
"tl_subscript": "Sous-exposant",
|
||||
"tl_quote": "Quote",
|
||||
"tl_ol": "Liste ",
|
||||
"tl_ul": "Puce",
|
||||
"tl_link": "Lien",
|
||||
"tl_image": "Image Lien",
|
||||
"tl_code": "Code",
|
||||
"tl_table": "Table",
|
||||
"tl_undo": "Annuler",
|
||||
"tl_redo": "Refaire",
|
||||
"tl_trash": "Supprimer",
|
||||
"tl_save": "Sauver",
|
||||
"tl_navigation_on": "Activer la navigation",
|
||||
"tl_navigation_off": "Désactiver le navigation",
|
||||
"tl_preview": "Previsualisé",
|
||||
"tl_aligncenter": "Center le texte",
|
||||
"tl_alignleft": "Férer le texte à gauche",
|
||||
"tl_alignright": "Férer le texte à droite",
|
||||
"tl_preview": "Previsualisé",
|
||||
"tl_edit": "Editer",
|
||||
"tl_single_column": "Seule Colonne",
|
||||
"tl_double_column": "Colonnes Doubles",
|
||||
"tl_fullscreen_on": "Activer le mode plein écran",
|
||||
"tl_fullscreen_off": "Désactiver le mode plein écran",
|
||||
"tl_read": "Lire le modèle",
|
||||
"tl_html_on": "Activer le mode HTML",
|
||||
"tl_html_off": "Désactiver le mode HTML",
|
||||
"tl_help": "Guide Markdown",
|
||||
"tl_upload": "Télécharger les images",
|
||||
"tl_upload_remove": "Supprimer",
|
||||
"tl_popup_link_title": "Ajouter un lien",
|
||||
"tl_popup_link_text": "Description",
|
||||
"tl_popup_link_addr": "Link",
|
||||
"tl_popup_img_link_title": "Ajouter une image",
|
||||
"tl_popup_img_link_text": "Description",
|
||||
"tl_popup_img_link_addr": "Link",
|
||||
"tl_popup_link_sure": "sûr",
|
||||
"tl_popup_link_cancel": "Annuler"
|
||||
}
|
||||
205
node_modules/mavon-editor/src/lib/lang/ja/help_ja.md
generated
vendored
Normal file
205
node_modules/mavon-editor/src/lib/lang/ja/help_ja.md
generated
vendored
Normal file
@@ -0,0 +1,205 @@
|
||||
@[toc](目次)
|
||||
|
||||
Markdown 文法ガイド
|
||||
===
|
||||
> Detailed: [http://commonmark.org/help/](http://commonmark.org/help/)
|
||||
|
||||
## **太字**
|
||||
```
|
||||
**太字**
|
||||
__太字__
|
||||
```
|
||||
## *斜体*
|
||||
```
|
||||
*斜体*
|
||||
_斜体_
|
||||
```
|
||||
## 見出し
|
||||
```
|
||||
# h1 #
|
||||
h1
|
||||
====
|
||||
## h2 ##
|
||||
h2
|
||||
----
|
||||
### h3 ###
|
||||
#### h4 ####
|
||||
##### h5 #####
|
||||
###### h6 ######
|
||||
```
|
||||
## 横線
|
||||
```
|
||||
***
|
||||
---
|
||||
```
|
||||
****
|
||||
## ^上付き^文字 & ~下付き~文字
|
||||
```
|
||||
super x^2^
|
||||
sub H~2~0
|
||||
```
|
||||
## ++下線++ & ~~取り消し線~~
|
||||
```
|
||||
++underline++
|
||||
~~strikethrough~~
|
||||
```
|
||||
## ==蛍光ペン==
|
||||
```
|
||||
==mark==
|
||||
```
|
||||
## 引用
|
||||
|
||||
```
|
||||
> quote 1
|
||||
>> quote 2
|
||||
>>> quote 3
|
||||
...
|
||||
```
|
||||
|
||||
## リスト
|
||||
```
|
||||
番号付きリスト
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
|
||||
箇条書きリスト
|
||||
-
|
||||
-
|
||||
...
|
||||
```
|
||||
|
||||
## Todoリスト
|
||||
|
||||
- [x] task 1
|
||||
- [ ] task 2
|
||||
|
||||
```
|
||||
- [x] task 1
|
||||
- [ ] task 2
|
||||
```
|
||||
|
||||
## リンク
|
||||
```
|
||||
Text Link
|
||||
[Text](www.baidu.com)
|
||||
|
||||
Image Link
|
||||

|
||||
```
|
||||
## コード
|
||||
\``` type
|
||||
|
||||
code block
|
||||
|
||||
\```
|
||||
|
||||
\` code \`
|
||||
|
||||
```c++
|
||||
int main()
|
||||
{
|
||||
printf("hello world!");
|
||||
}
|
||||
```
|
||||
`code`
|
||||
|
||||
## 表
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| left | center | right |
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| left | center | right |
|
||||
| ---------------------- | ------------- | ----------------- |
|
||||
|
||||
## 脚注
|
||||
```
|
||||
hello[^hello]
|
||||
```
|
||||
|
||||
Look at the bottom[^hello]
|
||||
|
||||
[^hello]: footnote
|
||||
|
||||
## 絵文字
|
||||
> Detailed: [https://www.webpagefx.com/tools/emoji-cheat-sheet/](https://www.webpagefx.com/tools/emoji-cheat-sheet/)
|
||||
```
|
||||
:laughing:
|
||||
:blush:
|
||||
:smiley:
|
||||
:)
|
||||
...
|
||||
```
|
||||
:laughing::blush::smiley::)
|
||||
|
||||
## $\KaTeX$ 数式
|
||||
> Detailed: [KaTeXマニュアル](http://www.intmath.com/cg5/katex-mathjax-comparison.php)、[KaTeX function](https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX)、[LaTeXマニュアル](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference)
|
||||
|
||||
We can render formulas for example:$x_i + y_i = z_i$ and $\sum_{i=1}^n a_i=0$
|
||||
We can also single-line rendering
|
||||
$$\sum_{i=1}^n a_i=0$$
|
||||
|
||||
## レイアウト
|
||||
|
||||
::: hljs-left
|
||||
`::: hljs-left`
|
||||
`left`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-center
|
||||
`::: hljs-center`
|
||||
`center`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-right
|
||||
`::: hljs-right`
|
||||
`right`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
## 定義リスト
|
||||
|
||||
Term 1
|
||||
|
||||
: Definition 1
|
||||
|
||||
Term 2 with *inline markup*
|
||||
|
||||
: Definition 2
|
||||
|
||||
{ some code, part of Definition 2 }
|
||||
|
||||
Third paragraph of definition 2.
|
||||
|
||||
```
|
||||
Term 1
|
||||
|
||||
: Definition 1
|
||||
|
||||
Term 2 with *inline markup*
|
||||
|
||||
: Definition 2
|
||||
|
||||
{ some code, part of Definition 2 }
|
||||
|
||||
Third paragraph of definition 2.
|
||||
|
||||
```
|
||||
|
||||
## abbr
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
The HTML specification
|
||||
is maintained by the W3C.
|
||||
```
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
The HTML specification
|
||||
is maintained by the W3C.
|
||||
```
|
||||
54
node_modules/mavon-editor/src/lib/lang/ja/words_ja.json
generated
vendored
Normal file
54
node_modules/mavon-editor/src/lib/lang/ja/words_ja.json
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"start_editor": "編集を始めてね!",
|
||||
"navigation_title": "ナビゲーション",
|
||||
"tl_bold": "太字",
|
||||
"tl_italic": "斜体",
|
||||
"tl_header": "見出し",
|
||||
"tl_header_one": "見出し1",
|
||||
"tl_header_two": "見出し2",
|
||||
"tl_header_three": "見出し3",
|
||||
"tl_header_four": "見出し4",
|
||||
"tl_header_five": "見出し5",
|
||||
"tl_header_six": "見出し6",
|
||||
"tl_underline": "下線",
|
||||
"tl_strikethrough": "取り消し線",
|
||||
"tl_mark": "蛍光ペン",
|
||||
"tl_superscript": "上付き文字",
|
||||
"tl_subscript": "下付き文字",
|
||||
"tl_quote": "引用",
|
||||
"tl_ol": "番号付きリスト",
|
||||
"tl_ul": "箇条書きリスト",
|
||||
"tl_link": "ハイパーリンク",
|
||||
"tl_image": "画像のリンク",
|
||||
"tl_code": "コードの挿入",
|
||||
"tl_table": "表の挿入",
|
||||
"tl_undo": "戻る",
|
||||
"tl_redo": "進む",
|
||||
"tl_trash": "削除",
|
||||
"tl_save": "保存",
|
||||
"tl_navigation_on": "ナビゲーションを表示",
|
||||
"tl_navigation_off": "ナビゲーションを非表示",
|
||||
"tl_preview": "プレビュー",
|
||||
"tl_aligncenter": "中央揃え",
|
||||
"tl_alignleft": "左揃え",
|
||||
"tl_alignright": "右揃え",
|
||||
"tl_edit": "編集",
|
||||
"tl_single_column": "一列",
|
||||
"tl_double_column": "二列",
|
||||
"tl_fullscreen_on": "全画面表示",
|
||||
"tl_fullscreen_off": "全画面表示の終了",
|
||||
"tl_read": "モデルの読み込み",
|
||||
"tl_html_on": "HTMLで表示",
|
||||
"tl_html_off": "HTML表示の終了",
|
||||
"tl_help": "ヘルプ",
|
||||
"tl_upload": "画像をアップロード",
|
||||
"tl_upload_remove": "画像の削除",
|
||||
"tl_popup_link_title": "リンクの追加",
|
||||
"tl_popup_link_text": "リンクテキスト",
|
||||
"tl_popup_link_addr": "リンク先のURL",
|
||||
"tl_popup_img_link_title": "画像の追加",
|
||||
"tl_popup_img_link_text": "画像タイトル",
|
||||
"tl_popup_img_link_addr": "画像URL",
|
||||
"tl_popup_link_sure": "OK",
|
||||
"tl_popup_link_cancel": "戻る"
|
||||
}
|
||||
204
node_modules/mavon-editor/src/lib/lang/pt-BR/help_pt-BR.md
generated
vendored
Normal file
204
node_modules/mavon-editor/src/lib/lang/pt-BR/help_pt-BR.md
generated
vendored
Normal file
@@ -0,0 +1,204 @@
|
||||
@[toc](Directory)
|
||||
|
||||
Guia Markdown
|
||||
===
|
||||
> Detalhes: [http://commonmark.org/help/](http://commonmark.org/help/)
|
||||
|
||||
## **Negrito**
|
||||
```
|
||||
**negrito**
|
||||
__negrito__
|
||||
```
|
||||
## *Itálico*
|
||||
```
|
||||
*itálico*
|
||||
_itálico_
|
||||
```
|
||||
## Cabeçalho
|
||||
```
|
||||
# h1 #
|
||||
h1
|
||||
====
|
||||
## h2 ##
|
||||
h2
|
||||
----
|
||||
### h3 ###
|
||||
#### h4 ####
|
||||
##### h5 #####
|
||||
###### h6 ######
|
||||
```
|
||||
## Linha Divisora
|
||||
```
|
||||
***
|
||||
---
|
||||
```
|
||||
****
|
||||
## ^Sobre^scrito & ~Sub~scrito
|
||||
```
|
||||
sobre x^2^
|
||||
sub H~2~0
|
||||
```
|
||||
## ++Sublinhar++ & ~~Tachar~~
|
||||
```
|
||||
++sublinhar++
|
||||
~~tachar~~
|
||||
```
|
||||
## ==Marcador==
|
||||
```
|
||||
==marcador==
|
||||
```
|
||||
## Citação
|
||||
|
||||
```
|
||||
> citação 1
|
||||
>> citação 2
|
||||
>>> citação 3
|
||||
...
|
||||
```
|
||||
|
||||
## Listas
|
||||
```
|
||||
lista Numerada
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
|
||||
lista com marcadores
|
||||
-
|
||||
-
|
||||
...
|
||||
```
|
||||
|
||||
## Todo Listas
|
||||
|
||||
- [x] Tarefa 1
|
||||
- [ ] Tarefa 2
|
||||
|
||||
```
|
||||
- [x] Tarefa 1
|
||||
- [ ] Tarefa 2
|
||||
```
|
||||
|
||||
## Link
|
||||
```
|
||||
Link Texto
|
||||
[Text](www.baidu.com)
|
||||
|
||||
Link Imagem
|
||||

|
||||
```
|
||||
## Código
|
||||
\``` tipo
|
||||
|
||||
bloco de código
|
||||
|
||||
\```
|
||||
|
||||
\` código \`
|
||||
|
||||
```c++
|
||||
int main()
|
||||
{
|
||||
printf("hello world!");
|
||||
}
|
||||
```
|
||||
`code`
|
||||
|
||||
## Tabela
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| esquerda | centro | direita |
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| esquerda | centro | direita |
|
||||
| ---------------------- | ------------- | ----------------- |
|
||||
## Rodapé
|
||||
```
|
||||
olá[^olá]
|
||||
```
|
||||
|
||||
Olhe para baixo[^olá]
|
||||
|
||||
[^olá]: rodapé
|
||||
|
||||
## Emojis
|
||||
Detalhes: [https://www.webpagefx.com/tools/emoji-cheat-sheet/](https://www.webpagefx.com/tools/emoji-cheat-sheet/)
|
||||
```
|
||||
:laughing:
|
||||
:blush:
|
||||
:smiley:
|
||||
:)
|
||||
...
|
||||
```
|
||||
:laughing::blush::smiley::)
|
||||
|
||||
## $\KaTeX$ Mathematics
|
||||
|
||||
Podemos mostrar fórmulas por exemplo:$x_i + y_i = z_i$ and $\sum_{i=1}^n a_i=0$
|
||||
Podemos também mostrar em uma única linha:
|
||||
$$\sum_{i=1}^n a_i=0$$
|
||||
Detalhes: [katex](http://www.intmath.com/cg5/katex-mathjax-comparison.php)和[katex function](https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX)以及[latex](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference)
|
||||
|
||||
## Layout
|
||||
|
||||
::: hljs-left
|
||||
`::: hljs-left`
|
||||
`esquerda`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-center
|
||||
`::: hljs-center`
|
||||
`centro`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-right
|
||||
`::: hljs-right`
|
||||
`direita`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
## Definições
|
||||
|
||||
Termo 1
|
||||
|
||||
: Definição 1
|
||||
|
||||
Termo 2 com *markup inline*
|
||||
|
||||
: Definição 2
|
||||
|
||||
{ um pouco de código, parte da Definição 2 }
|
||||
|
||||
Terceiro parágrafo da definição 2.
|
||||
|
||||
```
|
||||
Termo 1
|
||||
|
||||
: Definição 1
|
||||
|
||||
Termo 2 com *markup inline*
|
||||
|
||||
: Definição 2
|
||||
|
||||
{ um pouco de código, parte da Definição 2 }
|
||||
|
||||
Terceiro parágrafo da definição 2.
|
||||
|
||||
```
|
||||
|
||||
## Abreviações
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
A especificação HTML
|
||||
é mantida pela W3C.
|
||||
```
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
The HTML specification
|
||||
é mantida pela W3C.
|
||||
```
|
||||
54
node_modules/mavon-editor/src/lib/lang/pt-BR/words_pt-BR.json
generated
vendored
Normal file
54
node_modules/mavon-editor/src/lib/lang/pt-BR/words_pt-BR.json
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"start_editor": "Começar edição...",
|
||||
"navigation_title": "Navegação",
|
||||
"tl_bold": "Negrito",
|
||||
"tl_italic": "Itálico",
|
||||
"tl_header": "Cabeçalho",
|
||||
"tl_header_one": "Cabeçalho 1",
|
||||
"tl_header_two": "Cabeçalho 2",
|
||||
"tl_header_three": "Cabeçalho 3",
|
||||
"tl_header_four": "Cabeçalho 4",
|
||||
"tl_header_five": "Cabeçalho 5",
|
||||
"tl_header_six": "Cabeçalho 6",
|
||||
"tl_underline": "Sublinhar",
|
||||
"tl_strikethrough": "Tachar",
|
||||
"tl_mark": "Marcação",
|
||||
"tl_superscript": "Sobrescrito",
|
||||
"tl_subscript": "Subscrito",
|
||||
"tl_quote": "Citação",
|
||||
"tl_ol": "Lista Numerada",
|
||||
"tl_ul": "Lista com marcadores",
|
||||
"tl_link": "Link",
|
||||
"tl_image": "Link de imagem",
|
||||
"tl_code": "Código",
|
||||
"tl_table": "Tabela",
|
||||
"tl_undo": "Desfazer",
|
||||
"tl_redo": "Refazer",
|
||||
"tl_trash": "Lixo",
|
||||
"tl_save": "Salvar",
|
||||
"tl_navigation_on": "Mostrar Navegação",
|
||||
"tl_navigation_off": "Esconder Navegação",
|
||||
"tl_preview": "Preview",
|
||||
"tl_aligncenter": "Alinhar no centro",
|
||||
"tl_alignleft": "Alinhar à esquerda",
|
||||
"tl_alignright": "Alinhar à direita",
|
||||
"tl_edit": "Editar",
|
||||
"tl_single_column": "Coluna Única",
|
||||
"tl_double_column": "Duas Colunas",
|
||||
"tl_fullscreen_on": "Ligar Tela Cheia",
|
||||
"tl_fullscreen_off": "Desligar Tela Cheia",
|
||||
"tl_read": "Modo de Leitura",
|
||||
"tl_html_on": "Ligar HTML",
|
||||
"tl_html_off": "Desligar HTML",
|
||||
"tl_help": "Guia Markdown",
|
||||
"tl_upload": "Upload de Imagens",
|
||||
"tl_upload_remove": "Remover",
|
||||
"tl_popup_link_title": "Adicionar Link",
|
||||
"tl_popup_link_text": "Descrição",
|
||||
"tl_popup_link_addr": "Link",
|
||||
"tl_popup_img_link_title": "Adicionar fotos",
|
||||
"tl_popup_img_link_text": "Descrição",
|
||||
"tl_popup_img_link_addr": "Link",
|
||||
"tl_popup_link_sure": "Confirmar",
|
||||
"tl_popup_link_cancel": "Cancelar"
|
||||
}
|
||||
202
node_modules/mavon-editor/src/lib/lang/ru/help_ru.md
generated
vendored
Normal file
202
node_modules/mavon-editor/src/lib/lang/ru/help_ru.md
generated
vendored
Normal file
@@ -0,0 +1,202 @@
|
||||
@[toc](Catalog)
|
||||
|
||||
Markdown помощь
|
||||
===
|
||||
> Подробнее: [http://commonmark.org/help/](http://commonmark.org/help/)
|
||||
|
||||
## **Полужирный**
|
||||
```
|
||||
**Полужирный**
|
||||
__Полужирный__
|
||||
```
|
||||
## *Курсив*
|
||||
```
|
||||
*Курсив*
|
||||
_Курсив_
|
||||
```
|
||||
## Заголовок
|
||||
```
|
||||
# h1 #
|
||||
h1
|
||||
====
|
||||
## h2 ##
|
||||
h2
|
||||
----
|
||||
### h3 ###
|
||||
#### h4 ####
|
||||
##### h5 #####
|
||||
###### h6 ######
|
||||
```
|
||||
## Разделительная линия
|
||||
```
|
||||
***
|
||||
---
|
||||
```
|
||||
****
|
||||
## ^Верхний^индекс & ~Нижний~индекс
|
||||
```
|
||||
верхний x^2^
|
||||
нижний H~2~0
|
||||
```
|
||||
## ++Подчеркнутый++ & ~~Зачеркнутый~~
|
||||
```
|
||||
++Подчеркнутый++
|
||||
~~Зачеркнутый~~
|
||||
```
|
||||
## ==Отметка==
|
||||
```
|
||||
==Отметка==
|
||||
```
|
||||
## Цитата
|
||||
|
||||
```
|
||||
> Цитата
|
||||
>> Цитата 2
|
||||
>>> Цитата 3
|
||||
...
|
||||
```
|
||||
|
||||
## Список
|
||||
```
|
||||
ol
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
|
||||
ul
|
||||
-
|
||||
-
|
||||
...
|
||||
```
|
||||
|
||||
## Список задач
|
||||
|
||||
- [x] Задача 1
|
||||
- [ ] Задача 2
|
||||
|
||||
```
|
||||
- [x] Задача 1
|
||||
- [ ] Задача 2
|
||||
```
|
||||
|
||||
## Ссылка
|
||||
```
|
||||
Ссылка
|
||||
[Текст](www.baidu.com)
|
||||
|
||||
Ссылка изображения
|
||||

|
||||
```
|
||||
## Код
|
||||
\``` type
|
||||
|
||||
code block
|
||||
|
||||
\```
|
||||
|
||||
\` code \`
|
||||
|
||||
```c++
|
||||
int main()
|
||||
{
|
||||
printf("hello world!");}
|
||||
```
|
||||
`code`
|
||||
|
||||
## Таблица
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| left | center | right |
|
||||
```
|
||||
| th1 | th2 | th3 |
|
||||
| :-- | :--: | ----: |
|
||||
| left | center | right |
|
||||
| ---------------------- | ------------- | ----------------- |
|
||||
## Сноска
|
||||
```
|
||||
Привет[^Привет]
|
||||
```
|
||||
|
||||
Тут что-то непонятное[^Привет]
|
||||
|
||||
[^Привет]: А тут объяснение
|
||||
|
||||
## Emojis
|
||||
Подробнее: [https://www.webpagefx.com/tools/emoji-cheat-sheet/](https://www.webpagefx.com/tools/emoji-cheat-sheet/)
|
||||
```
|
||||
:laughing:
|
||||
:blush:
|
||||
:smiley:
|
||||
:)
|
||||
...
|
||||
```
|
||||
:laughing::blush::smiley::)
|
||||
|
||||
## $\KaTeX$ Mathematics
|
||||
|
||||
Можно выводить такие формулы:$x_i + y_i = z_i$ and $\sum_{i=1}^n a_i=0$
|
||||
А также в одну строку:
|
||||
$$\sum_{i=1}^n a_i=0$$
|
||||
Подробнее:
|
||||
- [katex](http://www.intmath.com/cg5/katex-mathjax-comparison.php)
|
||||
- [katex function](https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX)
|
||||
- [latex](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference)
|
||||
|
||||
## Разметка
|
||||
|
||||
::: hljs-left
|
||||
`::: hljs-left`
|
||||
`left`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-center
|
||||
`::: hljs-center`
|
||||
`center`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-right
|
||||
`::: hljs-right`
|
||||
`right`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
## Список определений
|
||||
|
||||
Термин 1
|
||||
|
||||
: Определение 1
|
||||
|
||||
Термин 2 с использованием *разметки*
|
||||
|
||||
: Определение 2
|
||||
|
||||
{ Какой-нибудь код, часть определения 2 }
|
||||
Третий параграф определения 2.
|
||||
```
|
||||
Термин 1
|
||||
|
||||
: Определение 1
|
||||
|
||||
Термин 2 с использованием *разметки*
|
||||
|
||||
: Определение 2
|
||||
|
||||
{ Какой-нибудь код, часть определения 2 }
|
||||
Третий параграф определения 2.
|
||||
```
|
||||
|
||||
## Сокращения
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
The HTML specification
|
||||
is maintained by the W3C.
|
||||
```
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
The HTML specification
|
||||
is maintained by the W3C.
|
||||
```
|
||||
54
node_modules/mavon-editor/src/lib/lang/ru/words_ru.json
generated
vendored
Normal file
54
node_modules/mavon-editor/src/lib/lang/ru/words_ru.json
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"start_editor": "Начните редактирование...",
|
||||
"navigation_title": "Навигация",
|
||||
"tl_bold": "Полужирный",
|
||||
"tl_italic": "Курсив",
|
||||
"tl_header": "Заголовки",
|
||||
"tl_header_one": "Заголовок 1",
|
||||
"tl_header_two": "Заголовок 2",
|
||||
"tl_header_three": "Заголовок 3",
|
||||
"tl_header_four": "Заголовок 4",
|
||||
"tl_header_five": "Заголовок 5",
|
||||
"tl_header_six": "Заголовок 6",
|
||||
"tl_underline": "Подчеркнутый",
|
||||
"tl_strikethrough": "Зачеркнутый",
|
||||
"tl_mark": "Отметка",
|
||||
"tl_superscript": "Верхний индекс",
|
||||
"tl_subscript": "Нижний индекс",
|
||||
"tl_quote": "Цитата",
|
||||
"tl_ol": "Нумерованный список",
|
||||
"tl_ul": "Список",
|
||||
"tl_link": "Ссылка",
|
||||
"tl_image": "Ссылка изображения",
|
||||
"tl_code": "Код",
|
||||
"tl_table": "Таблица",
|
||||
"tl_undo": "Отменить",
|
||||
"tl_redo": "Вернуть",
|
||||
"tl_trash": "Удалить",
|
||||
"tl_save": "Сохранить",
|
||||
"tl_navigation_on": "Показать навигацию",
|
||||
"tl_navigation_off": "Скрыть навигацию",
|
||||
"tl_preview": "Предпросмотр",
|
||||
"tl_aligncenter": "Выровнять по центру",
|
||||
"tl_alignleft": "Выровнять по левому краю",
|
||||
"tl_alignright": "Выровнять по правому краю",
|
||||
"tl_edit": "Редактор",
|
||||
"tl_single_column": "Одно поле",
|
||||
"tl_double_column": "Два поля",
|
||||
"tl_fullscreen_on": "Полноэкранный режим",
|
||||
"tl_fullscreen_off": "Выключить полноэкранный режим",
|
||||
"tl_read": "Режим чтения",
|
||||
"tl_html_on": "Показать HTML",
|
||||
"tl_html_off": "Убрать HTML",
|
||||
"tl_help": "Markdown помощь",
|
||||
"tl_upload": "Загрузить изображение",
|
||||
"tl_upload_remove": "Удалить",
|
||||
"tl_popup_link_title": "Добавить ссылку",
|
||||
"tl_popup_link_text": "Текст ссылки",
|
||||
"tl_popup_link_addr": "Адрес ссылки",
|
||||
"tl_popup_img_link_title": "Локальное изображение",
|
||||
"tl_popup_img_link_text": "Текст изображения",
|
||||
"tl_popup_img_link_addr": "Ссылка изображения",
|
||||
"tl_popup_link_sure": "Добавить",
|
||||
"tl_popup_link_cancel": "Отменить"
|
||||
}
|
||||
203
node_modules/mavon-editor/src/lib/lang/zh-CN/help_zh-CN.md
generated
vendored
Normal file
203
node_modules/mavon-editor/src/lib/lang/zh-CN/help_zh-CN.md
generated
vendored
Normal file
@@ -0,0 +1,203 @@
|
||||
@[toc](目录)
|
||||
|
||||
Markdown 语法简介
|
||||
=============
|
||||
> [语法详解](http://commonmark.org/help/)
|
||||
|
||||
## **目录**
|
||||
```
|
||||
@[toc](目录)
|
||||
```
|
||||
|
||||
## **粗体**
|
||||
```
|
||||
**粗体**
|
||||
__粗体__
|
||||
```
|
||||
## *斜体*
|
||||
```
|
||||
*斜体*
|
||||
_斜体_
|
||||
```
|
||||
## 标题
|
||||
```
|
||||
# 一级标题 #
|
||||
一级标题
|
||||
====
|
||||
## 二级标题 ##
|
||||
二级标题
|
||||
----
|
||||
### 三级标题 ###
|
||||
#### 四级标题 ####
|
||||
##### 五级标题 #####
|
||||
###### 六级标题 ######
|
||||
```
|
||||
## 分割线
|
||||
```
|
||||
***
|
||||
---
|
||||
```
|
||||
****
|
||||
## ^上^角~下~标
|
||||
```
|
||||
上角标 x^2^
|
||||
下角标 H~2~0
|
||||
```
|
||||
## ++下划线++ ~~中划线~~
|
||||
```
|
||||
++下划线++
|
||||
~~中划线~~
|
||||
```
|
||||
## ==标记==
|
||||
```
|
||||
==标记==
|
||||
```
|
||||
## 段落引用
|
||||
```
|
||||
> 一级
|
||||
>> 二级
|
||||
>>> 三级
|
||||
...
|
||||
```
|
||||
|
||||
## 列表
|
||||
```
|
||||
有序列表
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
无序列表
|
||||
-
|
||||
-
|
||||
...
|
||||
```
|
||||
|
||||
## 任务列表
|
||||
|
||||
- [x] 已完成任务
|
||||
- [ ] 未完成任务
|
||||
|
||||
```
|
||||
- [x] 已完成任务
|
||||
- [ ] 未完成任务
|
||||
```
|
||||
|
||||
## 链接
|
||||
```
|
||||
[链接](www.baidu.com)
|
||||

|
||||
```
|
||||
## 代码段落
|
||||
\``` type
|
||||
|
||||
代码段落
|
||||
|
||||
\```
|
||||
|
||||
\` 代码块 \`
|
||||
|
||||
```c++
|
||||
int main()
|
||||
{
|
||||
printf("hello world!");
|
||||
}
|
||||
```
|
||||
`code`
|
||||
## 表格(table)
|
||||
```
|
||||
| 标题1 | 标题2 | 标题3 |
|
||||
| :-- | :--: | ----: |
|
||||
| 左对齐 | 居中 | 右对齐 |
|
||||
| ---------------------- | ------------- | ----------------- |
|
||||
```
|
||||
| 标题1 | 标题2 | 标题3 |
|
||||
| :-- | :--: | ----: |
|
||||
| 左对齐 | 居中 | 右对齐 |
|
||||
| ---------------------- | ------------- | ----------------- |
|
||||
## 脚注(footnote)
|
||||
```
|
||||
hello[^hello]
|
||||
```
|
||||
|
||||
见底部脚注[^hello]
|
||||
|
||||
[^hello]: 一个注脚
|
||||
|
||||
## 表情(emoji)
|
||||
[参考网站: https://www.webpagefx.com/tools/emoji-cheat-sheet/](https://www.webpagefx.com/tools/emoji-cheat-sheet/)
|
||||
```
|
||||
:laughing:
|
||||
:blush:
|
||||
:smiley:
|
||||
:)
|
||||
...
|
||||
```
|
||||
:laughing::blush::smiley::)
|
||||
|
||||
## $\KaTeX$公式
|
||||
|
||||
我们可以渲染公式例如:$x_i + y_i = z_i$和$\sum_{i=1}^n a_i=0$
|
||||
我们也可以单行渲染
|
||||
$$\sum_{i=1}^n a_i=0$$
|
||||
具体可参照[katex文档](http://www.intmath.com/cg5/katex-mathjax-comparison.php)和[katex支持的函数](https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX)以及[latex文档](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference)
|
||||
|
||||
## 布局
|
||||
|
||||
::: hljs-left
|
||||
`::: hljs-left`
|
||||
`居左`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-center
|
||||
`::: hljs-center`
|
||||
`居中`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-right
|
||||
`::: hljs-right`
|
||||
`居右`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
## 定义
|
||||
|
||||
术语一
|
||||
|
||||
: 定义一
|
||||
|
||||
包含有*行内标记*的术语二
|
||||
|
||||
: 定义二
|
||||
|
||||
{一些定义二的文字或代码}
|
||||
|
||||
定义二的第三段
|
||||
|
||||
```
|
||||
术语一
|
||||
|
||||
: 定义一
|
||||
|
||||
包含有*行内标记*的术语二
|
||||
|
||||
: 定义二
|
||||
|
||||
{一些定义二的文字或代码}
|
||||
|
||||
定义二的第三段
|
||||
|
||||
```
|
||||
|
||||
## abbr
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
HTML 规范由 W3C 维护
|
||||
```
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
HTML 规范由 W3C 维护
|
||||
```
|
||||
|
||||
54
node_modules/mavon-editor/src/lib/lang/zh-CN/words_zh-CN.json
generated
vendored
Normal file
54
node_modules/mavon-editor/src/lib/lang/zh-CN/words_zh-CN.json
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"start_editor": "开始编辑...",
|
||||
"navigation_title": "导航目录",
|
||||
"tl_bold": "粗体",
|
||||
"tl_italic": "斜体",
|
||||
"tl_header": "标题",
|
||||
"tl_header_one": "一级标题",
|
||||
"tl_header_two": "二级标题",
|
||||
"tl_header_three": "三级标题",
|
||||
"tl_header_four": "四级标题",
|
||||
"tl_header_five": "五级标题",
|
||||
"tl_header_six": "六级标题",
|
||||
"tl_underline": "下划线",
|
||||
"tl_strikethrough": "中划线",
|
||||
"tl_mark": "标记",
|
||||
"tl_superscript": "上角标",
|
||||
"tl_subscript": "下角标",
|
||||
"tl_quote": "段落引用",
|
||||
"tl_ol": "有序列表",
|
||||
"tl_ul": "无序列表",
|
||||
"tl_link": "链接",
|
||||
"tl_image": "添加图片链接",
|
||||
"tl_code": "代码块",
|
||||
"tl_table": "表格",
|
||||
"tl_undo": "上一步",
|
||||
"tl_redo": "下一步",
|
||||
"tl_trash": "清空",
|
||||
"tl_save": "保存",
|
||||
"tl_navigation_on": "开启标题导航",
|
||||
"tl_navigation_off": "关闭标题导航",
|
||||
"tl_preview": "预览",
|
||||
"tl_aligncenter": "居中",
|
||||
"tl_alignleft": "居左",
|
||||
"tl_alignright": "居右",
|
||||
"tl_edit": "编辑",
|
||||
"tl_single_column": "单栏",
|
||||
"tl_double_column": "双栏",
|
||||
"tl_fullscreen_on": "全屏编辑",
|
||||
"tl_fullscreen_off": "退出全屏",
|
||||
"tl_read": "沉浸式阅读",
|
||||
"tl_html_on": "查看html文本",
|
||||
"tl_html_off": "返回markdown文本",
|
||||
"tl_help": "markdown语法帮助",
|
||||
"tl_upload": "上传图片",
|
||||
"tl_upload_remove": "删除",
|
||||
"tl_popup_link_title": "添加链接",
|
||||
"tl_popup_link_text": "链接描述",
|
||||
"tl_popup_link_addr": "链接地址",
|
||||
"tl_popup_img_link_title": "添加图片",
|
||||
"tl_popup_img_link_text": "图片描述",
|
||||
"tl_popup_img_link_addr": "图片链接",
|
||||
"tl_popup_link_sure": "确定",
|
||||
"tl_popup_link_cancel": "取消"
|
||||
}
|
||||
198
node_modules/mavon-editor/src/lib/lang/zh-TW/help_zh-TW.md
generated
vendored
Normal file
198
node_modules/mavon-editor/src/lib/lang/zh-TW/help_zh-TW.md
generated
vendored
Normal file
@@ -0,0 +1,198 @@
|
||||
@[toc](目錄)
|
||||
|
||||
Markdown 語法簡介
|
||||
=============
|
||||
> [語法詳解](http://commonmark.org/help/)
|
||||
|
||||
## **粗體**
|
||||
```
|
||||
**粗體**
|
||||
__粗體__
|
||||
```
|
||||
## *斜體*
|
||||
```
|
||||
*斜體*
|
||||
_斜體_
|
||||
```
|
||||
## 標題
|
||||
```
|
||||
# 一級標題 #
|
||||
一級標題
|
||||
====
|
||||
## 二級標題 ##
|
||||
二級標題
|
||||
----
|
||||
### 三級標題 ###
|
||||
#### 四級標題 ####
|
||||
##### 五級標題 #####
|
||||
###### 六級標題 ######
|
||||
```
|
||||
## 分割線
|
||||
```
|
||||
***
|
||||
---
|
||||
```
|
||||
****
|
||||
## ^上^角~下~標
|
||||
```
|
||||
上角標 x^2^
|
||||
下角標 H~2~0
|
||||
```
|
||||
## ++下劃線++ ~~中劃線~~
|
||||
```
|
||||
++下劃線++
|
||||
~~中劃線~~
|
||||
```
|
||||
## ==標記==
|
||||
```
|
||||
==標記==
|
||||
```
|
||||
## 段落引用
|
||||
```
|
||||
> 一級
|
||||
>> 二級
|
||||
>>> 三級
|
||||
...
|
||||
```
|
||||
|
||||
## 列表
|
||||
```
|
||||
有序列表
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
無序列表
|
||||
-
|
||||
-
|
||||
...
|
||||
```
|
||||
|
||||
## 任務列表
|
||||
|
||||
- [x] 已完成任務
|
||||
- [ ] 未完成任務
|
||||
|
||||
```
|
||||
- [x] 已完成任務
|
||||
- [ ] 未完成任務
|
||||
```
|
||||
|
||||
## 鏈接
|
||||
```
|
||||
[鏈接](www.baidu.com)
|
||||

|
||||
```
|
||||
## 代碼段落
|
||||
\``` type
|
||||
|
||||
代碼段落
|
||||
|
||||
\```
|
||||
|
||||
\` 代碼塊 \`
|
||||
|
||||
```c++
|
||||
int main()
|
||||
{
|
||||
printf("hello world!");
|
||||
}
|
||||
```
|
||||
`code`
|
||||
## 表格(table)
|
||||
```
|
||||
| 標題1 | 標題2 | 標題3 |
|
||||
| :-- | :--: | ----: |
|
||||
| 左對齊 | 居中 | 右對齊 |
|
||||
| ---------------------- | ------------- | ----------------- |
|
||||
```
|
||||
| 標題1 | 標題2 | 標題3 |
|
||||
| :-- | :--: | ----: |
|
||||
| 左對齊 | 居中 | 右對齊 |
|
||||
| ---------------------- | ------------- | ----------------- |
|
||||
## 腳註(footnote)
|
||||
```
|
||||
hello[^hello]
|
||||
```
|
||||
|
||||
見底部腳註[^hello]
|
||||
|
||||
[^hello]: 一個註腳
|
||||
|
||||
## 表情(emoji)
|
||||
[參考網站: https://www.webpagefx.com/tools/emoji-cheat-sheet/](https://www.webpagefx.com/tools/emoji-cheat-sheet/)
|
||||
```
|
||||
:laughing:
|
||||
:blush:
|
||||
:smiley:
|
||||
:)
|
||||
...
|
||||
```
|
||||
:laughing::blush::smiley::)
|
||||
|
||||
## $\KaTeX$公式
|
||||
|
||||
我們可以渲染公式例如:$x_i + y_i = z_i$和$\sum_{i=1}^n a_i=0$
|
||||
我們也可以單行渲染
|
||||
$$\sum_{i=1}^n a_i=0$$
|
||||
具體可參照[katex文檔](http://www.intmath.com/cg5/katex-mathjax-comparison.php)和[katex支持的函數](https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX)以及[latex文檔](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference)
|
||||
|
||||
## 布局
|
||||
|
||||
::: hljs-left
|
||||
`::: hljs-left`
|
||||
`居左`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-center
|
||||
`::: hljs-center`
|
||||
`居中`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
::: hljs-right
|
||||
`::: hljs-right`
|
||||
`居右`
|
||||
`:::`
|
||||
:::
|
||||
|
||||
## 定義
|
||||
|
||||
術語一
|
||||
|
||||
: 定義一
|
||||
|
||||
包含有*行內標記*的術語二
|
||||
|
||||
: 定義二
|
||||
|
||||
{一些定義二的文字或代碼}
|
||||
|
||||
定義二的第三段
|
||||
|
||||
```
|
||||
術語一
|
||||
|
||||
: 定義一
|
||||
|
||||
包含有*行內標記*的術語二
|
||||
|
||||
: 定義二
|
||||
|
||||
{一些定義二的文字或代碼}
|
||||
|
||||
定義二的第三段
|
||||
|
||||
```
|
||||
|
||||
## abbr
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
HTML 規範由 W3C 維護
|
||||
```
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
*[W3C]: World Wide Web Consortium
|
||||
HTML 規範由 W3C 維護
|
||||
```
|
||||
|
||||
54
node_modules/mavon-editor/src/lib/lang/zh-TW/words_zh-TW.json
generated
vendored
Normal file
54
node_modules/mavon-editor/src/lib/lang/zh-TW/words_zh-TW.json
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"start_editor": "開始編輯...",
|
||||
"navigation_title": "導航目錄",
|
||||
"tl_bold": "粗體",
|
||||
"tl_italic": "斜體",
|
||||
"tl_header": "標題",
|
||||
"tl_header_one": "一級標題",
|
||||
"tl_header_two": "二級標題",
|
||||
"tl_header_three": "三級標題",
|
||||
"tl_header_four": "四級標題",
|
||||
"tl_header_five": "五級標題",
|
||||
"tl_header_six": "六級標題",
|
||||
"tl_underline": "下劃線",
|
||||
"tl_strikethrough": "中劃線",
|
||||
"tl_mark": "標記",
|
||||
"tl_superscript": "上角標",
|
||||
"tl_subscript": "下角標",
|
||||
"tl_quote": "段落引用",
|
||||
"tl_ol": "有序列表",
|
||||
"tl_ul": "無序列表",
|
||||
"tl_link": "鏈接",
|
||||
"tl_image": "添加圖片鏈接",
|
||||
"tl_code": "代碼塊",
|
||||
"tl_table": "表格",
|
||||
"tl_undo": "上一步",
|
||||
"tl_redo": "下一步",
|
||||
"tl_trash": "清空",
|
||||
"tl_save": "保存",
|
||||
"tl_navigation_on": "開啟標題導航",
|
||||
"tl_navigation_off": "關閉標題導航",
|
||||
"tl_preview": "預覽",
|
||||
"tl_aligncenter": "居中",
|
||||
"tl_alignleft": "居左",
|
||||
"tl_alignright": "居右",
|
||||
"tl_edit": "編輯",
|
||||
"tl_single_column": "單欄",
|
||||
"tl_double_column": "雙欄",
|
||||
"tl_fullscreen_on": "全屏編輯",
|
||||
"tl_fullscreen_off": "退出全屏",
|
||||
"tl_read": "沈浸式閱讀",
|
||||
"tl_html_on": "查看html文本",
|
||||
"tl_html_off": "返回markdown文本",
|
||||
"tl_help": "markdown語法幫助",
|
||||
"tl_upload": "上傳圖片",
|
||||
"tl_upload_remove": "刪除",
|
||||
"tl_popup_link_title": "添加鏈接",
|
||||
"tl_popup_link_text": "鏈接描述",
|
||||
"tl_popup_link_addr": "鏈接地址",
|
||||
"tl_popup_img_link_title": "添加圖片",
|
||||
"tl_popup_img_link_text": "圖片描述",
|
||||
"tl_popup_img_link_addr": "圖片鏈接",
|
||||
"tl_popup_link_sure": "確定",
|
||||
"tl_popup_link_cancel": "取消"
|
||||
}
|
||||
154
node_modules/mavon-editor/src/lib/mixins/markdown.js
generated
vendored
Normal file
154
node_modules/mavon-editor/src/lib/mixins/markdown.js
generated
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
import hljsLangs from '../core/hljs/lang.hljs.js'
|
||||
import {
|
||||
loadScript
|
||||
} from '../core/extra-function.js'
|
||||
import sanitizer from '../core/sanitizer.js'
|
||||
var markdown_config = {
|
||||
html: true, // Enable HTML tags in source
|
||||
xhtmlOut: true, // Use '/' to close single tags (<br />).
|
||||
breaks: true, // Convert '\n' in paragraphs into <br>
|
||||
langPrefix: 'lang-', // CSS language prefix for fenced blocks. Can be
|
||||
linkify: false, // 自动识别url
|
||||
typographer: true,
|
||||
quotes: '“”‘’'
|
||||
}
|
||||
|
||||
var MarkdownIt = require('markdown-it');
|
||||
// 表情
|
||||
var emoji = require('markdown-it-emoji');
|
||||
// 下标
|
||||
var sub = require('markdown-it-sub')
|
||||
// 上标
|
||||
var sup = require('markdown-it-sup')
|
||||
// <dl/>
|
||||
var deflist = require('markdown-it-deflist')
|
||||
// <abbr/>
|
||||
var abbr = require('markdown-it-abbr')
|
||||
// footnote
|
||||
var footnote = require('markdown-it-footnote')
|
||||
// insert 带有下划线 样式 ++ ++
|
||||
var insert = require('markdown-it-ins')
|
||||
// mark
|
||||
var mark = require('markdown-it-mark')
|
||||
// taskLists
|
||||
var taskLists = require('markdown-it-task-lists')
|
||||
// container
|
||||
var container = require('markdown-it-container')
|
||||
|
||||
var toc = require('markdown-it-toc')
|
||||
|
||||
var mihe = require('markdown-it-highlightjs-external');
|
||||
// math katex
|
||||
var katex = require('markdown-it-katex-external');
|
||||
var miip = require('markdown-it-images-preview');
|
||||
var missLangs = {};
|
||||
var needLangs = [];
|
||||
var hljs_opts = {
|
||||
hljs: 'auto',
|
||||
highlighted: true,
|
||||
langCheck: function (lang) {
|
||||
if (lang && hljsLangs[lang] && !missLangs[lang]) {
|
||||
missLangs[lang] = 1;
|
||||
needLangs.push(hljsLangs[lang])
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export function initMarkdown() {
|
||||
const markdown = new MarkdownIt(markdown_config);
|
||||
|
||||
// add target="_blank" to all link
|
||||
var defaultRender = markdown.renderer.rules.link_open || function (tokens, idx, options, env, self) {
|
||||
return self.renderToken(tokens, idx, options);
|
||||
};
|
||||
markdown.renderer.rules.link_open = function (tokens, idx, options, env, self) {
|
||||
var hIndex = tokens[idx].attrIndex('href');
|
||||
if (tokens[idx].attrs[hIndex][1].startsWith('#')) return defaultRender(tokens, idx, options, env, self);
|
||||
// If you are sure other plugins can't add `target` - drop check below
|
||||
var aIndex = tokens[idx].attrIndex('target');
|
||||
|
||||
if (aIndex < 0) {
|
||||
tokens[idx].attrPush(['target', '_blank']); // add new attribute
|
||||
} else {
|
||||
tokens[idx].attrs[aIndex][1] = '_blank'; // replace value of existing attr
|
||||
}
|
||||
|
||||
// pass token to default renderer.
|
||||
return defaultRender(tokens, idx, options, env, self);
|
||||
};
|
||||
|
||||
markdown.use(mihe, hljs_opts)
|
||||
.use(emoji)
|
||||
.use(sup)
|
||||
.use(sub)
|
||||
.use(container)
|
||||
.use(container, 'hljs-left') /* align left */
|
||||
.use(container, 'hljs-center')/* align center */
|
||||
.use(container, 'hljs-right')/* align right */
|
||||
.use(deflist)
|
||||
.use(abbr)
|
||||
.use(footnote)
|
||||
.use(insert)
|
||||
.use(mark)
|
||||
.use(container)
|
||||
.use(miip)
|
||||
.use(katex)
|
||||
.use(taskLists)
|
||||
.use(toc)
|
||||
|
||||
return markdown;
|
||||
}
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
markdownIt: null
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.markdownIt = initMarkdown();
|
||||
if (!this.html) {
|
||||
this.markdownIt.set({ html: false });
|
||||
this.xssOptions = false;
|
||||
} else if (typeof this.xssOptions === 'object') {
|
||||
this.markdownIt.use(sanitizer, this.xssOptions);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
var $vm = this;
|
||||
hljs_opts.highlighted = this.ishljs;
|
||||
},
|
||||
methods: {
|
||||
$render(src, func) {
|
||||
var $vm = this;
|
||||
missLangs = {};
|
||||
needLangs = [];
|
||||
var res = this.markdownIt.render(src);
|
||||
if (this.ishljs) {
|
||||
if (needLangs.length > 0) {
|
||||
$vm.$_render(src, func, res);
|
||||
}
|
||||
}
|
||||
func(res);
|
||||
},
|
||||
$_render(src, func, res) {
|
||||
var $vm = this;
|
||||
var deal = 0;
|
||||
for (var i = 0; i < needLangs.length; i++) {
|
||||
var url = $vm.p_external_link.hljs_lang(needLangs[i]);
|
||||
loadScript(url, function () {
|
||||
deal = deal + 1;
|
||||
if (deal === needLangs.length) {
|
||||
res = this.markdownIt.render(src);
|
||||
func(res);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
ishljs: function (val) {
|
||||
hljs_opts.highlighted = val;
|
||||
}
|
||||
}
|
||||
};
|
||||
197
node_modules/mavon-editor/src/lib/toolbar_left_click.js
generated
vendored
Normal file
197
node_modules/mavon-editor/src/lib/toolbar_left_click.js
generated
vendored
Normal file
@@ -0,0 +1,197 @@
|
||||
/**
|
||||
* @Author: HuaChao Chen <CHC>
|
||||
* @Date: 2017-05-03T01:23:38+08:00
|
||||
* @Email: chenhuachaoxyz@gmail.com
|
||||
* @Filename: toolbar_left_click.js
|
||||
* @Last modified by: CHC
|
||||
* @Last modified time: 2017-08-10T12:43:22+08:00
|
||||
* @License: MIT
|
||||
* @Copyright: 2017
|
||||
*/
|
||||
|
||||
function $toolbar_left_undo_click($vm) {
|
||||
if ($vm.d_history_index > 0) {
|
||||
$vm.d_history_index--
|
||||
}
|
||||
// $vm.$refs.vNoteDivEdit.innerHTML = $vm.s_markdown.render($vm.d_value)
|
||||
$vm.$nextTick(() => {
|
||||
// 光标操作
|
||||
let start = $vm.textarea_selectionEnds[$vm.d_history_index];
|
||||
$vm.getTextareaDom().selectionStart = start
|
||||
$vm.getTextareaDom().selectionEnd = start
|
||||
})
|
||||
$vm.getTextareaDom().focus()
|
||||
}
|
||||
// redo
|
||||
function $toolbar_left_redo_click($vm) {
|
||||
if ($vm.d_history_index < $vm.d_history.length - 1) {
|
||||
$vm.d_history_index++
|
||||
}
|
||||
$vm.$nextTick(() => {
|
||||
let start = $vm.textarea_selectionEnds[$vm.d_history_index];
|
||||
$vm.getTextareaDom().selectionStart = start
|
||||
$vm.getTextareaDom().selectionEnd = start
|
||||
})
|
||||
$vm.getTextareaDom().focus()
|
||||
// $vm.$refs.vNoteDivEdit.innerHTML = $vm.s_markdown.render($vm.d_value)
|
||||
}
|
||||
function $toolbar_left_trash_click($vm) {
|
||||
$vm.d_value = ''
|
||||
$vm.getTextareaDom().focus()
|
||||
// $vm.$refs.vNoteDivEdit.innerHTML = $vm.s_markdown.render($vm.d_value)
|
||||
}
|
||||
function $toolbar_left_save_click($vm) {
|
||||
$vm.save($vm.d_value, $vm.d_render)
|
||||
}
|
||||
// ol
|
||||
function $toolbar_left_ol_click($vm) {
|
||||
$vm.insertOl()
|
||||
}
|
||||
// ul
|
||||
function $toolbar_left_ul_click($vm) {
|
||||
$vm.insertUl()
|
||||
}
|
||||
function $toolbar_left_remove_line_click($vm) {
|
||||
$vm.removeLine()
|
||||
}
|
||||
|
||||
function $toolbar_left_codeBlock_click($vm) {
|
||||
$vm.insertCodeBlock();
|
||||
}
|
||||
|
||||
// 直接添加链接
|
||||
export const toolbar_left_addlink = (type, text, link, $vm) => {
|
||||
let insert_text = {
|
||||
prefix: type === 'link' ? `[${text}](` : `',
|
||||
str: link
|
||||
};
|
||||
$vm.insertText($vm.getTextareaDom(), insert_text);
|
||||
}
|
||||
export const toolbar_left_click = (_type, $vm) => {
|
||||
var _param_of_insert_text = {
|
||||
'bold': {
|
||||
prefix: '**',
|
||||
subfix: '**',
|
||||
str: $vm.d_words.tl_bold
|
||||
},
|
||||
'italic': {
|
||||
prefix: '*',
|
||||
subfix: '*',
|
||||
str: $vm.d_words.tl_italic
|
||||
},
|
||||
'header': {
|
||||
prefix: '# ',
|
||||
subfix: '',
|
||||
str: $vm.d_words.tl_header
|
||||
},
|
||||
'header1': {
|
||||
prefix: '# ',
|
||||
subfix: '',
|
||||
str: $vm.d_words.tl_header_one
|
||||
},
|
||||
'header2': {
|
||||
prefix: '## ',
|
||||
subfix: '',
|
||||
str: $vm.d_words.tl_header_two
|
||||
},
|
||||
'header3': {
|
||||
prefix: '### ',
|
||||
subfix: '',
|
||||
str: $vm.d_words.tl_header_three
|
||||
},
|
||||
'header4': {
|
||||
prefix: '#### ',
|
||||
subfix: '',
|
||||
str: $vm.d_words.tl_header_four
|
||||
},
|
||||
'header5': {
|
||||
prefix: '##### ',
|
||||
subfix: '',
|
||||
str: $vm.d_words.tl_header_five
|
||||
},
|
||||
'header6': {
|
||||
prefix: '###### ',
|
||||
subfix: '',
|
||||
str: $vm.d_words.tl_header_six
|
||||
},
|
||||
'underline': {
|
||||
prefix: '++',
|
||||
subfix: '++',
|
||||
str: $vm.d_words.tl_underline
|
||||
},
|
||||
'strikethrough': {
|
||||
prefix: '~~',
|
||||
subfix: '~~',
|
||||
str: $vm.d_words.tl_strikethrough
|
||||
},
|
||||
'mark': {
|
||||
prefix: '==',
|
||||
subfix: '==',
|
||||
str: $vm.d_words.tl_mark
|
||||
},
|
||||
'superscript': {
|
||||
prefix: '^',
|
||||
subfix: '^',
|
||||
str: $vm.d_words.tl_superscript
|
||||
},
|
||||
'subscript': {
|
||||
prefix: '~',
|
||||
subfix: '~',
|
||||
str: $vm.d_words.tl_subscript
|
||||
},
|
||||
'quote': {
|
||||
prefix: '> ',
|
||||
subfix: '',
|
||||
str: $vm.d_words.tl_quote
|
||||
},
|
||||
'link': {
|
||||
prefix: '[](',
|
||||
subfix: ')',
|
||||
str: $vm.d_words.tl_link
|
||||
},
|
||||
'imagelink': {
|
||||
prefix: '',
|
||||
str: $vm.d_words.tl_image
|
||||
},
|
||||
'table': {
|
||||
prefix: '',
|
||||
subfix: '',
|
||||
str: '|column1|column2|column3|\n|-|-|-|\n|content1|content2|content3|\n'
|
||||
},
|
||||
'aligncenter': {
|
||||
prefix: '::: hljs-center\n\n',
|
||||
subfix: '\n\n:::\n',
|
||||
str: $vm.d_words.tl_aligncenter
|
||||
},
|
||||
'alignright': {
|
||||
prefix: '::: hljs-right\n\n',
|
||||
subfix: '\n\n:::\n',
|
||||
str: $vm.d_words.tl_alignright
|
||||
},
|
||||
'alignleft': {
|
||||
prefix: '::: hljs-left\n\n',
|
||||
subfix: '\n\n:::\n',
|
||||
str: $vm.d_words.tl_alignleft
|
||||
}
|
||||
};
|
||||
if (_param_of_insert_text.hasOwnProperty(_type)) {
|
||||
// 插入对应的内容
|
||||
$vm.insertText($vm.getTextareaDom(),
|
||||
_param_of_insert_text[_type]);
|
||||
}
|
||||
var _other_left_click = {
|
||||
'undo': $toolbar_left_undo_click,
|
||||
'redo': $toolbar_left_redo_click,
|
||||
'trash': $toolbar_left_trash_click,
|
||||
'save': $toolbar_left_save_click,
|
||||
'ol': $toolbar_left_ol_click,
|
||||
'ul': $toolbar_left_ul_click,
|
||||
'removeLine': $toolbar_left_remove_line_click,
|
||||
'code': $toolbar_left_codeBlock_click
|
||||
};
|
||||
if (_other_left_click.hasOwnProperty(_type)) {
|
||||
_other_left_click[_type]($vm);
|
||||
}
|
||||
}
|
||||
92
node_modules/mavon-editor/src/lib/toolbar_right_click.js
generated
vendored
Normal file
92
node_modules/mavon-editor/src/lib/toolbar_right_click.js
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
/**
|
||||
* @Author: HuaChao Chen <CHC>
|
||||
* @Date: 2017-05-03T01:39:47+08:00
|
||||
* @Email: chenhuachaoxyz@gmail.com
|
||||
* @Filename: toolbar_right_click.js
|
||||
* @Last modified by: chc
|
||||
* @Last modified time: 2017-06-08T12:44:50+08:00
|
||||
* @License: MIT
|
||||
* @Copyright: 2017
|
||||
*/
|
||||
|
||||
function $toolbar_right_html_click($vm) {
|
||||
$vm.s_html_code = !$vm.s_html_code
|
||||
if ($vm.htmlcode) {
|
||||
$vm.htmlcode($vm.s_html_code, $vm.d_value)
|
||||
}
|
||||
}
|
||||
|
||||
function $toolbar_right_help_click($vm) {
|
||||
$vm.s_help = !$vm.s_help
|
||||
if ($vm.helptoggle) {
|
||||
$vm.helptoggle($vm.s_help, $vm.d_value)
|
||||
}
|
||||
}
|
||||
// 导航
|
||||
function $toolbar_right_read_click($vm) {
|
||||
let element = $vm.$refs.vReadModel
|
||||
// 单栏编辑
|
||||
if (element.requestFullscreen) {
|
||||
element.requestFullscreen();
|
||||
} else if (element.mozRequestFullScreen) {
|
||||
element.mozRequestFullScreen();
|
||||
} else if (element.webkitRequestFullscreen) {
|
||||
element.webkitRequestFullscreen();
|
||||
} else if (element.msRequestFullscreen) {
|
||||
element.msRequestFullscreen();
|
||||
}
|
||||
}
|
||||
|
||||
function $toolbar_right_preview_click($vm) {
|
||||
$vm.s_preview_switch = !$vm.s_preview_switch
|
||||
// $vm.$refs.vNoteDivEdit.innerHTML = $vm.s_markdown.render($vm.d_value)
|
||||
if ($vm.previewtoggle) {
|
||||
$vm.previewtoggle($vm.s_preview_switch, $vm.d_value)
|
||||
}
|
||||
}
|
||||
|
||||
function $toolbar_right_fullscreen_click($vm) {
|
||||
$vm.s_fullScreen = !$vm.s_fullScreen
|
||||
if ($vm.fullscreen) {
|
||||
$vm.fullscreen($vm.s_fullScreen, $vm.d_value)
|
||||
}
|
||||
}
|
||||
function $toolbar_right_subfield_click ($vm) {
|
||||
$vm.s_subfield = !$vm.s_subfield
|
||||
$vm.s_preview_switch = $vm.s_subfield;
|
||||
// $vm.$refs.vNoteDivEdit.innerHTML = $vm.s_markdown.render($vm.d_value)
|
||||
if ($vm.previewtoggle) {
|
||||
$vm.previewtoggle($vm.s_preview_switch, $vm.d_value)
|
||||
}
|
||||
// $vm.$refs.vNoteDivEdit.innerHTML = $vm.s_markdown.render($vm.d_value)
|
||||
if ($vm.subfieldtoggle) {
|
||||
$vm.subfieldtoggle($vm.s_subfield, $vm.d_value)
|
||||
}
|
||||
}
|
||||
function $toolbar_right_navigation_click($vm) {
|
||||
$vm.s_navigation = !$vm.s_navigation
|
||||
if ($vm.s_navigation) {
|
||||
$vm.s_preview_switch = true;
|
||||
}
|
||||
if ($vm.navigationtoggle) {
|
||||
$vm.navigationtoggle($vm.s_navigation, $vm.d_value)
|
||||
}
|
||||
if ($vm.s_navigation) {
|
||||
// 绘制标题导航
|
||||
$vm.getNavigation($vm, false)
|
||||
}
|
||||
}
|
||||
export const toolbar_right_click = (_type, $vm) => {
|
||||
var _other_right_click = {
|
||||
'help': $toolbar_right_help_click,
|
||||
'html': $toolbar_right_html_click,
|
||||
'read': $toolbar_right_read_click,
|
||||
'preview': $toolbar_right_preview_click,
|
||||
'fullscreen': $toolbar_right_fullscreen_click,
|
||||
'navigation': $toolbar_right_navigation_click,
|
||||
'subfield': $toolbar_right_subfield_click
|
||||
}
|
||||
if (_other_right_click.hasOwnProperty(_type)) {
|
||||
_other_right_click[_type]($vm);
|
||||
}
|
||||
}
|
||||
52
node_modules/mavon-editor/src/lib/util.js
generated
vendored
Normal file
52
node_modules/mavon-editor/src/lib/util.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* Created by zhy on 2016/12/25.
|
||||
*/
|
||||
/**
|
||||
* 深度拷贝对象
|
||||
* @param target
|
||||
* @param arg
|
||||
* @returns {*}
|
||||
* @constructor
|
||||
*/
|
||||
export function p_ObjectCopy_DEEP(target, arg) {
|
||||
for (let arg_item in arg) {
|
||||
let type = typeof arg[arg_item];
|
||||
if (!target[arg_item] || (type !== 'Object' && type !== 'object')) {
|
||||
target[arg_item] = arg[arg_item];
|
||||
continue;
|
||||
} else {
|
||||
target[arg_item] = p_ObjectCopy_DEEP(target[arg_item], arg[arg_item]);
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
||||
/**
|
||||
* 解析url参数
|
||||
*/
|
||||
export function p_urlParse() {
|
||||
let url = window.location.search;
|
||||
let obj = {};
|
||||
let reg = /[?&][^?&]+=[^?&]+/g;
|
||||
let arr = url.match(reg);
|
||||
if (arr) {
|
||||
arr.forEach((item) => {
|
||||
let tempArr = item.substring(1).split('=');
|
||||
let key = decodeURIComponent(tempArr[0]);
|
||||
let val = decodeURIComponent(tempArr[1]);
|
||||
obj[key] = val;
|
||||
})
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
|
||||
export function stopEvent(e) {
|
||||
if (!e) {
|
||||
return;
|
||||
}
|
||||
if (e.preventDefault) {
|
||||
e.preventDefault();
|
||||
}
|
||||
if (e.stopPropagation) {
|
||||
e.stopPropagation();
|
||||
}
|
||||
};
|
||||
932
node_modules/mavon-editor/src/mavon-editor.vue
generated
vendored
Normal file
932
node_modules/mavon-editor/src/mavon-editor.vue
generated
vendored
Normal file
@@ -0,0 +1,932 @@
|
||||
<template>
|
||||
<div
|
||||
:class="[{ fullscreen: s_fullScreen, shadow: boxShadow }]"
|
||||
class="v-note-wrapper markdown-body"
|
||||
:style="{ 'box-shadow': boxShadow ? boxShadowStyle : '' }"
|
||||
>
|
||||
<!--工具栏-->
|
||||
<div
|
||||
class="v-note-op"
|
||||
v-show="toolbarsFlag"
|
||||
:style="{ background: toolbarsBackground }"
|
||||
>
|
||||
<v-md-toolbar-left
|
||||
ref="toolbar_left"
|
||||
:editable="editable"
|
||||
:transition="transition"
|
||||
:d_words="d_words"
|
||||
@toolbar_left_click="toolbar_left_click"
|
||||
@toolbar_left_addlink="toolbar_left_addlink"
|
||||
:toolbars="toolbars"
|
||||
@imgAdd="$imgAdd"
|
||||
@imgDel="$imgDel"
|
||||
@imgTouch="$imgTouch"
|
||||
:image_filter="imageFilter"
|
||||
:class="{ transition: transition }"
|
||||
>
|
||||
<template v-slot:left-toolbar-before
|
||||
><slot name="left-toolbar-before"
|
||||
/></template>
|
||||
<template v-slot:left-toolbar-after
|
||||
><slot name="left-toolbar-after"
|
||||
/></template>
|
||||
</v-md-toolbar-left>
|
||||
<v-md-toolbar-right
|
||||
ref="toolbar_right"
|
||||
:d_words="d_words"
|
||||
@toolbar_right_click="toolbar_right_click"
|
||||
:toolbars="toolbars"
|
||||
:s_subfield="s_subfield"
|
||||
:s_preview_switch="s_preview_switch"
|
||||
:s_fullScreen="s_fullScreen"
|
||||
:s_html_code="s_html_code"
|
||||
:s_navigation="s_navigation"
|
||||
:class="{ transition: transition }"
|
||||
>
|
||||
<template v-slot:right-toolbar-before
|
||||
><slot name="right-toolbar-before"
|
||||
/></template>
|
||||
<template v-slot:right-toolbar-after
|
||||
><slot name="right-toolbar-after"
|
||||
/></template>
|
||||
</v-md-toolbar-right>
|
||||
</div>
|
||||
<!--编辑展示区域-->
|
||||
<div class="v-note-panel">
|
||||
<!--编辑区-->
|
||||
<div
|
||||
ref="vNoteEdit"
|
||||
@scroll="$v_edit_scroll"
|
||||
class="v-note-edit divarea-wrapper"
|
||||
:class="{
|
||||
'scroll-style': s_scrollStyle,
|
||||
'scroll-style-border-radius':
|
||||
s_scrollStyle && !s_preview_switch && !s_html_code,
|
||||
'single-edit': !s_preview_switch && !s_html_code,
|
||||
'single-show':
|
||||
(!s_subfield && s_preview_switch) || (!s_subfield && s_html_code),
|
||||
transition: transition
|
||||
}"
|
||||
@click="textAreaFocus"
|
||||
>
|
||||
<div
|
||||
class="content-input-wrapper"
|
||||
:style="{ 'background-color': editorBackground }"
|
||||
>
|
||||
<!-- 双栏 -->
|
||||
<v-autoTextarea
|
||||
ref="vNoteTextarea"
|
||||
:placeholder="placeholder ? placeholder : d_words.start_editor"
|
||||
class="content-input"
|
||||
:fontSize="fontSize"
|
||||
lineHeight="1.5"
|
||||
v-model="d_value"
|
||||
fullHeight
|
||||
:style="{ 'background-color': editorBackground }"
|
||||
></v-autoTextarea>
|
||||
</div>
|
||||
</div>
|
||||
<!--展示区-->
|
||||
<div
|
||||
:class="{
|
||||
'single-show':
|
||||
(!s_subfield && s_preview_switch) || (!s_subfield && s_html_code)
|
||||
}"
|
||||
v-show="s_preview_switch || s_html_code"
|
||||
class="v-note-show"
|
||||
>
|
||||
<div
|
||||
ref="vShowContent"
|
||||
v-html="d_render"
|
||||
v-show="!s_html_code"
|
||||
:class="{
|
||||
'scroll-style': s_scrollStyle,
|
||||
'scroll-style-border-radius': s_scrollStyle
|
||||
}"
|
||||
class="v-show-content"
|
||||
:style="{ 'background-color': previewBackground }"
|
||||
></div>
|
||||
<div
|
||||
v-show="s_html_code"
|
||||
:class="{
|
||||
'scroll-style': s_scrollStyle,
|
||||
'scroll-style-border-radius': s_scrollStyle
|
||||
}"
|
||||
class="v-show-content-html"
|
||||
:style="{ 'background-color': previewBackground }"
|
||||
>
|
||||
{{ d_render }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--标题导航-->
|
||||
<transition name="slideTop">
|
||||
<div
|
||||
v-show="s_navigation"
|
||||
class="v-note-navigation-wrapper"
|
||||
:class="{ transition: transition }"
|
||||
>
|
||||
<div class="v-note-navigation-title">
|
||||
{{ d_words.navigation_title
|
||||
}}<i
|
||||
@click="toolbar_right_click('navigation')"
|
||||
class="fa fa-mavon-times v-note-navigation-close"
|
||||
aria-hidden="true"
|
||||
></i>
|
||||
</div>
|
||||
<div
|
||||
ref="navigationContent"
|
||||
class="v-note-navigation-content"
|
||||
:class="{ 'scroll-style': s_scrollStyle }"
|
||||
></div>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
<!--帮助文档-->
|
||||
<transition name="fade">
|
||||
<div ref="help">
|
||||
<div
|
||||
@click.self="toolbar_right_click('help')"
|
||||
class="v-note-help-wrapper"
|
||||
v-if="s_help"
|
||||
>
|
||||
<div
|
||||
class="v-note-help-content markdown-body"
|
||||
:class="{ shadow: boxShadow }"
|
||||
>
|
||||
<i
|
||||
@click.stop.prevent="toolbar_right_click('help')"
|
||||
class="fa fa-mavon-times"
|
||||
aria-hidden="true"
|
||||
></i>
|
||||
<div class="scroll-style v-note-help-show" v-html="d_help"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
<!-- 预览图片 -->
|
||||
<transition name="fade">
|
||||
<div
|
||||
@click="d_preview_imgsrc = null"
|
||||
class="v-note-img-wrapper"
|
||||
v-if="d_preview_imgsrc"
|
||||
>
|
||||
<img :src="d_preview_imgsrc" alt="none" />
|
||||
</div>
|
||||
</transition>
|
||||
<!--阅读模式-->
|
||||
<div
|
||||
:class="{ show: s_readmodel }"
|
||||
class="v-note-read-model scroll-style"
|
||||
ref="vReadModel"
|
||||
>
|
||||
<div
|
||||
ref="vNoteReadContent"
|
||||
class="v-note-read-content"
|
||||
v-html="d_render"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import tomarkdown from './lib/core/to-markdown.js'
|
||||
import { keydownListen } from "./lib/core/keydown-listen.js";
|
||||
import hljsCss from "./lib/core/hljs/lang.hljs.css.js";
|
||||
import hljsLangs from "./lib/core/hljs/lang.hljs.js";
|
||||
import {
|
||||
fullscreenchange,
|
||||
/* windowResize, */
|
||||
scrollLink,
|
||||
insertTextAtCaret,
|
||||
getNavigation,
|
||||
insertTab,
|
||||
unInsertTab,
|
||||
insertOl,
|
||||
insertUl,
|
||||
insertEnter,
|
||||
removeLine,
|
||||
insertCodeBlock,
|
||||
loadLink,
|
||||
loadScript,
|
||||
ImagePreviewListener
|
||||
} from "./lib/core/extra-function.js";
|
||||
import { stopEvent } from "./lib/util.js";
|
||||
import {
|
||||
toolbar_left_click,
|
||||
toolbar_left_addlink
|
||||
} from "./lib/toolbar_left_click.js";
|
||||
import { toolbar_right_click } from "./lib/toolbar_right_click.js";
|
||||
import { CONFIG } from "./lib/config.js";
|
||||
import markdown, {initMarkdown} from './lib/mixins/markdown.js';
|
||||
import md_toolbar_left from "./components/md-toolbar-left";
|
||||
import md_toolbar_right from "./components/md-toolbar-right";
|
||||
import autoTextarea from "./components/auto-textarea";
|
||||
import "./lib/font/css/fontello.css";
|
||||
import "./lib/css/md.css";
|
||||
|
||||
export default {
|
||||
emits: [
|
||||
"imgDel",
|
||||
"change",
|
||||
"fullScreen",
|
||||
"readModel",
|
||||
"previewToggle",
|
||||
"subfieldToggle",
|
||||
"htmlCode",
|
||||
"helpToggle",
|
||||
"save",
|
||||
"navigationToggle",
|
||||
"update:modelValue"
|
||||
],
|
||||
|
||||
mixins: [markdown],
|
||||
|
||||
props: {
|
||||
scrollStyle: {
|
||||
// 是否渲染滚动条样式(webkit)
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
boxShadow: {
|
||||
// 是否添加阴影
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
transition: {
|
||||
// 是否开启动画过渡
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
autofocus: {
|
||||
// 是否自动获取焦点
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
fontSize: {
|
||||
// 字体大小
|
||||
type: String,
|
||||
default: "14px"
|
||||
},
|
||||
toolbarsBackground: {
|
||||
// 工具栏背景色
|
||||
type: String,
|
||||
default: "#ffffff"
|
||||
},
|
||||
editorBackground: {
|
||||
// TODO: 编辑栏背景色
|
||||
type: String,
|
||||
default: "#ffffff"
|
||||
},
|
||||
previewBackground: {
|
||||
// 预览栏背景色
|
||||
type: String,
|
||||
default: "#fbfbfb"
|
||||
},
|
||||
boxShadowStyle: {
|
||||
// 阴影样式
|
||||
type: String,
|
||||
default: "0 2px 12px 0 rgba(0, 0, 0, 0.1)"
|
||||
},
|
||||
help: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
modelValue: {
|
||||
// 初始 value
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
language: {
|
||||
// 初始语言
|
||||
type: String,
|
||||
default: "zh-CN"
|
||||
},
|
||||
subfield: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
navigation: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
defaultOpen: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
editable: {
|
||||
// 是否开启编辑
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
toolbarsFlag: {
|
||||
// 是否开启工具栏
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
toolbars: {
|
||||
// 工具栏
|
||||
type: Object,
|
||||
default() {
|
||||
return CONFIG.toolbars;
|
||||
}
|
||||
},
|
||||
html: {// Enable HTML tags in source
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
xssOptions: {
|
||||
type: [Object, Boolean],
|
||||
default() {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
codeStyle: {
|
||||
// <code></code> 样式
|
||||
type: String,
|
||||
default() {
|
||||
return "github";
|
||||
}
|
||||
},
|
||||
placeholder: {
|
||||
// 编辑器默认内容
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
ishljs: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
externalLink: {
|
||||
type: [Object, Boolean],
|
||||
default: true
|
||||
},
|
||||
imageFilter: {
|
||||
type: Function,
|
||||
default: null
|
||||
},
|
||||
imageClick: {
|
||||
type: Function,
|
||||
default: null
|
||||
},
|
||||
tabSize: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
shortCut: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
s_right_click_menu_show: false,
|
||||
right_click_menu_top: 0,
|
||||
right_click_menu_left: 0,
|
||||
s_subfield: (() => {
|
||||
return this.subfield;
|
||||
})(),
|
||||
s_autofocus: true,
|
||||
// 标题导航
|
||||
s_navigation: (() => {
|
||||
return this.navigation;
|
||||
})(),
|
||||
s_scrollStyle: (() => {
|
||||
return this.scrollStyle;
|
||||
})(), // props 是否渲染滚动条样式
|
||||
d_value: "", // props 文本内容
|
||||
d_render: "", // props 文本内容render
|
||||
s_preview_switch: (() => {
|
||||
let default_open_ = this.defaultOpen;
|
||||
if (!default_open_) {
|
||||
default_open_ = this.subfield ? "preview" : "edit";
|
||||
}
|
||||
return default_open_ === "preview" ? true : false;
|
||||
})(), // props true 展示编辑 false展示预览
|
||||
s_fullScreen: false, // 全屏编辑标志
|
||||
s_help: false, // markdown帮助
|
||||
s_html_code: false, // 分栏情况下查看html
|
||||
d_help: null,
|
||||
d_words: null,
|
||||
edit_scroll_height: -1,
|
||||
s_readmodel: false,
|
||||
s_table_enter: false, // 回车事件是否在表格中执行
|
||||
d_history: (() => {
|
||||
let temp_array = [];
|
||||
temp_array.push(this.modelValue);
|
||||
return temp_array;
|
||||
})(), // 编辑记录
|
||||
d_history_index: 0, // 编辑记录索引
|
||||
currentTimeout: "",
|
||||
d_image_file: [],
|
||||
d_preview_imgsrc: null, // 图片预览地址
|
||||
s_external_link: {
|
||||
markdown_css: function () {
|
||||
return "https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/2.9.0/github-markdown.min.css";
|
||||
},
|
||||
hljs_js: function () {
|
||||
return "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/highlight.min.js";
|
||||
},
|
||||
hljs_lang: function (lang) {
|
||||
return (
|
||||
"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/languages/" +
|
||||
lang +
|
||||
".min.js"
|
||||
);
|
||||
},
|
||||
hljs_css: function (css) {
|
||||
if (hljsCss[css]) {
|
||||
return (
|
||||
"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/styles/" +
|
||||
css +
|
||||
".min.css"
|
||||
);
|
||||
}
|
||||
return "";
|
||||
},
|
||||
katex_js: function () {
|
||||
return "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.8.3/katex.min.js";
|
||||
},
|
||||
katex_css: function () {
|
||||
return "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.8.3/katex.min.css";
|
||||
}
|
||||
},
|
||||
p_external_link: {},
|
||||
textarea_selectionEnd: 0,
|
||||
textarea_selectionEnds: [0],
|
||||
_xssHandler: null
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
var $vm = this;
|
||||
// 初始化语言
|
||||
this.initLanguage();
|
||||
this.initExternalFuc();
|
||||
this.$nextTick(() => {
|
||||
// 初始化Textarea编辑开关
|
||||
$vm.editableTextarea();
|
||||
});
|
||||
},
|
||||
|
||||
mounted() {
|
||||
var $vm = this;
|
||||
this.$el.addEventListener("paste", function (e) {
|
||||
$vm.$paste(e);
|
||||
});
|
||||
this.$el.addEventListener("drop", function (e) {
|
||||
$vm.$drag(e);
|
||||
});
|
||||
// 浏览器siz大小
|
||||
/* windowResize(this); */
|
||||
keydownListen(this);
|
||||
// 图片预览事件监听
|
||||
ImagePreviewListener(this);
|
||||
// 设置默认焦点
|
||||
if (this.autofocus) {
|
||||
this.getTextareaDom().focus();
|
||||
}
|
||||
// fullscreen事件
|
||||
fullscreenchange(this);
|
||||
this.d_value = this.modelValue || "";
|
||||
// 将help添加到末尾
|
||||
document.body.appendChild(this.$refs.help);
|
||||
this.loadExternalLink("markdown_css", "css");
|
||||
this.loadExternalLink("katex_css", "css");
|
||||
this.loadExternalLink("katex_js", "js", function () {
|
||||
$vm.iRender(true);
|
||||
});
|
||||
this.loadExternalLink("hljs_js", "js", function () {
|
||||
$vm.iRender(true);
|
||||
});
|
||||
|
||||
if (
|
||||
!(
|
||||
typeof $vm.externalLink === "object" &&
|
||||
typeof $vm.externalLink["markdown_css"] === "function"
|
||||
)
|
||||
) {
|
||||
// 没有外部文件要来接管markdown样式,可以更改markdown样式。
|
||||
$vm.codeStyleChange($vm.codeStyle, true);
|
||||
}
|
||||
},
|
||||
|
||||
beforeUnmount() {
|
||||
document.body.removeChild(this.$refs.help);
|
||||
},
|
||||
|
||||
getMarkdownIt() {
|
||||
let mdIt = this.mixins[0].data().markdownIt;
|
||||
if (!mdIt) {
|
||||
mdIt = initMarkdown();
|
||||
}
|
||||
return mdIt;
|
||||
},
|
||||
|
||||
methods: {
|
||||
loadExternalLink(name, type, callback) {
|
||||
if (typeof this.p_external_link[name] !== "function") {
|
||||
if (this.p_external_link[name] !== false) {
|
||||
console.error(
|
||||
"external_link." + name,
|
||||
"is not a function, if you want to disabled this error log, set external_link." +
|
||||
name,
|
||||
"to function or false"
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
var _obj = {
|
||||
css: loadLink,
|
||||
js: loadScript
|
||||
};
|
||||
if (_obj.hasOwnProperty(type)) {
|
||||
_obj[type](this.p_external_link[name](), callback);
|
||||
}
|
||||
},
|
||||
initExternalFuc() {
|
||||
var $vm = this;
|
||||
var _external_ = [
|
||||
"markdown_css",
|
||||
"hljs_js",
|
||||
"hljs_css",
|
||||
"hljs_lang",
|
||||
"katex_js",
|
||||
"katex_css"
|
||||
];
|
||||
var _type_ = typeof $vm.externalLink;
|
||||
var _is_object = _type_ === "object";
|
||||
var _is_boolean = _type_ === "boolean";
|
||||
for (var i = 0; i < _external_.length; i++) {
|
||||
if (
|
||||
(_is_boolean && !$vm.externalLink) ||
|
||||
(_is_object && $vm.externalLink[_external_[i]] === false)
|
||||
) {
|
||||
$vm.p_external_link[_external_[i]] = false;
|
||||
} else if (
|
||||
_is_object &&
|
||||
typeof $vm.externalLink[_external_[i]] === "function"
|
||||
) {
|
||||
$vm.p_external_link[_external_[i]] = $vm.externalLink[_external_[i]];
|
||||
} else {
|
||||
$vm.p_external_link[_external_[i]] =
|
||||
$vm.s_external_link[_external_[i]];
|
||||
}
|
||||
}
|
||||
},
|
||||
textAreaFocus() {
|
||||
this.$refs.vNoteTextarea.$refs.vTextarea.focus();
|
||||
},
|
||||
$drag($e) {
|
||||
var dataTransfer = $e.dataTransfer;
|
||||
if (dataTransfer) {
|
||||
var files = dataTransfer.files;
|
||||
if (files.length > 0) {
|
||||
$e.preventDefault();
|
||||
this.$refs.toolbar_left.$imgFilesAdd(files);
|
||||
}
|
||||
}
|
||||
},
|
||||
$paste($e) {
|
||||
var clipboardData = $e.clipboardData;
|
||||
if (clipboardData) {
|
||||
var items = clipboardData.items;
|
||||
if (!items) return;
|
||||
var types = clipboardData.types || [];
|
||||
var item = null;
|
||||
for (var i = 0; i < types.length; i++) {
|
||||
if (types[i] === "Files") {
|
||||
item = items[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (item && item.kind === "file") {
|
||||
// prevent filename being pasted parallel along
|
||||
// with the image pasting process
|
||||
stopEvent($e);
|
||||
var oFile = item.getAsFile();
|
||||
this.$refs.toolbar_left.$imgFilesAdd([oFile]);
|
||||
}
|
||||
}
|
||||
},
|
||||
$imgTouch(file) {
|
||||
var $vm = this;
|
||||
// TODO 跳转到图片位置
|
||||
},
|
||||
$imgDel(file) {
|
||||
this.markdownIt.image_del(file[1]);
|
||||
// 删除所有markdown中的图片
|
||||
let fileReg = file[0];
|
||||
let reg = new RegExp(`\\!\\[${file[1]._name}\\]\\(${fileReg}\\)`, "g");
|
||||
|
||||
this.d_value = this.d_value.replace(reg, "");
|
||||
this.iRender();
|
||||
this.$emit("imgDel", file);
|
||||
},
|
||||
$imgAdd(pos, $file, isinsert) {
|
||||
if (isinsert === undefined) isinsert = true;
|
||||
var $vm = this;
|
||||
if (this.__rFilter == null) {
|
||||
// this.__rFilter = /^(?:image\/bmp|image\/cis\-cod|image\/gif|image\/ief|image\/jpeg|image\/jpeg|image\/jpeg|image\/pipeg|image\/png|image\/svg\+xml|image\/tiff|image\/x\-cmu\-raster|image\/x\-cmx|image\/x\-icon|image\/x\-portable\-anymap|image\/x\-portable\-bitmap|image\/x\-portable\-graymap|image\/x\-portable\-pixmap|image\/x\-rgb|image\/x\-xbitmap|image\/x\-xpixmap|image\/x\-xwindowdump)$/i;
|
||||
this.__rFilter = /^image\//i;
|
||||
}
|
||||
this.__oFReader = new FileReader();
|
||||
this.__oFReader.onload = function (oFREvent) {
|
||||
$vm.markdownIt.image_add(pos, oFREvent.target.result);
|
||||
$file.miniurl = oFREvent.target.result;
|
||||
if (isinsert === true) {
|
||||
// 去除特殊字符
|
||||
$file._name = $file.name.replace(
|
||||
/[\[\]\(\)\+\{\}&\|\\\*^%$#@\-]/g,
|
||||
""
|
||||
);
|
||||
|
||||
$vm.insertText($vm.getTextareaDom(), {
|
||||
prefix: "",
|
||||
subfix: "",
|
||||
str: ""
|
||||
});
|
||||
$vm.$nextTick(function () {
|
||||
$vm.$emit("imgAdd", pos, $file);
|
||||
});
|
||||
}
|
||||
};
|
||||
if ($file) {
|
||||
var oFile = $file;
|
||||
if (this.__rFilter.test(oFile.type)) {
|
||||
this.__oFReader.readAsDataURL(oFile);
|
||||
}
|
||||
}
|
||||
},
|
||||
$imgUpdateByUrl(pos, url) {
|
||||
var $vm = this;
|
||||
this.markdownIt.image_add(pos, url);
|
||||
this.$nextTick(function () {
|
||||
$vm.d_render = this.markdownIt.render(this.d_value);
|
||||
});
|
||||
},
|
||||
$imgAddByUrl(pos, url) {
|
||||
if (this.$refs.toolbar_left.$imgAddByUrl(pos, url)) {
|
||||
this.$imgUpdateByUrl(pos, url);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
$img2Url(fileIndex, url) {
|
||||
// x.replace(/(\[[^\[]*?\](?=\())\(\s*(\.\/2)\s*\)/g, "$1(http://path/to/png.png)")
|
||||
var reg_str =
|
||||
"/(!\\[\[^\\[\]*?\\]\(?=\\(\)\)\\(\\s*\(" + fileIndex + "\)\\s*\\)/g";
|
||||
var reg = eval(reg_str);
|
||||
this.d_value = this.d_value.replace(reg, "$1(" + url + ")");
|
||||
this.$refs.toolbar_left.$changeUrl(fileIndex, url);
|
||||
this.iRender();
|
||||
},
|
||||
$imglst2Url(imglst) {
|
||||
if (imglst instanceof Array) {
|
||||
for (var i = 0; i < imglst.length; i++) {
|
||||
this.$img2Url(imglst[i][0], imglst[i][1]);
|
||||
}
|
||||
}
|
||||
},
|
||||
toolbar_left_click(_type) {
|
||||
toolbar_left_click(_type, this);
|
||||
},
|
||||
toolbar_left_addlink(_type, text, link) {
|
||||
toolbar_left_addlink(_type, text, link, this);
|
||||
},
|
||||
toolbar_right_click(_type) {
|
||||
toolbar_right_click(_type, this);
|
||||
},
|
||||
getNavigation($vm, full) {
|
||||
return getNavigation($vm, full);
|
||||
},
|
||||
// @event
|
||||
// 修改数据触发 (val , val_render)
|
||||
change(val, render) {
|
||||
this.$emit("change", val, render);
|
||||
},
|
||||
// 切换全屏触发 (status , val)
|
||||
fullscreen(status, val) {
|
||||
this.$emit("fullScreen", status, val);
|
||||
},
|
||||
// 打开阅读模式触发(status , val)
|
||||
readmodel(status, val) {
|
||||
this.$emit("readModel", status, val);
|
||||
},
|
||||
// 切换阅读编辑触发 (status , val)
|
||||
previewtoggle(status, val) {
|
||||
this.$emit("previewToggle", status, val);
|
||||
},
|
||||
// 切换分栏触发 (status , val)
|
||||
subfieldtoggle(status, val) {
|
||||
this.$emit("subfieldToggle", status, val);
|
||||
},
|
||||
// 切换htmlcode触发 (status , val)
|
||||
htmlcode(status, val) {
|
||||
this.$emit("htmlCode", status, val);
|
||||
},
|
||||
// 打开 , 关闭 help触发 (status , val)
|
||||
helptoggle(status, val) {
|
||||
this.$emit("helpToggle", status, val);
|
||||
},
|
||||
// 监听ctrl + s
|
||||
save(val, render) {
|
||||
this.$emit("save", val, render);
|
||||
},
|
||||
// 导航栏切换
|
||||
navigationtoggle(status, val) {
|
||||
this.$emit("navigationToggle", status, val);
|
||||
},
|
||||
$toolbar_right_read_change_status() {
|
||||
this.s_readmodel = !this.s_readmodel;
|
||||
if (this.readmodel) {
|
||||
this.readmodel(this.s_readmodel, this.d_value);
|
||||
}
|
||||
if (this.s_readmodel && this.toolbars.navigation) {
|
||||
this.getNavigation(this, true);
|
||||
}
|
||||
},
|
||||
// ---------------------------------------
|
||||
// 滚动条联动
|
||||
$v_edit_scroll($event) {
|
||||
scrollLink($event, this);
|
||||
},
|
||||
// 获取textarea dom节点
|
||||
getTextareaDom() {
|
||||
return this.$refs.vNoteTextarea.$refs.vTextarea;
|
||||
},
|
||||
// 工具栏插入内容
|
||||
insertText(obj, { prefix, subfix, str, type }) {
|
||||
// if (this.s_preview_switch) {
|
||||
|
||||
insertTextAtCaret(obj, { prefix, subfix, str, type }, this);
|
||||
},
|
||||
insertTab() {
|
||||
insertTab(this, this.tabSize);
|
||||
},
|
||||
insertOl() {
|
||||
insertOl(this);
|
||||
},
|
||||
removeLine() {
|
||||
removeLine(this);
|
||||
},
|
||||
insertUl() {
|
||||
insertUl(this);
|
||||
},
|
||||
unInsertTab() {
|
||||
unInsertTab(this, this.tabSize);
|
||||
},
|
||||
insertCodeBlock() {
|
||||
insertCodeBlock(this);
|
||||
},
|
||||
insertEnter(event) {
|
||||
insertEnter(this, event);
|
||||
},
|
||||
saveHistory() {
|
||||
this.d_history.splice(this.d_history_index + 1, this.d_history.length);
|
||||
this.d_history.push(this.d_value);
|
||||
this.textarea_selectionEnds.splice(
|
||||
this.d_history_index + 1,
|
||||
this.textarea_selectionEnds.length
|
||||
);
|
||||
this.textarea_selectionEnds.push(this.textarea_selectionEnd);
|
||||
this.d_history_index = this.d_history.length - 1;
|
||||
},
|
||||
saveSelectionEndsHistory() {
|
||||
const textarea =
|
||||
this.$refs.vNoteTextarea &&
|
||||
this.$refs.vNoteTextarea.$el.querySelector("textarea");
|
||||
this.textarea_selectionEnd = textarea
|
||||
? textarea.selectionEnd
|
||||
: this.textarea_selectionEnd;
|
||||
},
|
||||
initLanguage() {
|
||||
let lang =
|
||||
CONFIG.langList.indexOf(this.language) >= 0 ? this.language : "zh-CN";
|
||||
var $vm = this;
|
||||
$vm.$render(CONFIG[`help_${lang}`], function (res) {
|
||||
$vm.d_help = res;
|
||||
});
|
||||
this.d_words = CONFIG[`words_${lang}`];
|
||||
},
|
||||
// 编辑开关
|
||||
editableTextarea() {
|
||||
let text_dom = this.$refs.vNoteTextarea.$refs.vTextarea;
|
||||
if (this.editable) {
|
||||
text_dom.removeAttribute("disabled");
|
||||
} else {
|
||||
text_dom.setAttribute("disabled", "disabled");
|
||||
}
|
||||
},
|
||||
codeStyleChange(val, isInit) {
|
||||
isInit = isInit ? isInit : false;
|
||||
if (typeof this.p_external_link.hljs_css !== "function") {
|
||||
if (this.p_external_link.hljs_css !== false) {
|
||||
console.error(
|
||||
"external_link.hljs_css is not a function, if you want to disabled this error log, set external_link.hljs_css to function or false"
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
var url = this.p_external_link.hljs_css(val);
|
||||
if (url.length === 0 && isInit) {
|
||||
console.warn(
|
||||
"hljs color scheme",
|
||||
val,
|
||||
"do not exist, loading default github"
|
||||
);
|
||||
url = this.p_external_link.hljs_css("github");
|
||||
}
|
||||
if (url.length > 0) {
|
||||
loadLink(url, null, "md-code-style");
|
||||
} else {
|
||||
console.warn(
|
||||
"hljs color scheme",
|
||||
val,
|
||||
"do not exist, hljs color scheme will not change"
|
||||
);
|
||||
}
|
||||
},
|
||||
iRender(toggleChange) {
|
||||
var $vm = this;
|
||||
this.$render($vm.d_value, function (res) {
|
||||
$vm.d_render = res;
|
||||
// change回调 toggleChange == false 时候触发change回调
|
||||
if (!toggleChange) {
|
||||
if ($vm.change) $vm.change($vm.d_value, $vm.d_render);
|
||||
}
|
||||
// 改变标题导航
|
||||
if ($vm.s_navigation) getNavigation($vm, false);
|
||||
// v-model 语法糖
|
||||
$vm.$emit("update:modelValue", $vm.d_value);
|
||||
// 塞入编辑记录数组
|
||||
if ($vm.d_value === $vm.d_history[$vm.d_history_index]) return;
|
||||
window.clearTimeout($vm.currentTimeout);
|
||||
$vm.currentTimeout = setTimeout(() => {
|
||||
$vm.saveHistory();
|
||||
}, 500);
|
||||
});
|
||||
},
|
||||
// 清空上一步 下一步缓存
|
||||
$emptyHistory() {
|
||||
this.d_history = [this.d_value]; // 编辑记录
|
||||
this.d_history_index = 0; // 编辑记录索引
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
d_value: function (val, oldVal) {
|
||||
this.saveSelectionEndsHistory();
|
||||
this.iRender();
|
||||
},
|
||||
modelValue: function (val, oldVal) {
|
||||
if (val !== this.d_value) {
|
||||
this.d_value = val;
|
||||
}
|
||||
},
|
||||
subfield: function (val, oldVal) {
|
||||
this.s_subfield = val;
|
||||
},
|
||||
d_history_index() {
|
||||
if (this.d_history_index > 20) {
|
||||
this.d_history.shift();
|
||||
this.d_history_index = this.d_history_index - 1;
|
||||
}
|
||||
this.d_value = this.d_history[this.d_history_index];
|
||||
},
|
||||
language: function (val) {
|
||||
this.initLanguage();
|
||||
},
|
||||
editable: function () {
|
||||
this.editableTextarea();
|
||||
},
|
||||
defaultOpen: function (val) {
|
||||
let default_open_ = val;
|
||||
if (!default_open_) {
|
||||
default_open_ = this.subfield ? "preview" : "edit";
|
||||
}
|
||||
this.s_preview_switch = default_open_ === "preview" ? true : false;
|
||||
return this.s_preview_switch;
|
||||
},
|
||||
codeStyle: function (val) {
|
||||
this.codeStyleChange(val);
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
"v-autoTextarea": autoTextarea,
|
||||
"v-md-toolbar-left": md_toolbar_left,
|
||||
"v-md-toolbar-right": md_toolbar_right
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="stylus" rel="stylesheet/stylus">
|
||||
@import "lib/css/scroll.styl"
|
||||
@import "lib/css/mavon-editor.styl"
|
||||
</style>
|
||||
<style lang="css" scoped>
|
||||
.auto-textarea-wrapper {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user