周立森 5 anni fa
parent
commit
d0614bd717
100 ha cambiato i file con 28867 aggiunte e 621 eliminazioni
  1. 2
    2
      foyo-service/pom.xml
  2. 3
    0
      foyo-service/src/main/java/com/huiju/foyo/controller/ImageController.java
  3. 2
    2
      foyo-service/src/main/java/com/huiju/foyo/controller/TaCarouselPictureController.java
  4. 2
    0
      foyo-service/src/main/java/com/huiju/foyo/model/TaCarouselPicture.java
  5. 4
    1
      foyo-service/src/main/java/com/huiju/foyo/model/TaCase.java
  6. 19
    0
      foyo-service/src/main/java/com/huiju/foyo/service/impl/ImageServiceimpl.java
  7. 5
    1
      vue-element-admin/build/webpack.prod.conf.js
  8. 1
    1
      vue-element-admin/config/dev.env.js
  9. 1
    1
      vue-element-admin/index.html
  10. 2
    0
      vue-element-admin/package.json
  11. 15
    0
      vue-element-admin/src/api/carousel.js
  12. 9
    0
      vue-element-admin/src/api/upimage.js
  13. 1
    1
      vue-element-admin/src/components/ThemePicker/index.vue
  14. 0
    103
      vue-element-admin/src/components/Tinymce/components/editorImage.vue
  15. 166
    179
      vue-element-admin/src/components/Tinymce/index.vue
  16. 0
    7
      vue-element-admin/src/components/Tinymce/plugins.js
  17. 0
    6
      vue-element-admin/src/components/Tinymce/toolbar.js
  18. 65
    67
      vue-element-admin/src/components/Wangeditor/index.vue
  19. 7
    0
      vue-element-admin/src/router/index.js
  20. 20
    1
      vue-element-admin/src/store/modules/carousel.js
  21. 12
    0
      vue-element-admin/src/store/modules/case.js
  22. 2
    2
      vue-element-admin/src/utils/request.js
  23. 76
    0
      vue-element-admin/src/utils/uploadImage.js
  24. 16
    13
      vue-element-admin/src/views/carousel/edit.vue
  25. 8
    3
      vue-element-admin/src/views/carousel/index.vue
  26. 204
    0
      vue-element-admin/src/views/carousel/modify.vue
  27. 0
    2
      vue-element-admin/src/views/case/CoverMovement.vue
  28. 29
    35
      vue-element-admin/src/views/case/add.vue
  29. 0
    2
      vue-element-admin/src/views/case/cover.vue
  30. 46
    39
      vue-element-admin/src/views/case/edit.vue
  31. 0
    2
      vue-element-admin/src/views/case/index.vue
  32. 0
    2
      vue-element-admin/src/views/case/movement.vue
  33. 0
    1
      vue-element-admin/src/views/case/servicecase/index.vue
  34. 0
    1
      vue-element-admin/src/views/partner/index.vue
  35. 0
    1
      vue-element-admin/src/views/service/index.vue
  36. 305
    146
      vue-element-admin/static/tinymce/langs/zh_CN.js
  37. 297
    0
      vue-element-admin/static/tinymce/plugins/advlist/plugin.js
  38. 9
    0
      vue-element-admin/static/tinymce/plugins/advlist/plugin.min.js
  39. 145
    0
      vue-element-admin/static/tinymce/plugins/anchor/plugin.js
  40. 9
    0
      vue-element-admin/static/tinymce/plugins/anchor/plugin.min.js
  41. 186
    0
      vue-element-admin/static/tinymce/plugins/autolink/plugin.js
  42. 9
    0
      vue-element-admin/static/tinymce/plugins/autolink/plugin.min.js
  43. 188
    0
      vue-element-admin/static/tinymce/plugins/autoresize/plugin.js
  44. 9
    0
      vue-element-admin/static/tinymce/plugins/autoresize/plugin.min.js
  45. 230
    0
      vue-element-admin/static/tinymce/plugins/autosave/plugin.js
  46. 9
    0
      vue-element-admin/static/tinymce/plugins/autosave/plugin.min.js
  47. 7
    0
      vue-element-admin/static/tinymce/plugins/axupimgs/index.js
  48. BIN
      vue-element-admin/static/tinymce/plugins/axupimgs/loading.gif
  49. 73
    0
      vue-element-admin/static/tinymce/plugins/axupimgs/plugin.js
  50. 73
    0
      vue-element-admin/static/tinymce/plugins/axupimgs/plugin.min.js
  51. 198
    0
      vue-element-admin/static/tinymce/plugins/axupimgs/upfiles.html
  52. 103
    0
      vue-element-admin/static/tinymce/plugins/bbcode/plugin.js
  53. 9
    0
      vue-element-admin/static/tinymce/plugins/bbcode/plugin.min.js
  54. 1696
    0
      vue-element-admin/static/tinymce/plugins/charmap/plugin.js
  55. 9
    0
      vue-element-admin/static/tinymce/plugins/charmap/plugin.min.js
  56. 99
    0
      vue-element-admin/static/tinymce/plugins/code/plugin.js
  57. 9
    0
      vue-element-admin/static/tinymce/plugins/code/plugin.min.js
  58. 1089
    0
      vue-element-admin/static/tinymce/plugins/codesample/plugin.js
  59. 9
    0
      vue-element-admin/static/tinymce/plugins/codesample/plugin.min.js
  60. 22
    0
      vue-element-admin/static/tinymce/plugins/colorpicker/plugin.js
  61. 9
    0
      vue-element-admin/static/tinymce/plugins/colorpicker/plugin.min.js
  62. 22
    0
      vue-element-admin/static/tinymce/plugins/contextmenu/plugin.js
  63. 9
    0
      vue-element-admin/static/tinymce/plugins/contextmenu/plugin.min.js
  64. 314
    0
      vue-element-admin/static/tinymce/plugins/directionality/plugin.js
  65. 9
    0
      vue-element-admin/static/tinymce/plugins/directionality/plugin.min.js
  66. 9015
    0
      vue-element-admin/static/tinymce/plugins/emoticons/js/emojis.js
  67. 2
    0
      vue-element-admin/static/tinymce/plugins/emoticons/js/emojis.min.js
  68. 589
    0
      vue-element-admin/static/tinymce/plugins/emoticons/plugin.js
  69. 9
    0
      vue-element-admin/static/tinymce/plugins/emoticons/plugin.min.js
  70. 582
    0
      vue-element-admin/static/tinymce/plugins/fullpage/plugin.js
  71. 9
    0
      vue-element-admin/static/tinymce/plugins/fullpage/plugin.min.js
  72. 1106
    0
      vue-element-admin/static/tinymce/plugins/fullscreen/plugin.js
  73. 9
    0
      vue-element-admin/static/tinymce/plugins/fullscreen/plugin.min.js
  74. 908
    0
      vue-element-admin/static/tinymce/plugins/help/plugin.js
  75. 9
    0
      vue-element-admin/static/tinymce/plugins/help/plugin.min.js
  76. 48
    0
      vue-element-admin/static/tinymce/plugins/hr/plugin.js
  77. 9
    0
      vue-element-admin/static/tinymce/plugins/hr/plugin.min.js
  78. 2372
    0
      vue-element-admin/static/tinymce/plugins/image/plugin.js
  79. 9
    0
      vue-element-admin/static/tinymce/plugins/image/plugin.min.js
  80. 1710
    0
      vue-element-admin/static/tinymce/plugins/imagetools/plugin.js
  81. 9
    0
      vue-element-admin/static/tinymce/plugins/imagetools/plugin.min.js
  82. 408
    0
      vue-element-admin/static/tinymce/plugins/importcss/plugin.js
  83. 9
    0
      vue-element-admin/static/tinymce/plugins/importcss/plugin.min.js
  84. 198
    0
      vue-element-admin/static/tinymce/plugins/insertdatetime/plugin.js
  85. 9
    0
      vue-element-admin/static/tinymce/plugins/insertdatetime/plugin.min.js
  86. 184
    0
      vue-element-admin/static/tinymce/plugins/legacyoutput/plugin.js
  87. 9
    0
      vue-element-admin/static/tinymce/plugins/legacyoutput/plugin.min.js
  88. 1835
    0
      vue-element-admin/static/tinymce/plugins/link/plugin.js
  89. 9
    0
      vue-element-admin/static/tinymce/plugins/link/plugin.min.js
  90. 2177
    0
      vue-element-admin/static/tinymce/plugins/lists/plugin.js
  91. 9
    0
      vue-element-admin/static/tinymce/plugins/lists/plugin.min.js
  92. 7
    0
      vue-element-admin/static/tinymce/plugins/media/index.js
  93. 1367
    0
      vue-element-admin/static/tinymce/plugins/media/plugin.js
  94. 9
    0
      vue-element-admin/static/tinymce/plugins/media/plugin.min.js
  95. 109
    0
      vue-element-admin/static/tinymce/plugins/nonbreaking/plugin.js
  96. 9
    0
      vue-element-admin/static/tinymce/plugins/nonbreaking/plugin.min.js
  97. 124
    0
      vue-element-admin/static/tinymce/plugins/noneditable/plugin.js
  98. 9
    0
      vue-element-admin/static/tinymce/plugins/noneditable/plugin.min.js
  99. 119
    0
      vue-element-admin/static/tinymce/plugins/pagebreak/plugin.js
  100. 0
    0
      vue-element-admin/static/tinymce/plugins/pagebreak/plugin.min.js

+ 2
- 2
foyo-service/pom.xml Vedi File

@@ -9,8 +9,8 @@
9 9
 		<relativePath/> <!-- lookup parent from repository -->
10 10
 	</parent>
11 11
 	<groupId>com.huiju</groupId>
12
-	<artifactId>foyo</artifactId>
13
-	<version>v0.2.4</version>
12
+	<artifactId>foyo1</artifactId>
13
+	<version>v0.2.5</version>
14 14
 	<name>foyo</name>
15 15
 	<description>Demo project for Spring Boot</description>
16 16
 

+ 3
- 0
foyo-service/src/main/java/com/huiju/foyo/controller/ImageController.java Vedi File

@@ -24,6 +24,7 @@ public class ImageController {
24 24
 
25 25
     @Autowired
26 26
     private ImageServiceI imageService;
27
+
27 28
     
28 29
     @PostMapping(value = "/admin/uploadimage", consumes = "multipart/*", headers = "content-type=multipart/form-data")
29 30
     public ResponseBean uploadImgAndGetUrl(MultipartFile[] uploadFiles) throws Exception {
@@ -36,4 +37,6 @@ public class ImageController {
36 37
         responseBean.addSuccess(urls);
37 38
         return responseBean;
38 39
     }
40
+
41
+
39 42
 }

+ 2
- 2
foyo-service/src/main/java/com/huiju/foyo/controller/TaCarouselPictureController.java Vedi File

@@ -121,7 +121,7 @@ public class TaCarouselPictureController extends BaseController {
121 121
      * @param taCarouselPicture 实体对象
122 122
      * @return
123 123
      */
124
-    @RequestMapping(value="/taCarouselPicture/{id}",method= RequestMethod.PUT)
124
+    @RequestMapping(value="/admin/taCarouselPicture/{id}",method= RequestMethod.PUT)
125 125
     public ResponseBean taCarouselPictureUpdate(@PathVariable Integer id,
126 126
                                         @RequestBody TaCarouselPicture taCarouselPicture){
127 127
         ResponseBean responseBean = new ResponseBean();
@@ -143,7 +143,7 @@ public class TaCarouselPictureController extends BaseController {
143 143
      * 根据id查询对象
144 144
      * @param id  实体ID
145 145
      */
146
-    @RequestMapping(value="/taCarouselPicture/{id}",method= RequestMethod.GET)
146
+    @RequestMapping(value="/admin/taCarouselPicture/{id}",method= RequestMethod.GET)
147 147
     public ResponseBean taCarouselPictureGet(@PathVariable Integer id){
148 148
         ResponseBean responseBean = new ResponseBean();
149 149
         try {

+ 2
- 0
foyo-service/src/main/java/com/huiju/foyo/model/TaCarouselPicture.java Vedi File

@@ -65,4 +65,6 @@ public class TaCarouselPicture implements Serializable {
65 65
 
66 66
 
67 67
   private String link;
68
+
69
+  private String type;
68 70
 }

+ 4
- 1
foyo-service/src/main/java/com/huiju/foyo/model/TaCase.java Vedi File

@@ -129,5 +129,8 @@ public class TaCase implements Serializable {
129 129
    */
130 130
   private String caseMoreCoverImg;
131 131
 
132
-
132
+  /**
133
+   * 列表图
134
+   */
135
+  private String listImg;
133 136
 }

+ 19
- 0
foyo-service/src/main/java/com/huiju/foyo/service/impl/ImageServiceimpl.java Vedi File

@@ -39,4 +39,23 @@ public class ImageServiceimpl implements ImageServiceI {
39 39
         
40 40
         return rebackPath;
41 41
     }
42
+
43
+//  @Override
44
+//  public String getVideoUrl(MultipartFile uploadFile) throws IOException {
45
+//    //保存的文件名
46
+//    String imgName = System.currentTimeMillis() + ".mp4";
47
+//    //保存路径
48
+//    String path = imagePath + imgName;
49
+//    String rebackPath = "/uploadimage/" + imgName;
50
+//    //生成保存文件
51
+//    File troUploadFile = new File(path);
52
+//    //将上传文件保存到路径
53
+//    try {
54
+//      uploadFile.transferTo(troUploadFile);
55
+//    } catch (IOException e) {
56
+//      e.printStackTrace();
57
+//    }
58
+//
59
+//    return rebackPath;
60
+//  }
42 61
 }

+ 5
- 1
vue-element-admin/build/webpack.prod.conf.js Vedi File

@@ -37,6 +37,9 @@ const webpackConfig = merge(baseWebpackConfig, {
37 37
     filename: utils.assetsPath('js/[name].[chunkhash:8].js'),
38 38
     chunkFilename: utils.assetsPath('js/[name].[chunkhash:8].js')
39 39
   },
40
+  performance: {
41
+    hints: false, // 关闭性能提示
42
+  },
40 43
   plugins: [
41 44
     // http://vuejs.github.io/vue-loader/en/workflow/production.html
42 45
     new webpack.DefinePlugin({
@@ -74,6 +77,7 @@ const webpackConfig = merge(baseWebpackConfig, {
74 77
       //`runtime` must same as runtimeChunk name. default is `runtime`
75 78
       inline: /runtime\..*\.js$/
76 79
     }),
80
+    
77 81
     // keep chunk.id stable when chunk has no name
78 82
     new webpack.NamedChunksPlugin(chunk => {
79 83
       if (chunk.name) {
@@ -168,7 +172,7 @@ if (config.build.generateAnalyzerReport || config.build.bundleAnalyzerReport) {
168 172
   if (config.build.bundleAnalyzerReport) {
169 173
     webpackConfig.plugins.push(
170 174
       new BundleAnalyzerPlugin({
171
-        analyzerPort: 8080,
175
+        analyzerPort: 8081,
172 176
         generateStatsFile: false
173 177
       })
174 178
     )

+ 1
- 1
vue-element-admin/config/dev.env.js Vedi File

@@ -1,5 +1,5 @@
1 1
 module.exports = {
2 2
   NODE_ENV: '"development"',
3 3
   ENV_CONFIG: '"dev"',
4
-  BASE_API: '"http://127.0.0.1:8080/admin/"'
4
+  BASE_API: '"http://127.0.0.1:8081/admin/"'
5 5
 }

+ 1
- 1
vue-element-admin/index.html Vedi File

@@ -9,7 +9,7 @@
9 9
     <title>FOYO</title>
10 10
   </head>
11 11
   <body>
12
-    <script src=<%= BASE_URL %>/tinymce4.7.5/tinymce.min.js></script>
12
+    <script src=<%= BASE_URL %>/tinymce/tinymce.min.js></script>
13 13
     <div id="app"></div>
14 14
     <!-- built files will be auto injected -->
15 15
   </body>

+ 2
- 0
vue-element-admin/package.json Vedi File

@@ -34,6 +34,7 @@
34 34
     "url": "https://github.com/PanJiaChen/vue-element-admin/issues"
35 35
   },
36 36
   "dependencies": {
37
+    "@tinymce/tinymce-vue": "^3.0.1",
37 38
     "axios": "0.18.0",
38 39
     "clipboard": "1.7.1",
39 40
     "codemirror": "5.39.2",
@@ -54,6 +55,7 @@
54 55
     "showdown": "1.8.6",
55 56
     "simplemde": "1.11.2",
56 57
     "sortablejs": "1.7.0",
58
+    "tinymce": "^5.1.5",
57 59
     "vue": "2.5.17",
58 60
     "vue-count-to": "1.0.13",
59 61
     "vue-i18n": "7.3.2",

+ 15
- 0
vue-element-admin/src/api/carousel.js Vedi File

@@ -23,3 +23,18 @@ export function deleteCarouselBatch(data) {
23 23
     data
24 24
   })
25 25
 }
26
+
27
+export function selectCarousel(id) {
28
+  return request({
29
+    url: '/taCarouselPicture/' + id,
30
+    method: 'get'
31
+  })
32
+}
33
+
34
+export function updateCarousel(id, data) {
35
+  return request({
36
+    url: '/taCarouselPicture/' + id,
37
+    method: 'put',
38
+    data
39
+  })
40
+}

+ 9
- 0
vue-element-admin/src/api/upimage.js Vedi File

@@ -0,0 +1,9 @@
1
+import request from '@/utils/request'
2
+
3
+export function uploadimage(date) {
4
+  return request({
5
+    url: '/uploadimage',
6
+    method: 'post',
7
+    date
8
+  })
9
+}

+ 1
- 1
vue-element-admin/src/components/ThemePicker/index.vue Vedi File

@@ -22,7 +22,7 @@ export default {
22 22
       if (typeof val !== 'string') return
23 23
       const themeCluster = this.getThemeCluster(val.replace('#', ''))
24 24
       const originalCluster = this.getThemeCluster(oldVal.replace('#', ''))
25
-      console.log(themeCluster, originalCluster)
25
+
26 26
       const getHandler = (variable, id) => {
27 27
         return () => {
28 28
           const originalCluster = this.getThemeCluster(ORIGINAL_THEME.replace('#', ''))

+ 0
- 103
vue-element-admin/src/components/Tinymce/components/editorImage.vue Vedi File

@@ -1,103 +0,0 @@
1
-<template>
2
-  <div class="upload-container">
3
-    <el-button :style="{background:color,borderColor:color}" icon="el-icon-upload" size="mini" type="primary" @click=" dialogVisible=true">上传图片
4
-    </el-button>
5
-    <el-dialog :visible.sync="dialogVisible">
6
-      <el-upload
7
-        :multiple="true"
8
-        :file-list="fileList"
9
-        :show-file-list="true"
10
-        :on-remove="handleRemove"
11
-        :on-success="handleSuccess"
12
-        :before-upload="beforeUpload"
13
-        class="editor-slide-upload"
14
-        action="https://httpbin.org/post"
15
-        list-type="picture-card">
16
-        <el-button size="small" type="primary">点击上传</el-button>
17
-      </el-upload>
18
-      <el-button @click="dialogVisible = false">取 消</el-button>
19
-      <el-button type="primary" @click="handleSubmit">确 定</el-button>
20
-    </el-dialog>
21
-  </div>
22
-</template>
23
-
24
-<script>
25
-// import { getToken } from 'api/qiniu'
26
-
27
-export default {
28
-  name: 'EditorSlideUpload',
29
-  props: {
30
-    color: {
31
-      type: String,
32
-      default: '#1890ff'
33
-    }
34
-  },
35
-  data() {
36
-    return {
37
-      dialogVisible: false,
38
-      listObj: {},
39
-      fileList: []
40
-    }
41
-  },
42
-  methods: {
43
-    checkAllSuccess() {
44
-      return Object.keys(this.listObj).every(item => this.listObj[item].hasSuccess)
45
-    },
46
-    handleSubmit() {
47
-      const arr = Object.keys(this.listObj).map(v => this.listObj[v])
48
-      if (!this.checkAllSuccess()) {
49
-        this.$message('请等待所有图片上传成功 或 出现了网络问题,请刷新页面重新上传!')
50
-        return
51
-      }
52
-      this.$emit('successCBK', arr)
53
-      this.listObj = {}
54
-      this.fileList = []
55
-      this.dialogVisible = false
56
-    },
57
-    handleSuccess(response, file) {
58
-      const uid = file.uid
59
-      const objKeyArr = Object.keys(this.listObj)
60
-      for (let i = 0, len = objKeyArr.length; i < len; i++) {
61
-        if (this.listObj[objKeyArr[i]].uid === uid) {
62
-          this.listObj[objKeyArr[i]].url = response.files.file
63
-          this.listObj[objKeyArr[i]].hasSuccess = true
64
-          return
65
-        }
66
-      }
67
-    },
68
-    handleRemove(file) {
69
-      const uid = file.uid
70
-      const objKeyArr = Object.keys(this.listObj)
71
-      for (let i = 0, len = objKeyArr.length; i < len; i++) {
72
-        if (this.listObj[objKeyArr[i]].uid === uid) {
73
-          delete this.listObj[objKeyArr[i]]
74
-          return
75
-        }
76
-      }
77
-    },
78
-    beforeUpload(file) {
79
-      const _self = this
80
-      const _URL = window.URL || window.webkitURL
81
-      const fileName = file.uid
82
-      this.listObj[fileName] = {}
83
-      return new Promise((resolve, reject) => {
84
-        const img = new Image()
85
-        img.src = _URL.createObjectURL(file)
86
-        img.onload = function() {
87
-          _self.listObj[fileName] = { hasSuccess: false, uid: file.uid, width: this.width, height: this.height }
88
-        }
89
-        resolve(true)
90
-      })
91
-    }
92
-  }
93
-}
94
-</script>
95
-
96
-<style rel="stylesheet/scss" lang="scss" scoped>
97
-.editor-slide-upload {
98
-  margin-bottom: 20px;
99
-  /deep/ .el-upload--picture-card {
100
-    width: 100%;
101
-  }
102
-}
103
-</style>

+ 166
- 179
vue-element-admin/src/components/Tinymce/index.vue Vedi File

@@ -1,204 +1,191 @@
1 1
 <template>
2
-  <div :class="{fullscreen:fullscreen}" class="tinymce-container editor-container">
3
-    <textarea :id="tinymceId" class="tinymce-textarea"/>
4
-    <div class="editor-custom-btn-container">
5
-      <editorImage color="#1890ff" class="editor-upload-btn" @successCBK="imageSuccessCBK"/>
6
-    </div>
2
+  <div>
3
+    <!--
4
+    给editor加key是因为给tinymce keep-alive以后组件切换时tinymce编辑器会显示异常,
5
+    在activated钩子里改变key的值可以让编辑器重新创建v-model="content" @show="editors"v-models="content"
6
+    -->
7
+    <editor id="tinymceEditor" :init="tinymceInit" v-model="content" :key="tinymceFlag"/>
8
+    <!-- <el-upload multiple ref="imageUpload" :action="publicPath" :on-success="insertImage" style="display:none"></el-upload> -->
7 9
   </div>
8 10
 </template>
9
-
10 11
 <script>
11
-import editorImage from './components/editorImage'
12
-import plugins from './plugins'
13
-import toolbar from './toolbar'
12
+
13
+// import tinymce from '../../../static/tinymce/tinymce.js'
14
+import '../../../static/tinymce/themes/silver/theme'
15
+import Editor from '@tinymce/tinymce-vue'
16
+import request from '@/utils/uploadImage'
17
+// import axios from 'axios'
18
+
19
+import 'tinymce/plugins/textcolor'
20
+import 'tinymce/plugins/advlist'
21
+import 'tinymce/plugins/table'
22
+import 'tinymce/plugins/lists'
23
+import 'tinymce/plugins/paste'
24
+import 'tinymce/plugins/preview'
25
+import 'tinymce/plugins/fullscreen'
26
+import 'tinymce/plugins/print'
27
+import 'tinymce/plugins/searchreplace'
28
+import 'tinymce/plugins/autolink'
29
+import 'tinymce/plugins/directionality'
30
+import 'tinymce/plugins/visualblocks'
31
+import 'tinymce/plugins/visualchars'
32
+import 'tinymce/plugins/image'
33
+import 'tinymce/plugins/link'
34
+// import '../../../static/tinymce/plugins/media'
35
+import 'tinymce/plugins/media'
36
+import 'tinymce/plugins/template'
37
+import 'tinymce/plugins/code'
38
+import 'tinymce/plugins/codesample'
39
+import 'tinymce/plugins/charmap'
40
+import 'tinymce/plugins/hr'
41
+import 'tinymce/plugins/pagebreak'
42
+import 'tinymce/plugins/nonbreaking'
43
+import 'tinymce/plugins/anchor'
44
+import 'tinymce/plugins/insertdatetime'
45
+import 'tinymce/plugins/advlist'
46
+import 'tinymce/plugins/wordcount'
47
+import 'tinymce/plugins/imagetools'
48
+import 'tinymce/plugins/wordcount'
49
+import 'tinymce/plugins/textpattern'
50
+import 'tinymce/plugins/help'
51
+import 'tinymce/plugins/emoticons'
52
+import 'tinymce/plugins/autosave'
53
+// import 'tinymce/plugins/bdmap'
54
+// import 'tinymce/plugins/indent2em'
55
+import 'tinymce/plugins/autoresize'
56
+
57
+// import 'tinymce/plugins/lineheight'
58
+// import 'tinymce/plugins/formatpainter'../../../static/tinymce/skins/ui/oxide
59
+import '../../../static/tinymce/plugins/axupimgs'
60
+
61
+// import 'tinymce/plugins/axupimgs'
62
+// import 'tinymce/plugins/autosave'
14 63
 
15 64
 export default {
16
-  name: 'Tinymce',
17
-  components: { editorImage },
18
-  props: {
19
-    id: {
20
-      type: String,
21
-      default: function() {
22
-        return 'vue-tinymce-' + +new Date() + ((Math.random() * 1000).toFixed(0) + '')
23
-      }
24
-    },
25
-    value: {
26
-      type: String,
27
-      default: ''
28
-    },
29
-    toolbar: {
30
-      type: Array,
31
-      required: false,
32
-      default() {
33
-        return []
34
-      }
35
-    },
36
-    menubar: {
37
-      type: String,
38
-      default: 'file edit insert view format table'
39
-    },
40
-    height: {
41
-      type: Number,
42
-      required: false,
43
-      default: 360
44
-    }
65
+  name: 'TinymceEditor',
66
+  components: {
67
+    editor: Editor
45 68
   },
69
+  props: [
70
+    'content'
71
+  ],
46 72
   data() {
47 73
     return {
48
-      hasChange: false,
49
-      hasInit: false,
50
-      tinymceId: this.id,
51
-      fullscreen: false,
52
-      languageTypeList: {
53
-        'en': 'en',
54
-        'zh': 'zh_CN'
55
-      }
56
-    }
57
-  },
58
-  computed: {
59
-    language() {
60
-      return this.languageTypeList[this.$store.getters.language]
74
+      publicPath: process.env.BASE_API + 'uploadimage',
75
+      tinymceFlag: 1,
76
+      tinymceInit: {},
77
+      contents: this.content
78
+      // contents:''
61 79
     }
62 80
   },
63 81
   watch: {
64
-    value(val) {
65
-      if (!this.hasChange && this.hasInit) {
66
-        this.$nextTick(() =>
67
-          window.tinymce.get(this.tinymceId).setContent(val || ''))
68
-      }
69
-    },
70
-    language() {
71
-      this.destroyTinymce()
72
-      this.$nextTick(() => this.initTinymce())
82
+
83
+    content(newV, oldV) {
84
+      this.$emit('fun', newV)
85
+      // tinymce.activeEditor.setContent(newV);
73 86
     }
74 87
   },
75 88
   mounted() {
76
-    this.initTinymce()
77
-  },
78
-  activated() {
79
-    this.initTinymce()
89
+    const that = this
90
+
91
+    this.contents = that.content
80 92
   },
81
-  deactivated() {
82
-    this.destroyTinymce()
93
+  created() {
94
+    // this.value = this.content
95
+    // const that = this
96
+
97
+    this.tinymceInit = {
98
+      // skin_url: `../../../static/tinymce/skins/ui/oxide`,
99
+      // content_css: `../../../static/tinymce/skins/content/default/content.css`,
100
+      // language_url: `../../../static/tinymce/langs/zh_CN.js`,
101
+      skin_url: `../../../admin/static/tinymce/skins/ui/oxide`,
102
+      content_css: `../../../admin/static/tinymce/skins/content/default/content.css`,
103
+      language_url: `../../../admin/static/tinymce/langs/zh_CN.js`,
104
+      language: 'zh_CN',
105
+      height: 650, // 编辑器高度
106
+      min_height: 400,
107
+      browser_spellcheck: true, // 拼写检查
108
+      branding: false, // 去水印
109
+      // elementpath: false,  //禁用编辑器底部的状态栏
110
+      statusbar: false, // 隐藏编辑器底部的状态栏
111
+      paste_data_images: true, // 允许粘贴图像
112
+
113
+      // images_upload_url: this.publicPath,
114
+      // menubar: false, // 隐藏最上方menu | bdmap indent2em lineheight formatpainter axupimgs alignjustify outdent indent
115
+      plugins: 'print preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template code codesample table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern help emoticons autosave  autoresize axupimgs',
116
+      toolbar: 'code undo redo restoredraft | cut copy paste pastetext | forecolor backcolor bold italic underline strikethrough image link imageUpload anchor | alignleft aligncenter alignright  | \
117
+    styleselect formatselect fontselect fontsizeselect | bullist numlist | blockquote subscript superscript removeformat | \
118
+    table image media charmap emoticons hr pagebreak insertdatetime print preview | fullscreen axupimgs',
119
+
120
+      // file_picker_types: 'media',
121
+
122
+      // file_picker_callback: function (blobInfo, value, meta) {
123
+      //   console.log(meta, 'meta')
124
+      //   console.log(value, 'meta')
125
+      //   console.log(blobInfo, 'meta')
126
+      //   if (meta.filetype == 'media') {
127
+      //     //创建一个隐藏的type=file的文件选择input
128
+      //     let input = document.createElement('input');
129
+      //     input.setAttribute('type', 'file');
130
+      //     input.onchange = function () {
131
+      //       // let file = this.files[0];//只选取第一个文件。如果要选取全部,后面注意做修改
132
+      //       // let xhr, formData;
133
+      //       // xhr = new XMLHttpRequest();
134
+      //       // xhr.open('POST', self.apiUrl);
135
+      //       // xhr.withCredentials = self.credentials;
136
+      //       // xhr.upload.onprogress = function (e) {
137
+      //       //   // 进度(e.loaded / e.total * 100)
138
+      //       };
139
+
140
+      //       let fm = new FormData()
141
+      //     }
142
+      // fm.append('uploadFiles',  blobInfo.blob())
143
+      // request({
144
+      //   url: '/uploadVideo',
145
+      //   method: 'post',
146
+      //   data: fm
147
+      // }).then((data) => {
148
+
149
+      // }).catch((err) => {
150
+      //   console.log(err, 'err')
151
+
152
+      // })
153
+      // },
154
+
155
+      images_upload_handler: function(blobInfo, succFun, failFun) {
156
+        const fm = new FormData()
157
+        fm.append('uploadFiles', blobInfo.blob())
158
+        request({
159
+          url: '/uploadimage',
160
+          method: 'post',
161
+          data: fm
162
+        }).then((data) => {
163
+          const url = data.data.data[0]
164
+          succFun(url)
165
+        }).catch((err) => {
166
+          console.log(err, 'err')
167
+          failFun(err)
168
+        })
169
+      }
170
+    }
171
+    // this.getContents()
83 172
   },
84
-  destroyed() {
85
-    this.destroyTinymce()
173
+  activated() {
174
+    this.tinymceFlag++
86 175
   },
87 176
   methods: {
88
-    initTinymce() {
89
-      const _this = this
90
-      window.tinymce.init({
91
-        language: this.language,
92
-        selector: `#${this.tinymceId}`,
93
-        height: this.height,
94
-        body_class: 'panel-body ',
95
-        object_resizing: false,
96
-        toolbar: this.toolbar.length > 0 ? this.toolbar : toolbar,
97
-        menubar: this.menubar,
98
-        plugins: plugins,
99
-        end_container_on_empty_block: true,
100
-        powerpaste_word_import: 'clean',
101
-        code_dialog_height: 450,
102
-        code_dialog_width: 1000,
103
-        advlist_bullet_styles: 'square',
104
-        advlist_number_styles: 'default',
105
-        imagetools_cors_hosts: ['www.tinymce.com', 'codepen.io'],
106
-        default_link_target: '_blank',
107
-        link_title: false,
108
-        nonbreaking_force_tab: true, // inserting nonbreaking space &nbsp; need Nonbreaking Space Plugin
109
-        init_instance_callback: editor => {
110
-          if (_this.value) {
111
-            editor.setContent(_this.value)
112
-          }
113
-          _this.hasInit = true
114
-          editor.on('NodeChange Change KeyUp SetContent', () => {
115
-            this.hasChange = true
116
-            this.$emit('input', editor.getContent())
117
-          })
118
-        },
119
-        setup(editor) {
120
-          editor.on('FullscreenStateChanged', (e) => {
121
-            _this.fullscreen = e.state
122
-          })
123
-        }
124
-        // 整合七牛上传
125
-        // images_dataimg_filter(img) {
126
-        //   setTimeout(() => {
127
-        //     const $image = $(img);
128
-        //     $image.removeAttr('width');
129
-        //     $image.removeAttr('height');
130
-        //     if ($image[0].height && $image[0].width) {
131
-        //       $image.attr('data-wscntype', 'image');
132
-        //       $image.attr('data-wscnh', $image[0].height);
133
-        //       $image.attr('data-wscnw', $image[0].width);
134
-        //       $image.addClass('wscnph');
135
-        //     }
136
-        //   }, 0);
137
-        //   return img
138
-        // },
139
-        // images_upload_handler(blobInfo, success, failure, progress) {
140
-        //   progress(0);
141
-        //   const token = _this.$store.getters.token;
142
-        //   getToken(token).then(response => {
143
-        //     const url = response.data.qiniu_url;
144
-        //     const formData = new FormData();
145
-        //     formData.append('token', response.data.qiniu_token);
146
-        //     formData.append('key', response.data.qiniu_key);
147
-        //     formData.append('file', blobInfo.blob(), url);
148
-        //     upload(formData).then(() => {
149
-        //       success(url);
150
-        //       progress(100);
151
-        //     })
152
-        //   }).catch(err => {
153
-        //     failure('出现未知问题,刷新页面,或者联系程序员')
154
-        //     console.log(err);
155
-        //   });
156
-        // },
157
-      })
158
-    },
159
-    destroyTinymce() {
160
-      if (window.tinymce.get(this.tinymceId)) {
161
-        window.tinymce.get(this.tinymceId).destroy()
162
-      }
163
-    },
164
-    setContent(value) {
165
-      window.tinymce.get(this.tinymceId).setContent(value)
166
-    },
177
+    // 插入图片至编辑器
167 178
     getContent() {
168
-      window.tinymce.get(this.tinymceId).getContent()
179
+      return this.content
180
+    },
181
+    getContents() {
182
+      this.contents = this.content
169 183
     },
170
-    imageSuccessCBK(arr) {
171
-      const _this = this
172
-      arr.forEach(v => {
173
-        window.tinymce.get(_this.tinymceId).insertContent(`<img class="wscnph" src="${v.url}" >`)
174
-      })
184
+
185
+    editors(content) {
186
+      this.$emit('success', '子组件修改了')
175 187
     }
188
+
176 189
   }
177 190
 }
178 191
 </script>
179
-
180
-<style scoped>
181
-.tinymce-container {
182
-  position: relative;
183
-}
184
-.tinymce-container>>>.mce-fullscreen {
185
-  z-index: 10000;
186
-}
187
-.tinymce-textarea {
188
-  visibility: hidden;
189
-  z-index: -1;
190
-}
191
-.editor-custom-btn-container {
192
-  position: absolute;
193
-  right: 4px;
194
-  top: 4px;
195
-  /*z-index: 2005;*/
196
-}
197
-.fullscreen .editor-custom-btn-container {
198
-  z-index: 10000;
199
-  position: fixed;
200
-}
201
-.editor-upload-btn {
202
-  display: inline-block;
203
-}
204
-</style>

+ 0
- 7
vue-element-admin/src/components/Tinymce/plugins.js Vedi File

@@ -1,7 +0,0 @@
1
-// Any plugins you want to use has to be imported
2
-// Detail plugins list see https://www.tinymce.com/docs/plugins/
3
-// Custom builds see https://www.tinymce.com/download/custom-builds/
4
-
5
-const plugins = ['advlist anchor autolink autosave code codesample colorpicker colorpicker contextmenu directionality emoticons fullscreen hr image imagetools importcss insertdatetime link lists media nonbreaking noneditable pagebreak paste preview print save searchreplace spellchecker tabfocus table template textcolor textpattern visualblocks visualchars wordcount']
6
-
7
-export default plugins

+ 0
- 6
vue-element-admin/src/components/Tinymce/toolbar.js Vedi File

@@ -1,6 +0,0 @@
1
-// Here is a list of the toolbar
2
-// Detail list see https://www.tinymce.com/docs/advanced/editor-control-identifiers/#toolbarcontrols
3
-
4
-const toolbar = ['bold italic underline strikethrough alignleft aligncenter alignright outdent indent  blockquote undo redo removeformat subscript superscript code codesample', 'hr bullist numlist link image charmap preview anchor pagebreak insertdatetime media table emoticons forecolor backcolor fullscreen']
5
-
6
-export default toolbar

+ 65
- 67
vue-element-admin/src/components/Wangeditor/index.vue Vedi File

@@ -1,77 +1,75 @@
1 1
 <template>
2
-    <div id="websiteEditorElem" style="height: 400px"></div>
2
+  <div id="websiteEditorElem" style="height: 400px"/>
3 3
 </template>
4 4
 
5 5
 <script>
6
-    import E from 'wangeditor'
7
-    export default {
8
-        name: "index",
9
-        props:[
10
-          'content'
11
-        ],
12
-        watch: {
13
-            text(newVal, oldVal) {
14
-                console.log(newVal, oldVal)
15
-                //this.phoneEditor.txt.html(this.text)
16
-                if (!newVal && oldVal) {
17
-                    this.text = newVal
18
-                    this.intiPhoneEditor()
19
-                }
20
-                this.sendContent()
21
-            }
22
-        },
23
-        data() {
24
-          return {
25
-              text: this.content,
26
-              phoneEditor: ''
27
-          }
28
-        },
29
-        mounted() {
30
-            this.$nextTick(() => {
31
-                this.intiPhoneEditor()
32
-            })
33
-        },
34
-        methods: {
35
-            sendContent() {
36
-                this.$emit('get-content', this.text)
37
-            },
38
-            intiPhoneEditor() {
39
-                console.log('初始化值:', this.text)
40
-                const _that = this
41
-                _that.phoneEditor = new E('#websiteEditorElem')
42
-                const phoneEditor = _that.phoneEditor
43
-                phoneEditor.customConfig.zIndex = 1
44
-                phoneEditor.customConfig.onchange = function (html) {
45
-                    _that.text = html
46
-                }
47
-                // phoneEditor.customConfig.uploadImgServer = this.upFileUrl
48
-                // phoneEditor.customConfig.uploadFileName = 'uploadFiles'
6
+import E from 'wangeditor'
7
+export default {
8
+  name: 'Index',
9
+  props: [
10
+    // 'content'
11
+  ],
12
+  data() {
13
+    return {
14
+      text: this.content,
15
+      phoneEditor: ''
16
+    }
17
+  },
18
+  watch: {
19
+    text(newVal, oldVal) {
20
+      // this.phoneEditor.txt.html(this.text)
21
+      if (!newVal && oldVal) {
22
+        this.text = newVal
23
+        this.intiPhoneEditor()
24
+      }
25
+      this.sendContent()
26
+    }
27
+  },
28
+  mounted() {
29
+    this.$nextTick(() => {
30
+      this.intiPhoneEditor()
31
+    })
32
+  },
33
+  methods: {
34
+    sendContent() {
35
+      this.$emit('get-content', this.text)
36
+    },
37
+    intiPhoneEditor() {
38
+      const _that = this
39
+      _that.phoneEditor = new E('#websiteEditorElem')
40
+      const phoneEditor = _that.phoneEditor
41
+      phoneEditor.customConfig.zIndex = 1
42
+      phoneEditor.customConfig.onchange = function(html) {
43
+        _that.text = html
44
+      }
45
+      // phoneEditor.customConfig.uploadImgServer = this.upFileUrl
46
+      // phoneEditor.customConfig.uploadFileName = 'uploadFiles'
49 47
 
50
-                // phoneEditor.customConfig.customUploadImg = function (files, insert) {
51
-                //     _that.uploadImg(files[0]).then(data => {
52
-                //         insert(data)
53
-                //     })
54
-                // }
55
-                phoneEditor.customConfig.menus = [
56
-                    'head',  // 标题
57
-                    'bold',  // 粗体
58
-                    'fontSize',  // 字号
59
-                    'fontName',  // 字体
60
-                    'italic',  // 斜体
61
-                    'underline',  // 下划线
62
-                    'strikeThrough',  // 删除线
63
-                    'foreColor',  // 文字颜色
64
-                    'backColor',  // 背景颜色
65
-                    'justify',  // 对齐方式
66
-                    'image',  // 插入图片
67
-                ]
68
-                phoneEditor.create()
69
-                phoneEditor.txt.html(this.text)
70
-            },
71
-        }
48
+      // phoneEditor.customConfig.customUploadImg = function (files, insert) {
49
+      //     _that.uploadImg(files[0]).then(data => {
50
+      //         insert(data)
51
+      //     })
52
+      // }
53
+      phoneEditor.customConfig.menus = [
54
+        'head', // 标题
55
+        'bold', // 粗体
56
+        'fontSize', // 字号
57
+        'fontName', // 字体
58
+        'italic', // 斜体
59
+        'underline', // 下划线
60
+        'strikeThrough', // 删除线
61
+        'foreColor', // 文字颜色
62
+        'backColor', // 背景颜色
63
+        'justify', // 对齐方式
64
+        'image' // 插入图片
65
+      ]
66
+      phoneEditor.create()
67
+      phoneEditor.txt.html(this.text)
72 68
     }
69
+  }
70
+}
73 71
 </script>
74 72
 
75 73
 <style scoped>
76 74
 
77
-</style>
75
+</style>

+ 7
- 0
vue-element-admin/src/router/index.js Vedi File

@@ -111,6 +111,13 @@ export const constantRouterMap = [
111 111
         name: 'carousel-edit',
112 112
         hidden: true,
113 113
         meta: { title: '新增轮播图' }
114
+      },
115
+      {
116
+        path: '/carousel/modify',
117
+        component: () => import('@/views/carousel/modify'),
118
+        name: 'carousel-modify',
119
+        hidden: true,
120
+        meta: { title: '修改轮播图' }
114 121
       }
115 122
     ]
116 123
   },

+ 20
- 1
vue-element-admin/src/store/modules/carousel.js Vedi File

@@ -1,4 +1,4 @@
1
-import { carouselList, addCarousel, deleteCarouselBatch } from '@/api/carousel'
1
+import { carouselList, addCarousel, deleteCarouselBatch, selectCarousel, updateCarousel } from '@/api/carousel'
2 2
 
3 3
 const carousel = {
4 4
   namespaced: true,
@@ -22,6 +22,24 @@ const carousel = {
22 22
         })
23 23
       })
24 24
     },
25
+    selectCarousel({ commit, state }, id) {
26
+      return new Promise((resolve, reject) => {
27
+        selectCarousel(id).then(response => {
28
+          resolve(response)
29
+        }).catch(error => {
30
+          reject(error)
31
+        })
32
+      })
33
+    },
34
+    updateCarousel({ commit, state }, params) {
35
+      return new Promise((resolve, reject) => {
36
+        updateCarousel(params.id, params.data).then(response => {
37
+          resolve(response)
38
+        }).catch(error => {
39
+          reject(error)
40
+        })
41
+      })
42
+    },
25 43
     deleteCarousel({ commit, state }, data) { // 删除轮播图
26 44
       return new Promise((resolve, reject) => {
27 45
         deleteCarouselBatch(data).then(response => {
@@ -31,6 +49,7 @@ const carousel = {
31 49
         })
32 50
       })
33 51
     }
52
+
34 53
   }
35 54
 }
36 55
 

+ 12
- 0
vue-element-admin/src/store/modules/case.js Vedi File

@@ -12,6 +12,7 @@ import {
12 12
   deleteCaseBatch,
13 13
   getCaseDetailById
14 14
 } from '@/api/case'
15
+import { uploadimage } from '@/api/upimage'
15 16
 
16 17
 const servicecase = {
17 18
   namespaced: true,
@@ -142,7 +143,18 @@ const servicecase = {
142 143
           reject(error)
143 144
         })
144 145
       })
146
+    },
147
+
148
+    uploadImage({ commit }, date) {
149
+      return new Promise((resolve, reject) => {
150
+        uploadimage(date).then(response => {
151
+          resolve(response)
152
+        }).catch(error => {
153
+          reject(error)
154
+        })
155
+      })
145 156
     }
157
+
146 158
   }
147 159
 }
148 160
 

+ 2
- 2
vue-element-admin/src/utils/request.js Vedi File

@@ -5,8 +5,8 @@ import { getToken } from '@/utils/auth'
5 5
 
6 6
 // create an axios instance
7 7
 const service = axios.create({
8
-  baseURL: process.env.BASE_API, // api 的 base_url
9
-  timeout: 10000 // request timeout
8
+  baseURL: process.env.BASE_API // api 的 base_url
9
+  // timeout: 10000 // request timeout
10 10
 })
11 11
 
12 12
 service.defaults.withCredentials = true

+ 76
- 0
vue-element-admin/src/utils/uploadImage.js Vedi File

@@ -0,0 +1,76 @@
1
+// import request from './request';
2
+// import apis from '../config/api';
3
+
4
+// export default (file) => {
5
+//   return new Promise((resolve, reject) => {
6
+//     const fm = new FormData()
7
+//     fm.append('file', file)
8
+//     request({
9
+//       ...apis.file.upload,
10
+//       data: fm,
11
+//     }).then((data) => {
12
+//       resolve(data)
13
+//     }).catch((err) => {
14
+//       reject(err.message || err)
15
+//     })
16
+//   })
17
+// }
18
+import axios from 'axios'
19
+import { Message } from 'element-ui'
20
+// import store from '@/store'
21
+// import { getToken } from '@/utils/auth'
22
+
23
+// create an axios instance
24
+const service = axios.create({
25
+  headers: { 'Accept': '*/*' },
26
+  baseURL: process.env.BASE_API, // api 的 base_url
27
+  timeout: 10000 // request timeout
28
+})
29
+
30
+service.defaults.withCredentials = true
31
+
32
+// request interceptor
33
+service.interceptors.request.use(
34
+  config => {
35
+    // Do something before request is sent
36
+    // if (store.getters.token) {
37
+    //   // 让每个请求携带token-- ['X-Token']为自定义key 请根据实际情况自行修改
38
+    //   config.headers['X-Token'] = getToken()
39
+    // }
40
+    return config
41
+  },
42
+  error => {
43
+    // Do something with request error
44
+    console.log(error) // for debug
45
+    Promise.reject(error)
46
+  }
47
+)
48
+
49
+// response interceptor
50
+service.interceptors.response.use(
51
+  response => {
52
+    // console.log('response: ', response)
53
+    const resData = response.data
54
+
55
+    if (resData.code !== '0') {
56
+      Message({
57
+        message: resData.message,
58
+        type: 'error',
59
+        duration: 5 * 1000
60
+      })
61
+    }
62
+    return response
63
+  },
64
+
65
+  error => {
66
+    console.log('err :', error) // for debug
67
+    Message({
68
+      message: error.message,
69
+      type: 'error',
70
+      duration: 5 * 1000
71
+    })
72
+    return Promise.reject(error)
73
+  }
74
+)
75
+
76
+export default service

+ 16
- 13
vue-element-admin/src/views/carousel/edit.vue Vedi File

@@ -3,26 +3,27 @@
3 3
     <el-form ref="form" :model="form">
4 4
       <!-- <el-form-item :label-width="formLabelWidth" label="业务名称">
5 5
         <el-input v-model="form.serviceName"/>
6
-      </el-form-item> -->
6
+      </el-form-item>-->
7 7
       <el-form-item :label-width="formLabelWidth" label="权重">
8
-        <el-input v-model="form.sort"/>
8
+        <el-input v-model="form.sort" />
9 9
       </el-form-item>
10 10
       <el-form-item :label-width="formLabelWidth" label="链接">
11
-        <el-input v-model="form.link"/>
11
+        <el-input v-model="form.link" />
12 12
       </el-form-item>
13 13
       <el-form-item :label-width="formLabelWidth" label="banner图">
14
-        <el-upload
15
-          :action= "uploadImgUrl"
16
-          :show-file-list="false"
17
-          :on-success="handleAvatarSuccess"
18
-          :with-credentials="true"
19
-          class="avatar-uploader"
20
-          name="uploadFiles">
21
-          <img v-if="imageUrl" :src="imageUrl" class="avatar">
22
-          <i v-else class="el-icon-plus avatar-uploader-icon"/>
14
+        <el-upload :action="uploadImgUrl" :show-file-list="false" :on-success="handleAvatarSuccess" :with-credentials="true" class="avatar-uploader" name="uploadFiles">
15
+          <img v-if="imageUrl" :src="imageUrl" class="avatar" >
16
+          <i v-else class="el-icon-plus avatar-uploader-icon" />
23 17
         </el-upload>
24 18
       </el-form-item>
19
+      <el-form-item :label-width="formLabelWidth" label="链接类型">
20
+        <el-select v-model="form.type" placeholder="请选择发布类型">
21
+          <el-option key="case" value="case" label="案例" />
22
+          <el-option key="movement" value="movement" label="动态" />
23
+        </el-select>
24
+      </el-form-item>
25 25
     </el-form>
26
+
26 27
     <div slot="footer" class="dialog-footer">
27 28
       <el-button @click="dialogForm('0')">取 消</el-button>
28 29
       <el-button type="primary" @click="dialogForm('1')">确 定</el-button>
@@ -86,6 +87,7 @@ export default {
86 87
         serviceName: '',
87 88
         sort: '',
88 89
         link: '',
90
+        type: 'case',
89 91
         imageUrl: ''
90 92
       },
91 93
       uploadImgUrl: process.env.BASE_API + 'uploadimage',
@@ -117,6 +119,7 @@ export default {
117 119
       this.form.serviceName = ''
118 120
       this.form.sort = ''
119 121
       this.form.link = ''
122
+      this.form.type = ''
120 123
       this.form.imageUrl = ''
121 124
     },
122 125
     dialogForm(isVaule) {
@@ -177,7 +180,7 @@ export default {
177 180
   overflow: hidden;
178 181
 }
179 182
 .avatar-uploader .el-upload:hover {
180
-  border-color: #409EFF;
183
+  border-color: #409eff;
181 184
 }
182 185
 .avatar-uploader-icon {
183 186
   font-size: 28px;

+ 8
- 3
vue-element-admin/src/views/carousel/index.vue Vedi File

@@ -44,6 +44,11 @@
44 44
           <span>{{ formatDate(scope.row.createTime) }}</span>
45 45
         </template>
46 46
       </el-table-column>
47
+      <el-table-column label="操作" class-name="status-col" align="center">
48
+        <template slot-scope="scope">
49
+          <el-button type="primary" icon="el-icon-edit" @click="toedit(scope.row.id)">修改</el-button>
50
+        </template>
51
+      </el-table-column>
47 52
     </el-table>
48 53
     <div class="block">
49 54
       <el-pagination
@@ -101,7 +106,6 @@ export default {
101 106
     getList() {
102 107
       this.listLoading = true
103 108
       this.$store.dispatch('carousel/getCarouselList', this.listQuery).then((res) => {
104
-        console.log(res)
105 109
         this.carouselList = res.data.data.records
106 110
         this.total = res.data.data.total
107 111
         this.listLoading = false
@@ -234,6 +238,9 @@ export default {
234 238
         }
235 239
       }))
236 240
     },
241
+    toedit(id) {
242
+      this.$router.push({ name: 'carousel-modify', query: { id }})
243
+    },
237 244
     deleteCarousel() { // 删除
238 245
       if (this.ids.length <= 0) {
239 246
         this.$message.error('请至少选择一项')
@@ -252,11 +259,9 @@ export default {
252 259
       })
253 260
     },
254 261
     handleSelectionChange(val) { // 选择
255
-      console.log(val)
256 262
       this.ids = []
257 263
 
258 264
       val.map((item, index) => {
259
-        console.log(item, index)
260 265
         this.ids.push(item.id)
261 266
       })
262 267
     }

+ 204
- 0
vue-element-admin/src/views/carousel/modify.vue Vedi File

@@ -0,0 +1,204 @@
1
+<template>
2
+  <div id="app" class="app-container">
3
+    <el-form ref="form" :model="form">
4
+      <!-- <el-form-item :label-width="formLabelWidth" label="业务名称">
5
+        <el-input v-model="form.serviceName"/>
6
+      </el-form-item>-->
7
+      <el-form-item :label-width="formLabelWidth" label="权重">
8
+        <el-input v-model="form.sort" />
9
+      </el-form-item>
10
+      <el-form-item :label-width="formLabelWidth" label="链接">
11
+        <el-input v-model="form.link" />
12
+      </el-form-item>
13
+      <el-form-item :label-width="formLabelWidth" label="banner图">
14
+        <el-upload :action="uploadImgUrl" :show-file-list="false" :on-success="handleAvatarSuccess" :with-credentials="true" class="avatar-uploader" name="uploadFiles">
15
+          <img v-if="imageUrl" :src="imageUrl" class="avatar" >
16
+          <i v-else class="el-icon-plus avatar-uploader-icon" />
17
+        </el-upload>
18
+      </el-form-item>
19
+      <el-form-item :label-width="formLabelWidth" label="链接类型">
20
+        <el-select v-model="form.type" placeholder="请选择发布类型">
21
+          <el-option key="case" value="case" label="案例" />
22
+          <el-option key="movement" value="movement" label="动态" />
23
+        </el-select>
24
+      </el-form-item>
25
+    </el-form>
26
+    <div slot="footer" class="dialog-footer">
27
+      <el-button @click="dialogForm('0')">取 消</el-button>
28
+      <el-button type="primary" @click="dialogForm('1')">确 定</el-button>
29
+    </div>
30
+  </div>
31
+</template>
32
+
33
+<script>
34
+// import { updateArticle, createBanner } from '@/api/banner' // getBanner
35
+import waves from '@/directive/waves' // Waves directive
36
+import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
37
+const calendarTypeOptions = [
38
+  { key: 'CN', display_name: 'China' },
39
+  { key: 'US', display_name: 'USA' },
40
+  { key: 'JP', display_name: 'Japan' },
41
+  { key: 'EU', display_name: 'Eurozone' }
42
+]
43
+// arr to obj ,such as { CN : "China", US : "USA" }
44
+const calendarTypeKeyValue = calendarTypeOptions.reduce((acc, cur) => {
45
+  acc[cur.key] = cur.display_name
46
+  return acc
47
+}, {})
48
+export default {
49
+  name: 'UpdateBanner',
50
+  components: { Pagination },
51
+  directives: { waves },
52
+  filters: {
53
+    statusFilter(status) {
54
+      const statusMap = {
55
+        published: 'success',
56
+        draft: 'info',
57
+        deleted: 'danger'
58
+      }
59
+      return statusMap[status]
60
+    },
61
+    typeFilter(type) {
62
+      return calendarTypeKeyValue[type]
63
+    }
64
+  },
65
+  data() {
66
+    return {
67
+      tableKey: 0,
68
+      list: null,
69
+      total: 0,
70
+      listLoading: true,
71
+      imageUrl: '', // 图片预览
72
+      importanceOptions: [1, 2, 3],
73
+      calendarTypeOptions,
74
+      communityQuery: {
75
+        pageNum: 1,
76
+        pageSize: 300,
77
+        communityId: undefined,
78
+        communityName: undefined,
79
+        provinceId: undefined,
80
+        cityId: undefined,
81
+        districtId: undefined
82
+      },
83
+      listQuery: [],
84
+      form: {
85
+        id: '',
86
+        serviceName: '',
87
+        sort: '',
88
+        link: '',
89
+        type: 'case',
90
+        imageUrl: ''
91
+      },
92
+      uploadImgUrl: process.env.BASE_API + 'uploadimage',
93
+      dialogStatus: '',
94
+      downloadLoading: false,
95
+      formLabelWidth: '120px',
96
+      showContentVisible: false,
97
+      showURLVisible: true,
98
+      bannerPositionArr: [
99
+        { id: 1, value: '首页banner' },
100
+        { id: 2, value: '服务banner' }
101
+      ]
102
+    }
103
+  },
104
+  computed: {
105
+  },
106
+  created() {
107
+    this.listQuery = this.$route.params.listQuery
108
+  },
109
+  updated() {
110
+  },
111
+  mounted() {
112
+    this.$store.dispatch('carousel/selectCarousel', this.$route.query.id).then((res) => {
113
+      this.imageUrl = res.data.data.imageUrl
114
+
115
+      this.form = res.data.data
116
+    })
117
+  },
118
+  methods: {
119
+    handleAvatarSuccess(res, file) { // 上传成功回调
120
+      this.imageUrl = URL.createObjectURL(file.raw)
121
+      this.form.imageUrl = res.data[0]
122
+    },
123
+    dialogAddForm() {
124
+      this.dialogFormVisible = true
125
+      this.form.serviceName = ''
126
+      this.form.sort = ''
127
+      this.form.link = ''
128
+      this.form.type = ''
129
+      this.form.imageUrl = ''
130
+    },
131
+    dialogForm(isVaule) {
132
+      if (isVaule === '0') {
133
+        this.$router.push({ name: 'carousel-index' })
134
+      } else {
135
+        this.createData()
136
+      }
137
+    },
138
+    showContent() {
139
+      if (this.form.bannerType === '1') {
140
+        this.showContentVisible = false
141
+        this.showURLVisible = true
142
+      } else {
143
+        this.showContentVisible = true
144
+        this.showURLVisible = false
145
+      }
146
+    },
147
+    createData() {
148
+      this.$refs['form'].validate((valid) => {
149
+        if (valid) {
150
+          this.$store.dispatch('carousel/updateCarousel', { id: this.$route.query.id, data: this.form }).then((res) => {
151
+            if (res.data.code === '0') {
152
+              this.$message({
153
+                message: res.data.message,
154
+                type: 'success'
155
+              })
156
+            } else {
157
+              this.$message({
158
+                message: res.data.message,
159
+                type: 'warning'
160
+              })
161
+            }
162
+          })
163
+        }
164
+      })
165
+    }
166
+  }
167
+}
168
+</script>
169
+
170
+<style scoped>
171
+.app-container {
172
+  width: 50%;
173
+  margin: auto;
174
+}
175
+.dialog-footer {
176
+  text-align: center;
177
+}
178
+</style>
179
+<style>
180
+.avatar-uploader .el-upload {
181
+  border: 1px dashed #d9d9d9;
182
+  border-radius: 6px;
183
+  cursor: pointer;
184
+  position: relative;
185
+  overflow: hidden;
186
+}
187
+.avatar-uploader .el-upload:hover {
188
+  border-color: #409eff;
189
+}
190
+.avatar-uploader-icon {
191
+  font-size: 28px;
192
+  color: #8c939d;
193
+  width: 178px;
194
+  height: 178px;
195
+  line-height: 178px;
196
+  text-align: center;
197
+}
198
+.avatar {
199
+  width: 178px;
200
+  height: 178px;
201
+  display: block;
202
+}
203
+</style>
204
+

+ 0
- 2
vue-element-admin/src/views/case/CoverMovement.vue Vedi File

@@ -153,8 +153,6 @@ export default {
153 153
     getCoverImg() {
154 154
       this.$store.dispatch('servicecase/getMovementCover', this.form).then((res) => {
155 155
         if (res.data.code === '0') {
156
-          console.log(res.data.data)
157
-          console.log(res.data.data.length)
158 156
           if (res.data.data.length > 0) {
159 157
             this.imageUrl = res.data.data[0].coverImg
160 158
             this.form.coverImg = res.data.data[0].coverImg

+ 29
- 35
vue-element-admin/src/views/case/add.vue Vedi File

@@ -25,6 +25,13 @@
25 25
           <div slot="tip" class="el-upload__tip">建议上传481*466的图片</div>
26 26
         </el-upload>
27 27
       </el-form-item>
28
+      <el-form-item :label-width="formLabelWidth" label="列表图">
29
+        <el-upload :action="uploadImgUrl" :show-file-list="false" :on-success="handleListUrlSuccess" class="avatar-uploader" name="uploadFiles">
30
+          <img v-if="listUrl" :src="listUrl" class="avatar" >
31
+          <i v-else class="el-icon-plus avatar-uploader-icon" />
32
+          <div slot="tip" class="el-upload__tip">建议上传707*464的图片</div>
33
+        </el-upload>
34
+      </el-form-item>
28 35
       <el-form-item :label-width="formLabelWidth" label="简介">
29 36
         <el-input v-model="form.caseSummary" />
30 37
       </el-form-item>
@@ -51,13 +58,15 @@
51 58
         <el-input v-model="form.caseLink" />
52 59
       </el-form-item>
53 60
 
54
-      <el-form-item :label-width="formLabelWidth" label="是否链接">
61
+      <!-- <el-form-item :label-width="formLabelWidth" label="是否链接">
55 62
         <el-switch v-model="form.islink" active-color="#13ce66" inactive-color="#ff4949" active-value="1" inactive-value="0" />
56
-      </el-form-item>
63
+      </el-form-item> -->
57 64
 
58 65
       <el-form-item>
59 66
         <p class="title">内容</p>
60
-        <div id="websiteEditorElem" style="height: 400px" />
67
+        <Tinymce ref="setcontent" :content="form.content" @fun="success"/>
68
+
69
+        <!-- <div id="websiteEditorElem" style="height: 400px" /> -->
61 70
       </el-form-item>
62 71
       <el-form-item :label-width="formLabelWidth" label="权重">
63 72
         <el-input v-model="form.sort" />
@@ -66,7 +75,7 @@
66 75
         <el-switch v-model="form.topping" active-color="#13ce66" inactive-color="#ff4949" active-value="1" inactive-value="0" />
67 76
       </el-form-item>
68 77
       <el-form-item :label-width="formLabelWidth" label="发布类型">
69
-        <el-select :value="form.type" placeholder="请选择发布类型">
78
+        <el-select v-model="form.type" placeholder="请选择发布类型">
70 79
           <el-option key="case" value="case" label="案例" />
71 80
           <el-option key="movement" value="movement" label="动态" />
72 81
         </el-select>
@@ -83,7 +92,8 @@
83 92
 // import { updateArticle, createBanner } from '@/api/banner' // getBanner
84 93
 import waves from '@/directive/waves' // Waves directive
85 94
 import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
86
-import E from 'wangeditor'
95
+import Tinymce from '@/components/Tinymce' // Secondary package based on el-pagination
96
+// import E from 'wangeditor'
87 97
 const calendarTypeOptions = [
88 98
   { key: 'CN', display_name: 'China' },
89 99
   { key: 'US', display_name: 'USA' },
@@ -97,7 +107,7 @@ const calendarTypeKeyValue = calendarTypeOptions.reduce((acc, cur) => {
97 107
 }, {})
98 108
 export default {
99 109
   name: 'UpdateBanner',
100
-  components: { Pagination },
110
+  components: { Pagination, Tinymce },
101 111
   directives: { waves },
102 112
   filters: {
103 113
     statusFilter(status) {
@@ -122,6 +132,7 @@ export default {
122 132
       logoUrl: '', // 图片预览
123 133
       detailUrl: '',
124 134
       moreUrl: '',
135
+      listUrl: '',
125 136
       importanceOptions: [1, 2, 3],
126 137
       calendarTypeOptions,
127 138
       communityQuery: {
@@ -141,6 +152,7 @@ export default {
141 152
         caseCoverImg: '',
142 153
         caseDetailCoverImg: '',
143 154
         caseMoreCoverImg: '',
155
+        caseListImg: '',
144 156
         caseLogoImg: '',
145 157
         caseSummary: '',
146 158
         caseIndustry: '',
@@ -168,35 +180,7 @@ export default {
168 180
     }
169 181
   },
170 182
   mounted() {
171
-    const _that = this
172
-    const phoneEditor = new E('#websiteEditorElem')
173
-    phoneEditor.customConfig.zIndex = 1
174
-    phoneEditor.customConfig.onchange = function(html) {
175
-      _that.form.content = html
176
-      console.log('that.dynamic.url', _that.form.content)
177
-    }
178
-    // phoneEditor.customConfig.uploadImgServer = this.upFileUrl
179
-    // phoneEditor.customConfig.uploadFileName = 'uploadFiles'
180
-
181
-    phoneEditor.customConfig.customUploadImg = function(files, insert) {
182
-      _that.uploadImg(files[0]).then(data => {
183
-        insert(data)
184
-      })
185
-    }
186
-    phoneEditor.customConfig.menus = [
187
-      'head', // 标题
188
-      'bold', // 粗体
189
-      'fontSize', // 字号
190
-      'fontName', // 字体
191
-      'italic', // 斜体
192
-      'underline', // 下划线
193
-      'strikeThrough', // 删除线
194
-      'foreColor', // 文字颜色
195
-      'backColor', // 背景颜色
196
-      'justify', // 对齐方式
197
-      'image' // 插入图片
198
-    ]
199
-    phoneEditor.create()
183
+    // const _that = this
200 184
   },
201 185
   created() {
202 186
     this.form.type = this.$route.query.type
@@ -219,10 +203,19 @@ export default {
219 203
       this.form.caseMoreCoverImg = res.data[0]
220 204
     },
221 205
 
206
+    handleListUrlSuccess(res, file) { // 上传成功回调
207
+      this.listUrl = URL.createObjectURL(file.raw)
208
+      this.form.listImg = res.data[0]
209
+    },
210
+
222 211
     handleLogoSuccess(res, file) { // 上传成功回调
223 212
       this.logoUrl = URL.createObjectURL(file.raw)
224 213
       this.form.caseLogoImg = res.data[0]
225 214
     },
215
+
216
+    success: function(res) {
217
+      this.form.content = res
218
+    },
226 219
     dialogAddForm() {
227 220
       this.dialogFormVisible = true
228 221
       this.form.serviceName = ''
@@ -250,6 +243,7 @@ export default {
250 243
       this.$refs['form'].validate((valid) => {
251 244
         if (valid) {
252 245
           this.form.labelList = this.dynamicTags
246
+
253 247
           this.$store.dispatch('servicecase/createCase', this.form).then((res) => {
254 248
             if (res.data.code === '0') {
255 249
               this.$message({

+ 0
- 2
vue-element-admin/src/views/case/cover.vue Vedi File

@@ -154,8 +154,6 @@ export default {
154 154
     getCoverImg() {
155 155
       this.$store.dispatch('servicecase/getCaseCover', this.form).then((res) => {
156 156
         if (res.data.code === '0') {
157
-          console.log(res.data.data)
158
-          console.log(res.data.data.length)
159 157
           if (res.data.data.length > 0) {
160 158
             this.imageUrl = res.data.data[0].coverImg
161 159
             this.form.coverImg = res.data.data[0].coverImg

+ 46
- 39
vue-element-admin/src/views/case/edit.vue Vedi File

@@ -27,6 +27,14 @@
27 27
         </el-upload>
28 28
       </el-form-item>
29 29
 
30
+      <el-form-item :label-width="formLabelWidth" label="列表图">
31
+        <el-upload :action="uploadImgUrl" :show-file-list="false" :on-success="handleListUrlSuccess" class="avatar-uploader" name="uploadFiles">
32
+          <img v-if="listUrl" :src="listUrl" class="avatar" >
33
+          <i v-else class="el-icon-plus avatar-uploader-icon" />
34
+          <div slot="tip" class="el-upload__tip">建议上传707*464的图片</div>
35
+        </el-upload>
36
+      </el-form-item>
37
+
30 38
       <el-form-item :label-width="formLabelWidth" label="简介">
31 39
         <el-input v-model="form.caseSummary" />
32 40
       </el-form-item>
@@ -35,7 +43,7 @@
35 43
           <el-option v-for="item in caseTypeList" :key="item.id" :value="item.id" :label="item.typeName" />
36 44
         </el-select>
37 45
       </el-form-item>
38
-      <el-form-item v-if="form.type == 'case'" :label-width="formLabelWidth" label="案例客户方logo">
46
+      <el-form-item :label-width="formLabelWidth" label="案例客户方logo">
39 47
         <el-upload :action="uploadImgUrl" :show-file-list="false" :on-success="handleLogoSuccess" class="avatar-uploader" name="uploadFiles">
40 48
           <img v-if="logoUrl" :src="logoUrl" class="avatar" >
41 49
           <i v-else class="el-icon-plus avatar-uploader-icon" />
@@ -44,12 +52,16 @@
44 52
       <el-form-item :label-width="formLabelWidth" label="所属行业">
45 53
         <el-input v-model="form.caseIndustry" />
46 54
       </el-form-item>
55
+      <el-form-item :label-width="formLabelWidth" label="链接名称">
56
+        <el-input v-model="form.linkName" />
57
+      </el-form-item>
47 58
       <el-form-item :label-width="formLabelWidth" label="分享链接">
48 59
         <el-input v-model="form.caseLink" />
49 60
       </el-form-item>
50 61
       <el-form-item>
51 62
         <p class="title">内容</p>
52
-        <div id="websiteEditorElem" style="height: 400px" />
63
+        <Tinymce ref="setcontent" :content="form.content" @fun="success"/>
64
+        <!-- <div id="websiteEditorElem" style="height: 400px" /> -->
53 65
       </el-form-item>
54 66
       <el-form-item :label-width="formLabelWidth" label="权重">
55 67
         <el-input v-model="form.sort" />
@@ -58,7 +70,7 @@
58 70
         <el-switch v-model="form.topping" :active-value="1" :inactive-value="0" active-color="#13ce66" inactive-color="#ff4949" />
59 71
       </el-form-item>
60 72
       <el-form-item :label-width="formLabelWidth" label="发布类型">
61
-        <el-select :value="form.type" placeholder="请选择发布类型">
73
+        <el-select v-model="form.type" placeholder="请选择发布类型">
62 74
           <el-option key="case" value="case" label="案例" />
63 75
           <el-option key="movement" value="movement" label="动态" />
64 76
         </el-select>
@@ -75,7 +87,8 @@
75 87
 // import { updateArticle, createBanner } from '@/api/banner' // getBanner
76 88
 import waves from '@/directive/waves' // Waves directive
77 89
 import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
78
-import E from 'wangeditor'
90
+import Tinymce from '@/components/Tinymce' // Secondary package based on el-pagination
91
+
79 92
 const calendarTypeOptions = [
80 93
   { key: 'CN', display_name: 'China' },
81 94
   { key: 'US', display_name: 'USA' },
@@ -89,7 +102,7 @@ const calendarTypeKeyValue = calendarTypeOptions.reduce((acc, cur) => {
89 102
 }, {})
90 103
 export default {
91 104
   name: 'UpdateBanner',
92
-  components: { Pagination },
105
+  components: { Pagination, Tinymce },
93 106
   directives: { waves },
94 107
   filters: {
95 108
     statusFilter(status) {
@@ -114,6 +127,7 @@ export default {
114 127
       logoUrl: '', // 图片预览
115 128
       detailUrl: '',
116 129
       moreUrl: '',
130
+      listUrl: '',
117 131
       importanceOptions: [1, 2, 3],
118 132
       calendarTypeOptions,
119 133
       communityQuery: {
@@ -134,11 +148,15 @@ export default {
134 148
         caseLogoImg: '',
135 149
         caseSummary: '',
136 150
         caseIndustry: '',
151
+        linkName: '',
137 152
         caseLink: '',
138 153
         topping: 0,
139 154
         content: '',
140 155
         type: 'case',
141
-        caseDetailCoverImg: ''
156
+
157
+        caseDetailCoverImg: '',
158
+        caseMoreCoverImg: '',
159
+        listImg: ''
142 160
       },
143 161
       uploadImgUrl: process.env.BASE_API + 'uploadimage',
144 162
       dialogStatus: '',
@@ -157,43 +175,17 @@ export default {
157 175
     }
158 176
   },
159 177
   mounted() {
160
-    const _that = this
161
-    const phoneEditor = new E('#websiteEditorElem')
162
-    phoneEditor.customConfig.zIndex = 1
163
-    phoneEditor.customConfig.onchange = function(html) {
164
-      _that.form.content = html
165
-      console.log('that.dynamic.url', _that.form.content)
166
-    }
167
-    // phoneEditor.customConfig.uploadImgServer = this.upFileUrl
168
-    // phoneEditor.customConfig.uploadFileName = 'uploadFiles'
169
-
170
-    phoneEditor.customConfig.customUploadImg = function(files, insert) {
171
-      _that.uploadImg(files[0]).then(data => {
172
-        insert(data)
173
-      })
174
-    }
175
-    phoneEditor.customConfig.menus = [
176
-      'head', // 标题
177
-      'bold', // 粗体
178
-      'fontSize', // 字号
179
-      'fontName', // 字体
180
-      'italic', // 斜体
181
-      'underline', // 下划线
182
-      'strikeThrough', // 删除线
183
-      'foreColor', // 文字颜色
184
-      'backColor', // 背景颜色
185
-      'justify', // 对齐方式
186
-      'image' // 插入图片
187
-    ]
188
-    phoneEditor.create()
178
+    // const _that = this
189 179
 
190 180
     this.$store.dispatch('servicecase/getCaseDetail', this.$route.query.id).then((res) => {
191 181
       if (res.data.code === '0') {
192
-        console.log(res.data.data, '-----')
193 182
         this.imageUrl = res.data.data.caseCoverImg
194 183
         this.logoUrl = res.data.data.caseLogoImg
184
+
185
+        this.detailUrl = res.data.data.caseDetailCoverImg
186
+        this.moreUrl = res.data.data.caseMoreCoverImg
187
+        this.listUrl = res.data.data.listImg
195 188
         this.form = res.data.data
196
-        phoneEditor.txt.html(res.data.data.content)
197 189
       } else {
198 190
         this.$message({
199 191
           message: res.data.message,
@@ -222,11 +214,22 @@ export default {
222 214
       this.moreUrl = URL.createObjectURL(file.raw)
223 215
       this.form.caseMoreCoverImg = res.data[0]
224 216
     },
217
+    handleListUrlSuccess(res, file) { // 上传成功回调
218
+      this.listUrl = URL.createObjectURL(file.raw)
219
+      this.form.listImg = res.data[0]
220
+    },
225 221
 
226 222
     handleLogoSuccess(res, file) { // 上传成功回调
227 223
       this.logoUrl = URL.createObjectURL(file.raw)
228 224
       this.form.caseLogoImg = res.data[0]
229 225
     },
226
+    success: function(res) {
227
+      this.form.content = res
228
+    },
229
+    //     success(res){
230
+    //
231
+    // // this.form.content = this.$refs.setcontent.contents
232
+    //     },
230 233
     dialogAddForm() {
231 234
       this.dialogFormVisible = true
232 235
       this.form.serviceName = ''
@@ -250,10 +253,14 @@ export default {
250 253
         this.showURLVisible = false
251 254
       }
252 255
     },
256
+    getContent() {
257
+      this.form.content = this.$refs.setcontent.content
258
+    },
253 259
     createData() {
254 260
       this.$refs['form'].validate((valid) => {
255 261
         if (valid) {
256 262
           this.form.labelList = this.dynamicTags
263
+
257 264
           this.$store.dispatch('servicecase/createCase', this.form).then((res) => {
258 265
             if (res.data.code === '0') {
259 266
               this.$message({
@@ -261,7 +268,7 @@ export default {
261 268
                 type: 'success'
262 269
               })
263 270
               // this.$router.push({ name: 'case-index' })
264
-              this.$router.go(-1)
271
+              // this.$router.go(-1)
265 272
             } else {
266 273
               this.$message({
267 274
                 message: res.data.message,
@@ -275,11 +282,11 @@ export default {
275 282
     getCaseDetail(id) {
276 283
       this.$store.dispatch('servicecase/getCaseDetail', id).then((res) => {
277 284
         if (res.data.code === '0') {
278
-          console.log(res.data.data)
279 285
           this.imageUrl = res.data.data.caseCoverImg
280 286
           this.logoUrl = res.data.data.caseLogoImg
281 287
           this.detailUrl = res.data.data.caseDetailCoverImg
282 288
           this.moreUrl = res.data.data.caseMoreCoverImg
289
+          this.listUrl = res.data.data.listImg
283 290
           this.form = res.data.data
284 291
         } else {
285 292
           this.$message({

+ 0
- 2
vue-element-admin/src/views/case/index.vue Vedi File

@@ -282,11 +282,9 @@ export default {
282 282
       })
283 283
     },
284 284
     handleSelectionChange(val) { // 选择
285
-      console.log(val)
286 285
       this.ids = []
287 286
 
288 287
       val.map((item, index) => {
289
-        console.log(item, index)
290 288
         this.ids.push(item.id)
291 289
       })
292 290
     }

+ 0
- 2
vue-element-admin/src/views/case/movement.vue Vedi File

@@ -277,11 +277,9 @@ export default {
277 277
       })
278 278
     },
279 279
     handleSelectionChange(val) { // 选择
280
-      console.log(val)
281 280
       this.ids = []
282 281
 
283 282
       val.map((item, index) => {
284
-        console.log(item, index)
285 283
         this.ids.push(item.id)
286 284
       })
287 285
     }

+ 0
- 1
vue-element-admin/src/views/case/servicecase/index.vue Vedi File

@@ -102,7 +102,6 @@ export default {
102 102
     getList() {
103 103
       this.listLoading = true
104 104
       this.$store.dispatch('servicecase/getServiceCaseList', this.listQuery).then((res) => {
105
-        console.log(res)
106 105
         this.serviceCaseList = res.data.data.records
107 106
         this.total = res.data.data.total
108 107
         this.listLoading = false

+ 0
- 1
vue-element-admin/src/views/partner/index.vue Vedi File

@@ -101,7 +101,6 @@ export default {
101 101
     getList() {
102 102
       this.listLoading = true
103 103
       this.$store.dispatch('partner/getPartnerList', this.listQuery).then((res) => {
104
-        console.log(res)
105 104
         this.partnerList = res.data.data.records
106 105
         this.total = res.data.data.total
107 106
         this.listLoading = false

+ 0
- 1
vue-element-admin/src/views/service/index.vue Vedi File

@@ -102,7 +102,6 @@ export default {
102 102
     getList() {
103 103
       this.listLoading = true
104 104
       this.$store.dispatch('service/getServiceList', this.listQuery).then((res) => {
105
-        console.log(res)
106 105
         this.serviceList = res.data.data.records
107 106
         this.total = res.data.data.total
108 107
         this.listLoading = false

vue-element-admin/static/tinymce4.7.5/langs/zh_CN.js → vue-element-admin/static/tinymce/langs/zh_CN.js Vedi File

@@ -1,230 +1,389 @@
1 1
 tinymce.addI18n('zh_CN',{
2
+"Redo": "\u91cd\u505a",
3
+"Undo": "\u64a4\u9500",
2 4
 "Cut": "\u526a\u5207",
3
-"Heading 5": "\u6807\u98985",
4
-"Header 2": "\u6807\u98982",
5
-"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "\u4f60\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u5bf9\u526a\u8d34\u677f\u7684\u8bbf\u95ee\uff0c\u8bf7\u4f7f\u7528Ctrl+X\/C\/V\u952e\u8fdb\u884c\u590d\u5236\u7c98\u8d34\u3002",
6
-"Heading 4": "\u6807\u98984",
7
-"Div": "Div\u533a\u5757",
8
-"Heading 2": "\u6807\u98982",
5
+"Copy": "\u590d\u5236",
9 6
 "Paste": "\u7c98\u8d34",
10
-"Close": "\u5173\u95ed",
11
-"Font Family": "\u5b57\u4f53",
12
-"Pre": "\u9884\u683c\u5f0f\u6587\u672c",
13
-"Align right": "\u53f3\u5bf9\u9f50",
14
-"New document": "\u65b0\u6587\u6863",
15
-"Blockquote": "\u5f15\u7528",
7
+"Select all": "\u5168\u9009",
8
+"New document": "\u65b0\u6587\u4ef6",
9
+"Ok": "\u786e\u5b9a",
10
+"Cancel": "\u53d6\u6d88",
11
+"Visual aids": "\u7f51\u683c\u7ebf",
12
+"Bold": "\u7c97\u4f53",
13
+"Italic": "\u659c\u4f53",
14
+"Underline": "\u4e0b\u5212\u7ebf",
15
+"Strikethrough": "\u5220\u9664\u7ebf",
16
+"Superscript": "\u4e0a\u6807",
17
+"Subscript": "\u4e0b\u6807",
18
+"Clear formatting": "\u6e05\u9664\u683c\u5f0f",
19
+"Align left": "\u5de6\u8fb9\u5bf9\u9f50",
20
+"Align center": "\u4e2d\u95f4\u5bf9\u9f50",
21
+"Align right": "\u53f3\u8fb9\u5bf9\u9f50",
22
+"Justify": "\u4e24\u7aef\u5bf9\u9f50",
23
+"Bullet list": "\u9879\u76ee\u7b26\u53f7",
16 24
 "Numbered list": "\u7f16\u53f7\u5217\u8868",
17
-"Heading 1": "\u6807\u98981",
18
-"Headings": "\u6807\u9898",
25
+"Decrease indent": "\u51cf\u5c11\u7f29\u8fdb",
19 26
 "Increase indent": "\u589e\u52a0\u7f29\u8fdb",
27
+"Close": "\u5173\u95ed",
20 28
 "Formats": "\u683c\u5f0f",
29
+"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "\u4f60\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u6253\u5f00\u526a\u8d34\u677f\uff0c\u8bf7\u4f7f\u7528Ctrl+X\/C\/V\u7b49\u5feb\u6377\u952e\u3002",
21 30
 "Headers": "\u6807\u9898",
22
-"Select all": "\u5168\u9009",
23
-"Header 3": "\u6807\u98983",
24
-"Blocks": "\u533a\u5757",
25
-"Undo": "\u64a4\u6d88",
26
-"Strikethrough": "\u5220\u9664\u7ebf",
27
-"Bullet list": "\u9879\u76ee\u7b26\u53f7",
28 31
 "Header 1": "\u6807\u98981",
29
-"Superscript": "\u4e0a\u6807",
30
-"Clear formatting": "\u6e05\u9664\u683c\u5f0f",
31
-"Font Sizes": "\u5b57\u53f7",
32
-"Subscript": "\u4e0b\u6807",
33
-"Header 6": "\u6807\u98986",
34
-"Redo": "\u91cd\u590d",
35
-"Paragraph": "\u6bb5\u843d",
36
-"Ok": "\u786e\u5b9a",
37
-"Bold": "\u7c97\u4f53",
38
-"Code": "\u4ee3\u7801",
39
-"Italic": "\u659c\u4f53",
40
-"Align center": "\u5c45\u4e2d",
32
+"Header 2": "\u6807\u98982",
33
+"Header 3": "\u6807\u98983",
34
+"Header 4": "\u6807\u98984",
41 35
 "Header 5": "\u6807\u98985",
42
-"Heading 6": "\u6807\u98986",
36
+"Header 6": "\u6807\u98986",
37
+"Headings": "\u6807\u9898",
38
+"Heading 1": "\u6807\u98981",
39
+"Heading 2": "\u6807\u98982",
43 40
 "Heading 3": "\u6807\u98983",
44
-"Decrease indent": "\u51cf\u5c11\u7f29\u8fdb",
45
-"Header 4": "\u6807\u98984",
46
-"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "\u5f53\u524d\u4e3a\u7eaf\u6587\u672c\u7c98\u8d34\u6a21\u5f0f\uff0c\u518d\u6b21\u70b9\u51fb\u53ef\u4ee5\u56de\u5230\u666e\u901a\u7c98\u8d34\u6a21\u5f0f\u3002",
47
-"Underline": "\u4e0b\u5212\u7ebf",
48
-"Cancel": "\u53d6\u6d88",
49
-"Justify": "\u4e24\u7aef\u5bf9\u9f50",
41
+"Heading 4": "\u6807\u98984",
42
+"Heading 5": "\u6807\u98985",
43
+"Heading 6": "\u6807\u98986",
44
+"Preformatted": "\u9884\u5148\u683c\u5f0f\u5316\u7684",
45
+"Div": "Div",
46
+"Pre": "Pre",
47
+"Code": "\u4ee3\u7801",
48
+"Paragraph": "\u6bb5\u843d",
49
+"Blockquote": "\u5f15\u6587\u533a\u5757",
50 50
 "Inline": "\u6587\u672c",
51
-"Copy": "\u590d\u5236",
52
-"Align left": "\u5de6\u5bf9\u9f50",
53
-"Visual aids": "\u7f51\u683c\u7ebf",
54
-"Lower Greek": "\u5c0f\u5199\u5e0c\u814a\u5b57\u6bcd",
55
-"Square": "\u65b9\u5757",
51
+"Blocks": "\u57fa\u5757",
52
+"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "\u5f53\u524d\u4e3a\u7eaf\u6587\u672c\u7c98\u8d34\u6a21\u5f0f\uff0c\u518d\u6b21\u70b9\u51fb\u53ef\u4ee5\u56de\u5230\u666e\u901a\u7c98\u8d34\u6a21\u5f0f\u3002",
53
+"Fonts": "\u5b57\u4f53",
54
+"Font Sizes": "\u5b57\u53f7",
55
+"Class": "\u7c7b\u578b",
56
+"Browse for an image": "\u6d4f\u89c8\u56fe\u50cf",
57
+"OR": "\u6216",
58
+"Drop an image here": "\u62d6\u653e\u4e00\u5f20\u56fe\u50cf\u81f3\u6b64",
59
+"Upload": "\u4e0a\u4f20",
60
+"Block": "\u5757",
61
+"Align": "\u5bf9\u9f50",
56 62
 "Default": "\u9ed8\u8ba4",
57
-"Lower Alpha": "\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd",
58 63
 "Circle": "\u7a7a\u5fc3\u5706",
59 64
 "Disc": "\u5b9e\u5fc3\u5706",
65
+"Square": "\u65b9\u5757",
66
+"Lower Alpha": "\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd",
67
+"Lower Greek": "\u5c0f\u5199\u5e0c\u814a\u5b57\u6bcd",
68
+"Lower Roman": "\u5c0f\u5199\u7f57\u9a6c\u5b57\u6bcd",
60 69
 "Upper Alpha": "\u5927\u5199\u82f1\u6587\u5b57\u6bcd",
61 70
 "Upper Roman": "\u5927\u5199\u7f57\u9a6c\u5b57\u6bcd",
62
-"Lower Roman": "\u5c0f\u5199\u7f57\u9a6c\u5b57\u6bcd",
63
-"Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.": "\u6807\u8bc6\u7b26\u5e94\u8be5\u4ee5\u5b57\u6bcd\u5f00\u5934\uff0c\u540e\u8ddf\u5b57\u6bcd\u3001\u6570\u5b57\u3001\u7834\u6298\u53f7\u3001\u70b9\u3001\u5192\u53f7\u6216\u4e0b\u5212\u7ebf\u3002",
71
+"Anchor...": "\u951a\u70b9...",
64 72
 "Name": "\u540d\u79f0",
65
-"Anchor": "\u951a\u70b9",
66 73
 "Id": "\u6807\u8bc6\u7b26",
74
+"Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.": "\u6807\u8bc6\u7b26\u5e94\u8be5\u4ee5\u5b57\u6bcd\u5f00\u5934\uff0c\u540e\u8ddf\u5b57\u6bcd\u3001\u6570\u5b57\u3001\u7834\u6298\u53f7\u3001\u70b9\u3001\u5192\u53f7\u6216\u4e0b\u5212\u7ebf\u3002",
67 75
 "You have unsaved changes are you sure you want to navigate away?": "\u4f60\u8fd8\u6709\u6587\u6863\u5c1a\u672a\u4fdd\u5b58\uff0c\u786e\u5b9a\u8981\u79bb\u5f00\uff1f",
68 76
 "Restore last draft": "\u6062\u590d\u4e0a\u6b21\u7684\u8349\u7a3f",
69
-"Special character": "\u7279\u6b8a\u7b26\u53f7",
77
+"Special characters...": "\u7279\u6b8a\u5b57\u7b26...",
70 78
 "Source code": "\u6e90\u4ee3\u7801",
71
-"Language": "\u8bed\u8a00",
72 79
 "Insert\/Edit code sample": "\u63d2\u5165\/\u7f16\u8f91\u4ee3\u7801\u793a\u4f8b",
73
-"B": "B",
80
+"Language": "\u8bed\u8a00",
81
+"Code sample...": "\u793a\u4f8b\u4ee3\u7801...",
82
+"Color Picker": "\u9009\u8272\u5668",
74 83
 "R": "R",
75 84
 "G": "G",
76
-"Color": "\u989c\u8272",
77
-"Right to left": "\u4ece\u53f3\u5230\u5de6",
85
+"B": "B",
78 86
 "Left to right": "\u4ece\u5de6\u5230\u53f3",
79
-"Emoticons": "\u8868\u60c5",
80
-"Robots": "\u673a\u5668\u4eba",
81
-"Document properties": "\u6587\u6863\u5c5e\u6027",
87
+"Right to left": "\u4ece\u53f3\u5230\u5de6",
88
+"Emoticons...": "\u8868\u60c5\u7b26\u53f7...",
89
+"Metadata and Document Properties": "\u5143\u6570\u636e\u548c\u6587\u6863\u5c5e\u6027",
82 90
 "Title": "\u6807\u9898",
83 91
 "Keywords": "\u5173\u952e\u8bcd",
84
-"Encoding": "\u7f16\u7801",
85 92
 "Description": "\u63cf\u8ff0",
93
+"Robots": "\u673a\u5668\u4eba",
86 94
 "Author": "\u4f5c\u8005",
95
+"Encoding": "\u7f16\u7801",
87 96
 "Fullscreen": "\u5168\u5c4f",
97
+"Action": "\u64cd\u4f5c",
98
+"Shortcut": "\u5feb\u6377\u952e",
99
+"Help": "\u5e2e\u52a9",
100
+"Address": "\u5730\u5740",
101
+"Focus to menubar": "\u79fb\u52a8\u7126\u70b9\u5230\u83dc\u5355\u680f",
102
+"Focus to toolbar": "\u79fb\u52a8\u7126\u70b9\u5230\u5de5\u5177\u680f",
103
+"Focus to element path": "\u79fb\u52a8\u7126\u70b9\u5230\u5143\u7d20\u8def\u5f84",
104
+"Focus to contextual toolbar": "\u79fb\u52a8\u7126\u70b9\u5230\u4e0a\u4e0b\u6587\u83dc\u5355",
105
+"Insert link (if link plugin activated)": "\u63d2\u5165\u94fe\u63a5 (\u5982\u679c\u94fe\u63a5\u63d2\u4ef6\u5df2\u6fc0\u6d3b)",
106
+"Save (if save plugin activated)": "\u4fdd\u5b58(\u5982\u679c\u4fdd\u5b58\u63d2\u4ef6\u5df2\u6fc0\u6d3b)",
107
+"Find (if searchreplace plugin activated)": "\u67e5\u627e(\u5982\u679c\u67e5\u627e\u66ff\u6362\u63d2\u4ef6\u5df2\u6fc0\u6d3b)",
108
+"Plugins installed ({0}):": "\u5df2\u5b89\u88c5\u63d2\u4ef6 ({0}):",
109
+"Premium plugins:": "\u4f18\u79c0\u63d2\u4ef6\uff1a",
110
+"Learn more...": "\u4e86\u89e3\u66f4\u591a...",
111
+"You are using {0}": "\u4f60\u6b63\u5728\u4f7f\u7528 {0}",
112
+"Plugins": "\u63d2\u4ef6",
113
+"Handy Shortcuts": "\u5feb\u6377\u952e",
88 114
 "Horizontal line": "\u6c34\u5e73\u5206\u5272\u7ebf",
89
-"Horizontal space": "\u6c34\u5e73\u8fb9\u8ddd",
90 115
 "Insert\/edit image": "\u63d2\u5165\/\u7f16\u8f91\u56fe\u7247",
91
-"General": "\u666e\u901a",
92
-"Advanced": "\u9ad8\u7ea7",
116
+"Image description": "\u56fe\u7247\u63cf\u8ff0",
93 117
 "Source": "\u5730\u5740",
94
-"Border": "\u8fb9\u6846",
118
+"Dimensions": "\u5927\u5c0f",
95 119
 "Constrain proportions": "\u4fdd\u6301\u7eb5\u6a2a\u6bd4",
96
-"Vertical space": "\u5782\u76f4\u8fb9\u8ddd",
97
-"Image description": "\u56fe\u7247\u63cf\u8ff0",
120
+"General": "\u666e\u901a",
121
+"Advanced": "\u9ad8\u7ea7",
98 122
 "Style": "\u6837\u5f0f",
99
-"Dimensions": "\u5927\u5c0f",
123
+"Vertical space": "\u5782\u76f4\u8fb9\u8ddd",
124
+"Horizontal space": "\u6c34\u5e73\u8fb9\u8ddd",
125
+"Border": "\u8fb9\u6846",
100 126
 "Insert image": "\u63d2\u5165\u56fe\u7247",
101
-"Image": "\u56fe\u7247",
102
-"Zoom in": "\u653e\u5927",
103
-"Contrast": "\u5bf9\u6bd4\u5ea6",
104
-"Back": "\u540e\u9000",
105
-"Gamma": "\u4f3d\u9a6c\u503c",
106
-"Flip horizontally": "\u6c34\u5e73\u7ffb\u8f6c",
107
-"Resize": "\u8c03\u6574\u5927\u5c0f",
108
-"Sharpen": "\u9510\u5316",
109
-"Zoom out": "\u7f29\u5c0f",
110
-"Image options": "\u56fe\u7247\u9009\u9879",
111
-"Apply": "\u5e94\u7528",
112
-"Brightness": "\u4eae\u5ea6",
113
-"Rotate clockwise": "\u987a\u65f6\u9488\u65cb\u8f6c",
127
+"Image...": "\u56fe\u7247...",
128
+"Image list": "\u56fe\u7247\u5217\u8868",
114 129
 "Rotate counterclockwise": "\u9006\u65f6\u9488\u65cb\u8f6c",
130
+"Rotate clockwise": "\u987a\u65f6\u9488\u65cb\u8f6c",
131
+"Flip vertically": "\u5782\u76f4\u7ffb\u8f6c",
132
+"Flip horizontally": "\u6c34\u5e73\u7ffb\u8f6c",
115 133
 "Edit image": "\u7f16\u8f91\u56fe\u7247",
116
-"Color levels": "\u989c\u8272\u5c42\u6b21",
134
+"Image options": "\u56fe\u7247\u9009\u9879",
135
+"Zoom in": "\u653e\u5927",
136
+"Zoom out": "\u7f29\u5c0f",
117 137
 "Crop": "\u88c1\u526a",
138
+"Resize": "\u8c03\u6574\u5927\u5c0f",
118 139
 "Orientation": "\u65b9\u5411",
119
-"Flip vertically": "\u5782\u76f4\u7ffb\u8f6c",
140
+"Brightness": "\u4eae\u5ea6",
141
+"Sharpen": "\u9510\u5316",
142
+"Contrast": "\u5bf9\u6bd4\u5ea6",
143
+"Color levels": "\u989c\u8272\u5c42\u6b21",
144
+"Gamma": "\u4f3d\u9a6c\u503c",
120 145
 "Invert": "\u53cd\u8f6c",
121
-"Date\/time": "\u65e5\u671f\/\u65f6\u95f4",
146
+"Apply": "\u5e94\u7528",
147
+"Back": "\u540e\u9000",
122 148
 "Insert date\/time": "\u63d2\u5165\u65e5\u671f\/\u65f6\u95f4",
123
-"Remove link": "\u5220\u9664\u94fe\u63a5",
124
-"Url": "\u5730\u5740",
149
+"Date\/time": "\u65e5\u671f\/\u65f6\u95f4",
150
+"Insert\/Edit Link": "\u63d2\u5165\/\u7f16\u8f91\u94fe\u63a5",
151
+"Insert\/edit link": "\u63d2\u5165\/\u7f16\u8f91\u94fe\u63a5",
125 152
 "Text to display": "\u663e\u793a\u6587\u5b57",
126
-"Anchors": "\u951a\u70b9",
127
-"Insert link": "\u63d2\u5165\u94fe\u63a5",
128
-"Link": "\u94fe\u63a5",
129
-"New window": "\u5728\u65b0\u7a97\u53e3\u6253\u5f00",
153
+"Url": "\u5730\u5740",
154
+"Open link in...": "\u94fe\u63a5\u6253\u5f00\u4f4d\u7f6e...",
155
+"Current window": "\u5f53\u524d\u7a97\u53e3",
130 156
 "None": "\u65e0",
131
-"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "\u4f60\u6240\u586b\u5199\u7684URL\u5730\u5740\u5c5e\u4e8e\u5916\u90e8\u94fe\u63a5\uff0c\u9700\u8981\u52a0\u4e0ahttp:\/\/:\u524d\u7f00\u5417\uff1f",
157
+"New window": "\u5728\u65b0\u7a97\u53e3\u6253\u5f00",
158
+"Remove link": "\u5220\u9664\u94fe\u63a5",
159
+"Anchors": "\u951a\u70b9",
160
+"Link...": "\u94fe\u63a5...",
132 161
 "Paste or type a link": "\u7c98\u8d34\u6216\u8f93\u5165\u94fe\u63a5",
133
-"Target": "\u6253\u5f00\u65b9\u5f0f",
134 162
 "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "\u4f60\u6240\u586b\u5199\u7684URL\u5730\u5740\u4e3a\u90ae\u4ef6\u5730\u5740\uff0c\u9700\u8981\u52a0\u4e0amailto:\u524d\u7f00\u5417\uff1f",
135
-"Insert\/edit link": "\u63d2\u5165\/\u7f16\u8f91\u94fe\u63a5",
163
+"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "\u4f60\u6240\u586b\u5199\u7684URL\u5730\u5740\u5c5e\u4e8e\u5916\u90e8\u94fe\u63a5\uff0c\u9700\u8981\u52a0\u4e0ahttp:\/\/:\u524d\u7f00\u5417\uff1f",
164
+"Link list": "\u94fe\u63a5\u5217\u8868",
165
+"Insert video": "\u63d2\u5165\u89c6\u9891",
136 166
 "Insert\/edit video": "\u63d2\u5165\/\u7f16\u8f91\u89c6\u9891",
137
-"Media": "\u5a92\u4f53",
167
+"Insert\/edit media": "\u63d2\u5165\/\u7f16\u8f91\u5a92\u4f53",
138 168
 "Alternative source": "\u955c\u50cf",
169
+"Alternative source URL": "\u66ff\u4ee3\u6765\u6e90\u7f51\u5740",
170
+"Media poster (Image URL)": "\u5c01\u9762(\u56fe\u7247\u5730\u5740)",
139 171
 "Paste your embed code below:": "\u5c06\u5185\u5d4c\u4ee3\u7801\u7c98\u8d34\u5728\u4e0b\u9762:",
140
-"Insert video": "\u63d2\u5165\u89c6\u9891",
141
-"Poster": "\u5c01\u9762",
142
-"Insert\/edit media": "\u63d2\u5165\/\u7f16\u8f91\u5a92\u4f53",
143 172
 "Embed": "\u5185\u5d4c",
173
+"Media...": "\u591a\u5a92\u4f53...",
144 174
 "Nonbreaking space": "\u4e0d\u95f4\u65ad\u7a7a\u683c",
145 175
 "Page break": "\u5206\u9875\u7b26",
146 176
 "Paste as text": "\u7c98\u8d34\u4e3a\u6587\u672c",
147 177
 "Preview": "\u9884\u89c8",
148
-"Print": "\u6253\u5370",
178
+"Print...": "\u6253\u5370...",
149 179
 "Save": "\u4fdd\u5b58",
150
-"Could not find the specified string.": "\u672a\u627e\u5230\u641c\u7d22\u5185\u5bb9.",
151
-"Replace": "\u66ff\u6362",
152
-"Next": "\u4e0b\u4e00\u4e2a",
153
-"Whole words": "\u5168\u5b57\u5339\u914d",
154
-"Find and replace": "\u67e5\u627e\u548c\u66ff\u6362",
155
-"Replace with": "\u66ff\u6362\u4e3a",
156 180
 "Find": "\u67e5\u627e",
181
+"Replace with": "\u66ff\u6362\u4e3a",
182
+"Replace": "\u66ff\u6362",
157 183
 "Replace all": "\u5168\u90e8\u66ff\u6362",
184
+"Previous": "\u4e0a\u4e00\u4e2a",
185
+"Next": "\u4e0b\u4e00\u4e2a",
186
+"Find and replace...": "\u67e5\u627e\u5e76\u66ff\u6362...",
187
+"Could not find the specified string.": "\u672a\u627e\u5230\u641c\u7d22\u5185\u5bb9.",
158 188
 "Match case": "\u533a\u5206\u5927\u5c0f\u5199",
159
-"Prev": "\u4e0a\u4e00\u4e2a",
160
-"Spellcheck": "\u62fc\u5199\u68c0\u67e5",
161
-"Finish": "\u5b8c\u6210",
162
-"Ignore all": "\u5168\u90e8\u5ffd\u7565",
189
+"Find whole words only": "\u5168\u5b57\u5339\u914d",
190
+"Spell check": "\u62fc\u5199\u68c0\u67e5",
163 191
 "Ignore": "\u5ffd\u7565",
192
+"Ignore all": "\u5168\u90e8\u5ffd\u7565",
193
+"Finish": "\u5b8c\u6210",
164 194
 "Add to Dictionary": "\u6dfb\u52a0\u5230\u5b57\u5178",
165
-"Insert row before": "\u5728\u4e0a\u65b9\u63d2\u5165",
166
-"Rows": "\u884c",
167
-"Height": "\u9ad8",
168
-"Paste row after": "\u7c98\u8d34\u5230\u4e0b\u65b9",
169
-"Alignment": "\u5bf9\u9f50\u65b9\u5f0f",
170
-"Border color": "\u8fb9\u6846\u989c\u8272",
171
-"Column group": "\u5217\u7ec4",
195
+"Insert table": "\u63d2\u5165\u8868\u683c",
196
+"Table properties": "\u8868\u683c\u5c5e\u6027",
197
+"Delete table": "\u5220\u9664\u8868\u683c",
198
+"Cell": "\u5355\u5143\u683c",
172 199
 "Row": "\u884c",
173
-"Insert column before": "\u5728\u5de6\u4fa7\u63d2\u5165",
200
+"Column": "\u5217",
201
+"Cell properties": "\u5355\u5143\u683c\u5c5e\u6027",
202
+"Merge cells": "\u5408\u5e76\u5355\u5143\u683c",
174 203
 "Split cell": "\u62c6\u5206\u5355\u5143\u683c",
175
-"Cell padding": "\u5355\u5143\u683c\u5185\u8fb9\u8ddd",
176
-"Cell spacing": "\u5355\u5143\u683c\u5916\u95f4\u8ddd",
177
-"Row type": "\u884c\u7c7b\u578b",
178
-"Insert table": "\u63d2\u5165\u8868\u683c",
179
-"Body": "\u8868\u4f53",
180
-"Caption": "\u6807\u9898",
181
-"Footer": "\u8868\u5c3e",
204
+"Insert row before": "\u5728\u4e0a\u65b9\u63d2\u5165",
205
+"Insert row after": "\u5728\u4e0b\u65b9\u63d2\u5165",
182 206
 "Delete row": "\u5220\u9664\u884c",
207
+"Row properties": "\u884c\u5c5e\u6027",
208
+"Cut row": "\u526a\u5207\u884c",
209
+"Copy row": "\u590d\u5236\u884c",
183 210
 "Paste row before": "\u7c98\u8d34\u5230\u4e0a\u65b9",
211
+"Paste row after": "\u7c98\u8d34\u5230\u4e0b\u65b9",
212
+"Insert column before": "\u5728\u5de6\u4fa7\u63d2\u5165",
213
+"Insert column after": "\u5728\u53f3\u4fa7\u63d2\u5165",
214
+"Delete column": "\u5220\u9664\u5217",
215
+"Cols": "\u5217",
216
+"Rows": "\u884c",
217
+"Width": "\u5bbd",
218
+"Height": "\u9ad8",
219
+"Cell spacing": "\u5355\u5143\u683c\u5916\u95f4\u8ddd",
220
+"Cell padding": "\u5355\u5143\u683c\u5185\u8fb9\u8ddd",
221
+"Show caption": "\u663e\u793a\u6807\u9898",
222
+"Left": "\u5de6\u5bf9\u9f50",
223
+"Center": "\u5c45\u4e2d",
224
+"Right": "\u53f3\u5bf9\u9f50",
225
+"Cell type": "\u5355\u5143\u683c\u7c7b\u578b",
184 226
 "Scope": "\u8303\u56f4",
185
-"Delete table": "\u5220\u9664\u8868\u683c",
227
+"Alignment": "\u5bf9\u9f50\u65b9\u5f0f",
186 228
 "H Align": "\u6c34\u5e73\u5bf9\u9f50",
229
+"V Align": "\u5782\u76f4\u5bf9\u9f50",
187 230
 "Top": "\u9876\u90e8\u5bf9\u9f50",
188
-"Header cell": "\u8868\u5934\u5355\u5143\u683c",
189
-"Column": "\u5217",
190
-"Row group": "\u884c\u7ec4",
191
-"Cell": "\u5355\u5143\u683c",
192 231
 "Middle": "\u5782\u76f4\u5c45\u4e2d",
193
-"Cell type": "\u5355\u5143\u683c\u7c7b\u578b",
194
-"Copy row": "\u590d\u5236\u884c",
195
-"Row properties": "\u884c\u5c5e\u6027",
196
-"Table properties": "\u8868\u683c\u5c5e\u6027",
197 232
 "Bottom": "\u5e95\u90e8\u5bf9\u9f50",
198
-"V Align": "\u5782\u76f4\u5bf9\u9f50",
233
+"Header cell": "\u8868\u5934\u5355\u5143\u683c",
234
+"Row group": "\u884c\u7ec4",
235
+"Column group": "\u5217\u7ec4",
236
+"Row type": "\u884c\u7c7b\u578b",
199 237
 "Header": "\u8868\u5934",
200
-"Right": "\u53f3\u5bf9\u9f50",
201
-"Insert column after": "\u5728\u53f3\u4fa7\u63d2\u5165",
202
-"Cols": "\u5217",
203
-"Insert row after": "\u5728\u4e0b\u65b9\u63d2\u5165",
204
-"Width": "\u5bbd",
205
-"Cell properties": "\u5355\u5143\u683c\u5c5e\u6027",
206
-"Left": "\u5de6\u5bf9\u9f50",
207
-"Cut row": "\u526a\u5207\u884c",
208
-"Delete column": "\u5220\u9664\u5217",
209
-"Center": "\u5c45\u4e2d",
210
-"Merge cells": "\u5408\u5e76\u5355\u5143\u683c",
211
-"Insert template": "\u63d2\u5165\u6a21\u677f",
238
+"Body": "\u8868\u4f53",
239
+"Footer": "\u8868\u5c3e",
240
+"Border color": "\u8fb9\u6846\u989c\u8272",
241
+"Insert template...": "\u63d2\u5165\u6a21\u677f...",
212 242
 "Templates": "\u6a21\u677f",
243
+"Template": "\u6a21\u677f",
244
+"Text color": "\u6587\u5b57\u989c\u8272",
213 245
 "Background color": "\u80cc\u666f\u8272",
214 246
 "Custom...": "\u81ea\u5b9a\u4e49...",
215 247
 "Custom color": "\u81ea\u5b9a\u4e49\u989c\u8272",
216 248
 "No color": "\u65e0",
217
-"Text color": "\u6587\u5b57\u989c\u8272",
249
+"Remove color": "\u79fb\u9664\u989c\u8272",
218 250
 "Table of Contents": "\u5185\u5bb9\u5217\u8868",
219 251
 "Show blocks": "\u663e\u793a\u533a\u5757\u8fb9\u6846",
220 252
 "Show invisible characters": "\u663e\u793a\u4e0d\u53ef\u89c1\u5b57\u7b26",
253
+"Word count": "\u5b57\u6570",
221 254
 "Words: {0}": "\u5b57\u6570\uff1a{0}",
222
-"Insert": "\u63d2\u5165",
255
+"{0} words": "{0} \u5b57",
223 256
 "File": "\u6587\u4ef6",
224 257
 "Edit": "\u7f16\u8f91",
225
-"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "\u5728\u7f16\u8f91\u533a\u6309ALT-F9\u6253\u5f00\u83dc\u5355\uff0c\u6309ALT-F10\u6253\u5f00\u5de5\u5177\u680f\uff0c\u6309ALT-0\u67e5\u770b\u5e2e\u52a9",
226
-"Tools": "\u5de5\u5177",
258
+"Insert": "\u63d2\u5165",
227 259
 "View": "\u89c6\u56fe",
260
+"Format": "\u683c\u5f0f",
228 261
 "Table": "\u8868\u683c",
229
-"Format": "\u683c\u5f0f"
262
+"Tools": "\u5de5\u5177",
263
+"Powered by {0}": "\u7531{0}\u9a71\u52a8",
264
+"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "\u5728\u7f16\u8f91\u533a\u6309ALT-F9\u6253\u5f00\u83dc\u5355\uff0c\u6309ALT-F10\u6253\u5f00\u5de5\u5177\u680f\uff0c\u6309ALT-0\u67e5\u770b\u5e2e\u52a9",
265
+"Image title": "\u56fe\u7247\u6807\u9898",
266
+"Border width": "\u8fb9\u6846\u5bbd\u5ea6",
267
+"Border style": "\u8fb9\u6846\u6837\u5f0f",
268
+"Error": "\u9519\u8bef",
269
+"Warn": "\u8b66\u544a",
270
+"Valid": "\u6709\u6548",
271
+"To open the popup, press Shift+Enter": "\u6309Shitf+Enter\u952e\u6253\u5f00\u5bf9\u8bdd\u6846",
272
+"Rich Text Area. Press ALT-0 for help.": "\u7f16\u8f91\u533a\u3002\u6309Alt+0\u952e\u6253\u5f00\u5e2e\u52a9\u3002",
273
+"System Font": "\u7cfb\u7edf\u5b57\u4f53",
274
+"Failed to upload image: {0}": "\u56fe\u7247\u4e0a\u4f20\u5931\u8d25: {0}",
275
+"Failed to load plugin: {0} from url {1}": "\u63d2\u4ef6\u52a0\u8f7d\u5931\u8d25: {0} \u6765\u81ea\u94fe\u63a5 {1}",
276
+"Failed to load plugin url: {0}": "\u63d2\u4ef6\u52a0\u8f7d\u5931\u8d25 \u94fe\u63a5: {0}",
277
+"Failed to initialize plugin: {0}": "\u63d2\u4ef6\u521d\u59cb\u5316\u5931\u8d25: {0}",
278
+"example": "\u793a\u4f8b",
279
+"Search": "\u641c\u7d22",
280
+"All": "\u5168\u90e8",
281
+"Currency": "\u8d27\u5e01",
282
+"Text": "\u6587\u5b57",
283
+"Quotations": "\u5f15\u7528",
284
+"Mathematical": "\u6570\u5b66",
285
+"Extended Latin": "\u62c9\u4e01\u8bed\u6269\u5145",
286
+"Symbols": "\u7b26\u53f7",
287
+"Arrows": "\u7bad\u5934",
288
+"User Defined": "\u81ea\u5b9a\u4e49",
289
+"dollar sign": "\u7f8e\u5143\u7b26\u53f7",
290
+"currency sign": "\u8d27\u5e01\u7b26\u53f7",
291
+"euro-currency sign": "\u6b27\u5143\u7b26\u53f7",
292
+"colon sign": "\u5192\u53f7",
293
+"cruzeiro sign": "\u514b\u9c81\u8d5b\u7f57\u5e01\u7b26\u53f7",
294
+"french franc sign": "\u6cd5\u90ce\u7b26\u53f7",
295
+"lira sign": "\u91cc\u62c9\u7b26\u53f7",
296
+"mill sign": "\u5bc6\u5c14\u7b26\u53f7",
297
+"naira sign": "\u5948\u62c9\u7b26\u53f7",
298
+"peseta sign": "\u6bd4\u585e\u5854\u7b26\u53f7",
299
+"rupee sign": "\u5362\u6bd4\u7b26\u53f7",
300
+"won sign": "\u97e9\u5143\u7b26\u53f7",
301
+"new sheqel sign": "\u65b0\u8c22\u514b\u5c14\u7b26\u53f7",
302
+"dong sign": "\u8d8a\u5357\u76fe\u7b26\u53f7",
303
+"kip sign": "\u8001\u631d\u57fa\u666e\u7b26\u53f7",
304
+"tugrik sign": "\u56fe\u683c\u91cc\u514b\u7b26\u53f7",
305
+"drachma sign": "\u5fb7\u62c9\u514b\u9a6c\u7b26\u53f7",
306
+"german penny symbol": "\u5fb7\u56fd\u4fbf\u58eb\u7b26\u53f7",
307
+"peso sign": "\u6bd4\u7d22\u7b26\u53f7",
308
+"guarani sign": "\u74dc\u62c9\u5c3c\u7b26\u53f7",
309
+"austral sign": "\u6fb3\u5143\u7b26\u53f7",
310
+"hryvnia sign": "\u683c\u91cc\u592b\u5c3c\u4e9a\u7b26\u53f7",
311
+"cedi sign": "\u585e\u5730\u7b26\u53f7",
312
+"livre tournois sign": "\u91cc\u5f17\u5f17\u5c14\u7b26\u53f7",
313
+"spesmilo sign": "spesmilo\u7b26\u53f7",
314
+"tenge sign": "\u575a\u6208\u7b26\u53f7",
315
+"indian rupee sign": "\u5370\u5ea6\u5362\u6bd4",
316
+"turkish lira sign": "\u571f\u8033\u5176\u91cc\u62c9",
317
+"nordic mark sign": "\u5317\u6b27\u9a6c\u514b",
318
+"manat sign": "\u9a6c\u7eb3\u7279\u7b26\u53f7",
319
+"ruble sign": "\u5362\u5e03\u7b26\u53f7",
320
+"yen character": "\u65e5\u5143\u5b57\u6837",
321
+"yuan character": "\u4eba\u6c11\u5e01\u5143\u5b57\u6837",
322
+"yuan character, in hong kong and taiwan": "\u5143\u5b57\u6837\uff08\u6e2f\u53f0\u5730\u533a\uff09",
323
+"yen\/yuan character variant one": "\u5143\u5b57\u6837\uff08\u5927\u5199\uff09",
324
+"Loading emoticons...": "\u52a0\u8f7d\u8868\u60c5\u7b26\u53f7...",
325
+"Could not load emoticons": "\u4e0d\u80fd\u52a0\u8f7d\u8868\u60c5\u7b26\u53f7",
326
+"People": "\u4eba\u7c7b",
327
+"Animals and Nature": "\u52a8\u7269\u548c\u81ea\u7136",
328
+"Food and Drink": "\u98df\u7269\u548c\u996e\u54c1",
329
+"Activity": "\u6d3b\u52a8",
330
+"Travel and Places": "\u65c5\u6e38\u548c\u5730\u70b9",
331
+"Objects": "\u7269\u4ef6",
332
+"Flags": "\u65d7\u5e1c",
333
+"Characters": "\u5b57\u7b26",
334
+"Characters (no spaces)": "\u5b57\u7b26(\u65e0\u7a7a\u683c)",
335
+"Error: Form submit field collision.": "\u9519\u8bef: \u8868\u5355\u63d0\u4ea4\u5b57\u6bb5\u51b2\u7a81\u3002",
336
+"Error: No form element found.": "\u9519\u8bef: \u6ca1\u6709\u8868\u5355\u63a7\u4ef6\u3002",
337
+"Update": "\u66f4\u65b0",
338
+"Color swatch": "\u989c\u8272\u6837\u672c",
339
+"Turquoise": "\u9752\u7eff\u8272",
340
+"Green": "\u7eff\u8272",
341
+"Blue": "\u84dd\u8272",
342
+"Purple": "\u7d2b\u8272",
343
+"Navy Blue": "\u6d77\u519b\u84dd",
344
+"Dark Turquoise": "\u6df1\u84dd\u7eff\u8272",
345
+"Dark Green": "\u6df1\u7eff\u8272",
346
+"Medium Blue": "\u4e2d\u84dd\u8272",
347
+"Medium Purple": "\u4e2d\u7d2b\u8272",
348
+"Midnight Blue": "\u6df1\u84dd\u8272",
349
+"Yellow": "\u9ec4\u8272",
350
+"Orange": "\u6a59\u8272",
351
+"Red": "\u7ea2\u8272",
352
+"Light Gray": "\u6d45\u7070\u8272",
353
+"Gray": "\u7070\u8272",
354
+"Dark Yellow": "\u6697\u9ec4\u8272",
355
+"Dark Orange": "\u6df1\u6a59\u8272",
356
+"Dark Red": "\u6df1\u7ea2\u8272",
357
+"Medium Gray": "\u4e2d\u7070\u8272",
358
+"Dark Gray": "\u6df1\u7070\u8272",
359
+"Black": "\u9ed1\u8272",
360
+"White": "\u767d\u8272",
361
+"Switch to or from fullscreen mode": "\u5207\u6362\u5168\u5c4f\u6a21\u5f0f",
362
+"Open help dialog": "\u6253\u5f00\u5e2e\u52a9\u5bf9\u8bdd\u6846",
363
+"history": "\u5386\u53f2",
364
+"styles": "\u6837\u5f0f",
365
+"formatting": "\u683c\u5f0f\u5316",
366
+"alignment": "\u5bf9\u9f50",
367
+"indentation": "\u7f29\u8fdb",
368
+"permanent pen": "\u8bb0\u53f7\u7b14",
369
+"comments": "\u5907\u6ce8",
370
+"Anchor": "\u951a\u70b9",
371
+"Special character": "\u7279\u6b8a\u7b26\u53f7",
372
+"Code sample": "\u4ee3\u7801\u793a\u4f8b",
373
+"Color": "\u989c\u8272",
374
+"Emoticons": "\u8868\u60c5",
375
+"Document properties": "\u6587\u6863\u5c5e\u6027",
376
+"Image": "\u56fe\u7247",
377
+"Insert link": "\u63d2\u5165\u94fe\u63a5",
378
+"Target": "\u6253\u5f00\u65b9\u5f0f",
379
+"Link": "\u94fe\u63a5",
380
+"Poster": "\u5c01\u9762",
381
+"Media": "\u5a92\u4f53",
382
+"Print": "\u6253\u5370",
383
+"Prev": "\u4e0a\u4e00\u4e2a",
384
+"Find and replace": "\u67e5\u627e\u548c\u66ff\u6362",
385
+"Whole words": "\u5168\u5b57\u5339\u914d",
386
+"Spellcheck": "\u62fc\u5199\u68c0\u67e5",
387
+"Caption": "\u6807\u9898",
388
+"Insert template": "\u63d2\u5165\u6a21\u677f"
230 389
 });

+ 297
- 0
vue-element-admin/static/tinymce/plugins/advlist/plugin.js Vedi File

@@ -0,0 +1,297 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+(function () {
10
+    'use strict';
11
+
12
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
+
14
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
15
+
16
+    var applyListFormat = function (editor, listName, styleValue) {
17
+      var cmd = listName === 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList';
18
+      editor.execCommand(cmd, false, styleValue === false ? null : { 'list-style-type': styleValue });
19
+    };
20
+    var Actions = { applyListFormat: applyListFormat };
21
+
22
+    var register = function (editor) {
23
+      editor.addCommand('ApplyUnorderedListStyle', function (ui, value) {
24
+        Actions.applyListFormat(editor, 'UL', value['list-style-type']);
25
+      });
26
+      editor.addCommand('ApplyOrderedListStyle', function (ui, value) {
27
+        Actions.applyListFormat(editor, 'OL', value['list-style-type']);
28
+      });
29
+    };
30
+    var Commands = { register: register };
31
+
32
+    var getNumberStyles = function (editor) {
33
+      var styles = editor.getParam('advlist_number_styles', 'default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman');
34
+      return styles ? styles.split(/[ ,]/) : [];
35
+    };
36
+    var getBulletStyles = function (editor) {
37
+      var styles = editor.getParam('advlist_bullet_styles', 'default,circle,square');
38
+      return styles ? styles.split(/[ ,]/) : [];
39
+    };
40
+    var Settings = {
41
+      getNumberStyles: getNumberStyles,
42
+      getBulletStyles: getBulletStyles
43
+    };
44
+
45
+    var noop = function () {
46
+    };
47
+    var constant = function (value) {
48
+      return function () {
49
+        return value;
50
+      };
51
+    };
52
+    var never = constant(false);
53
+    var always = constant(true);
54
+
55
+    var none = function () {
56
+      return NONE;
57
+    };
58
+    var NONE = function () {
59
+      var eq = function (o) {
60
+        return o.isNone();
61
+      };
62
+      var call = function (thunk) {
63
+        return thunk();
64
+      };
65
+      var id = function (n) {
66
+        return n;
67
+      };
68
+      var me = {
69
+        fold: function (n, s) {
70
+          return n();
71
+        },
72
+        is: never,
73
+        isSome: never,
74
+        isNone: always,
75
+        getOr: id,
76
+        getOrThunk: call,
77
+        getOrDie: function (msg) {
78
+          throw new Error(msg || 'error: getOrDie called on none.');
79
+        },
80
+        getOrNull: constant(null),
81
+        getOrUndefined: constant(undefined),
82
+        or: id,
83
+        orThunk: call,
84
+        map: none,
85
+        each: noop,
86
+        bind: none,
87
+        exists: never,
88
+        forall: always,
89
+        filter: none,
90
+        equals: eq,
91
+        equals_: eq,
92
+        toArray: function () {
93
+          return [];
94
+        },
95
+        toString: constant('none()')
96
+      };
97
+      if (Object.freeze) {
98
+        Object.freeze(me);
99
+      }
100
+      return me;
101
+    }();
102
+    var some = function (a) {
103
+      var constant_a = constant(a);
104
+      var self = function () {
105
+        return me;
106
+      };
107
+      var bind = function (f) {
108
+        return f(a);
109
+      };
110
+      var me = {
111
+        fold: function (n, s) {
112
+          return s(a);
113
+        },
114
+        is: function (v) {
115
+          return a === v;
116
+        },
117
+        isSome: always,
118
+        isNone: never,
119
+        getOr: constant_a,
120
+        getOrThunk: constant_a,
121
+        getOrDie: constant_a,
122
+        getOrNull: constant_a,
123
+        getOrUndefined: constant_a,
124
+        or: self,
125
+        orThunk: self,
126
+        map: function (f) {
127
+          return some(f(a));
128
+        },
129
+        each: function (f) {
130
+          f(a);
131
+        },
132
+        bind: bind,
133
+        exists: bind,
134
+        forall: bind,
135
+        filter: function (f) {
136
+          return f(a) ? me : NONE;
137
+        },
138
+        toArray: function () {
139
+          return [a];
140
+        },
141
+        toString: function () {
142
+          return 'some(' + a + ')';
143
+        },
144
+        equals: function (o) {
145
+          return o.is(a);
146
+        },
147
+        equals_: function (o, elementEq) {
148
+          return o.fold(never, function (b) {
149
+            return elementEq(a, b);
150
+          });
151
+        }
152
+      };
153
+      return me;
154
+    };
155
+    var from = function (value) {
156
+      return value === null || value === undefined ? NONE : some(value);
157
+    };
158
+    var Option = {
159
+      some: some,
160
+      none: none,
161
+      from: from
162
+    };
163
+
164
+    var isChildOfBody = function (editor, elm) {
165
+      return editor.$.contains(editor.getBody(), elm);
166
+    };
167
+    var isTableCellNode = function (node) {
168
+      return node && /^(TH|TD)$/.test(node.nodeName);
169
+    };
170
+    var isListNode = function (editor) {
171
+      return function (node) {
172
+        return node && /^(OL|UL|DL)$/.test(node.nodeName) && isChildOfBody(editor, node);
173
+      };
174
+    };
175
+    var getSelectedStyleType = function (editor) {
176
+      var listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul');
177
+      var style = editor.dom.getStyle(listElm, 'listStyleType');
178
+      return Option.from(style);
179
+    };
180
+    var ListUtils = {
181
+      isTableCellNode: isTableCellNode,
182
+      isListNode: isListNode,
183
+      getSelectedStyleType: getSelectedStyleType
184
+    };
185
+
186
+    var findIndex = function (list, predicate) {
187
+      for (var index = 0; index < list.length; index++) {
188
+        var element = list[index];
189
+        if (predicate(element)) {
190
+          return index;
191
+        }
192
+      }
193
+      return -1;
194
+    };
195
+    var styleValueToText = function (styleValue) {
196
+      return styleValue.replace(/\-/g, ' ').replace(/\b\w/g, function (chr) {
197
+        return chr.toUpperCase();
198
+      });
199
+    };
200
+    var isWithinList = function (editor, e, nodeName) {
201
+      var tableCellIndex = findIndex(e.parents, ListUtils.isTableCellNode);
202
+      var parents = tableCellIndex !== -1 ? e.parents.slice(0, tableCellIndex) : e.parents;
203
+      var lists = global$1.grep(parents, ListUtils.isListNode(editor));
204
+      return lists.length > 0 && lists[0].nodeName === nodeName;
205
+    };
206
+    var addSplitButton = function (editor, id, tooltip, cmd, nodeName, styles) {
207
+      editor.ui.registry.addSplitButton(id, {
208
+        tooltip: tooltip,
209
+        icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',
210
+        presets: 'listpreview',
211
+        columns: 3,
212
+        fetch: function (callback) {
213
+          var items = global$1.map(styles, function (styleValue) {
214
+            var iconStyle = nodeName === 'OL' ? 'num' : 'bull';
215
+            var iconName = styleValue === 'disc' || styleValue === 'decimal' ? 'default' : styleValue;
216
+            var itemValue = styleValue === 'default' ? '' : styleValue;
217
+            var displayText = styleValueToText(styleValue);
218
+            return {
219
+              type: 'choiceitem',
220
+              value: itemValue,
221
+              icon: 'list-' + iconStyle + '-' + iconName,
222
+              text: displayText
223
+            };
224
+          });
225
+          callback(items);
226
+        },
227
+        onAction: function () {
228
+          return editor.execCommand(cmd);
229
+        },
230
+        onItemAction: function (splitButtonApi, value) {
231
+          Actions.applyListFormat(editor, nodeName, value);
232
+        },
233
+        select: function (value) {
234
+          var listStyleType = ListUtils.getSelectedStyleType(editor);
235
+          return listStyleType.map(function (listStyle) {
236
+            return value === listStyle;
237
+          }).getOr(false);
238
+        },
239
+        onSetup: function (api) {
240
+          var nodeChangeHandler = function (e) {
241
+            api.setActive(isWithinList(editor, e, nodeName));
242
+          };
243
+          editor.on('NodeChange', nodeChangeHandler);
244
+          return function () {
245
+            return editor.off('NodeChange', nodeChangeHandler);
246
+          };
247
+        }
248
+      });
249
+    };
250
+    var addButton = function (editor, id, tooltip, cmd, nodeName, styles) {
251
+      editor.ui.registry.addToggleButton(id, {
252
+        active: false,
253
+        tooltip: tooltip,
254
+        icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',
255
+        onSetup: function (api) {
256
+          var nodeChangeHandler = function (e) {
257
+            api.setActive(isWithinList(editor, e, nodeName));
258
+          };
259
+          editor.on('NodeChange', nodeChangeHandler);
260
+          return function () {
261
+            return editor.off('NodeChange', nodeChangeHandler);
262
+          };
263
+        },
264
+        onAction: function () {
265
+          return editor.execCommand(cmd);
266
+        }
267
+      });
268
+    };
269
+    var addControl = function (editor, id, tooltip, cmd, nodeName, styles) {
270
+      if (styles.length > 0) {
271
+        addSplitButton(editor, id, tooltip, cmd, nodeName, styles);
272
+      } else {
273
+        addButton(editor, id, tooltip, cmd, nodeName);
274
+      }
275
+    };
276
+    var register$1 = function (editor) {
277
+      addControl(editor, 'numlist', 'Numbered list', 'InsertOrderedList', 'OL', Settings.getNumberStyles(editor));
278
+      addControl(editor, 'bullist', 'Bullet list', 'InsertUnorderedList', 'UL', Settings.getBulletStyles(editor));
279
+    };
280
+    var Buttons = { register: register$1 };
281
+
282
+    function Plugin () {
283
+      global.add('advlist', function (editor) {
284
+        var hasPlugin = function (editor, plugin) {
285
+          var plugins = editor.settings.plugins ? editor.settings.plugins : '';
286
+          return global$1.inArray(plugins.split(/[ ,]/), plugin) !== -1;
287
+        };
288
+        if (hasPlugin(editor, 'lists')) {
289
+          Buttons.register(editor);
290
+          Commands.register(editor);
291
+        }
292
+      });
293
+    }
294
+
295
+    Plugin();
296
+
297
+}());

+ 9
- 0
vue-element-admin/static/tinymce/plugins/advlist/plugin.min.js Vedi File

@@ -0,0 +1,9 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+!function(){"use strict";function n(){}function o(n){return function(){return n}}function t(){return d}var e,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=function(n,t,e){var r="UL"===t?"InsertUnorderedList":"InsertOrderedList";n.execCommand(r,!1,!1===e?null:{"list-style-type":e})},i=function(e){e.addCommand("ApplyUnorderedListStyle",function(n,t){l(e,"UL",t["list-style-type"])}),e.addCommand("ApplyOrderedListStyle",function(n,t){l(e,"OL",t["list-style-type"])})},c=function(n){var t=n.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");return t?t.split(/[ ,]/):[]},s=function(n){var t=n.getParam("advlist_bullet_styles","default,circle,square");return t?t.split(/[ ,]/):[]},f=o(!1),a=o(!0),d=(e={fold:function(n,t){return n()},is:f,isSome:f,isNone:a,getOr:m,getOrThunk:p,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(undefined),or:m,orThunk:p,map:t,each:n,bind:t,exists:f,forall:a,filter:t,equals:g,equals_:g,toArray:function(){return[]},toString:o("none()")},Object.freeze&&Object.freeze(e),e);function g(n){return n.isNone()}function p(n){return n()}function m(n){return n}function y(n,t,e){var r=function(n,t){for(var e=0;e<n.length;e++){if(t(n[e]))return e}return-1}(t.parents,L),i=-1!==r?t.parents.slice(0,r):t.parents,o=u.grep(i,N(n));return 0<o.length&&o[0].nodeName===e}function O(n,t,e,r,i,o){0<o.length?function(e,n,t,r,i,o){e.ui.registry.addSplitButton(n,{tooltip:t,icon:"OL"===i?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:function(n){n(u.map(o,function(n){return{type:"choiceitem",value:"default"===n?"":n,icon:"list-"+("OL"===i?"num":"bull")+"-"+("disc"===n||"decimal"===n?"default":n),text:function(n){return n.replace(/\-/g," ").replace(/\b\w/g,function(n){return n.toUpperCase()})}(n)}}))},onAction:function(){return e.execCommand(r)},onItemAction:function(n,t){l(e,i,t)},select:function(t){return S(e).map(function(n){return t===n}).getOr(!1)},onSetup:function(t){function n(n){t.setActive(y(e,n,i))}return e.on("NodeChange",n),function(){return e.off("NodeChange",n)}}})}(n,t,e,r,i,o):function(e,n,t,r,i){e.ui.registry.addToggleButton(n,{active:!1,tooltip:t,icon:"OL"===i?"ordered-list":"unordered-list",onSetup:function(t){function n(n){t.setActive(y(e,n,i))}return e.on("NodeChange",n),function(){return e.off("NodeChange",n)}},onAction:function(){return e.execCommand(r)}})}(n,t,e,r,i)}var v=function(e){function n(){return i}function t(n){return n(e)}var r=o(e),i={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:a,isNone:f,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:n,orThunk:n,map:function(n){return v(n(e))},each:function(n){n(e)},bind:t,exists:t,forall:t,filter:function(n){return n(e)?i:d},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(f,function(n){return t(e,n)})}};return i},h=function(n){return null===n||n===undefined?d:v(n)},L=function(n){return n&&/^(TH|TD)$/.test(n.nodeName)},N=function(t){return function(n){return n&&/^(OL|UL|DL)$/.test(n.nodeName)&&function(n,t){return n.$.contains(n.getBody(),t)}(t,n)}},S=function(n){var t=n.dom.getParent(n.selection.getNode(),"ol,ul"),e=n.dom.getStyle(t,"listStyleType");return h(e)},T=function(n){O(n,"numlist","Numbered list","InsertOrderedList","OL",c(n)),O(n,"bullist","Bullet list","InsertUnorderedList","UL",s(n))};!function b(){r.add("advlist",function(n){var t,e,r;e="lists",r=(t=n).settings.plugins?t.settings.plugins:"",-1!==u.inArray(r.split(/[ ,]/),e)&&(T(n),i(n))})}()}();

+ 145
- 0
vue-element-admin/static/tinymce/plugins/anchor/plugin.js Vedi File

@@ -0,0 +1,145 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+(function () {
10
+    'use strict';
11
+
12
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
+
14
+    var isValidId = function (id) {
15
+      return /^[A-Za-z][A-Za-z0-9\-:._]*$/.test(id);
16
+    };
17
+    var getId = function (editor) {
18
+      var selectedNode = editor.selection.getNode();
19
+      var isAnchor = selectedNode.tagName === 'A' && editor.dom.getAttrib(selectedNode, 'href') === '';
20
+      return isAnchor ? selectedNode.getAttribute('id') || selectedNode.getAttribute('name') : '';
21
+    };
22
+    var insert = function (editor, id) {
23
+      var selectedNode = editor.selection.getNode();
24
+      var isAnchor = selectedNode.tagName === 'A' && editor.dom.getAttrib(selectedNode, 'href') === '';
25
+      if (isAnchor) {
26
+        selectedNode.removeAttribute('name');
27
+        selectedNode.id = id;
28
+        editor.undoManager.add();
29
+      } else {
30
+        editor.focus();
31
+        editor.selection.collapse(true);
32
+        editor.execCommand('mceInsertContent', false, editor.dom.createHTML('a', { id: id }));
33
+      }
34
+    };
35
+    var Anchor = {
36
+      isValidId: isValidId,
37
+      getId: getId,
38
+      insert: insert
39
+    };
40
+
41
+    var insertAnchor = function (editor, newId) {
42
+      if (!Anchor.isValidId(newId)) {
43
+        editor.windowManager.alert('Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.');
44
+        return true;
45
+      } else {
46
+        Anchor.insert(editor, newId);
47
+        return false;
48
+      }
49
+    };
50
+    var open = function (editor) {
51
+      var currentId = Anchor.getId(editor);
52
+      editor.windowManager.open({
53
+        title: 'Anchor',
54
+        size: 'normal',
55
+        body: {
56
+          type: 'panel',
57
+          items: [{
58
+              name: 'id',
59
+              type: 'input',
60
+              label: 'ID',
61
+              placeholder: 'example'
62
+            }]
63
+        },
64
+        buttons: [
65
+          {
66
+            type: 'cancel',
67
+            name: 'cancel',
68
+            text: 'Cancel'
69
+          },
70
+          {
71
+            type: 'submit',
72
+            name: 'save',
73
+            text: 'Save',
74
+            primary: true
75
+          }
76
+        ],
77
+        initialData: { id: currentId },
78
+        onSubmit: function (api) {
79
+          if (!insertAnchor(editor, api.getData().id)) {
80
+            api.close();
81
+          }
82
+        }
83
+      });
84
+    };
85
+    var Dialog = { open: open };
86
+
87
+    var register = function (editor) {
88
+      editor.addCommand('mceAnchor', function () {
89
+        Dialog.open(editor);
90
+      });
91
+    };
92
+    var Commands = { register: register };
93
+
94
+    var isAnchorNode = function (node) {
95
+      return !node.attr('href') && (node.attr('id') || node.attr('name')) && !node.firstChild;
96
+    };
97
+    var setContentEditable = function (state) {
98
+      return function (nodes) {
99
+        for (var i = 0; i < nodes.length; i++) {
100
+          if (isAnchorNode(nodes[i])) {
101
+            nodes[i].attr('contenteditable', state);
102
+          }
103
+        }
104
+      };
105
+    };
106
+    var setup = function (editor) {
107
+      editor.on('PreInit', function () {
108
+        editor.parser.addNodeFilter('a', setContentEditable('false'));
109
+        editor.serializer.addNodeFilter('a', setContentEditable(null));
110
+      });
111
+    };
112
+    var FilterContent = { setup: setup };
113
+
114
+    var register$1 = function (editor) {
115
+      editor.ui.registry.addToggleButton('anchor', {
116
+        icon: 'bookmark',
117
+        tooltip: 'Anchor',
118
+        onAction: function () {
119
+          return editor.execCommand('mceAnchor');
120
+        },
121
+        onSetup: function (buttonApi) {
122
+          return editor.selection.selectorChangedWithUnbind('a:not([href])', buttonApi.setActive).unbind;
123
+        }
124
+      });
125
+      editor.ui.registry.addMenuItem('anchor', {
126
+        icon: 'bookmark',
127
+        text: 'Anchor...',
128
+        onAction: function () {
129
+          return editor.execCommand('mceAnchor');
130
+        }
131
+      });
132
+    };
133
+    var Buttons = { register: register$1 };
134
+
135
+    function Plugin () {
136
+      global.add('anchor', function (editor) {
137
+        FilterContent.setup(editor);
138
+        Commands.register(editor);
139
+        Buttons.register(editor);
140
+      });
141
+    }
142
+
143
+    Plugin();
144
+
145
+}());

+ 9
- 0
vue-element-admin/static/tinymce/plugins/anchor/plugin.min.js Vedi File

@@ -0,0 +1,9 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+!function(){"use strict";function e(o){return function(t){for(var e=0;e<t.length;e++)(n=t[e]).attr("href")||!n.attr("id")&&!n.attr("name")||n.firstChild||t[e].attr("contenteditable",o);var n}}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)},o=function(t){var e=t.selection.getNode();return"A"===e.tagName&&""===t.dom.getAttrib(e,"href")?e.getAttribute("id")||e.getAttribute("name"):""},r=function(t,e){var n=t.selection.getNode();"A"===n.tagName&&""===t.dom.getAttrib(n,"href")?(n.removeAttribute("name"),n.id=e,t.undoManager.add()):(t.focus(),t.selection.collapse(!0),t.execCommand("mceInsertContent",!1,t.dom.createHTML("a",{id:e})))},a=function(e){var t=o(e);e.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:function(t){!function(t,e){return n(e)?(r(t,e),!1):(t.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!0)}(e,t.getData().id)&&t.close()}})},i=function(t){t.addCommand("mceAnchor",function(){a(t)})},c=function(t){t.on("PreInit",function(){t.parser.addNodeFilter("a",e("false")),t.serializer.addNodeFilter("a",e(null))})},d=function(e){e.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:function(){return e.execCommand("mceAnchor")},onSetup:function(t){return e.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind}}),e.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:function(){return e.execCommand("mceAnchor")}})};!function u(){t.add("anchor",function(t){c(t),i(t),d(t)})}()}();

+ 186
- 0
vue-element-admin/static/tinymce/plugins/autolink/plugin.js Vedi File

@@ -0,0 +1,186 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+(function () {
10
+    'use strict';
11
+
12
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
+
14
+    var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
15
+
16
+    var getAutoLinkPattern = function (editor) {
17
+      return editor.getParam('autolink_pattern', /^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i);
18
+    };
19
+    var getDefaultLinkTarget = function (editor) {
20
+      return editor.getParam('default_link_target', false);
21
+    };
22
+    var Settings = {
23
+      getAutoLinkPattern: getAutoLinkPattern,
24
+      getDefaultLinkTarget: getDefaultLinkTarget
25
+    };
26
+
27
+    var rangeEqualsDelimiterOrSpace = function (rangeString, delimiter) {
28
+      return rangeString === delimiter || rangeString === ' ' || rangeString.charCodeAt(0) === 160;
29
+    };
30
+    var handleEclipse = function (editor) {
31
+      parseCurrentLine(editor, -1, '(');
32
+    };
33
+    var handleSpacebar = function (editor) {
34
+      parseCurrentLine(editor, 0, '');
35
+    };
36
+    var handleEnter = function (editor) {
37
+      parseCurrentLine(editor, -1, '');
38
+    };
39
+    var scopeIndex = function (container, index) {
40
+      if (index < 0) {
41
+        index = 0;
42
+      }
43
+      if (container.nodeType === 3) {
44
+        var len = container.data.length;
45
+        if (index > len) {
46
+          index = len;
47
+        }
48
+      }
49
+      return index;
50
+    };
51
+    var setStart = function (rng, container, offset) {
52
+      if (container.nodeType !== 1 || container.hasChildNodes()) {
53
+        rng.setStart(container, scopeIndex(container, offset));
54
+      } else {
55
+        rng.setStartBefore(container);
56
+      }
57
+    };
58
+    var setEnd = function (rng, container, offset) {
59
+      if (container.nodeType !== 1 || container.hasChildNodes()) {
60
+        rng.setEnd(container, scopeIndex(container, offset));
61
+      } else {
62
+        rng.setEndAfter(container);
63
+      }
64
+    };
65
+    var parseCurrentLine = function (editor, endOffset, delimiter) {
66
+      var rng, end, start, endContainer, bookmark, text, matches, prev, len, rngText;
67
+      var autoLinkPattern = Settings.getAutoLinkPattern(editor);
68
+      var defaultLinkTarget = Settings.getDefaultLinkTarget(editor);
69
+      if (editor.selection.getNode().tagName === 'A') {
70
+        return;
71
+      }
72
+      rng = editor.selection.getRng(true).cloneRange();
73
+      if (rng.startOffset < 5) {
74
+        prev = rng.endContainer.previousSibling;
75
+        if (!prev) {
76
+          if (!rng.endContainer.firstChild || !rng.endContainer.firstChild.nextSibling) {
77
+            return;
78
+          }
79
+          prev = rng.endContainer.firstChild.nextSibling;
80
+        }
81
+        len = prev.length;
82
+        setStart(rng, prev, len);
83
+        setEnd(rng, prev, len);
84
+        if (rng.endOffset < 5) {
85
+          return;
86
+        }
87
+        end = rng.endOffset;
88
+        endContainer = prev;
89
+      } else {
90
+        endContainer = rng.endContainer;
91
+        if (endContainer.nodeType !== 3 && endContainer.firstChild) {
92
+          while (endContainer.nodeType !== 3 && endContainer.firstChild) {
93
+            endContainer = endContainer.firstChild;
94
+          }
95
+          if (endContainer.nodeType === 3) {
96
+            setStart(rng, endContainer, 0);
97
+            setEnd(rng, endContainer, endContainer.nodeValue.length);
98
+          }
99
+        }
100
+        if (rng.endOffset === 1) {
101
+          end = 2;
102
+        } else {
103
+          end = rng.endOffset - 1 - endOffset;
104
+        }
105
+      }
106
+      start = end;
107
+      do {
108
+        setStart(rng, endContainer, end >= 2 ? end - 2 : 0);
109
+        setEnd(rng, endContainer, end >= 1 ? end - 1 : 0);
110
+        end -= 1;
111
+        rngText = rng.toString();
112
+      } while (rngText !== ' ' && rngText !== '' && rngText.charCodeAt(0) !== 160 && end - 2 >= 0 && rngText !== delimiter);
113
+      if (rangeEqualsDelimiterOrSpace(rng.toString(), delimiter)) {
114
+        setStart(rng, endContainer, end);
115
+        setEnd(rng, endContainer, start);
116
+        end += 1;
117
+      } else if (rng.startOffset === 0) {
118
+        setStart(rng, endContainer, 0);
119
+        setEnd(rng, endContainer, start);
120
+      } else {
121
+        setStart(rng, endContainer, end);
122
+        setEnd(rng, endContainer, start);
123
+      }
124
+      text = rng.toString();
125
+      if (text.charAt(text.length - 1) === '.') {
126
+        setEnd(rng, endContainer, start - 1);
127
+      }
128
+      text = rng.toString().trim();
129
+      matches = text.match(autoLinkPattern);
130
+      if (matches) {
131
+        if (matches[1] === 'www.') {
132
+          matches[1] = 'http://www.';
133
+        } else if (/@$/.test(matches[1]) && !/^mailto:/.test(matches[1])) {
134
+          matches[1] = 'mailto:' + matches[1];
135
+        }
136
+        bookmark = editor.selection.getBookmark();
137
+        editor.selection.setRng(rng);
138
+        editor.execCommand('createlink', false, matches[1] + matches[2]);
139
+        if (defaultLinkTarget !== false) {
140
+          editor.dom.setAttrib(editor.selection.getNode(), 'target', defaultLinkTarget);
141
+        }
142
+        editor.selection.moveToBookmark(bookmark);
143
+        editor.nodeChanged();
144
+      }
145
+    };
146
+    var setup = function (editor) {
147
+      var autoUrlDetectState;
148
+      editor.on('keydown', function (e) {
149
+        if (e.keyCode === 13) {
150
+          return handleEnter(editor);
151
+        }
152
+      });
153
+      if (global$1.browser.isIE()) {
154
+        editor.on('focus', function () {
155
+          if (!autoUrlDetectState) {
156
+            autoUrlDetectState = true;
157
+            try {
158
+              editor.execCommand('AutoUrlDetect', false, true);
159
+            } catch (ex) {
160
+            }
161
+          }
162
+        });
163
+        return;
164
+      }
165
+      editor.on('keypress', function (e) {
166
+        if (e.keyCode === 41) {
167
+          return handleEclipse(editor);
168
+        }
169
+      });
170
+      editor.on('keyup', function (e) {
171
+        if (e.keyCode === 32) {
172
+          return handleSpacebar(editor);
173
+        }
174
+      });
175
+    };
176
+    var Keys = { setup: setup };
177
+
178
+    function Plugin () {
179
+      global.add('autolink', function (editor) {
180
+        Keys.setup(editor);
181
+      });
182
+    }
183
+
184
+    Plugin();
185
+
186
+}());

+ 9
- 0
vue-element-admin/static/tinymce/plugins/autolink/plugin.min.js Vedi File

@@ -0,0 +1,9 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+!function(){"use strict";function i(t,e){if(e<0&&(e=0),3===t.nodeType){var n=t.data.length;n<e&&(e=n)}return e}function C(t,e,n){1!==e.nodeType||e.hasChildNodes()?t.setStart(e,i(e,n)):t.setStartBefore(e)}function m(t,e,n){1!==e.nodeType||e.hasChildNodes()?t.setEnd(e,i(e,n)):t.setEndAfter(e)}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.Env"),y=function(t){return t.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i)},k=function(t){return t.getParam("default_link_target",!1)},r=function(t,e,n){var i,o,r,f,a,s,d,c,l,u,g=y(t),h=k(t);if("A"!==t.selection.getNode().tagName){if((i=t.selection.getRng(!0).cloneRange()).startOffset<5){if(!(c=i.endContainer.previousSibling)){if(!i.endContainer.firstChild||!i.endContainer.firstChild.nextSibling)return;c=i.endContainer.firstChild.nextSibling}if(l=c.length,C(i,c,l),m(i,c,l),i.endOffset<5)return;o=i.endOffset,f=c}else{if(3!==(f=i.endContainer).nodeType&&f.firstChild){for(;3!==f.nodeType&&f.firstChild;)f=f.firstChild;3===f.nodeType&&(C(i,f,0),m(i,f,f.nodeValue.length))}o=1===i.endOffset?2:i.endOffset-1-e}for(r=o;C(i,f,2<=o?o-2:0),m(i,f,1<=o?o-1:0),o-=1," "!==(u=i.toString())&&""!==u&&160!==u.charCodeAt(0)&&0<=o-2&&u!==n;);!function(t,e){return t===e||" "===t||160===t.charCodeAt(0)}(i.toString(),n)?(0===i.startOffset?C(i,f,0):C(i,f,o),m(i,f,r)):(C(i,f,o),m(i,f,r),o+=1),"."===(s=i.toString()).charAt(s.length-1)&&m(i,f,r-1),(d=(s=i.toString().trim()).match(g))&&("www."===d[1]?d[1]="http://www.":/@$/.test(d[1])&&!/^mailto:/.test(d[1])&&(d[1]="mailto:"+d[1]),a=t.selection.getBookmark(),t.selection.setRng(i),t.execCommand("createlink",!1,d[1]+d[2]),!1!==h&&t.dom.setAttrib(t.selection.getNode(),"target",h),t.selection.moveToBookmark(a),t.nodeChanged())}},e=function(e){var n;e.on("keydown",function(t){if(13===t.keyCode)return function(t){r(t,-1,"")}(e)}),o.browser.isIE()?e.on("focus",function(){if(!n){n=!0;try{e.execCommand("AutoUrlDetect",!1,!0)}catch(t){}}}):(e.on("keypress",function(t){if(41===t.keyCode)return function(t){r(t,-1,"(")}(e)}),e.on("keyup",function(t){if(32===t.keyCode)return function(t){r(t,0,"")}(e)}))};!function n(){t.add("autolink",function(t){e(t)})}()}();

+ 188
- 0
vue-element-admin/static/tinymce/plugins/autoresize/plugin.js Vedi File

@@ -0,0 +1,188 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+(function () {
10
+    'use strict';
11
+
12
+    var Cell = function (initial) {
13
+      var value = initial;
14
+      var get = function () {
15
+        return value;
16
+      };
17
+      var set = function (v) {
18
+        value = v;
19
+      };
20
+      var clone = function () {
21
+        return Cell(get());
22
+      };
23
+      return {
24
+        get: get,
25
+        set: set,
26
+        clone: clone
27
+      };
28
+    };
29
+
30
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
31
+
32
+    var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
33
+
34
+    var global$2 = tinymce.util.Tools.resolve('tinymce.util.Delay');
35
+
36
+    var fireResizeEditor = function (editor) {
37
+      return editor.fire('ResizeEditor');
38
+    };
39
+    var Events = { fireResizeEditor: fireResizeEditor };
40
+
41
+    var getAutoResizeMinHeight = function (editor) {
42
+      return editor.getParam('min_height', editor.getElement().offsetHeight, 'number');
43
+    };
44
+    var getAutoResizeMaxHeight = function (editor) {
45
+      return editor.getParam('max_height', 0, 'number');
46
+    };
47
+    var getAutoResizeOverflowPadding = function (editor) {
48
+      return editor.getParam('autoresize_overflow_padding', 1, 'number');
49
+    };
50
+    var getAutoResizeBottomMargin = function (editor) {
51
+      return editor.getParam('autoresize_bottom_margin', 50, 'number');
52
+    };
53
+    var shouldAutoResizeOnInit = function (editor) {
54
+      return editor.getParam('autoresize_on_init', true, 'boolean');
55
+    };
56
+    var Settings = {
57
+      getAutoResizeMinHeight: getAutoResizeMinHeight,
58
+      getAutoResizeMaxHeight: getAutoResizeMaxHeight,
59
+      getAutoResizeOverflowPadding: getAutoResizeOverflowPadding,
60
+      getAutoResizeBottomMargin: getAutoResizeBottomMargin,
61
+      shouldAutoResizeOnInit: shouldAutoResizeOnInit
62
+    };
63
+
64
+    var isFullscreen = function (editor) {
65
+      return editor.plugins.fullscreen && editor.plugins.fullscreen.isFullscreen();
66
+    };
67
+    var wait = function (editor, oldSize, times, interval, callback) {
68
+      global$2.setEditorTimeout(editor, function () {
69
+        resize(editor, oldSize);
70
+        if (times--) {
71
+          wait(editor, oldSize, times, interval, callback);
72
+        } else if (callback) {
73
+          callback();
74
+        }
75
+      }, interval);
76
+    };
77
+    var toggleScrolling = function (editor, state) {
78
+      var body = editor.getBody();
79
+      if (body) {
80
+        body.style.overflowY = state ? '' : 'hidden';
81
+        if (!state) {
82
+          body.scrollTop = 0;
83
+        }
84
+      }
85
+    };
86
+    var parseCssValueToInt = function (dom, elm, name, computed) {
87
+      var value = parseInt(dom.getStyle(elm, name, computed), 10);
88
+      return isNaN(value) ? 0 : value;
89
+    };
90
+    var resize = function (editor, oldSize) {
91
+      var deltaSize, resizeHeight, contentHeight;
92
+      var dom = editor.dom;
93
+      var doc = editor.getDoc();
94
+      if (!doc) {
95
+        return;
96
+      }
97
+      if (isFullscreen(editor)) {
98
+        toggleScrolling(editor, true);
99
+        return;
100
+      }
101
+      var docEle = doc.documentElement;
102
+      var resizeBottomMargin = Settings.getAutoResizeBottomMargin(editor);
103
+      resizeHeight = Settings.getAutoResizeMinHeight(editor);
104
+      var marginTop = parseCssValueToInt(dom, docEle, 'margin-top', true);
105
+      var marginBottom = parseCssValueToInt(dom, docEle, 'margin-bottom', true);
106
+      contentHeight = docEle.offsetHeight + marginTop + marginBottom + resizeBottomMargin;
107
+      if (contentHeight < 0) {
108
+        contentHeight = 0;
109
+      }
110
+      var containerHeight = editor.getContainer().offsetHeight;
111
+      var contentAreaHeight = editor.getContentAreaContainer().offsetHeight;
112
+      var chromeHeight = containerHeight - contentAreaHeight;
113
+      if (contentHeight + chromeHeight > Settings.getAutoResizeMinHeight(editor)) {
114
+        resizeHeight = contentHeight + chromeHeight;
115
+      }
116
+      var maxHeight = Settings.getAutoResizeMaxHeight(editor);
117
+      if (maxHeight && resizeHeight > maxHeight) {
118
+        resizeHeight = maxHeight;
119
+        toggleScrolling(editor, true);
120
+      } else {
121
+        toggleScrolling(editor, false);
122
+      }
123
+      if (resizeHeight !== oldSize.get()) {
124
+        deltaSize = resizeHeight - oldSize.get();
125
+        dom.setStyle(editor.getContainer(), 'height', resizeHeight + 'px');
126
+        oldSize.set(resizeHeight);
127
+        Events.fireResizeEditor(editor);
128
+        if (global$1.browser.isSafari() && global$1.mac) {
129
+          var win = editor.getWin();
130
+          win.scrollTo(win.pageXOffset, win.pageYOffset);
131
+        }
132
+        if (editor.hasFocus()) {
133
+          editor.selection.scrollIntoView(editor.selection.getNode());
134
+        }
135
+        if (global$1.webkit && deltaSize < 0) {
136
+          resize(editor, oldSize);
137
+        }
138
+      }
139
+    };
140
+    var setup = function (editor, oldSize) {
141
+      editor.on('init', function () {
142
+        var overflowPadding = Settings.getAutoResizeOverflowPadding(editor);
143
+        var dom = editor.dom;
144
+        dom.setStyles(editor.getBody(), {
145
+          'paddingLeft': overflowPadding,
146
+          'paddingRight': overflowPadding,
147
+          'min-height': 0
148
+        });
149
+      });
150
+      editor.on('NodeChange SetContent keyup FullscreenStateChanged ResizeContent', function () {
151
+        resize(editor, oldSize);
152
+      });
153
+      if (Settings.shouldAutoResizeOnInit(editor)) {
154
+        editor.on('init', function () {
155
+          wait(editor, oldSize, 20, 100, function () {
156
+            wait(editor, oldSize, 5, 1000);
157
+          });
158
+        });
159
+      }
160
+    };
161
+    var Resize = {
162
+      setup: setup,
163
+      resize: resize
164
+    };
165
+
166
+    var register = function (editor, oldSize) {
167
+      editor.addCommand('mceAutoResize', function () {
168
+        Resize.resize(editor, oldSize);
169
+      });
170
+    };
171
+    var Commands = { register: register };
172
+
173
+    function Plugin () {
174
+      global.add('autoresize', function (editor) {
175
+        if (!editor.settings.hasOwnProperty('resize')) {
176
+          editor.settings.resize = false;
177
+        }
178
+        if (!editor.inline) {
179
+          var oldSize = Cell(0);
180
+          Commands.register(editor, oldSize);
181
+          Resize.setup(editor, oldSize);
182
+        }
183
+      });
184
+    }
185
+
186
+    Plugin();
187
+
188
+}());

+ 9
- 0
vue-element-admin/static/tinymce/plugins/autoresize/plugin.min.js Vedi File

@@ -0,0 +1,9 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+!function(){"use strict";function d(e,t){var n=e.getBody();n&&(n.style.overflowY=t?"":"hidden",t||(n.scrollTop=0))}function h(e,t,n,i){var o=parseInt(e.getStyle(t,n,i),10);return isNaN(o)?0:o}var i=function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return i(t())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),v=tinymce.util.Tools.resolve("tinymce.Env"),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),p=function(e){return e.fire("ResizeEditor")},y=function(e){return e.getParam("min_height",e.getElement().offsetHeight,"number")},z=function(e){return e.getParam("max_height",0,"number")},n=function(e){return e.getParam("autoresize_overflow_padding",1,"number")},b=function(e){return e.getParam("autoresize_bottom_margin",50,"number")},o=function(e){return e.getParam("autoresize_on_init",!0,"boolean")},u=function(e,t,n,i,o){r.setEditorTimeout(e,function(){C(e,t),n--?u(e,t,n,i,o):o&&o()},i)},C=function(e,t){var n,i,o,r=e.dom,u=e.getDoc();if(u)if(function(e){return e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen()}(e))d(e,!0);else{var s=u.documentElement,a=b(e);i=y(e);var f=h(r,s,"margin-top",!0),c=h(r,s,"margin-bottom",!0);(o=s.offsetHeight+f+c+a)<0&&(o=0);var g=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight;o+g>y(e)&&(i=o+g);var l=z(e);if(l&&l<i?(i=l,d(e,!0)):d(e,!1),i!==t.get()){if(n=i-t.get(),r.setStyle(e.getContainer(),"height",i+"px"),t.set(i),p(e),v.browser.isSafari()&&v.mac){var m=e.getWin();m.scrollTo(m.pageXOffset,m.pageYOffset)}e.hasFocus()&&e.selection.scrollIntoView(e.selection.getNode()),v.webkit&&n<0&&C(e,t)}}},s={setup:function(t,e){t.on("init",function(){var e=n(t);t.dom.setStyles(t.getBody(),{paddingLeft:e,paddingRight:e,"min-height":0})}),t.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",function(){C(t,e)}),o(t)&&t.on("init",function(){u(t,e,20,100,function(){u(t,e,5,1e3)})})},resize:C},a=function(e,t){e.addCommand("mceAutoResize",function(){s.resize(e,t)})};!function t(){e.add("autoresize",function(e){if(e.settings.hasOwnProperty("resize")||(e.settings.resize=!1),!e.inline){var t=i(0);a(e,t),s.setup(e,t)}})}()}();

+ 230
- 0
vue-element-admin/static/tinymce/plugins/autosave/plugin.js Vedi File

@@ -0,0 +1,230 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+(function (domGlobals) {
10
+    'use strict';
11
+
12
+    var Cell = function (initial) {
13
+      var value = initial;
14
+      var get = function () {
15
+        return value;
16
+      };
17
+      var set = function (v) {
18
+        value = v;
19
+      };
20
+      var clone = function () {
21
+        return Cell(get());
22
+      };
23
+      return {
24
+        get: get,
25
+        set: set,
26
+        clone: clone
27
+      };
28
+    };
29
+
30
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
31
+
32
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Delay');
33
+
34
+    var global$2 = tinymce.util.Tools.resolve('tinymce.util.LocalStorage');
35
+
36
+    var global$3 = tinymce.util.Tools.resolve('tinymce.util.Tools');
37
+
38
+    var fireRestoreDraft = function (editor) {
39
+      return editor.fire('RestoreDraft');
40
+    };
41
+    var fireStoreDraft = function (editor) {
42
+      return editor.fire('StoreDraft');
43
+    };
44
+    var fireRemoveDraft = function (editor) {
45
+      return editor.fire('RemoveDraft');
46
+    };
47
+
48
+    var parse = function (timeString, defaultTime) {
49
+      var multiples = {
50
+        s: 1000,
51
+        m: 60000
52
+      };
53
+      var toParse = timeString || defaultTime;
54
+      var parsedTime = /^(\d+)([ms]?)$/.exec('' + toParse);
55
+      return (parsedTime[2] ? multiples[parsedTime[2]] : 1) * parseInt(toParse, 10);
56
+    };
57
+
58
+    var shouldAskBeforeUnload = function (editor) {
59
+      return editor.getParam('autosave_ask_before_unload', true);
60
+    };
61
+    var getAutoSavePrefix = function (editor) {
62
+      var prefix = editor.getParam('autosave_prefix', 'tinymce-autosave-{path}{query}{hash}-{id}-');
63
+      prefix = prefix.replace(/\{path\}/g, domGlobals.document.location.pathname);
64
+      prefix = prefix.replace(/\{query\}/g, domGlobals.document.location.search);
65
+      prefix = prefix.replace(/\{hash\}/g, domGlobals.document.location.hash);
66
+      prefix = prefix.replace(/\{id\}/g, editor.id);
67
+      return prefix;
68
+    };
69
+    var shouldRestoreWhenEmpty = function (editor) {
70
+      return editor.getParam('autosave_restore_when_empty', false);
71
+    };
72
+    var getAutoSaveInterval = function (editor) {
73
+      return parse(editor.settings.autosave_interval, '30s');
74
+    };
75
+    var getAutoSaveRetention = function (editor) {
76
+      return parse(editor.settings.autosave_retention, '20m');
77
+    };
78
+
79
+    var isEmpty = function (editor, html) {
80
+      var forcedRootBlockName = editor.settings.forced_root_block;
81
+      html = global$3.trim(typeof html === 'undefined' ? editor.getBody().innerHTML : html);
82
+      return html === '' || new RegExp('^<' + forcedRootBlockName + '[^>]*>((\xA0|&nbsp;|[ \t]|<br[^>]*>)+?|)</' + forcedRootBlockName + '>|<br>$', 'i').test(html);
83
+    };
84
+    var hasDraft = function (editor) {
85
+      var time = parseInt(global$2.getItem(getAutoSavePrefix(editor) + 'time'), 10) || 0;
86
+      if (new Date().getTime() - time > getAutoSaveRetention(editor)) {
87
+        removeDraft(editor, false);
88
+        return false;
89
+      }
90
+      return true;
91
+    };
92
+    var removeDraft = function (editor, fire) {
93
+      var prefix = getAutoSavePrefix(editor);
94
+      global$2.removeItem(prefix + 'draft');
95
+      global$2.removeItem(prefix + 'time');
96
+      if (fire !== false) {
97
+        fireRemoveDraft(editor);
98
+      }
99
+    };
100
+    var storeDraft = function (editor) {
101
+      var prefix = getAutoSavePrefix(editor);
102
+      if (!isEmpty(editor) && editor.isDirty()) {
103
+        global$2.setItem(prefix + 'draft', editor.getContent({
104
+          format: 'raw',
105
+          no_events: true
106
+        }));
107
+        global$2.setItem(prefix + 'time', new Date().getTime().toString());
108
+        fireStoreDraft(editor);
109
+      }
110
+    };
111
+    var restoreDraft = function (editor) {
112
+      var prefix = getAutoSavePrefix(editor);
113
+      if (hasDraft(editor)) {
114
+        editor.setContent(global$2.getItem(prefix + 'draft'), { format: 'raw' });
115
+        fireRestoreDraft(editor);
116
+      }
117
+    };
118
+    var startStoreDraft = function (editor, started) {
119
+      var interval = getAutoSaveInterval(editor);
120
+      if (!started.get()) {
121
+        global$1.setInterval(function () {
122
+          if (!editor.removed) {
123
+            storeDraft(editor);
124
+          }
125
+        }, interval);
126
+        started.set(true);
127
+      }
128
+    };
129
+    var restoreLastDraft = function (editor) {
130
+      editor.undoManager.transact(function () {
131
+        restoreDraft(editor);
132
+        removeDraft(editor);
133
+      });
134
+      editor.focus();
135
+    };
136
+
137
+    function curry(fn) {
138
+      var initialArgs = [];
139
+      for (var _i = 1; _i < arguments.length; _i++) {
140
+        initialArgs[_i - 1] = arguments[_i];
141
+      }
142
+      return function () {
143
+        var restArgs = [];
144
+        for (var _i = 0; _i < arguments.length; _i++) {
145
+          restArgs[_i] = arguments[_i];
146
+        }
147
+        var all = initialArgs.concat(restArgs);
148
+        return fn.apply(null, all);
149
+      };
150
+    }
151
+
152
+    var get = function (editor) {
153
+      return {
154
+        hasDraft: curry(hasDraft, editor),
155
+        storeDraft: curry(storeDraft, editor),
156
+        restoreDraft: curry(restoreDraft, editor),
157
+        removeDraft: curry(removeDraft, editor),
158
+        isEmpty: curry(isEmpty, editor)
159
+      };
160
+    };
161
+
162
+    var global$4 = tinymce.util.Tools.resolve('tinymce.EditorManager');
163
+
164
+    var setup = function (editor) {
165
+      editor.editorManager.on('BeforeUnload', function (e) {
166
+        var msg;
167
+        global$3.each(global$4.get(), function (editor) {
168
+          if (editor.plugins.autosave) {
169
+            editor.plugins.autosave.storeDraft();
170
+          }
171
+          if (!msg && editor.isDirty() && shouldAskBeforeUnload(editor)) {
172
+            msg = editor.translate('You have unsaved changes are you sure you want to navigate away?');
173
+          }
174
+        });
175
+        if (msg) {
176
+          e.preventDefault();
177
+          e.returnValue = msg;
178
+        }
179
+      });
180
+    };
181
+
182
+    var makeSetupHandler = function (editor, started) {
183
+      return function (api) {
184
+        api.setDisabled(!hasDraft(editor));
185
+        var editorEventCallback = function () {
186
+          return api.setDisabled(!hasDraft(editor));
187
+        };
188
+        editor.on('StoreDraft RestoreDraft RemoveDraft', editorEventCallback);
189
+        return function () {
190
+          return editor.off('StoreDraft RestoreDraft RemoveDraft', editorEventCallback);
191
+        };
192
+      };
193
+    };
194
+    var register = function (editor, started) {
195
+      startStoreDraft(editor, started);
196
+      editor.ui.registry.addButton('restoredraft', {
197
+        tooltip: 'Restore last draft',
198
+        icon: 'restore-draft',
199
+        onAction: function () {
200
+          restoreLastDraft(editor);
201
+        },
202
+        onSetup: makeSetupHandler(editor)
203
+      });
204
+      editor.ui.registry.addMenuItem('restoredraft', {
205
+        text: 'Restore last draft',
206
+        icon: 'restore-draft',
207
+        onAction: function () {
208
+          restoreLastDraft(editor);
209
+        },
210
+        onSetup: makeSetupHandler(editor)
211
+      });
212
+    };
213
+
214
+    function Plugin () {
215
+      global.add('autosave', function (editor) {
216
+        var started = Cell(false);
217
+        setup(editor);
218
+        register(editor, started);
219
+        editor.on('init', function () {
220
+          if (shouldRestoreWhenEmpty(editor) && editor.dom.isEmpty(editor.getBody())) {
221
+            restoreDraft(editor);
222
+          }
223
+        });
224
+        return get(editor);
225
+      });
226
+    }
227
+
228
+    Plugin();
229
+
230
+}(window));

+ 9
- 0
vue-element-admin/static/tinymce/plugins/autosave/plugin.min.js Vedi File

@@ -0,0 +1,9 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+!function(n){"use strict";function r(t,e){var n=t||e,r=/^(\d+)([ms]?)$/.exec(""+n);return(r[2]?{s:1e3,m:6e4}[r[2]]:1)*parseInt(n,10)}function o(t){var e=t.getParam("autosave_prefix","tinymce-autosave-{path}{query}{hash}-{id}-");return e=(e=(e=(e=e.replace(/\{path\}/g,n.document.location.pathname)).replace(/\{query\}/g,n.document.location.search)).replace(/\{hash\}/g,n.document.location.hash)).replace(/\{id\}/g,t.id)}function a(t,e){var n=t.settings.forced_root_block;return""===(e=d.trim(void 0===e?t.getBody().innerHTML:e))||new RegExp("^<"+n+"[^>]*>((\xa0|&nbsp;|[ \t]|<br[^>]*>)+?|)</"+n+">|<br>$","i").test(e)}function i(t){var e=parseInt(v.getItem(o(t)+"time"),10)||0;return!((new Date).getTime()-e>function(t){return r(t.settings.autosave_retention,"20m")}(t))||(g(t,!1),!1)}function u(t){var e=o(t);!a(t)&&t.isDirty()&&(v.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),v.setItem(e+"time",(new Date).getTime().toString()),function(t){t.fire("StoreDraft")}(t))}function s(t){var e=o(t);i(t)&&(t.setContent(v.getItem(e+"draft"),{format:"raw"}),function(t){t.fire("RestoreDraft")}(t))}function c(t,e){var n=function(t){return r(t.settings.autosave_interval,"30s")}(t);e.get()||(m.setInterval(function(){t.removed||u(t)},n),e.set(!0))}function f(t){t.undoManager.transact(function(){s(t),g(t)}),t.focus()}var l=function(t){function e(){return n}var n=t;return{get:e,set:function(t){n=t},clone:function(){return l(e())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),m=tinymce.util.Tools.resolve("tinymce.util.Delay"),v=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),d=tinymce.util.Tools.resolve("tinymce.util.Tools"),g=function(t,e){var n=o(t);v.removeItem(n+"draft"),v.removeItem(n+"time"),!1!==e&&function(t){t.fire("RemoveDraft")}(t)};function y(r){for(var o=[],t=1;t<arguments.length;t++)o[t-1]=arguments[t];return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=o.concat(t);return r.apply(null,n)}}function p(n,t){return function(t){t.setDisabled(!i(n));function e(){return t.setDisabled(!i(n))}return n.on("StoreDraft RestoreDraft RemoveDraft",e),function(){return n.off("StoreDraft RestoreDraft RemoveDraft",e)}}}var D=tinymce.util.Tools.resolve("tinymce.EditorManager");!function e(){t.add("autosave",function(t){var e=l(!1);return function(t){t.editorManager.on("BeforeUnload",function(t){var e;d.each(D.get(),function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&function(t){return t.getParam("autosave_ask_before_unload",!0)}(t)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e&&(t.preventDefault(),t.returnValue=e)})}(t),function(t,e){c(t,e),t.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:function(){f(t)},onSetup:p(t)}),t.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:function(){f(t)},onSetup:p(t)})}(t,e),t.on("init",function(){(function(t){return t.getParam("autosave_restore_when_empty",!1)})(t)&&t.dom.isEmpty(t.getBody())&&s(t)}),function(t){return{hasDraft:y(i,t),storeDraft:y(u,t),restoreDraft:y(s,t),removeDraft:y(g,t),isEmpty:y(a,t)}}(t)})}()}(window);

+ 7
- 0
vue-element-admin/static/tinymce/plugins/axupimgs/index.js Vedi File

@@ -0,0 +1,7 @@
1
+// Exports the "autosave" plugin for usage with module loaders
2
+// Usage:
3
+//   CommonJS:
4
+//     require('tinymce/plugins/autosave')
5
+//   ES2015:
6
+//     import 'tinymce/plugins/autosave'
7
+require('../axupimgs/plugin.js');

BIN
vue-element-admin/static/tinymce/plugins/axupimgs/loading.gif Vedi File


+ 73
- 0
vue-element-admin/static/tinymce/plugins/axupimgs/plugin.js Vedi File

@@ -0,0 +1,73 @@
1
+tinymce.PluginManager.add('axupimgs', function(editor, url) {
2
+	var pluginName='Ax多图片上传';
3
+	window.axupimgs={}; //扔外部公共变量,也可以扔一个自定义的位置
4
+
5
+	var baseURL=tinymce.baseURL;
6
+	var iframe1 = baseURL+'/plugins/axupimgs/upfiles.html';
7
+    axupimgs.images_upload_handler = editor.getParam('images_upload_handler', undefined, 'function');
8
+    axupimgs.images_upload_base_path = editor.getParam('images_upload_base_path', '', 'string');
9
+    axupimgs.axupimgs_filetype = editor.getParam('axupimgs_filetype', '.png,.gif,.jpg,.jpeg', 'string');
10
+	axupimgs.res=[];
11
+	var openDialog = function() {
12
+		return editor.windowManager.openUrl({
13
+			title: pluginName,
14
+			size: 'large',
15
+			url:iframe1,
16
+			buttons: [
17
+				{
18
+					type: 'cancel',
19
+					text: 'Close'
20
+				},
21
+				{
22
+					type: 'custom',
23
+					text: 'Save',
24
+					name: 'save',
25
+					primary: true
26
+				},
27
+			],
28
+			onAction: function (api, details) {
29
+				switch (details.name) {
30
+					case 'save':
31
+						var html = '';
32
+						var imgs = axupimgs.res;
33
+						var len = imgs.length;
34
+						for(var i=0;i<len;i++){
35
+							html+='<img src="'+imgs[i].url+'" />';
36
+						}
37
+						editor.insertContent(html);
38
+						axupimgs.res=[];
39
+						api.close();
40
+						break;
41
+					default:
42
+						break;
43
+				}
44
+				
45
+			}
46
+		});
47
+	};
48
+
49
+	editor.ui.registry.getAll().icons.axupimgs || editor.ui.registry.addIcon('axupimgs','<svg viewBox="0 0 1280 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M1126.2,779.8V87.6c0-24-22.6-86.9-83.5-86.9H83.5C14.7,0.7,0,63.7,0,87.7v692c0,36.2,29.2,89.7,83.5,89.7l959.3-1.3c51.7,0,83.5-42.5,83.5-88.3zm-1044,4V86.3h961.6V783.7H82.2v0.1z" fill="#53565A"/><path d="M603,461.6L521.1,366.3,313,629.8,227.2,546.8,102.4,716.8H972.8v-170L768.2,235.2,603.1,461.6zM284.6,358.4a105.4,105.4,0,0,0,73.5-30c19.5-19.1,30.3-45,30.2-71.8,0-56.8-45.9-103-102.4-103-56.6,0-102.4,46.1-102.4,103C183.4,313.5,228,358.4,284.6,358.4z" fill="#9598A0"/><path d="M1197.7,153.6l-0.3,669.3s13.5,113.9-67.4,113.9H153.6c0,24.1,23.9,87.2,83.5,87.2h959.3c58.3,0,83.6-49.5,83.6-89.9V240.8c-0.1-41.8-44.9-87.2-82.3-87.2z" fill="#53565A"/></svg>');
50
+	
51
+	editor.ui.registry.addButton('axupimgs', {
52
+		icon: 'axupimgs',
53
+        tooltip: pluginName,
54
+		onAction: function() {
55
+			openDialog();
56
+		}
57
+	});
58
+	editor.ui.registry.addMenuItem('axupimgs', {
59
+		icon: 'axupimgs',
60
+		text: '图片批量上传...',
61
+		onAction: function() {
62
+			openDialog();
63
+		}
64
+	});
65
+	return {
66
+		getMetadata: function() {
67
+			return  {
68
+				name: pluginName,
69
+				url: "http://tinymce.ax-z.cn/more-plugins/axupimgs.php",
70
+			};
71
+		}
72
+	};
73
+});

+ 73
- 0
vue-element-admin/static/tinymce/plugins/axupimgs/plugin.min.js Vedi File

@@ -0,0 +1,73 @@
1
+tinymce.PluginManager.add('axupimgs', function(editor, url) {
2
+	var pluginName='Ax多图片上传';
3
+	window.axupimgs={}; //扔外部公共变量,也可以扔一个自定义的位置
4
+
5
+	var baseURL=tinymce.baseURL;
6
+	var iframe1 = baseURL+'/plugins/axupimgs/upfiles.html';
7
+    axupimgs.images_upload_handler = editor.getParam('images_upload_handler', undefined, 'function');
8
+    axupimgs.images_upload_base_path = editor.getParam('images_upload_base_path', '', 'string');
9
+    axupimgs.axupimgs_filetype = editor.getParam('axupimgs_filetype', '.png,.gif,.jpg,.jpeg', 'string');
10
+	axupimgs.res=[];
11
+	var openDialog = function() {
12
+		return editor.windowManager.openUrl({
13
+			title: pluginName,
14
+			size: 'large',
15
+			url:iframe1,
16
+			buttons: [
17
+				{
18
+					type: 'cancel',
19
+					text: 'Close'
20
+				},
21
+				{
22
+					type: 'custom',
23
+					text: 'Save',
24
+					name: 'save',
25
+					primary: true
26
+				},
27
+			],
28
+			onAction: function (api, details) {
29
+				switch (details.name) {
30
+					case 'save':
31
+						var html = '';
32
+						var imgs = axupimgs.res;
33
+						var len = imgs.length;
34
+						for(var i=0;i<len;i++){
35
+							html+='<img src="'+imgs[i].url+'" />';
36
+						}
37
+						editor.insertContent(html);
38
+						axupimgs.res=[];
39
+						api.close();
40
+						break;
41
+					default:
42
+						break;
43
+				}
44
+				
45
+			}
46
+		});
47
+	};
48
+
49
+	editor.ui.registry.getAll().icons.axupimgs || editor.ui.registry.addIcon('axupimgs','<svg viewBox="0 0 1280 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M1126.2,779.8V87.6c0-24-22.6-86.9-83.5-86.9H83.5C14.7,0.7,0,63.7,0,87.7v692c0,36.2,29.2,89.7,83.5,89.7l959.3-1.3c51.7,0,83.5-42.5,83.5-88.3zm-1044,4V86.3h961.6V783.7H82.2v0.1z" fill="#53565A"/><path d="M603,461.6L521.1,366.3,313,629.8,227.2,546.8,102.4,716.8H972.8v-170L768.2,235.2,603.1,461.6zM284.6,358.4a105.4,105.4,0,0,0,73.5-30c19.5-19.1,30.3-45,30.2-71.8,0-56.8-45.9-103-102.4-103-56.6,0-102.4,46.1-102.4,103C183.4,313.5,228,358.4,284.6,358.4z" fill="#9598A0"/><path d="M1197.7,153.6l-0.3,669.3s13.5,113.9-67.4,113.9H153.6c0,24.1,23.9,87.2,83.5,87.2h959.3c58.3,0,83.6-49.5,83.6-89.9V240.8c-0.1-41.8-44.9-87.2-82.3-87.2z" fill="#53565A"/></svg>');
50
+	
51
+	editor.ui.registry.addButton('axupimgs', {
52
+		icon: 'axupimgs',
53
+        tooltip: pluginName,
54
+		onAction: function() {
55
+			openDialog();
56
+		}
57
+	});
58
+	editor.ui.registry.addMenuItem('axupimgs', {
59
+		icon: 'axupimgs',
60
+		text: '图片批量上传...',
61
+		onAction: function() {
62
+			openDialog();
63
+		}
64
+	});
65
+	return {
66
+		getMetadata: function() {
67
+			return  {
68
+				name: pluginName,
69
+				url: "http://tinymce.ax-z.cn/more-plugins/axupimgs.php",
70
+			};
71
+		}
72
+	};
73
+});

+ 198
- 0
vue-element-admin/static/tinymce/plugins/axupimgs/upfiles.html Vedi File

@@ -0,0 +1,198 @@
1
+<!doctype html>
2
+<html>
3
+<head>
4
+<meta charset="utf-8" />
5
+<title>axupimgs</title>
6
+<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
7
+<meta name="apple-mobile-web-app-capable" content="yes" />
8
+<meta name="apple-mobile-web-app-status-bar-style" content="black" />
9
+<meta name="format-detection" content="telephone=no">
10
+<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
11
+<style>
12
+	html,body{height:100%;margin:0;padding:0;background:#fff;}
13
+	ul{margin:0;padding:0;list-style:none;}
14
+	#wrap{padding:10px;}
15
+	#topbar{padding:10px 0;border-bottom:1px solid #ccc;text-align:right;}
16
+	#topbar button {margin:0;margin-left:5px;outline:none;padding: 4px 16px;box-sizing: border-box;
17
+		display:inline-block;border:none;border-radius:3px;text-align:center;cursor:pointer;
18
+		font-size:14px;line-height:1.5;background-color:#f0f0f0;color:#223;
19
+	}
20
+	#topbar button.primary{background-color:#3d97d4;color:#fff;}
21
+	#topbar button:hover{background-color:#207ab7;color:#fff;}
22
+	#topbar button.removeall{float:left}
23
+	#file_list {display:grid;grid-gap:10px;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));padding-top:10px;}
24
+    #file_list:empty:after{content:'可以直接拖拽文件到这里';color:#777;font-size:0.8em;}
25
+	#file_list li{position:relative;display:block;vertical-align:top;padding:5px 5px;border-radius:5px;}
26
+	#file_list li.up-over {}
27
+	#file_list li.up-now {}
28
+	#file_list li.up-now:after{content:'';position:absolute;top:0;left:0;display:block;width:100%;height:100%;background:rgba(255,255,255,0.8) url(loading.gif) center center no-repeat;border-radius:5px;z-index:999;}
29
+	#file_list li:hover{background-color:#ddd;}
30
+	#file_list li .picbox {display:flex;flex:0 0 auto;justify-content:center;overflow:hidden;position:relative;width:100%;padding-top:100%;align-items:center;}
31
+	#file_list li .picbox img {display:block;max-width:100%;max-height:100%;position:absolute;
32
+		top:50%;left:50%;transform:translateX(-50%) translateY(-50%);}
33
+	#file_list li.up-over .picbox:after{content:url('data:image/svg+xml;%20charset=utf8,%3Csvg%20viewBox%3D%220%200%201024%201024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M512%200C229.376%200%200%20229.376%200%20512s229.376%20512%20512%20512%20512-229.376%20512-512S794.624%200%20512%200z%22%20fill%3D%22%234AC711%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M855.552%20394.752l-358.4%20358.4a50.9952%2050.9952%200%200%201-72.192%200l-204.8-204.8c-18.944-19.968-18.944-51.2%200-71.168a50.5344%2050.5344%200%200%201%2072.192-1.024L460.8%20644.608l322.048-322.048c19.968-18.944%2051.2-18.944%2071.168%200%2020.48%2019.456%2020.992%2051.712%201.536%2072.192z%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E');position:absolute;bottom:2px;right:2px;z-index:9;}
34
+	#file_list li .tools {display:none;position:absolute;bottom:5px;right:5px;z-index:99;}
35
+	#file_list li:hover .tools {display:block;}
36
+	#file_list li .tools .remove{cursor:pointer;}
37
+	#file_list li .tools .remove:after{content:url('data:image/svg+xml;%20charset=utf8,%3Csvg%20width=%2224%22%20height=%2224%22%20viewBox=%220%200%2024%2024%22%20xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cpath%20d=%22M17%206h3a1%201%200%200%201%200%202h-1v11a3%203%200%200%201-3%203H8a3%203%200%200%201-3-3V8H4a1%201%200%201%201%200-2h3V5a3%203%200%200%201%203-3h4a3%203%200%200%201%203%203v1zm-2%200V5a1%201%200%200%200-1-1h-4a1%201%200%200%200-1%201v1h6zm2%202H7v11a1%201%200%200%200%201%201h8a1%201%200%200%200%201-1V8zm-8%203a1%201%200%200%201%202%200v6a1%201%200%200%201-2%200v-6zm4%200a1%201%200%200%201%202%200v6a1%201%200%200%201-2%200v-6z%22%3E%3C/path%3E%3C/svg%3E');}
38
+	#file_list li .namebox {font-size:14px;line-height:20px;max-height:40px;overflow:hidden;padding:5px 10px;text-align:center;display:flex;justify-content:center;align-items:flex-start;}
39
+	#file_list li .namebox span{word-break:break-all;vertical-align:top;}
40
+</style>
41
+
42
+</head>
43
+<body>
44
+<div id="wrap">
45
+	<div id="topbar"><button class="addfile primary">+ 添加文件</button><button class="upall primary">全部上传</button><button class="removeall">清空列表</button></div>
46
+	<ul id="file_list"></ul>
47
+</div>
48
+
49
+<script>
50
+	var editor=parent.tinymce.activeEditor;
51
+	var axupimgs=parent.axupimgs;
52
+	axupimgs.res = []; //存放本地文件的数组
53
+	var blobInfo = {file:null}
54
+	blobInfo.blob = function(){return this.file;}
55
+	var upload_handler = axupimgs.images_upload_handler;
56
+	var upload_base_path = axupimgs.images_upload_base_path;
57
+
58
+	//为列表添加排序
59
+	function reSort(){
60
+        document.querySelectorAll('#file_list li').forEach((el,i)=>{
61
+            el.setAttribute('data-num',i);
62
+        });
63
+	}
64
+
65
+    function addList(files){
66
+        var files_sum = files.length;
67
+        var vDom = document.createDocumentFragment();
68
+        for(let i=0;i<files_sum;i++){
69
+            let file = files[i];
70
+            let blobUrl = window.URL.createObjectURL(file)
71
+            axupimgs.res.push({file:file,blobUrl:blobUrl,url:''});
72
+            let li = document.createElement('li');
73
+            li.setAttribute('class','up-no');
74
+            li.setAttribute('data-time',file.lastModified);
75
+            li.innerHTML='<div class="picbox"><img src="'+blobUrl+'"></div><div class="namebox"><span>'+file.name+'</span></div><div class="tools"><a class="remove"></a></div>';
76
+            vDom.appendChild(li);
77
+        }
78
+        document.querySelector('#file_list').appendChild(vDom);
79
+        //reSort();
80
+    }
81
+
82
+
83
+    //清空列表
84
+    document.querySelector('#topbar .removeall').addEventListener('click',()=>{
85
+        axupimgs.res=[]
86
+        document.querySelectorAll('#file_list li').forEach((el,i)=>{
87
+            el.parentNode.removeChild(el)
88
+        });
89
+    });
90
+    //拖拽添加
91
+    document.addEventListener('dragover', (e)=>{
92
+        e.stopPropagation();
93
+        e.preventDefault();
94
+        e.dataTransfer.dropEffect = 'copy';
95
+    });
96
+    document.addEventListener('drop', (e)=>{
97
+        e.stopPropagation();
98
+        e.preventDefault();
99
+        if(!e.dataTransfer.files){return false;}
100
+        var dropfiles = e.dataTransfer.files;
101
+        if(!(dropfiles.length>0)){return false;}
102
+        var exts=axupimgs.axupimgs_filetype.replace(/(\s)+/g,'').toLowerCase().split(',');
103
+        var files=[];
104
+        for( let file of dropfiles ){
105
+            ext = file.name.split('.');
106
+            ext = '.'+ext[ext.length-1];
107
+            for(let s of exts){
108
+                if(s==ext){
109
+                    files.push(file);
110
+                    break;
111
+                }
112
+            }
113
+        }
114
+        if(files.length>0){ addList(files) }
115
+    });
116
+
117
+    //添加文件
118
+    document.querySelector('#topbar .addfile').addEventListener('click',()=>{
119
+        var input = document.createElement('input');
120
+        input.setAttribute('value', '');
121
+        input.setAttribute('type', 'file');
122
+        input.setAttribute('multiple', 'multiple');
123
+        input.setAttribute('accept', axupimgs.axupimgs_filetype);
124
+        input.click();
125
+        input.onchange = function() {
126
+            var files = this.files;
127
+            addList(files);
128
+        }
129
+    });
130
+
131
+	var file_i = 0;
132
+
133
+	function upAllFiles(n){
134
+		var len = axupimgs.res.length;
135
+		file_i = n;
136
+		if(len == n){
137
+			file_i=0;
138
+            document.querySelector('#topbar .upall').innerText='全部上传';
139
+			return true;
140
+		}
141
+		if( axupimgs.res[n].url!='' ){
142
+			n++;
143
+			upAllFiles(n)
144
+		}else{
145
+			blobInfo.file=axupimgs.res[n].file;
146
+			upload_handler(blobInfo,function(url){
147
+				if(upload_base_path){
148
+					
149
+					if(upload_base_path.slice(-1)=='/' && url.substr(0,1)=='/' ){
150
+						url = upload_base_path + url.slice(1);
151
+					}else if(upload_base_path.slice(-1)!='/' && url.substr(0,1)!='/' ){
152
+						url = upload_base_path + '/' + url;
153
+					}else{
154
+						url = upload_base_path + url;
155
+					}
156
+				}
157
+				axupimgs.res[file_i].url = url;
158
+				filename = url.split('/').pop();
159
+                var li = document.querySelectorAll('#file_list li')[file_i];
160
+                li.setAttribute('class','up-over');
161
+				li.querySelector('.namebox span').innerText = filename;
162
+				n++
163
+				upAllFiles(n);
164
+			},{});
165
+		}
166
+		
167
+	}
168
+
169
+    document.querySelector('#topbar .upall').addEventListener('click',(e)=>{
170
+        if(e.target.innerText!='全部上传'){return false;}
171
+        if(axupimgs.res.length>0){
172
+            document.querySelectorAll('#file_list li.up-no').forEach((el,i)=>{
173
+                el.classList ? el.classList.add('up-now') : el.className+=' up-now';
174
+            });
175
+            e.target.innerText='上传中...';
176
+            upAllFiles(0);
177
+        }
178
+    });
179
+
180
+    var observ_flist = new MutationObserver( (muList,observe)=>{
181
+        if(muList[0].addedNodes.length>0){
182
+            muList[0].addedNodes.forEach((el)=>{
183
+                el.querySelector('.remove').addEventListener('click',(e)=>{
184
+                    var li = e.target.parentNode.parentNode;
185
+                    var n = li.getAttribute('data-num');
186
+                    var el = document.querySelectorAll('#file_list li')[n];
187
+                    el.parentNode.removeChild(el);
188
+                    axupimgs.res.splice(n,1);
189
+                });
190
+            });
191
+        }
192
+        reSort();
193
+    });
194
+    observ_flist.observe(document.querySelector('#file_list'),{childList:true});
195
+
196
+</script>
197
+</body>
198
+</html>

+ 103
- 0
vue-element-admin/static/tinymce/plugins/bbcode/plugin.js Vedi File

@@ -0,0 +1,103 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+(function () {
10
+    'use strict';
11
+
12
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
+
14
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
15
+
16
+    var html2bbcode = function (s) {
17
+      s = global$1.trim(s);
18
+      var rep = function (re, str) {
19
+        s = s.replace(re, str);
20
+      };
21
+      rep(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi, '[url=$1]$2[/url]');
22
+      rep(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi, '[code][color=$1]$2[/color][/code]');
23
+      rep(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi, '[quote][color=$1]$2[/color][/quote]');
24
+      rep(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, '[code][color=$1]$2[/color][/code]');
25
+      rep(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, '[quote][color=$1]$2[/color][/quote]');
26
+      rep(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi, '[color=$1]$2[/color]');
27
+      rep(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, '[color=$1]$2[/color]');
28
+      rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi, '[size=$1]$2[/size]');
29
+      rep(/<font>(.*?)<\/font>/gi, '$1');
30
+      rep(/<img.*?src=\"(.*?)\".*?\/>/gi, '[img]$1[/img]');
31
+      rep(/<span class=\"codeStyle\">(.*?)<\/span>/gi, '[code]$1[/code]');
32
+      rep(/<span class=\"quoteStyle\">(.*?)<\/span>/gi, '[quote]$1[/quote]');
33
+      rep(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi, '[code][b]$1[/b][/code]');
34
+      rep(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi, '[quote][b]$1[/b][/quote]');
35
+      rep(/<em class=\"codeStyle\">(.*?)<\/em>/gi, '[code][i]$1[/i][/code]');
36
+      rep(/<em class=\"quoteStyle\">(.*?)<\/em>/gi, '[quote][i]$1[/i][/quote]');
37
+      rep(/<u class=\"codeStyle\">(.*?)<\/u>/gi, '[code][u]$1[/u][/code]');
38
+      rep(/<u class=\"quoteStyle\">(.*?)<\/u>/gi, '[quote][u]$1[/u][/quote]');
39
+      rep(/<\/(strong|b)>/gi, '[/b]');
40
+      rep(/<(strong|b)>/gi, '[b]');
41
+      rep(/<\/(em|i)>/gi, '[/i]');
42
+      rep(/<(em|i)>/gi, '[i]');
43
+      rep(/<\/u>/gi, '[/u]');
44
+      rep(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi, '[u]$1[/u]');
45
+      rep(/<u>/gi, '[u]');
46
+      rep(/<blockquote[^>]*>/gi, '[quote]');
47
+      rep(/<\/blockquote>/gi, '[/quote]');
48
+      rep(/<br \/>/gi, '\n');
49
+      rep(/<br\/>/gi, '\n');
50
+      rep(/<br>/gi, '\n');
51
+      rep(/<p>/gi, '');
52
+      rep(/<\/p>/gi, '\n');
53
+      rep(/&nbsp;|\u00a0/gi, ' ');
54
+      rep(/&quot;/gi, '"');
55
+      rep(/&lt;/gi, '<');
56
+      rep(/&gt;/gi, '>');
57
+      rep(/&amp;/gi, '&');
58
+      return s;
59
+    };
60
+    var bbcode2html = function (s) {
61
+      s = global$1.trim(s);
62
+      var rep = function (re, str) {
63
+        s = s.replace(re, str);
64
+      };
65
+      rep(/\n/gi, '<br />');
66
+      rep(/\[b\]/gi, '<strong>');
67
+      rep(/\[\/b\]/gi, '</strong>');
68
+      rep(/\[i\]/gi, '<em>');
69
+      rep(/\[\/i\]/gi, '</em>');
70
+      rep(/\[u\]/gi, '<u>');
71
+      rep(/\[\/u\]/gi, '</u>');
72
+      rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi, '<a href="$1">$2</a>');
73
+      rep(/\[url\](.*?)\[\/url\]/gi, '<a href="$1">$1</a>');
74
+      rep(/\[img\](.*?)\[\/img\]/gi, '<img src="$1" />');
75
+      rep(/\[color=(.*?)\](.*?)\[\/color\]/gi, '<font color="$1">$2</font>');
76
+      rep(/\[code\](.*?)\[\/code\]/gi, '<span class="codeStyle">$1</span>&nbsp;');
77
+      rep(/\[quote.*?\](.*?)\[\/quote\]/gi, '<span class="quoteStyle">$1</span>&nbsp;');
78
+      return s;
79
+    };
80
+    var Convert = {
81
+      html2bbcode: html2bbcode,
82
+      bbcode2html: bbcode2html
83
+    };
84
+
85
+    function Plugin () {
86
+      global.add('bbcode', function (editor) {
87
+        editor.on('BeforeSetContent', function (e) {
88
+          e.content = Convert.bbcode2html(e.content);
89
+        });
90
+        editor.on('PostProcess', function (e) {
91
+          if (e.set) {
92
+            e.content = Convert.bbcode2html(e.content);
93
+          }
94
+          if (e.get) {
95
+            e.content = Convert.html2bbcode(e.content);
96
+          }
97
+        });
98
+      });
99
+    }
100
+
101
+    Plugin();
102
+
103
+}());

+ 9
- 0
vue-element-admin/static/tinymce/plugins/bbcode/plugin.min.js Vedi File

@@ -0,0 +1,9 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+!function(){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=function(t){t=e.trim(t);function o(o,e){t=t.replace(o,e)}return o(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),o(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),o(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),o(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),o(/<font>(.*?)<\/font>/gi,"$1"),o(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),o(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),o(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),o(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),o(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),o(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),o(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),o(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),o(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),o(/<\/(strong|b)>/gi,"[/b]"),o(/<(strong|b)>/gi,"[b]"),o(/<\/(em|i)>/gi,"[/i]"),o(/<(em|i)>/gi,"[i]"),o(/<\/u>/gi,"[/u]"),o(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),o(/<u>/gi,"[u]"),o(/<blockquote[^>]*>/gi,"[quote]"),o(/<\/blockquote>/gi,"[/quote]"),o(/<br \/>/gi,"\n"),o(/<br\/>/gi,"\n"),o(/<br>/gi,"\n"),o(/<p>/gi,""),o(/<\/p>/gi,"\n"),o(/&nbsp;|\u00a0/gi," "),o(/&quot;/gi,'"'),o(/&lt;/gi,"<"),o(/&gt;/gi,">"),o(/&amp;/gi,"&"),t},i=function(t){t=e.trim(t);function o(o,e){t=t.replace(o,e)}return o(/\n/gi,"<br />"),o(/\[b\]/gi,"<strong>"),o(/\[\/b\]/gi,"</strong>"),o(/\[i\]/gi,"<em>"),o(/\[\/i\]/gi,"</em>"),o(/\[u\]/gi,"<u>"),o(/\[\/u\]/gi,"</u>"),o(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),o(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),o(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),o(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),o(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span>&nbsp;'),o(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span>&nbsp;'),t};!function n(){o.add("bbcode",function(o){o.on("BeforeSetContent",function(o){o.content=i(o.content)}),o.on("PostProcess",function(o){o.set&&(o.content=i(o.content)),o.get&&(o.content=t(o.content))})})}()}();

+ 1696
- 0
vue-element-admin/static/tinymce/plugins/charmap/plugin.js
File diff suppressed because it is too large
Vedi File


+ 9
- 0
vue-element-admin/static/tinymce/plugins/charmap/plugin.min.js
File diff suppressed because it is too large
Vedi File


+ 99
- 0
vue-element-admin/static/tinymce/plugins/code/plugin.js Vedi File

@@ -0,0 +1,99 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+(function () {
10
+    'use strict';
11
+
12
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
+
14
+    var setContent = function (editor, html) {
15
+      editor.focus();
16
+      editor.undoManager.transact(function () {
17
+        editor.setContent(html);
18
+      });
19
+      editor.selection.setCursorLocation();
20
+      editor.nodeChanged();
21
+    };
22
+    var getContent = function (editor) {
23
+      return editor.getContent({ source_view: true });
24
+    };
25
+    var Content = {
26
+      setContent: setContent,
27
+      getContent: getContent
28
+    };
29
+
30
+    var open = function (editor) {
31
+      var editorContent = Content.getContent(editor);
32
+      editor.windowManager.open({
33
+        title: 'Source Code',
34
+        size: 'large',
35
+        body: {
36
+          type: 'panel',
37
+          items: [{
38
+              type: 'textarea',
39
+              name: 'code'
40
+            }]
41
+        },
42
+        buttons: [
43
+          {
44
+            type: 'cancel',
45
+            name: 'cancel',
46
+            text: 'Cancel'
47
+          },
48
+          {
49
+            type: 'submit',
50
+            name: 'save',
51
+            text: 'Save',
52
+            primary: true
53
+          }
54
+        ],
55
+        initialData: { code: editorContent },
56
+        onSubmit: function (api) {
57
+          Content.setContent(editor, api.getData().code);
58
+          api.close();
59
+        }
60
+      });
61
+    };
62
+    var Dialog = { open: open };
63
+
64
+    var register = function (editor) {
65
+      editor.addCommand('mceCodeEditor', function () {
66
+        Dialog.open(editor);
67
+      });
68
+    };
69
+    var Commands = { register: register };
70
+
71
+    var register$1 = function (editor) {
72
+      editor.ui.registry.addButton('code', {
73
+        icon: 'sourcecode',
74
+        tooltip: 'Source code',
75
+        onAction: function () {
76
+          return Dialog.open(editor);
77
+        }
78
+      });
79
+      editor.ui.registry.addMenuItem('code', {
80
+        icon: 'sourcecode',
81
+        text: 'Source code',
82
+        onAction: function () {
83
+          return Dialog.open(editor);
84
+        }
85
+      });
86
+    };
87
+    var Buttons = { register: register$1 };
88
+
89
+    function Plugin () {
90
+      global.add('code', function (editor) {
91
+        Commands.register(editor);
92
+        Buttons.register(editor);
93
+        return {};
94
+      });
95
+    }
96
+
97
+    Plugin();
98
+
99
+}());

+ 9
- 0
vue-element-admin/static/tinymce/plugins/code/plugin.min.js Vedi File

@@ -0,0 +1,9 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e,n){e.focus(),e.undoManager.transact(function(){e.setContent(n)}),e.selection.setCursorLocation(),e.nodeChanged()},o=function(e){return e.getContent({source_view:!0})},n=function(n){var e=o(n);n.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:e},onSubmit:function(e){t(n,e.getData().code),e.close()}})},c=function(e){e.addCommand("mceCodeEditor",function(){n(e)})},i=function(e){e.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:function(){return n(e)}}),e.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:function(){return n(e)}})};!function u(){e.add("code",function(e){return c(e),i(e),{}})}()}();

+ 1089
- 0
vue-element-admin/static/tinymce/plugins/codesample/plugin.js
File diff suppressed because it is too large
Vedi File


+ 9
- 0
vue-element-admin/static/tinymce/plugins/codesample/plugin.min.js
File diff suppressed because it is too large
Vedi File


+ 22
- 0
vue-element-admin/static/tinymce/plugins/colorpicker/plugin.js Vedi File

@@ -0,0 +1,22 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+(function (domGlobals) {
10
+    'use strict';
11
+
12
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
+
14
+    function Plugin () {
15
+      global.add('colorpicker', function () {
16
+        domGlobals.console.warn('Color picker plugin is now built in to the core editor, please remove it from your editor configuration');
17
+      });
18
+    }
19
+
20
+    Plugin();
21
+
22
+}(window));

+ 9
- 0
vue-element-admin/static/tinymce/plugins/colorpicker/plugin.min.js Vedi File

@@ -0,0 +1,9 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+!function(o){"use strict";var i=tinymce.util.Tools.resolve("tinymce.PluginManager");!function n(){i.add("colorpicker",function(){o.console.warn("Color picker plugin is now built in to the core editor, please remove it from your editor configuration")})}()}(window);

+ 22
- 0
vue-element-admin/static/tinymce/plugins/contextmenu/plugin.js Vedi File

@@ -0,0 +1,22 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+(function (domGlobals) {
10
+    'use strict';
11
+
12
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
+
14
+    function Plugin () {
15
+      global.add('contextmenu', function () {
16
+        domGlobals.console.warn('Context menu plugin is now built in to the core editor, please remove it from your editor configuration');
17
+      });
18
+    }
19
+
20
+    Plugin();
21
+
22
+}(window));

+ 9
- 0
vue-element-admin/static/tinymce/plugins/contextmenu/plugin.min.js Vedi File

@@ -0,0 +1,9 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+!function(n){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager");!function e(){o.add("contextmenu",function(){n.console.warn("Context menu plugin is now built in to the core editor, please remove it from your editor configuration")})}()}(window);

+ 314
- 0
vue-element-admin/static/tinymce/plugins/directionality/plugin.js Vedi File

@@ -0,0 +1,314 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+(function (domGlobals) {
10
+    'use strict';
11
+
12
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
+
14
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
15
+
16
+    var setDir = function (editor, dir) {
17
+      var dom = editor.dom;
18
+      var curDir;
19
+      var blocks = editor.selection.getSelectedBlocks();
20
+      if (blocks.length) {
21
+        curDir = dom.getAttrib(blocks[0], 'dir');
22
+        global$1.each(blocks, function (block) {
23
+          if (!dom.getParent(block.parentNode, '*[dir="' + dir + '"]', dom.getRoot())) {
24
+            dom.setAttrib(block, 'dir', curDir !== dir ? dir : null);
25
+          }
26
+        });
27
+        editor.nodeChanged();
28
+      }
29
+    };
30
+    var Direction = { setDir: setDir };
31
+
32
+    var register = function (editor) {
33
+      editor.addCommand('mceDirectionLTR', function () {
34
+        Direction.setDir(editor, 'ltr');
35
+      });
36
+      editor.addCommand('mceDirectionRTL', function () {
37
+        Direction.setDir(editor, 'rtl');
38
+      });
39
+    };
40
+    var Commands = { register: register };
41
+
42
+    var noop = function () {
43
+    };
44
+    var constant = function (value) {
45
+      return function () {
46
+        return value;
47
+      };
48
+    };
49
+    var never = constant(false);
50
+    var always = constant(true);
51
+
52
+    var none = function () {
53
+      return NONE;
54
+    };
55
+    var NONE = function () {
56
+      var eq = function (o) {
57
+        return o.isNone();
58
+      };
59
+      var call = function (thunk) {
60
+        return thunk();
61
+      };
62
+      var id = function (n) {
63
+        return n;
64
+      };
65
+      var me = {
66
+        fold: function (n, s) {
67
+          return n();
68
+        },
69
+        is: never,
70
+        isSome: never,
71
+        isNone: always,
72
+        getOr: id,
73
+        getOrThunk: call,
74
+        getOrDie: function (msg) {
75
+          throw new Error(msg || 'error: getOrDie called on none.');
76
+        },
77
+        getOrNull: constant(null),
78
+        getOrUndefined: constant(undefined),
79
+        or: id,
80
+        orThunk: call,
81
+        map: none,
82
+        each: noop,
83
+        bind: none,
84
+        exists: never,
85
+        forall: always,
86
+        filter: none,
87
+        equals: eq,
88
+        equals_: eq,
89
+        toArray: function () {
90
+          return [];
91
+        },
92
+        toString: constant('none()')
93
+      };
94
+      if (Object.freeze) {
95
+        Object.freeze(me);
96
+      }
97
+      return me;
98
+    }();
99
+    var some = function (a) {
100
+      var constant_a = constant(a);
101
+      var self = function () {
102
+        return me;
103
+      };
104
+      var bind = function (f) {
105
+        return f(a);
106
+      };
107
+      var me = {
108
+        fold: function (n, s) {
109
+          return s(a);
110
+        },
111
+        is: function (v) {
112
+          return a === v;
113
+        },
114
+        isSome: always,
115
+        isNone: never,
116
+        getOr: constant_a,
117
+        getOrThunk: constant_a,
118
+        getOrDie: constant_a,
119
+        getOrNull: constant_a,
120
+        getOrUndefined: constant_a,
121
+        or: self,
122
+        orThunk: self,
123
+        map: function (f) {
124
+          return some(f(a));
125
+        },
126
+        each: function (f) {
127
+          f(a);
128
+        },
129
+        bind: bind,
130
+        exists: bind,
131
+        forall: bind,
132
+        filter: function (f) {
133
+          return f(a) ? me : NONE;
134
+        },
135
+        toArray: function () {
136
+          return [a];
137
+        },
138
+        toString: function () {
139
+          return 'some(' + a + ')';
140
+        },
141
+        equals: function (o) {
142
+          return o.is(a);
143
+        },
144
+        equals_: function (o, elementEq) {
145
+          return o.fold(never, function (b) {
146
+            return elementEq(a, b);
147
+          });
148
+        }
149
+      };
150
+      return me;
151
+    };
152
+    var from = function (value) {
153
+      return value === null || value === undefined ? NONE : some(value);
154
+    };
155
+    var Option = {
156
+      some: some,
157
+      none: none,
158
+      from: from
159
+    };
160
+
161
+    var fromHtml = function (html, scope) {
162
+      var doc = scope || domGlobals.document;
163
+      var div = doc.createElement('div');
164
+      div.innerHTML = html;
165
+      if (!div.hasChildNodes() || div.childNodes.length > 1) {
166
+        domGlobals.console.error('HTML does not have a single root node', html);
167
+        throw new Error('HTML must have a single root node');
168
+      }
169
+      return fromDom(div.childNodes[0]);
170
+    };
171
+    var fromTag = function (tag, scope) {
172
+      var doc = scope || domGlobals.document;
173
+      var node = doc.createElement(tag);
174
+      return fromDom(node);
175
+    };
176
+    var fromText = function (text, scope) {
177
+      var doc = scope || domGlobals.document;
178
+      var node = doc.createTextNode(text);
179
+      return fromDom(node);
180
+    };
181
+    var fromDom = function (node) {
182
+      if (node === null || node === undefined) {
183
+        throw new Error('Node cannot be null or undefined');
184
+      }
185
+      return { dom: constant(node) };
186
+    };
187
+    var fromPoint = function (docElm, x, y) {
188
+      var doc = docElm.dom();
189
+      return Option.from(doc.elementFromPoint(x, y)).map(fromDom);
190
+    };
191
+    var Element = {
192
+      fromHtml: fromHtml,
193
+      fromTag: fromTag,
194
+      fromText: fromText,
195
+      fromDom: fromDom,
196
+      fromPoint: fromPoint
197
+    };
198
+
199
+    var typeOf = function (x) {
200
+      if (x === null) {
201
+        return 'null';
202
+      }
203
+      var t = typeof x;
204
+      if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
205
+        return 'array';
206
+      }
207
+      if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
208
+        return 'string';
209
+      }
210
+      return t;
211
+    };
212
+    var isType = function (type) {
213
+      return function (value) {
214
+        return typeOf(value) === type;
215
+      };
216
+    };
217
+    var isFunction = isType('function');
218
+
219
+    var nativeSlice = Array.prototype.slice;
220
+    var from$1 = isFunction(Array.from) ? Array.from : function (x) {
221
+      return nativeSlice.call(x);
222
+    };
223
+
224
+    var isSupported = function (dom) {
225
+      return dom.style !== undefined && isFunction(dom.style.getPropertyValue);
226
+    };
227
+
228
+    var ATTRIBUTE = domGlobals.Node.ATTRIBUTE_NODE;
229
+    var CDATA_SECTION = domGlobals.Node.CDATA_SECTION_NODE;
230
+    var COMMENT = domGlobals.Node.COMMENT_NODE;
231
+    var DOCUMENT = domGlobals.Node.DOCUMENT_NODE;
232
+    var DOCUMENT_TYPE = domGlobals.Node.DOCUMENT_TYPE_NODE;
233
+    var DOCUMENT_FRAGMENT = domGlobals.Node.DOCUMENT_FRAGMENT_NODE;
234
+    var ELEMENT = domGlobals.Node.ELEMENT_NODE;
235
+    var TEXT = domGlobals.Node.TEXT_NODE;
236
+    var PROCESSING_INSTRUCTION = domGlobals.Node.PROCESSING_INSTRUCTION_NODE;
237
+    var ENTITY_REFERENCE = domGlobals.Node.ENTITY_REFERENCE_NODE;
238
+    var ENTITY = domGlobals.Node.ENTITY_NODE;
239
+    var NOTATION = domGlobals.Node.NOTATION_NODE;
240
+
241
+    var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
242
+
243
+    var type = function (element) {
244
+      return element.dom().nodeType;
245
+    };
246
+    var isType$1 = function (t) {
247
+      return function (element) {
248
+        return type(element) === t;
249
+      };
250
+    };
251
+    var isText = isType$1(TEXT);
252
+
253
+    var inBody = function (element) {
254
+      var dom = isText(element) ? element.dom().parentNode : element.dom();
255
+      return dom !== undefined && dom !== null && dom.ownerDocument.body.contains(dom);
256
+    };
257
+
258
+    var get = function (element, property) {
259
+      var dom = element.dom();
260
+      var styles = domGlobals.window.getComputedStyle(dom);
261
+      var r = styles.getPropertyValue(property);
262
+      var v = r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r;
263
+      return v === null ? undefined : v;
264
+    };
265
+    var getUnsafeProperty = function (dom, property) {
266
+      return isSupported(dom) ? dom.style.getPropertyValue(property) : '';
267
+    };
268
+
269
+    var getDirection = function (element) {
270
+      return get(element, 'direction') === 'rtl' ? 'rtl' : 'ltr';
271
+    };
272
+
273
+    var getNodeChangeHandler = function (editor, dir) {
274
+      return function (api) {
275
+        var nodeChangeHandler = function (e) {
276
+          var element = Element.fromDom(e.element);
277
+          api.setActive(getDirection(element) === dir);
278
+        };
279
+        editor.on('NodeChange', nodeChangeHandler);
280
+        return function () {
281
+          return editor.off('NodeChange', nodeChangeHandler);
282
+        };
283
+      };
284
+    };
285
+    var register$1 = function (editor) {
286
+      editor.ui.registry.addToggleButton('ltr', {
287
+        tooltip: 'Left to right',
288
+        icon: 'ltr',
289
+        onAction: function () {
290
+          return editor.execCommand('mceDirectionLTR');
291
+        },
292
+        onSetup: getNodeChangeHandler(editor, 'ltr')
293
+      });
294
+      editor.ui.registry.addToggleButton('rtl', {
295
+        tooltip: 'Right to left',
296
+        icon: 'rtl',
297
+        onAction: function () {
298
+          return editor.execCommand('mceDirectionRTL');
299
+        },
300
+        onSetup: getNodeChangeHandler(editor, 'rtl')
301
+      });
302
+    };
303
+    var Buttons = { register: register$1 };
304
+
305
+    function Plugin () {
306
+      global.add('directionality', function (editor) {
307
+        Commands.register(editor);
308
+        Buttons.register(editor);
309
+      });
310
+    }
311
+
312
+    Plugin();
313
+
314
+}(window));

+ 9
- 0
vue-element-admin/static/tinymce/plugins/directionality/plugin.min.js Vedi File

@@ -0,0 +1,9 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+!function(i){"use strict";function n(){}function u(n){return function(){return n}}function t(){return a}var e,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(n,t){var e,r=n.dom,o=n.selection.getSelectedBlocks();o.length&&(e=r.getAttrib(o[0],"dir"),c.each(o,function(n){r.getParent(n.parentNode,'*[dir="'+t+'"]',r.getRoot())||r.setAttrib(n,"dir",e!==t?t:null)}),n.nodeChanged())},d=function(n){n.addCommand("mceDirectionLTR",function(){o(n,"ltr")}),n.addCommand("mceDirectionRTL",function(){o(n,"rtl")})},f=u(!1),l=u(!0),a=(e={fold:function(n,t){return n()},is:f,isSome:f,isNone:l,getOr:s,getOrThunk:N,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(undefined),or:s,orThunk:N,map:t,each:n,bind:t,exists:f,forall:l,filter:t,equals:m,equals_:m,toArray:function(){return[]},toString:u("none()")},Object.freeze&&Object.freeze(e),e);function m(n){return n.isNone()}function N(n){return n()}function s(n){return n}function g(n,t){var e=n.dom(),r=i.window.getComputedStyle(e).getPropertyValue(t),o=""!==r||function(n){var t=A(n)?n.dom().parentNode:n.dom();return t!==undefined&&null!==t&&t.ownerDocument.body.contains(t)}(n)?r:w(e,t);return null===o?undefined:o}function T(t,r){return function(e){function n(n){var t=p.fromDom(n.element);e.setActive(function(n){return"rtl"===g(n,"direction")?"rtl":"ltr"}(t)===r)}return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}}}var E,O,y=function(e){function n(){return o}function t(n){return n(e)}var r=u(e),o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:l,isNone:f,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:n,orThunk:n,map:function(n){return y(n(e))},each:function(n){n(e)},bind:t,exists:t,forall:t,filter:function(n){return n(e)?o:a},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(f,function(n){return t(e,n)})}};return o},D=function(n){return null===n||n===undefined?a:y(n)},h=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:u(n)}},p={fromHtml:function(n,t){var e=(t||i.document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1<e.childNodes.length)throw i.console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return h(e.childNodes[0])},fromTag:function(n,t){var e=(t||i.document).createElement(n);return h(e)},fromText:function(n,t){var e=(t||i.document).createTextNode(n);return h(e)},fromDom:h,fromPoint:function(n,t,e){var r=n.dom();return D(r.elementFromPoint(t,e)).map(h)}},_=(E="function",function(n){return function(n){if(null===n)return"null";var t=typeof n;return"object"==t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t}(n)===E}),v=Array.prototype.slice,C=(_(Array.from)&&Array.from,i.Node.ATTRIBUTE_NODE,i.Node.CDATA_SECTION_NODE,i.Node.COMMENT_NODE,i.Node.DOCUMENT_NODE,i.Node.DOCUMENT_TYPE_NODE,i.Node.DOCUMENT_FRAGMENT_NODE,i.Node.ELEMENT_NODE,i.Node.TEXT_NODE),A=(i.Node.PROCESSING_INSTRUCTION_NODE,i.Node.ENTITY_REFERENCE_NODE,i.Node.ENTITY_NODE,i.Node.NOTATION_NODE,"undefined"!=typeof i.window?i.window:Function("return this;")(),O=C,function(n){return function(n){return n.dom().nodeType}(n)===O}),w=function(n,t){return function(n){return n.style!==undefined&&_(n.style.getPropertyValue)}(n)?n.style.getPropertyValue(t):""},S=function(n){n.ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:function(){return n.execCommand("mceDirectionLTR")},onSetup:T(n,"ltr")}),n.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:function(){return n.execCommand("mceDirectionRTL")},onSetup:T(n,"rtl")})};!function R(){r.add("directionality",function(n){d(n),S(n)})}()}(window);

+ 9015
- 0
vue-element-admin/static/tinymce/plugins/emoticons/js/emojis.js
File diff suppressed because it is too large
Vedi File


+ 2
- 0
vue-element-admin/static/tinymce/plugins/emoticons/js/emojis.min.js
File diff suppressed because it is too large
Vedi File


+ 589
- 0
vue-element-admin/static/tinymce/plugins/emoticons/plugin.js Vedi File

@@ -0,0 +1,589 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+(function (domGlobals) {
10
+    'use strict';
11
+
12
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
+
14
+    var noop = function () {
15
+    };
16
+    var constant = function (value) {
17
+      return function () {
18
+        return value;
19
+      };
20
+    };
21
+    var never = constant(false);
22
+    var always = constant(true);
23
+
24
+    var none = function () {
25
+      return NONE;
26
+    };
27
+    var NONE = function () {
28
+      var eq = function (o) {
29
+        return o.isNone();
30
+      };
31
+      var call = function (thunk) {
32
+        return thunk();
33
+      };
34
+      var id = function (n) {
35
+        return n;
36
+      };
37
+      var me = {
38
+        fold: function (n, s) {
39
+          return n();
40
+        },
41
+        is: never,
42
+        isSome: never,
43
+        isNone: always,
44
+        getOr: id,
45
+        getOrThunk: call,
46
+        getOrDie: function (msg) {
47
+          throw new Error(msg || 'error: getOrDie called on none.');
48
+        },
49
+        getOrNull: constant(null),
50
+        getOrUndefined: constant(undefined),
51
+        or: id,
52
+        orThunk: call,
53
+        map: none,
54
+        each: noop,
55
+        bind: none,
56
+        exists: never,
57
+        forall: always,
58
+        filter: none,
59
+        equals: eq,
60
+        equals_: eq,
61
+        toArray: function () {
62
+          return [];
63
+        },
64
+        toString: constant('none()')
65
+      };
66
+      if (Object.freeze) {
67
+        Object.freeze(me);
68
+      }
69
+      return me;
70
+    }();
71
+    var some = function (a) {
72
+      var constant_a = constant(a);
73
+      var self = function () {
74
+        return me;
75
+      };
76
+      var bind = function (f) {
77
+        return f(a);
78
+      };
79
+      var me = {
80
+        fold: function (n, s) {
81
+          return s(a);
82
+        },
83
+        is: function (v) {
84
+          return a === v;
85
+        },
86
+        isSome: always,
87
+        isNone: never,
88
+        getOr: constant_a,
89
+        getOrThunk: constant_a,
90
+        getOrDie: constant_a,
91
+        getOrNull: constant_a,
92
+        getOrUndefined: constant_a,
93
+        or: self,
94
+        orThunk: self,
95
+        map: function (f) {
96
+          return some(f(a));
97
+        },
98
+        each: function (f) {
99
+          f(a);
100
+        },
101
+        bind: bind,
102
+        exists: bind,
103
+        forall: bind,
104
+        filter: function (f) {
105
+          return f(a) ? me : NONE;
106
+        },
107
+        toArray: function () {
108
+          return [a];
109
+        },
110
+        toString: function () {
111
+          return 'some(' + a + ')';
112
+        },
113
+        equals: function (o) {
114
+          return o.is(a);
115
+        },
116
+        equals_: function (o, elementEq) {
117
+          return o.fold(never, function (b) {
118
+            return elementEq(a, b);
119
+          });
120
+        }
121
+      };
122
+      return me;
123
+    };
124
+    var from = function (value) {
125
+      return value === null || value === undefined ? NONE : some(value);
126
+    };
127
+    var Option = {
128
+      some: some,
129
+      none: none,
130
+      from: from
131
+    };
132
+
133
+    var typeOf = function (x) {
134
+      if (x === null) {
135
+        return 'null';
136
+      }
137
+      var t = typeof x;
138
+      if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
139
+        return 'array';
140
+      }
141
+      if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
142
+        return 'string';
143
+      }
144
+      return t;
145
+    };
146
+    var isType = function (type) {
147
+      return function (value) {
148
+        return typeOf(value) === type;
149
+      };
150
+    };
151
+    var isFunction = isType('function');
152
+
153
+    var nativeSlice = Array.prototype.slice;
154
+    var exists = function (xs, pred) {
155
+      for (var i = 0, len = xs.length; i < len; i++) {
156
+        var x = xs[i];
157
+        if (pred(x, i)) {
158
+          return true;
159
+        }
160
+      }
161
+      return false;
162
+    };
163
+    var map = function (xs, f) {
164
+      var len = xs.length;
165
+      var r = new Array(len);
166
+      for (var i = 0; i < len; i++) {
167
+        var x = xs[i];
168
+        r[i] = f(x, i);
169
+      }
170
+      return r;
171
+    };
172
+    var from$1 = isFunction(Array.from) ? Array.from : function (x) {
173
+      return nativeSlice.call(x);
174
+    };
175
+
176
+    var contains = function (str, substr) {
177
+      return str.indexOf(substr) !== -1;
178
+    };
179
+
180
+    var emojiMatches = function (emoji, lowerCasePattern) {
181
+      return contains(emoji.title.toLowerCase(), lowerCasePattern) || exists(emoji.keywords, function (k) {
182
+        return contains(k.toLowerCase(), lowerCasePattern);
183
+      });
184
+    };
185
+    var emojisFrom = function (list, pattern, maxResults) {
186
+      var matches = [];
187
+      var lowerCasePattern = pattern.toLowerCase();
188
+      var reachedLimit = maxResults.fold(function () {
189
+        return never;
190
+      }, function (max) {
191
+        return function (size) {
192
+          return size >= max;
193
+        };
194
+      });
195
+      for (var i = 0; i < list.length; i++) {
196
+        if (pattern.length === 0 || emojiMatches(list[i], lowerCasePattern)) {
197
+          matches.push({
198
+            value: list[i].char,
199
+            text: list[i].title,
200
+            icon: list[i].char
201
+          });
202
+          if (reachedLimit(matches.length)) {
203
+            break;
204
+          }
205
+        }
206
+      }
207
+      return matches;
208
+    };
209
+
210
+    var init = function (editor, database) {
211
+      editor.ui.registry.addAutocompleter('emoticons', {
212
+        ch: ':',
213
+        columns: 'auto',
214
+        minChars: 2,
215
+        fetch: function (pattern, maxResults) {
216
+          return database.waitForLoad().then(function () {
217
+            var candidates = database.listAll();
218
+            return emojisFrom(candidates, pattern, Option.some(maxResults));
219
+          });
220
+        },
221
+        onAction: function (autocompleteApi, rng, value) {
222
+          editor.selection.setRng(rng);
223
+          editor.insertContent(value);
224
+          autocompleteApi.hide();
225
+        }
226
+      });
227
+    };
228
+
229
+    var Cell = function (initial) {
230
+      var value = initial;
231
+      var get = function () {
232
+        return value;
233
+      };
234
+      var set = function (v) {
235
+        value = v;
236
+      };
237
+      var clone = function () {
238
+        return Cell(get());
239
+      };
240
+      return {
241
+        get: get,
242
+        set: set,
243
+        clone: clone
244
+      };
245
+    };
246
+
247
+    var last = function (fn, rate) {
248
+      var timer = null;
249
+      var cancel = function () {
250
+        if (timer !== null) {
251
+          domGlobals.clearTimeout(timer);
252
+          timer = null;
253
+        }
254
+      };
255
+      var throttle = function () {
256
+        var args = [];
257
+        for (var _i = 0; _i < arguments.length; _i++) {
258
+          args[_i] = arguments[_i];
259
+        }
260
+        if (timer !== null) {
261
+          domGlobals.clearTimeout(timer);
262
+        }
263
+        timer = domGlobals.setTimeout(function () {
264
+          fn.apply(null, args);
265
+          timer = null;
266
+        }, rate);
267
+      };
268
+      return {
269
+        cancel: cancel,
270
+        throttle: throttle
271
+      };
272
+    };
273
+
274
+    var insertEmoticon = function (editor, ch) {
275
+      editor.insertContent(ch);
276
+    };
277
+
278
+    var hasOwnProperty = Object.prototype.hasOwnProperty;
279
+    var shallow = function (old, nu) {
280
+      return nu;
281
+    };
282
+    var baseMerge = function (merger) {
283
+      return function () {
284
+        var objects = new Array(arguments.length);
285
+        for (var i = 0; i < objects.length; i++) {
286
+          objects[i] = arguments[i];
287
+        }
288
+        if (objects.length === 0) {
289
+          throw new Error('Can\'t merge zero objects');
290
+        }
291
+        var ret = {};
292
+        for (var j = 0; j < objects.length; j++) {
293
+          var curObject = objects[j];
294
+          for (var key in curObject) {
295
+            if (hasOwnProperty.call(curObject, key)) {
296
+              ret[key] = merger(ret[key], curObject[key]);
297
+            }
298
+          }
299
+        }
300
+        return ret;
301
+      };
302
+    };
303
+    var merge = baseMerge(shallow);
304
+
305
+    var keys = Object.keys;
306
+    var hasOwnProperty$1 = Object.hasOwnProperty;
307
+    var each = function (obj, f) {
308
+      var props = keys(obj);
309
+      for (var k = 0, len = props.length; k < len; k++) {
310
+        var i = props[k];
311
+        var x = obj[i];
312
+        f(x, i);
313
+      }
314
+    };
315
+    var map$1 = function (obj, f) {
316
+      return tupleMap(obj, function (x, i) {
317
+        return {
318
+          k: i,
319
+          v: f(x, i)
320
+        };
321
+      });
322
+    };
323
+    var tupleMap = function (obj, f) {
324
+      var r = {};
325
+      each(obj, function (x, i) {
326
+        var tuple = f(x, i);
327
+        r[tuple.k] = tuple.v;
328
+      });
329
+      return r;
330
+    };
331
+    var has = function (obj, key) {
332
+      return hasOwnProperty$1.call(obj, key);
333
+    };
334
+
335
+    var global$1 = tinymce.util.Tools.resolve('tinymce.Resource');
336
+
337
+    var global$2 = tinymce.util.Tools.resolve('tinymce.util.Delay');
338
+
339
+    var global$3 = tinymce.util.Tools.resolve('tinymce.util.Promise');
340
+
341
+    var DEFAULT_ID = 'tinymce.plugins.emoticons';
342
+    var getEmoticonDatabaseUrl = function (editor, pluginUrl) {
343
+      return editor.getParam('emoticons_database_url', pluginUrl + '/js/emojis' + editor.suffix + '.js');
344
+    };
345
+    var getEmoticonDatabaseId = function (editor) {
346
+      return editor.getParam('emoticons_database_id', DEFAULT_ID, 'string');
347
+    };
348
+    var getAppendedEmoticons = function (editor) {
349
+      return editor.getParam('emoticons_append', {}, 'object');
350
+    };
351
+    var Settings = {
352
+      getEmoticonDatabaseUrl: getEmoticonDatabaseUrl,
353
+      getEmoticonDatabaseId: getEmoticonDatabaseId,
354
+      getAppendedEmoticons: getAppendedEmoticons
355
+    };
356
+
357
+    var ALL_CATEGORY = 'All';
358
+    var categoryNameMap = {
359
+      symbols: 'Symbols',
360
+      people: 'People',
361
+      animals_and_nature: 'Animals and Nature',
362
+      food_and_drink: 'Food and Drink',
363
+      activity: 'Activity',
364
+      travel_and_places: 'Travel and Places',
365
+      objects: 'Objects',
366
+      flags: 'Flags',
367
+      user: 'User Defined'
368
+    };
369
+    var translateCategory = function (categories, name) {
370
+      return has(categories, name) ? categories[name] : name;
371
+    };
372
+    var getUserDefinedEmoticons = function (editor) {
373
+      var userDefinedEmoticons = Settings.getAppendedEmoticons(editor);
374
+      return map$1(userDefinedEmoticons, function (value) {
375
+        return merge({
376
+          keywords: [],
377
+          category: 'user'
378
+        }, value);
379
+      });
380
+    };
381
+    var initDatabase = function (editor, databaseUrl, databaseId) {
382
+      var categories = Cell(Option.none());
383
+      var all = Cell(Option.none());
384
+      var processEmojis = function (emojis) {
385
+        var cats = {};
386
+        var everything = [];
387
+        each(emojis, function (lib, title) {
388
+          var entry = {
389
+            title: title,
390
+            keywords: lib.keywords,
391
+            char: lib.char,
392
+            category: translateCategory(categoryNameMap, lib.category)
393
+          };
394
+          var current = cats[entry.category] !== undefined ? cats[entry.category] : [];
395
+          cats[entry.category] = current.concat([entry]);
396
+          everything.push(entry);
397
+        });
398
+        categories.set(Option.some(cats));
399
+        all.set(Option.some(everything));
400
+      };
401
+      editor.on('init', function () {
402
+        global$1.load(databaseId, databaseUrl).then(function (emojis) {
403
+          var userEmojis = getUserDefinedEmoticons(editor);
404
+          processEmojis(merge(emojis, userEmojis));
405
+        }, function (err) {
406
+          domGlobals.console.log('Failed to load emoticons: ' + err);
407
+          categories.set(Option.some({}));
408
+          all.set(Option.some([]));
409
+        });
410
+      });
411
+      var listCategory = function (category) {
412
+        if (category === ALL_CATEGORY) {
413
+          return listAll();
414
+        }
415
+        return categories.get().bind(function (cats) {
416
+          return Option.from(cats[category]);
417
+        }).getOr([]);
418
+      };
419
+      var listAll = function () {
420
+        return all.get().getOr([]);
421
+      };
422
+      var listCategories = function () {
423
+        return [ALL_CATEGORY].concat(keys(categories.get().getOr({})));
424
+      };
425
+      var waitForLoad = function () {
426
+        if (hasLoaded()) {
427
+          return global$3.resolve(true);
428
+        } else {
429
+          return new global$3(function (resolve, reject) {
430
+            var numRetries = 15;
431
+            var interval = global$2.setInterval(function () {
432
+              if (hasLoaded()) {
433
+                global$2.clearInterval(interval);
434
+                resolve(true);
435
+              } else {
436
+                numRetries--;
437
+                if (numRetries < 0) {
438
+                  domGlobals.console.log('Could not load emojis from url: ' + databaseUrl);
439
+                  global$2.clearInterval(interval);
440
+                  reject(false);
441
+                }
442
+              }
443
+            }, 100);
444
+          });
445
+        }
446
+      };
447
+      var hasLoaded = function () {
448
+        return categories.get().isSome() && all.get().isSome();
449
+      };
450
+      return {
451
+        listCategories: listCategories,
452
+        hasLoaded: hasLoaded,
453
+        waitForLoad: waitForLoad,
454
+        listAll: listAll,
455
+        listCategory: listCategory
456
+      };
457
+    };
458
+
459
+    var patternName = 'pattern';
460
+    var open = function (editor, database) {
461
+      var initialState = {
462
+        pattern: '',
463
+        results: emojisFrom(database.listAll(), '', Option.some(300))
464
+      };
465
+      var currentTab = Cell(ALL_CATEGORY);
466
+      var scan = function (dialogApi) {
467
+        var dialogData = dialogApi.getData();
468
+        var category = currentTab.get();
469
+        var candidates = database.listCategory(category);
470
+        var results = emojisFrom(candidates, dialogData[patternName], category === ALL_CATEGORY ? Option.some(300) : Option.none());
471
+        dialogApi.setData({ results: results });
472
+      };
473
+      var updateFilter = last(function (dialogApi) {
474
+        scan(dialogApi);
475
+      }, 200);
476
+      var searchField = {
477
+        label: 'Search',
478
+        type: 'input',
479
+        name: patternName
480
+      };
481
+      var resultsField = {
482
+        type: 'collection',
483
+        name: 'results'
484
+      };
485
+      var getInitialState = function () {
486
+        var body = {
487
+          type: 'tabpanel',
488
+          tabs: map(database.listCategories(), function (cat) {
489
+            return {
490
+              title: cat,
491
+              name: cat,
492
+              items: [
493
+                searchField,
494
+                resultsField
495
+              ]
496
+            };
497
+          })
498
+        };
499
+        return {
500
+          title: 'Emoticons',
501
+          size: 'normal',
502
+          body: body,
503
+          initialData: initialState,
504
+          onTabChange: function (dialogApi, details) {
505
+            currentTab.set(details.newTabName);
506
+            updateFilter.throttle(dialogApi);
507
+          },
508
+          onChange: updateFilter.throttle,
509
+          onAction: function (dialogApi, actionData) {
510
+            if (actionData.name === 'results') {
511
+              insertEmoticon(editor, actionData.value);
512
+              dialogApi.close();
513
+            }
514
+          },
515
+          buttons: [{
516
+              type: 'cancel',
517
+              text: 'Close',
518
+              primary: true
519
+            }]
520
+        };
521
+      };
522
+      var dialogApi = editor.windowManager.open(getInitialState());
523
+      dialogApi.focus(patternName);
524
+      if (!database.hasLoaded()) {
525
+        dialogApi.block('Loading emoticons...');
526
+        database.waitForLoad().then(function () {
527
+          dialogApi.redial(getInitialState());
528
+          updateFilter.throttle(dialogApi);
529
+          dialogApi.focus(patternName);
530
+          dialogApi.unblock();
531
+        }).catch(function (err) {
532
+          dialogApi.redial({
533
+            title: 'Emoticons',
534
+            body: {
535
+              type: 'panel',
536
+              items: [{
537
+                  type: 'alertbanner',
538
+                  level: 'error',
539
+                  icon: 'warning',
540
+                  text: '<p>Could not load emoticons</p>'
541
+                }]
542
+            },
543
+            buttons: [{
544
+                type: 'cancel',
545
+                text: 'Close',
546
+                primary: true
547
+              }],
548
+            initialData: {
549
+              pattern: '',
550
+              results: []
551
+            }
552
+          });
553
+          dialogApi.focus(patternName);
554
+          dialogApi.unblock();
555
+        });
556
+      }
557
+    };
558
+    var Dialog = { open: open };
559
+
560
+    var register = function (editor, database) {
561
+      var onAction = function () {
562
+        return Dialog.open(editor, database);
563
+      };
564
+      editor.ui.registry.addButton('emoticons', {
565
+        tooltip: 'Emoticons',
566
+        icon: 'emoji',
567
+        onAction: onAction
568
+      });
569
+      editor.ui.registry.addMenuItem('emoticons', {
570
+        text: 'Emoticons...',
571
+        icon: 'emoji',
572
+        onAction: onAction
573
+      });
574
+    };
575
+    var Buttons = { register: register };
576
+
577
+    function Plugin () {
578
+      global.add('emoticons', function (editor, pluginUrl) {
579
+        var databaseUrl = Settings.getEmoticonDatabaseUrl(editor, pluginUrl);
580
+        var databaseId = Settings.getEmoticonDatabaseId(editor);
581
+        var database = initDatabase(editor, databaseUrl, databaseId);
582
+        Buttons.register(editor, database);
583
+        init(editor, database);
584
+      });
585
+    }
586
+
587
+    Plugin();
588
+
589
+}(window));

+ 9
- 0
vue-element-admin/static/tinymce/plugins/emoticons/plugin.min.js
File diff suppressed because it is too large
Vedi File


+ 582
- 0
vue-element-admin/static/tinymce/plugins/fullpage/plugin.js Vedi File

@@ -0,0 +1,582 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+(function (domGlobals) {
10
+    'use strict';
11
+
12
+    var Cell = function (initial) {
13
+      var value = initial;
14
+      var get = function () {
15
+        return value;
16
+      };
17
+      var set = function (v) {
18
+        value = v;
19
+      };
20
+      var clone = function () {
21
+        return Cell(get());
22
+      };
23
+      return {
24
+        get: get,
25
+        set: set,
26
+        clone: clone
27
+      };
28
+    };
29
+
30
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
31
+
32
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
33
+
34
+    var global$2 = tinymce.util.Tools.resolve('tinymce.html.DomParser');
35
+
36
+    var global$3 = tinymce.util.Tools.resolve('tinymce.html.Node');
37
+
38
+    var global$4 = tinymce.util.Tools.resolve('tinymce.html.Serializer');
39
+
40
+    var shouldHideInSourceView = function (editor) {
41
+      return editor.getParam('fullpage_hide_in_source_view');
42
+    };
43
+    var getDefaultXmlPi = function (editor) {
44
+      return editor.getParam('fullpage_default_xml_pi');
45
+    };
46
+    var getDefaultEncoding = function (editor) {
47
+      return editor.getParam('fullpage_default_encoding');
48
+    };
49
+    var getDefaultFontFamily = function (editor) {
50
+      return editor.getParam('fullpage_default_font_family');
51
+    };
52
+    var getDefaultFontSize = function (editor) {
53
+      return editor.getParam('fullpage_default_font_size');
54
+    };
55
+    var getDefaultTextColor = function (editor) {
56
+      return editor.getParam('fullpage_default_text_color');
57
+    };
58
+    var getDefaultTitle = function (editor) {
59
+      return editor.getParam('fullpage_default_title');
60
+    };
61
+    var getDefaultDocType = function (editor) {
62
+      return editor.getParam('fullpage_default_doctype', '<!DOCTYPE html>');
63
+    };
64
+    var Settings = {
65
+      shouldHideInSourceView: shouldHideInSourceView,
66
+      getDefaultXmlPi: getDefaultXmlPi,
67
+      getDefaultEncoding: getDefaultEncoding,
68
+      getDefaultFontFamily: getDefaultFontFamily,
69
+      getDefaultFontSize: getDefaultFontSize,
70
+      getDefaultTextColor: getDefaultTextColor,
71
+      getDefaultTitle: getDefaultTitle,
72
+      getDefaultDocType: getDefaultDocType
73
+    };
74
+
75
+    var parseHeader = function (head) {
76
+      return global$2({
77
+        validate: false,
78
+        root_name: '#document'
79
+      }).parse(head);
80
+    };
81
+    var htmlToData = function (editor, head) {
82
+      var headerFragment = parseHeader(head);
83
+      var data = {};
84
+      var elm, matches;
85
+      function getAttr(elm, name) {
86
+        var value = elm.attr(name);
87
+        return value || '';
88
+      }
89
+      data.fontface = Settings.getDefaultFontFamily(editor);
90
+      data.fontsize = Settings.getDefaultFontSize(editor);
91
+      elm = headerFragment.firstChild;
92
+      if (elm.type === 7) {
93
+        data.xml_pi = true;
94
+        matches = /encoding="([^"]+)"/.exec(elm.value);
95
+        if (matches) {
96
+          data.docencoding = matches[1];
97
+        }
98
+      }
99
+      elm = headerFragment.getAll('#doctype')[0];
100
+      if (elm) {
101
+        data.doctype = '<!DOCTYPE' + elm.value + '>';
102
+      }
103
+      elm = headerFragment.getAll('title')[0];
104
+      if (elm && elm.firstChild) {
105
+        data.title = elm.firstChild.value;
106
+      }
107
+      global$1.each(headerFragment.getAll('meta'), function (meta) {
108
+        var name = meta.attr('name');
109
+        var httpEquiv = meta.attr('http-equiv');
110
+        var matches;
111
+        if (name) {
112
+          data[name.toLowerCase()] = meta.attr('content');
113
+        } else if (httpEquiv === 'Content-Type') {
114
+          matches = /charset\s*=\s*(.*)\s*/gi.exec(meta.attr('content'));
115
+          if (matches) {
116
+            data.docencoding = matches[1];
117
+          }
118
+        }
119
+      });
120
+      elm = headerFragment.getAll('html')[0];
121
+      if (elm) {
122
+        data.langcode = getAttr(elm, 'lang') || getAttr(elm, 'xml:lang');
123
+      }
124
+      data.stylesheets = [];
125
+      global$1.each(headerFragment.getAll('link'), function (link) {
126
+        if (link.attr('rel') === 'stylesheet') {
127
+          data.stylesheets.push(link.attr('href'));
128
+        }
129
+      });
130
+      elm = headerFragment.getAll('body')[0];
131
+      if (elm) {
132
+        data.langdir = getAttr(elm, 'dir');
133
+        data.style = getAttr(elm, 'style');
134
+        data.visited_color = getAttr(elm, 'vlink');
135
+        data.link_color = getAttr(elm, 'link');
136
+        data.active_color = getAttr(elm, 'alink');
137
+      }
138
+      return data;
139
+    };
140
+    var dataToHtml = function (editor, data, head) {
141
+      var headerFragment, headElement, html, elm, value;
142
+      var dom = editor.dom;
143
+      function setAttr(elm, name, value) {
144
+        elm.attr(name, value ? value : undefined);
145
+      }
146
+      function addHeadNode(node) {
147
+        if (headElement.firstChild) {
148
+          headElement.insert(node, headElement.firstChild);
149
+        } else {
150
+          headElement.append(node);
151
+        }
152
+      }
153
+      headerFragment = parseHeader(head);
154
+      headElement = headerFragment.getAll('head')[0];
155
+      if (!headElement) {
156
+        elm = headerFragment.getAll('html')[0];
157
+        headElement = new global$3('head', 1);
158
+        if (elm.firstChild) {
159
+          elm.insert(headElement, elm.firstChild, true);
160
+        } else {
161
+          elm.append(headElement);
162
+        }
163
+      }
164
+      elm = headerFragment.firstChild;
165
+      if (data.xml_pi) {
166
+        value = 'version="1.0"';
167
+        if (data.docencoding) {
168
+          value += ' encoding="' + data.docencoding + '"';
169
+        }
170
+        if (elm.type !== 7) {
171
+          elm = new global$3('xml', 7);
172
+          headerFragment.insert(elm, headerFragment.firstChild, true);
173
+        }
174
+        elm.value = value;
175
+      } else if (elm && elm.type === 7) {
176
+        elm.remove();
177
+      }
178
+      elm = headerFragment.getAll('#doctype')[0];
179
+      if (data.doctype) {
180
+        if (!elm) {
181
+          elm = new global$3('#doctype', 10);
182
+          if (data.xml_pi) {
183
+            headerFragment.insert(elm, headerFragment.firstChild);
184
+          } else {
185
+            addHeadNode(elm);
186
+          }
187
+        }
188
+        elm.value = data.doctype.substring(9, data.doctype.length - 1);
189
+      } else if (elm) {
190
+        elm.remove();
191
+      }
192
+      elm = null;
193
+      global$1.each(headerFragment.getAll('meta'), function (meta) {
194
+        if (meta.attr('http-equiv') === 'Content-Type') {
195
+          elm = meta;
196
+        }
197
+      });
198
+      if (data.docencoding) {
199
+        if (!elm) {
200
+          elm = new global$3('meta', 1);
201
+          elm.attr('http-equiv', 'Content-Type');
202
+          elm.shortEnded = true;
203
+          addHeadNode(elm);
204
+        }
205
+        elm.attr('content', 'text/html; charset=' + data.docencoding);
206
+      } else if (elm) {
207
+        elm.remove();
208
+      }
209
+      elm = headerFragment.getAll('title')[0];
210
+      if (data.title) {
211
+        if (!elm) {
212
+          elm = new global$3('title', 1);
213
+          addHeadNode(elm);
214
+        } else {
215
+          elm.empty();
216
+        }
217
+        elm.append(new global$3('#text', 3)).value = data.title;
218
+      } else if (elm) {
219
+        elm.remove();
220
+      }
221
+      global$1.each('keywords,description,author,copyright,robots'.split(','), function (name) {
222
+        var nodes = headerFragment.getAll('meta');
223
+        var i, meta;
224
+        var value = data[name];
225
+        for (i = 0; i < nodes.length; i++) {
226
+          meta = nodes[i];
227
+          if (meta.attr('name') === name) {
228
+            if (value) {
229
+              meta.attr('content', value);
230
+            } else {
231
+              meta.remove();
232
+            }
233
+            return;
234
+          }
235
+        }
236
+        if (value) {
237
+          elm = new global$3('meta', 1);
238
+          elm.attr('name', name);
239
+          elm.attr('content', value);
240
+          elm.shortEnded = true;
241
+          addHeadNode(elm);
242
+        }
243
+      });
244
+      var currentStyleSheetsMap = {};
245
+      global$1.each(headerFragment.getAll('link'), function (stylesheet) {
246
+        if (stylesheet.attr('rel') === 'stylesheet') {
247
+          currentStyleSheetsMap[stylesheet.attr('href')] = stylesheet;
248
+        }
249
+      });
250
+      global$1.each(data.stylesheets, function (stylesheet) {
251
+        if (!currentStyleSheetsMap[stylesheet]) {
252
+          elm = new global$3('link', 1);
253
+          elm.attr({
254
+            rel: 'stylesheet',
255
+            text: 'text/css',
256
+            href: stylesheet
257
+          });
258
+          elm.shortEnded = true;
259
+          addHeadNode(elm);
260
+        }
261
+        delete currentStyleSheetsMap[stylesheet];
262
+      });
263
+      global$1.each(currentStyleSheetsMap, function (stylesheet) {
264
+        stylesheet.remove();
265
+      });
266
+      elm = headerFragment.getAll('body')[0];
267
+      if (elm) {
268
+        setAttr(elm, 'dir', data.langdir);
269
+        setAttr(elm, 'style', data.style);
270
+        setAttr(elm, 'vlink', data.visited_color);
271
+        setAttr(elm, 'link', data.link_color);
272
+        setAttr(elm, 'alink', data.active_color);
273
+        dom.setAttribs(editor.getBody(), {
274
+          style: data.style,
275
+          dir: data.dir,
276
+          vLink: data.visited_color,
277
+          link: data.link_color,
278
+          aLink: data.active_color
279
+        });
280
+      }
281
+      elm = headerFragment.getAll('html')[0];
282
+      if (elm) {
283
+        setAttr(elm, 'lang', data.langcode);
284
+        setAttr(elm, 'xml:lang', data.langcode);
285
+      }
286
+      if (!headElement.firstChild) {
287
+        headElement.remove();
288
+      }
289
+      html = global$4({
290
+        validate: false,
291
+        indent: true,
292
+        indent_before: 'head,html,body,meta,title,script,link,style',
293
+        indent_after: 'head,html,body,meta,title,script,link,style'
294
+      }).serialize(headerFragment);
295
+      return html.substring(0, html.indexOf('</body>'));
296
+    };
297
+    var Parser = {
298
+      parseHeader: parseHeader,
299
+      htmlToData: htmlToData,
300
+      dataToHtml: dataToHtml
301
+    };
302
+
303
+    var hasOwnProperty = Object.prototype.hasOwnProperty;
304
+    var shallow = function (old, nu) {
305
+      return nu;
306
+    };
307
+    var baseMerge = function (merger) {
308
+      return function () {
309
+        var objects = new Array(arguments.length);
310
+        for (var i = 0; i < objects.length; i++) {
311
+          objects[i] = arguments[i];
312
+        }
313
+        if (objects.length === 0) {
314
+          throw new Error('Can\'t merge zero objects');
315
+        }
316
+        var ret = {};
317
+        for (var j = 0; j < objects.length; j++) {
318
+          var curObject = objects[j];
319
+          for (var key in curObject) {
320
+            if (hasOwnProperty.call(curObject, key)) {
321
+              ret[key] = merger(ret[key], curObject[key]);
322
+            }
323
+          }
324
+        }
325
+        return ret;
326
+      };
327
+    };
328
+    var merge = baseMerge(shallow);
329
+
330
+    var open = function (editor, headState) {
331
+      var data = Parser.htmlToData(editor, headState.get());
332
+      var defaultData = {
333
+        title: '',
334
+        keywords: '',
335
+        description: '',
336
+        robots: '',
337
+        author: '',
338
+        docencoding: ''
339
+      };
340
+      var initialData = merge(defaultData, data);
341
+      editor.windowManager.open({
342
+        title: 'Metadata and Document Properties',
343
+        size: 'normal',
344
+        body: {
345
+          type: 'panel',
346
+          items: [
347
+            {
348
+              name: 'title',
349
+              type: 'input',
350
+              label: 'Title'
351
+            },
352
+            {
353
+              name: 'keywords',
354
+              type: 'input',
355
+              label: 'Keywords'
356
+            },
357
+            {
358
+              name: 'description',
359
+              type: 'input',
360
+              label: 'Description'
361
+            },
362
+            {
363
+              name: 'robots',
364
+              type: 'input',
365
+              label: 'Robots'
366
+            },
367
+            {
368
+              name: 'author',
369
+              type: 'input',
370
+              label: 'Author'
371
+            },
372
+            {
373
+              name: 'docencoding',
374
+              type: 'input',
375
+              label: 'Encoding'
376
+            }
377
+          ]
378
+        },
379
+        buttons: [
380
+          {
381
+            type: 'cancel',
382
+            name: 'cancel',
383
+            text: 'Cancel'
384
+          },
385
+          {
386
+            type: 'submit',
387
+            name: 'save',
388
+            text: 'Save',
389
+            primary: true
390
+          }
391
+        ],
392
+        initialData: initialData,
393
+        onSubmit: function (api) {
394
+          var nuData = api.getData();
395
+          var headHtml = Parser.dataToHtml(editor, global$1.extend(data, nuData), headState.get());
396
+          headState.set(headHtml);
397
+          api.close();
398
+        }
399
+      });
400
+    };
401
+    var Dialog = { open: open };
402
+
403
+    var register = function (editor, headState) {
404
+      editor.addCommand('mceFullPageProperties', function () {
405
+        Dialog.open(editor, headState);
406
+      });
407
+    };
408
+    var Commands = { register: register };
409
+
410
+    var protectHtml = function (protect, html) {
411
+      global$1.each(protect, function (pattern) {
412
+        html = html.replace(pattern, function (str) {
413
+          return '<!--mce:protected ' + escape(str) + '-->';
414
+        });
415
+      });
416
+      return html;
417
+    };
418
+    var unprotectHtml = function (html) {
419
+      return html.replace(/<!--mce:protected ([\s\S]*?)-->/g, function (a, m) {
420
+        return unescape(m);
421
+      });
422
+    };
423
+    var Protect = {
424
+      protectHtml: protectHtml,
425
+      unprotectHtml: unprotectHtml
426
+    };
427
+
428
+    var each = global$1.each;
429
+    var low = function (s) {
430
+      return s.replace(/<\/?[A-Z]+/g, function (a) {
431
+        return a.toLowerCase();
432
+      });
433
+    };
434
+    var handleSetContent = function (editor, headState, footState, evt) {
435
+      var startPos, endPos, content, headerFragment, styles = '';
436
+      var dom = editor.dom;
437
+      if (evt.selection) {
438
+        return;
439
+      }
440
+      content = Protect.protectHtml(editor.settings.protect, evt.content);
441
+      if (evt.format === 'raw' && headState.get()) {
442
+        return;
443
+      }
444
+      if (evt.source_view && Settings.shouldHideInSourceView(editor)) {
445
+        return;
446
+      }
447
+      if (content.length === 0 && !evt.source_view) {
448
+        content = global$1.trim(headState.get()) + '\n' + global$1.trim(content) + '\n' + global$1.trim(footState.get());
449
+      }
450
+      content = content.replace(/<(\/?)BODY/gi, '<$1body');
451
+      startPos = content.indexOf('<body');
452
+      if (startPos !== -1) {
453
+        startPos = content.indexOf('>', startPos);
454
+        headState.set(low(content.substring(0, startPos + 1)));
455
+        endPos = content.indexOf('</body', startPos);
456
+        if (endPos === -1) {
457
+          endPos = content.length;
458
+        }
459
+        evt.content = global$1.trim(content.substring(startPos + 1, endPos));
460
+        footState.set(low(content.substring(endPos)));
461
+      } else {
462
+        headState.set(getDefaultHeader(editor));
463
+        footState.set('\n</body>\n</html>');
464
+      }
465
+      headerFragment = Parser.parseHeader(headState.get());
466
+      each(headerFragment.getAll('style'), function (node) {
467
+        if (node.firstChild) {
468
+          styles += node.firstChild.value;
469
+        }
470
+      });
471
+      var bodyElm = headerFragment.getAll('body')[0];
472
+      if (bodyElm) {
473
+        dom.setAttribs(editor.getBody(), {
474
+          style: bodyElm.attr('style') || '',
475
+          dir: bodyElm.attr('dir') || '',
476
+          vLink: bodyElm.attr('vlink') || '',
477
+          link: bodyElm.attr('link') || '',
478
+          aLink: bodyElm.attr('alink') || ''
479
+        });
480
+      }
481
+      dom.remove('fullpage_styles');
482
+      var headElm = editor.getDoc().getElementsByTagName('head')[0];
483
+      if (styles) {
484
+        var styleElm = dom.add(headElm, 'style', { id: 'fullpage_styles' });
485
+        styleElm.appendChild(domGlobals.document.createTextNode(styles));
486
+      }
487
+      var currentStyleSheetsMap = {};
488
+      global$1.each(headElm.getElementsByTagName('link'), function (stylesheet) {
489
+        if (stylesheet.rel === 'stylesheet' && stylesheet.getAttribute('data-mce-fullpage')) {
490
+          currentStyleSheetsMap[stylesheet.href] = stylesheet;
491
+        }
492
+      });
493
+      global$1.each(headerFragment.getAll('link'), function (stylesheet) {
494
+        var href = stylesheet.attr('href');
495
+        if (!href) {
496
+          return true;
497
+        }
498
+        if (!currentStyleSheetsMap[href] && stylesheet.attr('rel') === 'stylesheet') {
499
+          dom.add(headElm, 'link', {
500
+            'rel': 'stylesheet',
501
+            'text': 'text/css',
502
+            'href': href,
503
+            'data-mce-fullpage': '1'
504
+          });
505
+        }
506
+        delete currentStyleSheetsMap[href];
507
+      });
508
+      global$1.each(currentStyleSheetsMap, function (stylesheet) {
509
+        stylesheet.parentNode.removeChild(stylesheet);
510
+      });
511
+    };
512
+    var getDefaultHeader = function (editor) {
513
+      var header = '', value, styles = '';
514
+      if (Settings.getDefaultXmlPi(editor)) {
515
+        var piEncoding = Settings.getDefaultEncoding(editor);
516
+        header += '<?xml version="1.0" encoding="' + (piEncoding ? piEncoding : 'ISO-8859-1') + '" ?>\n';
517
+      }
518
+      header += Settings.getDefaultDocType(editor);
519
+      header += '\n<html>\n<head>\n';
520
+      if (value = Settings.getDefaultTitle(editor)) {
521
+        header += '<title>' + value + '</title>\n';
522
+      }
523
+      if (value = Settings.getDefaultEncoding(editor)) {
524
+        header += '<meta http-equiv="Content-Type" content="text/html; charset=' + value + '" />\n';
525
+      }
526
+      if (value = Settings.getDefaultFontFamily(editor)) {
527
+        styles += 'font-family: ' + value + ';';
528
+      }
529
+      if (value = Settings.getDefaultFontSize(editor)) {
530
+        styles += 'font-size: ' + value + ';';
531
+      }
532
+      if (value = Settings.getDefaultTextColor(editor)) {
533
+        styles += 'color: ' + value + ';';
534
+      }
535
+      header += '</head>\n<body' + (styles ? ' style="' + styles + '"' : '') + '>\n';
536
+      return header;
537
+    };
538
+    var handleGetContent = function (editor, head, foot, evt) {
539
+      if (!evt.selection && (!evt.source_view || !Settings.shouldHideInSourceView(editor))) {
540
+        evt.content = Protect.unprotectHtml(global$1.trim(head) + '\n' + global$1.trim(evt.content) + '\n' + global$1.trim(foot));
541
+      }
542
+    };
543
+    var setup = function (editor, headState, footState) {
544
+      editor.on('BeforeSetContent', function (evt) {
545
+        handleSetContent(editor, headState, footState, evt);
546
+      });
547
+      editor.on('GetContent', function (evt) {
548
+        handleGetContent(editor, headState.get(), footState.get(), evt);
549
+      });
550
+    };
551
+    var FilterContent = { setup: setup };
552
+
553
+    var register$1 = function (editor) {
554
+      editor.ui.registry.addButton('fullpage', {
555
+        tooltip: 'Metadata and document properties',
556
+        icon: 'document-properties',
557
+        onAction: function () {
558
+          editor.execCommand('mceFullPageProperties');
559
+        }
560
+      });
561
+      editor.ui.registry.addMenuItem('fullpage', {
562
+        text: 'Metadata and document properties',
563
+        icon: 'document-properties',
564
+        onAction: function () {
565
+          editor.execCommand('mceFullPageProperties');
566
+        }
567
+      });
568
+    };
569
+    var Buttons = { register: register$1 };
570
+
571
+    function Plugin () {
572
+      global.add('fullpage', function (editor) {
573
+        var headState = Cell(''), footState = Cell('');
574
+        Commands.register(editor, headState);
575
+        Buttons.register(editor);
576
+        FilterContent.setup(editor, headState, footState);
577
+      });
578
+    }
579
+
580
+    Plugin();
581
+
582
+}(window));

+ 9
- 0
vue-element-admin/static/tinymce/plugins/fullpage/plugin.min.js
File diff suppressed because it is too large
Vedi File


+ 1106
- 0
vue-element-admin/static/tinymce/plugins/fullscreen/plugin.js
File diff suppressed because it is too large
Vedi File


+ 9
- 0
vue-element-admin/static/tinymce/plugins/fullscreen/plugin.min.js
File diff suppressed because it is too large
Vedi File


+ 908
- 0
vue-element-admin/static/tinymce/plugins/help/plugin.js Vedi File

@@ -0,0 +1,908 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+(function () {
10
+    'use strict';
11
+
12
+    var Cell = function (initial) {
13
+      var value = initial;
14
+      var get = function () {
15
+        return value;
16
+      };
17
+      var set = function (v) {
18
+        value = v;
19
+      };
20
+      var clone = function () {
21
+        return Cell(get());
22
+      };
23
+      return {
24
+        get: get,
25
+        set: set,
26
+        clone: clone
27
+      };
28
+    };
29
+
30
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
31
+
32
+    var get = function (customTabs) {
33
+      var addTab = function (spec) {
34
+        var currentCustomTabs = customTabs.get();
35
+        currentCustomTabs[spec.name] = spec;
36
+        customTabs.set(currentCustomTabs);
37
+      };
38
+      return { addTab: addTab };
39
+    };
40
+
41
+    var register = function (editor, dialogOpener) {
42
+      editor.addCommand('mceHelp', dialogOpener);
43
+    };
44
+    var Commands = { register: register };
45
+
46
+    var register$1 = function (editor, dialogOpener) {
47
+      editor.ui.registry.addButton('help', {
48
+        icon: 'help',
49
+        tooltip: 'Help',
50
+        onAction: dialogOpener
51
+      });
52
+      editor.ui.registry.addMenuItem('help', {
53
+        text: 'Help',
54
+        icon: 'help',
55
+        shortcut: 'Alt+0',
56
+        onAction: dialogOpener
57
+      });
58
+    };
59
+    var Buttons = { register: register$1 };
60
+
61
+    var __assign = function () {
62
+      __assign = Object.assign || function __assign(t) {
63
+        for (var s, i = 1, n = arguments.length; i < n; i++) {
64
+          s = arguments[i];
65
+          for (var p in s)
66
+            if (Object.prototype.hasOwnProperty.call(s, p))
67
+              t[p] = s[p];
68
+        }
69
+        return t;
70
+      };
71
+      return __assign.apply(this, arguments);
72
+    };
73
+
74
+    var noop = function () {
75
+    };
76
+    var constant = function (value) {
77
+      return function () {
78
+        return value;
79
+      };
80
+    };
81
+    function curry(fn) {
82
+      var initialArgs = [];
83
+      for (var _i = 1; _i < arguments.length; _i++) {
84
+        initialArgs[_i - 1] = arguments[_i];
85
+      }
86
+      return function () {
87
+        var restArgs = [];
88
+        for (var _i = 0; _i < arguments.length; _i++) {
89
+          restArgs[_i] = arguments[_i];
90
+        }
91
+        var all = initialArgs.concat(restArgs);
92
+        return fn.apply(null, all);
93
+      };
94
+    }
95
+    var not = function (f) {
96
+      return function () {
97
+        var args = [];
98
+        for (var _i = 0; _i < arguments.length; _i++) {
99
+          args[_i] = arguments[_i];
100
+        }
101
+        return !f.apply(null, args);
102
+      };
103
+    };
104
+    var never = constant(false);
105
+    var always = constant(true);
106
+
107
+    var none = function () {
108
+      return NONE;
109
+    };
110
+    var NONE = function () {
111
+      var eq = function (o) {
112
+        return o.isNone();
113
+      };
114
+      var call = function (thunk) {
115
+        return thunk();
116
+      };
117
+      var id = function (n) {
118
+        return n;
119
+      };
120
+      var me = {
121
+        fold: function (n, s) {
122
+          return n();
123
+        },
124
+        is: never,
125
+        isSome: never,
126
+        isNone: always,
127
+        getOr: id,
128
+        getOrThunk: call,
129
+        getOrDie: function (msg) {
130
+          throw new Error(msg || 'error: getOrDie called on none.');
131
+        },
132
+        getOrNull: constant(null),
133
+        getOrUndefined: constant(undefined),
134
+        or: id,
135
+        orThunk: call,
136
+        map: none,
137
+        each: noop,
138
+        bind: none,
139
+        exists: never,
140
+        forall: always,
141
+        filter: none,
142
+        equals: eq,
143
+        equals_: eq,
144
+        toArray: function () {
145
+          return [];
146
+        },
147
+        toString: constant('none()')
148
+      };
149
+      if (Object.freeze) {
150
+        Object.freeze(me);
151
+      }
152
+      return me;
153
+    }();
154
+    var some = function (a) {
155
+      var constant_a = constant(a);
156
+      var self = function () {
157
+        return me;
158
+      };
159
+      var bind = function (f) {
160
+        return f(a);
161
+      };
162
+      var me = {
163
+        fold: function (n, s) {
164
+          return s(a);
165
+        },
166
+        is: function (v) {
167
+          return a === v;
168
+        },
169
+        isSome: always,
170
+        isNone: never,
171
+        getOr: constant_a,
172
+        getOrThunk: constant_a,
173
+        getOrDie: constant_a,
174
+        getOrNull: constant_a,
175
+        getOrUndefined: constant_a,
176
+        or: self,
177
+        orThunk: self,
178
+        map: function (f) {
179
+          return some(f(a));
180
+        },
181
+        each: function (f) {
182
+          f(a);
183
+        },
184
+        bind: bind,
185
+        exists: bind,
186
+        forall: bind,
187
+        filter: function (f) {
188
+          return f(a) ? me : NONE;
189
+        },
190
+        toArray: function () {
191
+          return [a];
192
+        },
193
+        toString: function () {
194
+          return 'some(' + a + ')';
195
+        },
196
+        equals: function (o) {
197
+          return o.is(a);
198
+        },
199
+        equals_: function (o, elementEq) {
200
+          return o.fold(never, function (b) {
201
+            return elementEq(a, b);
202
+          });
203
+        }
204
+      };
205
+      return me;
206
+    };
207
+    var from = function (value) {
208
+      return value === null || value === undefined ? NONE : some(value);
209
+    };
210
+    var Option = {
211
+      some: some,
212
+      none: none,
213
+      from: from
214
+    };
215
+
216
+    var typeOf = function (x) {
217
+      if (x === null) {
218
+        return 'null';
219
+      }
220
+      var t = typeof x;
221
+      if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
222
+        return 'array';
223
+      }
224
+      if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
225
+        return 'string';
226
+      }
227
+      return t;
228
+    };
229
+    var isType = function (type) {
230
+      return function (value) {
231
+        return typeOf(value) === type;
232
+      };
233
+    };
234
+    var isFunction = isType('function');
235
+
236
+    var nativeSlice = Array.prototype.slice;
237
+    var nativeIndexOf = Array.prototype.indexOf;
238
+    var rawIndexOf = function (ts, t) {
239
+      return nativeIndexOf.call(ts, t);
240
+    };
241
+    var indexOf = function (xs, x) {
242
+      var r = rawIndexOf(xs, x);
243
+      return r === -1 ? Option.none() : Option.some(r);
244
+    };
245
+    var contains = function (xs, x) {
246
+      return rawIndexOf(xs, x) > -1;
247
+    };
248
+    var map = function (xs, f) {
249
+      var len = xs.length;
250
+      var r = new Array(len);
251
+      for (var i = 0; i < len; i++) {
252
+        var x = xs[i];
253
+        r[i] = f(x, i);
254
+      }
255
+      return r;
256
+    };
257
+    var filter = function (xs, pred) {
258
+      var r = [];
259
+      for (var i = 0, len = xs.length; i < len; i++) {
260
+        var x = xs[i];
261
+        if (pred(x, i)) {
262
+          r.push(x);
263
+        }
264
+      }
265
+      return r;
266
+    };
267
+    var find = function (xs, pred) {
268
+      for (var i = 0, len = xs.length; i < len; i++) {
269
+        var x = xs[i];
270
+        if (pred(x, i)) {
271
+          return Option.some(x);
272
+        }
273
+      }
274
+      return Option.none();
275
+    };
276
+    var from$1 = isFunction(Array.from) ? Array.from : function (x) {
277
+      return nativeSlice.call(x);
278
+    };
279
+
280
+    var keys = Object.keys;
281
+    var hasOwnProperty = Object.hasOwnProperty;
282
+    var get$1 = function (obj, key) {
283
+      return has(obj, key) ? Option.from(obj[key]) : Option.none();
284
+    };
285
+    var has = function (obj, key) {
286
+      return hasOwnProperty.call(obj, key);
287
+    };
288
+
289
+    var cat = function (arr) {
290
+      var r = [];
291
+      var push = function (x) {
292
+        r.push(x);
293
+      };
294
+      for (var i = 0; i < arr.length; i++) {
295
+        arr[i].each(push);
296
+      }
297
+      return r;
298
+    };
299
+
300
+    var getHelpTabs = function (editor) {
301
+      return Option.from(editor.getParam('help_tabs'));
302
+    };
303
+
304
+    var shortcuts = [
305
+      {
306
+        shortcuts: ['Meta + B'],
307
+        action: 'Bold'
308
+      },
309
+      {
310
+        shortcuts: ['Meta + I'],
311
+        action: 'Italic'
312
+      },
313
+      {
314
+        shortcuts: ['Meta + U'],
315
+        action: 'Underline'
316
+      },
317
+      {
318
+        shortcuts: ['Meta + A'],
319
+        action: 'Select all'
320
+      },
321
+      {
322
+        shortcuts: [
323
+          'Meta + Y',
324
+          'Meta + Shift + Z'
325
+        ],
326
+        action: 'Redo'
327
+      },
328
+      {
329
+        shortcuts: ['Meta + Z'],
330
+        action: 'Undo'
331
+      },
332
+      {
333
+        shortcuts: ['Access + 1'],
334
+        action: 'Header 1'
335
+      },
336
+      {
337
+        shortcuts: ['Access + 2'],
338
+        action: 'Header 2'
339
+      },
340
+      {
341
+        shortcuts: ['Access + 3'],
342
+        action: 'Header 3'
343
+      },
344
+      {
345
+        shortcuts: ['Access + 4'],
346
+        action: 'Header 4'
347
+      },
348
+      {
349
+        shortcuts: ['Access + 5'],
350
+        action: 'Header 5'
351
+      },
352
+      {
353
+        shortcuts: ['Access + 6'],
354
+        action: 'Header 6'
355
+      },
356
+      {
357
+        shortcuts: ['Access + 7'],
358
+        action: 'Paragraph'
359
+      },
360
+      {
361
+        shortcuts: ['Access + 8'],
362
+        action: 'Div'
363
+      },
364
+      {
365
+        shortcuts: ['Access + 9'],
366
+        action: 'Address'
367
+      },
368
+      {
369
+        shortcuts: ['Alt + 0'],
370
+        action: 'Open help dialog'
371
+      },
372
+      {
373
+        shortcuts: ['Alt + F9'],
374
+        action: 'Focus to menubar'
375
+      },
376
+      {
377
+        shortcuts: ['Alt + F10'],
378
+        action: 'Focus to toolbar'
379
+      },
380
+      {
381
+        shortcuts: ['Alt + F11'],
382
+        action: 'Focus to element path'
383
+      },
384
+      {
385
+        shortcuts: ['Ctrl + F9'],
386
+        action: 'Focus to contextual toolbar'
387
+      },
388
+      {
389
+        shortcuts: ['Shift + Enter'],
390
+        action: 'Open popup menu for split buttons'
391
+      },
392
+      {
393
+        shortcuts: ['Meta + K'],
394
+        action: 'Insert link (if link plugin activated)'
395
+      },
396
+      {
397
+        shortcuts: ['Meta + S'],
398
+        action: 'Save (if save plugin activated)'
399
+      },
400
+      {
401
+        shortcuts: ['Meta + F'],
402
+        action: 'Find (if searchreplace plugin activated)'
403
+      },
404
+      {
405
+        shortcuts: ['Meta + Shift + F'],
406
+        action: 'Switch to or from fullscreen mode'
407
+      }
408
+    ];
409
+    var KeyboardShortcuts = { shortcuts: shortcuts };
410
+
411
+    var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
412
+
413
+    var convertText = function (source) {
414
+      var mac = {
415
+        alt: '&#x2325;',
416
+        ctrl: '&#x2303;',
417
+        shift: '&#x21E7;',
418
+        meta: '&#x2318;',
419
+        access: '&#x2303;&#x2325;'
420
+      };
421
+      var other = {
422
+        meta: 'Ctrl ',
423
+        access: 'Shift + Alt '
424
+      };
425
+      var replace = global$1.mac ? mac : other;
426
+      var shortcut = source.split('+');
427
+      var updated = map(shortcut, function (segment) {
428
+        var search = segment.toLowerCase().trim();
429
+        return has(replace, search) ? replace[search] : segment;
430
+      });
431
+      return global$1.mac ? updated.join('').replace(/\s/, '') : updated.join('+');
432
+    };
433
+    var ConvertShortcut = { convertText: convertText };
434
+
435
+    var tab = function () {
436
+      var shortcutList = map(KeyboardShortcuts.shortcuts, function (shortcut) {
437
+        var shortcutText = map(shortcut.shortcuts, ConvertShortcut.convertText).join(' or ');
438
+        return [
439
+          shortcut.action,
440
+          shortcutText
441
+        ];
442
+      });
443
+      var tablePanel = {
444
+        type: 'table',
445
+        header: [
446
+          'Action',
447
+          'Shortcut'
448
+        ],
449
+        cells: shortcutList
450
+      };
451
+      return {
452
+        name: 'shortcuts',
453
+        title: 'Handy Shortcuts',
454
+        items: [tablePanel]
455
+      };
456
+    };
457
+    var KeyboardShortcutsTab = { tab: tab };
458
+
459
+    var supplant = function (str, obj) {
460
+      var isStringOrNumber = function (a) {
461
+        var t = typeof a;
462
+        return t === 'string' || t === 'number';
463
+      };
464
+      return str.replace(/\$\{([^{}]*)\}/g, function (fullMatch, key) {
465
+        var value = obj[key];
466
+        return isStringOrNumber(value) ? value.toString() : fullMatch;
467
+      });
468
+    };
469
+
470
+    var global$2 = tinymce.util.Tools.resolve('tinymce.util.I18n');
471
+
472
+    var urls = [
473
+      {
474
+        key: 'advlist',
475
+        name: 'Advanced List'
476
+      },
477
+      {
478
+        key: 'anchor',
479
+        name: 'Anchor'
480
+      },
481
+      {
482
+        key: 'autolink',
483
+        name: 'Autolink'
484
+      },
485
+      {
486
+        key: 'autoresize',
487
+        name: 'Autoresize'
488
+      },
489
+      {
490
+        key: 'autosave',
491
+        name: 'Autosave'
492
+      },
493
+      {
494
+        key: 'bbcode',
495
+        name: 'BBCode'
496
+      },
497
+      {
498
+        key: 'charmap',
499
+        name: 'Character Map'
500
+      },
501
+      {
502
+        key: 'code',
503
+        name: 'Code'
504
+      },
505
+      {
506
+        key: 'codesample',
507
+        name: 'Code Sample'
508
+      },
509
+      {
510
+        key: 'colorpicker',
511
+        name: 'Color Picker'
512
+      },
513
+      {
514
+        key: 'directionality',
515
+        name: 'Directionality'
516
+      },
517
+      {
518
+        key: 'emoticons',
519
+        name: 'Emoticons'
520
+      },
521
+      {
522
+        key: 'fullpage',
523
+        name: 'Full Page'
524
+      },
525
+      {
526
+        key: 'fullscreen',
527
+        name: 'Full Screen'
528
+      },
529
+      {
530
+        key: 'help',
531
+        name: 'Help'
532
+      },
533
+      {
534
+        key: 'hr',
535
+        name: 'Horizontal Rule'
536
+      },
537
+      {
538
+        key: 'image',
539
+        name: 'Image'
540
+      },
541
+      {
542
+        key: 'imagetools',
543
+        name: 'Image Tools'
544
+      },
545
+      {
546
+        key: 'importcss',
547
+        name: 'Import CSS'
548
+      },
549
+      {
550
+        key: 'insertdatetime',
551
+        name: 'Insert Date/Time'
552
+      },
553
+      {
554
+        key: 'legacyoutput',
555
+        name: 'Legacy Output'
556
+      },
557
+      {
558
+        key: 'link',
559
+        name: 'Link'
560
+      },
561
+      {
562
+        key: 'lists',
563
+        name: 'Lists'
564
+      },
565
+      {
566
+        key: 'media',
567
+        name: 'Media'
568
+      },
569
+      {
570
+        key: 'nonbreaking',
571
+        name: 'Nonbreaking'
572
+      },
573
+      {
574
+        key: 'noneditable',
575
+        name: 'Noneditable'
576
+      },
577
+      {
578
+        key: 'pagebreak',
579
+        name: 'Page Break'
580
+      },
581
+      {
582
+        key: 'paste',
583
+        name: 'Paste'
584
+      },
585
+      {
586
+        key: 'preview',
587
+        name: 'Preview'
588
+      },
589
+      {
590
+        key: 'print',
591
+        name: 'Print'
592
+      },
593
+      {
594
+        key: 'save',
595
+        name: 'Save'
596
+      },
597
+      {
598
+        key: 'searchreplace',
599
+        name: 'Search and Replace'
600
+      },
601
+      {
602
+        key: 'spellchecker',
603
+        name: 'Spell Checker'
604
+      },
605
+      {
606
+        key: 'tabfocus',
607
+        name: 'Tab Focus'
608
+      },
609
+      {
610
+        key: 'table',
611
+        name: 'Table'
612
+      },
613
+      {
614
+        key: 'template',
615
+        name: 'Template'
616
+      },
617
+      {
618
+        key: 'textcolor',
619
+        name: 'Text Color'
620
+      },
621
+      {
622
+        key: 'textpattern',
623
+        name: 'Text Pattern'
624
+      },
625
+      {
626
+        key: 'toc',
627
+        name: 'Table of Contents'
628
+      },
629
+      {
630
+        key: 'visualblocks',
631
+        name: 'Visual Blocks'
632
+      },
633
+      {
634
+        key: 'visualchars',
635
+        name: 'Visual Characters'
636
+      },
637
+      {
638
+        key: 'wordcount',
639
+        name: 'Word Count'
640
+      },
641
+      {
642
+        key: 'advcode',
643
+        name: 'Advanced Code Editor*'
644
+      },
645
+      {
646
+        key: 'formatpainter',
647
+        name: 'Format Painter*'
648
+      },
649
+      {
650
+        key: 'powerpaste',
651
+        name: 'PowerPaste*'
652
+      },
653
+      {
654
+        key: 'tinydrive',
655
+        name: 'Tiny Drive*'
656
+      },
657
+      {
658
+        key: 'tinymcespellchecker',
659
+        name: 'Spell Checker Pro*'
660
+      },
661
+      {
662
+        key: 'a11ychecker',
663
+        name: 'Accessibility Checker*'
664
+      },
665
+      {
666
+        key: 'linkchecker',
667
+        name: 'Link Checker*'
668
+      },
669
+      {
670
+        key: 'mentions',
671
+        name: 'Mentions*'
672
+      },
673
+      {
674
+        key: 'mediaembed',
675
+        name: 'Enhanced Media Embed*'
676
+      },
677
+      {
678
+        key: 'checklist',
679
+        name: 'Checklist*'
680
+      },
681
+      {
682
+        key: 'casechange',
683
+        name: 'Case Change*'
684
+      },
685
+      {
686
+        key: 'permanentpen',
687
+        name: 'Permanent Pen*'
688
+      },
689
+      {
690
+        key: 'pageembed',
691
+        name: 'Page Embed*'
692
+      },
693
+      {
694
+        key: 'tinycomments',
695
+        name: 'Tiny Comments*'
696
+      },
697
+      {
698
+        key: 'advtable',
699
+        name: 'Advanced Tables*'
700
+      },
701
+      {
702
+        key: 'autocorrect',
703
+        name: 'Autocorrect*'
704
+      }
705
+    ];
706
+    var PluginUrls = { urls: urls };
707
+
708
+    var tab$1 = function (editor) {
709
+      var availablePlugins = function () {
710
+        var premiumPlugins = [
711
+          'Accessibility Checker',
712
+          'Advanced Code Editor',
713
+          'Advanced Tables',
714
+          'Case Change',
715
+          'Checklist',
716
+          'Tiny Comments',
717
+          'Tiny Drive',
718
+          'Enhanced Media Embed',
719
+          'Format Painter',
720
+          'Link Checker',
721
+          'Mentions',
722
+          'MoxieManager',
723
+          'Page Embed',
724
+          'Permanent Pen',
725
+          'PowerPaste',
726
+          'Spell Checker Pro'
727
+        ];
728
+        var premiumPluginList = map(premiumPlugins, function (plugin) {
729
+          return '<li>' + global$2.translate(plugin) + '</li>';
730
+        }).join('');
731
+        return '<div data-mce-tabstop="1" tabindex="-1">' + '<p><b>' + global$2.translate('Premium plugins:') + '</b></p>' + '<ul>' + premiumPluginList + '<li style="list-style: none; margin-top: 1em;"><a href="https://www.tiny.cloud/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">' + global$2.translate('Learn more...') + '</a></li>' + '</ul>' + '</div>';
732
+      };
733
+      var makeLink = curry(supplant, '<a href="${url}" target="_blank" rel="noopener">${name}</a>');
734
+      var maybeUrlize = function (editor, key) {
735
+        return find(PluginUrls.urls, function (x) {
736
+          return x.key === key;
737
+        }).fold(function () {
738
+          var getMetadata = editor.plugins[key].getMetadata;
739
+          return typeof getMetadata === 'function' ? makeLink(getMetadata()) : key;
740
+        }, function (x) {
741
+          return makeLink({
742
+            name: x.name,
743
+            url: 'https://www.tiny.cloud/docs/plugins/' + x.key
744
+          });
745
+        });
746
+      };
747
+      var getPluginKeys = function (editor) {
748
+        var keys$1 = keys(editor.plugins);
749
+        return editor.settings.forced_plugins === undefined ? keys$1 : filter(keys$1, not(curry(contains, editor.settings.forced_plugins)));
750
+      };
751
+      var pluginLister = function (editor) {
752
+        var pluginKeys = getPluginKeys(editor);
753
+        var pluginLis = map(pluginKeys, function (key) {
754
+          return '<li>' + maybeUrlize(editor, key) + '</li>';
755
+        });
756
+        var count = pluginLis.length;
757
+        var pluginsString = pluginLis.join('');
758
+        var html = '<p><b>' + global$2.translate([
759
+          'Plugins installed ({0}):',
760
+          count
761
+        ]) + '</b></p>' + '<ul>' + pluginsString + '</ul>';
762
+        return html;
763
+      };
764
+      var installedPlugins = function (editor) {
765
+        if (editor == null) {
766
+          return '';
767
+        }
768
+        return '<div data-mce-tabstop="1" tabindex="-1">' + pluginLister(editor) + '</div>';
769
+      };
770
+      var htmlPanel = {
771
+        type: 'htmlpanel',
772
+        presets: 'document',
773
+        html: [
774
+          installedPlugins(editor),
775
+          availablePlugins()
776
+        ].join('')
777
+      };
778
+      return {
779
+        name: 'plugins',
780
+        title: 'Plugins',
781
+        items: [htmlPanel]
782
+      };
783
+    };
784
+    var PluginsTab = { tab: tab$1 };
785
+
786
+    var global$3 = tinymce.util.Tools.resolve('tinymce.EditorManager');
787
+
788
+    var tab$2 = function () {
789
+      var getVersion = function (major, minor) {
790
+        return major.indexOf('@') === 0 ? 'X.X.X' : major + '.' + minor;
791
+      };
792
+      var version = getVersion(global$3.majorVersion, global$3.minorVersion);
793
+      var changeLogLink = '<a href="https://www.tinymce.com/docs/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">TinyMCE ' + version + '</a>';
794
+      var htmlPanel = {
795
+        type: 'htmlpanel',
796
+        html: '<p>' + global$2.translate([
797
+          'You are using {0}',
798
+          changeLogLink
799
+        ]) + '</p>',
800
+        presets: 'document'
801
+      };
802
+      return {
803
+        name: 'versions',
804
+        title: 'Version',
805
+        items: [htmlPanel]
806
+      };
807
+    };
808
+    var VersionTab = { tab: tab$2 };
809
+
810
+    var description = '<h1>Editor UI keyboard navigation</h1>\n\n<h2>Activating keyboard navigation</h2>\n\n<p>The sections of the outer UI of the editor - the menubar, toolbar, sidebar and footer - are all keyboard navigable. As such, there are multiple ways to activate keyboard navigation:</p>\n<ul>\n  <li>Focus the menubar: Alt + F9 (Windows) or &#x2325;F9 (MacOS)</li>\n  <li>Focus the toolbar: Alt + F10 (Windows) or &#x2325;F10 (MacOS)</li>\n  <li>Focus the footer: Alt + F11 (Windows) or &#x2325;F11 (MacOS)</li>\n</ul>\n\n<p>Focusing the menubar or toolbar will start keyboard navigation at the first item in the menubar or toolbar, which will be highlighted with a gray background. Focusing the footer will start keyboard navigation at the first item in the element path, which will be highlighted with an underline. </p>\n\n<h2>Moving between UI sections</h2>\n\n<p>When keyboard navigation is active, pressing tab will move the focus to the next major section of the UI, where applicable. These sections are:</p>\n<ul>\n  <li>the menubar</li>\n  <li>each group of the toolbar </li>\n  <li>the sidebar</li>\n  <li>the element path in the footer </li>\n  <li>the wordcount toggle button in the footer </li>\n  <li>the branding link in the footer </li>\n</ul>\n\n<p>Pressing shift + tab will move backwards through the same sections, except when moving from the footer to the toolbar. Focusing the element path then pressing shift + tab will move focus to the first toolbar group, not the last.</p>\n\n<h2>Moving within UI sections</h2>\n\n<p>Keyboard navigation within UI sections can usually be achieved using the left and right arrow keys. This includes:</p>\n<ul>\n  <li>moving between menus in the menubar</li>\n  <li>moving between buttons in a toolbar group</li>\n  <li>moving between items in the element path</li>\n</ul>\n\n<p>In all these UI sections, keyboard navigation will cycle within the section. For example, focusing the last button in a toolbar group then pressing right arrow will move focus to the first item in the same toolbar group. </p>\n\n<h1>Executing buttons</h1>\n\n<p>To execute a button, navigate the selection to the desired button and hit space or enter.</p>\n\n<h1>Opening, navigating and closing menus</h1>\n\n<p>When focusing a menubar button or a toolbar button with a menu, pressing space, enter or down arrow will open the menu. When the menu opens the first item will be selected. To move up or down the menu, press the up or down arrow key respectively. This is the same for submenus, which can also be opened and closed using the left and right arrow keys.</p>\n\n<p>To close any active menu, hit the escape key. When a menu is closed the selection will be restored to its previous selection. This also works for closing submenus.</p>\n\n<h1>Context toolbars and menus</h1>\n\n<p>To focus an open context toolbar such as the table context toolbar, press Ctrl + F9 (Windows) or &#x2303;F9 (MacOS).</p>\n\n<p>Context toolbar navigation is the same as toolbar navigation, and context menu navigation is the same as standard menu navigation.</p>\n\n<h1>Dialog navigation</h1>\n\n<p>There are two types of dialog UIs in TinyMCE: tabbed dialogs and non-tabbed dialogs.</p>\n\n<p>When a non-tabbed dialog is opened, the first interactive component in the dialog will be focused. Users can navigate between interactive components by pressing tab. This includes any footer buttons. Navigation will cycle back to the first dialog component if tab is pressed while focusing the last component in the dialog. Pressing shift + tab will navigate backwards.</p>\n\n<p>When a tabbed dialog is opened, the first button in the tab menu is focused. Pressing tab will navigate to the first interactive component in that tab, and will cycle through the tab\u2019s components, the footer buttons, then back to the tab button. To switch to another tab, focus the tab button for the current tab, then use the arrow keys to cycle through the tab buttons.</p>';
811
+    var tab$3 = function () {
812
+      var body = {
813
+        type: 'htmlpanel',
814
+        presets: 'document',
815
+        html: description
816
+      };
817
+      return {
818
+        name: 'keyboardnav',
819
+        title: 'Keyboard Navigation',
820
+        items: [body]
821
+      };
822
+    };
823
+    var KeyboardNavTab = { tab: tab$3 };
824
+
825
+    var parseHelpTabsSetting = function (tabsFromSettings, tabs) {
826
+      var newTabs = {};
827
+      var names = map(tabsFromSettings, function (t) {
828
+        if (typeof t === 'string') {
829
+          if (has(tabs, t)) {
830
+            newTabs[t] = tabs[t];
831
+          }
832
+          return t;
833
+        } else {
834
+          newTabs[t.name] = t;
835
+          return t.name;
836
+        }
837
+      });
838
+      return {
839
+        tabs: newTabs,
840
+        names: names
841
+      };
842
+    };
843
+    var getNamesFromTabs = function (tabs) {
844
+      var names = keys(tabs);
845
+      var versionsIdx = indexOf(names, 'versions');
846
+      versionsIdx.each(function (idx) {
847
+        names.splice(idx, 1);
848
+        names.push('versions');
849
+      });
850
+      return {
851
+        tabs: tabs,
852
+        names: names
853
+      };
854
+    };
855
+    var parseCustomTabs = function (editor, customTabs) {
856
+      var _a;
857
+      var shortcuts = KeyboardShortcutsTab.tab();
858
+      var nav = KeyboardNavTab.tab();
859
+      var plugins = PluginsTab.tab(editor);
860
+      var versions = VersionTab.tab();
861
+      var tabs = __assign((_a = {}, _a[shortcuts.name] = shortcuts, _a[nav.name] = nav, _a[plugins.name] = plugins, _a[versions.name] = versions, _a), customTabs.get());
862
+      return getHelpTabs(editor).fold(function () {
863
+        return getNamesFromTabs(tabs);
864
+      }, function (tabsFromSettings) {
865
+        return parseHelpTabsSetting(tabsFromSettings, tabs);
866
+      });
867
+    };
868
+    var init = function (editor, customTabs) {
869
+      return function () {
870
+        var _a = parseCustomTabs(editor, customTabs), tabs = _a.tabs, names = _a.names;
871
+        var foundTabs = map(names, function (name) {
872
+          return get$1(tabs, name);
873
+        });
874
+        var dialogTabs = cat(foundTabs);
875
+        var body = {
876
+          type: 'tabpanel',
877
+          tabs: dialogTabs
878
+        };
879
+        editor.windowManager.open({
880
+          title: 'Help',
881
+          size: 'medium',
882
+          body: body,
883
+          buttons: [{
884
+              type: 'cancel',
885
+              name: 'close',
886
+              text: 'Close',
887
+              primary: true
888
+            }],
889
+          initialData: {}
890
+        });
891
+      };
892
+    };
893
+
894
+    function Plugin () {
895
+      global.add('help', function (editor) {
896
+        var customTabs = Cell({});
897
+        var api = get(customTabs);
898
+        var dialogOpener = init(editor, customTabs);
899
+        Buttons.register(editor, dialogOpener);
900
+        Commands.register(editor, dialogOpener);
901
+        editor.shortcuts.add('Alt+0', 'Open help dialog', 'mceHelp');
902
+        return api;
903
+      });
904
+    }
905
+
906
+    Plugin();
907
+
908
+}());

+ 9
- 0
vue-element-admin/static/tinymce/plugins/help/plugin.min.js
File diff suppressed because it is too large
Vedi File


+ 48
- 0
vue-element-admin/static/tinymce/plugins/hr/plugin.js Vedi File

@@ -0,0 +1,48 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+(function () {
10
+    'use strict';
11
+
12
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
+
14
+    var register = function (editor) {
15
+      editor.addCommand('InsertHorizontalRule', function () {
16
+        editor.execCommand('mceInsertContent', false, '<hr />');
17
+      });
18
+    };
19
+    var Commands = { register: register };
20
+
21
+    var register$1 = function (editor) {
22
+      editor.ui.registry.addButton('hr', {
23
+        icon: 'horizontal-rule',
24
+        tooltip: 'Horizontal line',
25
+        onAction: function () {
26
+          return editor.execCommand('InsertHorizontalRule');
27
+        }
28
+      });
29
+      editor.ui.registry.addMenuItem('hr', {
30
+        icon: 'horizontal-rule',
31
+        text: 'Horizontal line',
32
+        onAction: function () {
33
+          return editor.execCommand('InsertHorizontalRule');
34
+        }
35
+      });
36
+    };
37
+    var Buttons = { register: register$1 };
38
+
39
+    function Plugin () {
40
+      global.add('hr', function (editor) {
41
+        Commands.register(editor);
42
+        Buttons.register(editor);
43
+      });
44
+    }
45
+
46
+    Plugin();
47
+
48
+}());

+ 9
- 0
vue-element-admin/static/tinymce/plugins/hr/plugin.min.js Vedi File

@@ -0,0 +1,9 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(n){n.addCommand("InsertHorizontalRule",function(){n.execCommand("mceInsertContent",!1,"<hr />")})},t=function(n){n.ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:function(){return n.execCommand("InsertHorizontalRule")}}),n.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:function(){return n.execCommand("InsertHorizontalRule")}})};!function e(){n.add("hr",function(n){o(n),t(n)})}()}();

+ 2372
- 0
vue-element-admin/static/tinymce/plugins/image/plugin.js
File diff suppressed because it is too large
Vedi File


+ 9
- 0
vue-element-admin/static/tinymce/plugins/image/plugin.min.js
File diff suppressed because it is too large
Vedi File


+ 1710
- 0
vue-element-admin/static/tinymce/plugins/imagetools/plugin.js
File diff suppressed because it is too large
Vedi File


+ 9
- 0
vue-element-admin/static/tinymce/plugins/imagetools/plugin.min.js
File diff suppressed because it is too large
Vedi File


+ 408
- 0
vue-element-admin/static/tinymce/plugins/importcss/plugin.js Vedi File

@@ -0,0 +1,408 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+(function () {
10
+    'use strict';
11
+
12
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
+
14
+    var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
15
+
16
+    var global$2 = tinymce.util.Tools.resolve('tinymce.EditorManager');
17
+
18
+    var global$3 = tinymce.util.Tools.resolve('tinymce.Env');
19
+
20
+    var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');
21
+
22
+    var shouldMergeClasses = function (editor) {
23
+      return editor.getParam('importcss_merge_classes');
24
+    };
25
+    var shouldImportExclusive = function (editor) {
26
+      return editor.getParam('importcss_exclusive');
27
+    };
28
+    var getSelectorConverter = function (editor) {
29
+      return editor.getParam('importcss_selector_converter');
30
+    };
31
+    var getSelectorFilter = function (editor) {
32
+      return editor.getParam('importcss_selector_filter');
33
+    };
34
+    var getCssGroups = function (editor) {
35
+      return editor.getParam('importcss_groups');
36
+    };
37
+    var shouldAppend = function (editor) {
38
+      return editor.getParam('importcss_append');
39
+    };
40
+    var getFileFilter = function (editor) {
41
+      return editor.getParam('importcss_file_filter');
42
+    };
43
+    var Settings = {
44
+      shouldMergeClasses: shouldMergeClasses,
45
+      shouldImportExclusive: shouldImportExclusive,
46
+      getSelectorConverter: getSelectorConverter,
47
+      getSelectorFilter: getSelectorFilter,
48
+      getCssGroups: getCssGroups,
49
+      shouldAppend: shouldAppend,
50
+      getFileFilter: getFileFilter
51
+    };
52
+
53
+    var noop = function () {
54
+    };
55
+    var constant = function (value) {
56
+      return function () {
57
+        return value;
58
+      };
59
+    };
60
+    var never = constant(false);
61
+    var always = constant(true);
62
+
63
+    var none = function () {
64
+      return NONE;
65
+    };
66
+    var NONE = function () {
67
+      var eq = function (o) {
68
+        return o.isNone();
69
+      };
70
+      var call = function (thunk) {
71
+        return thunk();
72
+      };
73
+      var id = function (n) {
74
+        return n;
75
+      };
76
+      var me = {
77
+        fold: function (n, s) {
78
+          return n();
79
+        },
80
+        is: never,
81
+        isSome: never,
82
+        isNone: always,
83
+        getOr: id,
84
+        getOrThunk: call,
85
+        getOrDie: function (msg) {
86
+          throw new Error(msg || 'error: getOrDie called on none.');
87
+        },
88
+        getOrNull: constant(null),
89
+        getOrUndefined: constant(undefined),
90
+        or: id,
91
+        orThunk: call,
92
+        map: none,
93
+        each: noop,
94
+        bind: none,
95
+        exists: never,
96
+        forall: always,
97
+        filter: none,
98
+        equals: eq,
99
+        equals_: eq,
100
+        toArray: function () {
101
+          return [];
102
+        },
103
+        toString: constant('none()')
104
+      };
105
+      if (Object.freeze) {
106
+        Object.freeze(me);
107
+      }
108
+      return me;
109
+    }();
110
+
111
+    var typeOf = function (x) {
112
+      if (x === null) {
113
+        return 'null';
114
+      }
115
+      var t = typeof x;
116
+      if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
117
+        return 'array';
118
+      }
119
+      if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
120
+        return 'string';
121
+      }
122
+      return t;
123
+    };
124
+    var isType = function (type) {
125
+      return function (value) {
126
+        return typeOf(value) === type;
127
+      };
128
+    };
129
+    var isArray = isType('array');
130
+    var isFunction = isType('function');
131
+
132
+    var nativeSlice = Array.prototype.slice;
133
+    var nativePush = Array.prototype.push;
134
+    var map = function (xs, f) {
135
+      var len = xs.length;
136
+      var r = new Array(len);
137
+      for (var i = 0; i < len; i++) {
138
+        var x = xs[i];
139
+        r[i] = f(x, i);
140
+      }
141
+      return r;
142
+    };
143
+    var flatten = function (xs) {
144
+      var r = [];
145
+      for (var i = 0, len = xs.length; i < len; ++i) {
146
+        if (!isArray(xs[i])) {
147
+          throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
148
+        }
149
+        nativePush.apply(r, xs[i]);
150
+      }
151
+      return r;
152
+    };
153
+    var bind = function (xs, f) {
154
+      var output = map(xs, f);
155
+      return flatten(output);
156
+    };
157
+    var from = isFunction(Array.from) ? Array.from : function (x) {
158
+      return nativeSlice.call(x);
159
+    };
160
+
161
+    var generate = function () {
162
+      var ungroupedOrder = [];
163
+      var groupOrder = [];
164
+      var groups = {};
165
+      var addItemToGroup = function (groupTitle, itemInfo) {
166
+        if (groups[groupTitle]) {
167
+          groups[groupTitle].push(itemInfo);
168
+        } else {
169
+          groupOrder.push(groupTitle);
170
+          groups[groupTitle] = [itemInfo];
171
+        }
172
+      };
173
+      var addItem = function (itemInfo) {
174
+        ungroupedOrder.push(itemInfo);
175
+      };
176
+      var toFormats = function () {
177
+        var groupItems = bind(groupOrder, function (g) {
178
+          var items = groups[g];
179
+          return items.length === 0 ? [] : [{
180
+              title: g,
181
+              items: items
182
+            }];
183
+        });
184
+        return groupItems.concat(ungroupedOrder);
185
+      };
186
+      return {
187
+        addItemToGroup: addItemToGroup,
188
+        addItem: addItem,
189
+        toFormats: toFormats
190
+      };
191
+    };
192
+
193
+    var removeCacheSuffix = function (url) {
194
+      var cacheSuffix = global$3.cacheSuffix;
195
+      if (typeof url === 'string') {
196
+        url = url.replace('?' + cacheSuffix, '').replace('&' + cacheSuffix, '');
197
+      }
198
+      return url;
199
+    };
200
+    var isSkinContentCss = function (editor, href) {
201
+      var settings = editor.settings, skin = settings.skin !== false ? settings.skin || 'oxide' : false;
202
+      if (skin) {
203
+        var skinUrl = settings.skin_url ? editor.documentBaseURI.toAbsolute(settings.skin_url) : global$2.baseURL + '/skins/ui/' + skin;
204
+        var contentSkinUrlPart = global$2.baseURL + '/skins/content/';
205
+        return href === skinUrl + '/content' + (editor.inline ? '.inline' : '') + '.min.css' || href.indexOf(contentSkinUrlPart) !== -1;
206
+      }
207
+      return false;
208
+    };
209
+    var compileFilter = function (filter) {
210
+      if (typeof filter === 'string') {
211
+        return function (value) {
212
+          return value.indexOf(filter) !== -1;
213
+        };
214
+      } else if (filter instanceof RegExp) {
215
+        return function (value) {
216
+          return filter.test(value);
217
+        };
218
+      }
219
+      return filter;
220
+    };
221
+    var getSelectors = function (editor, doc, fileFilter) {
222
+      var selectors = [], contentCSSUrls = {};
223
+      function append(styleSheet, imported) {
224
+        var href = styleSheet.href, rules;
225
+        href = removeCacheSuffix(href);
226
+        if (!href || !fileFilter(href, imported) || isSkinContentCss(editor, href)) {
227
+          return;
228
+        }
229
+        global$4.each(styleSheet.imports, function (styleSheet) {
230
+          append(styleSheet, true);
231
+        });
232
+        try {
233
+          rules = styleSheet.cssRules || styleSheet.rules;
234
+        } catch (e) {
235
+        }
236
+        global$4.each(rules, function (cssRule) {
237
+          if (cssRule.styleSheet) {
238
+            append(cssRule.styleSheet, true);
239
+          } else if (cssRule.selectorText) {
240
+            global$4.each(cssRule.selectorText.split(','), function (selector) {
241
+              selectors.push(global$4.trim(selector));
242
+            });
243
+          }
244
+        });
245
+      }
246
+      global$4.each(editor.contentCSS, function (url) {
247
+        contentCSSUrls[url] = true;
248
+      });
249
+      if (!fileFilter) {
250
+        fileFilter = function (href, imported) {
251
+          return imported || contentCSSUrls[href];
252
+        };
253
+      }
254
+      try {
255
+        global$4.each(doc.styleSheets, function (styleSheet) {
256
+          append(styleSheet);
257
+        });
258
+      } catch (e) {
259
+      }
260
+      return selectors;
261
+    };
262
+    var defaultConvertSelectorToFormat = function (editor, selectorText) {
263
+      var format;
264
+      var selector = /^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(selectorText);
265
+      if (!selector) {
266
+        return;
267
+      }
268
+      var elementName = selector[1];
269
+      var classes = selector[2].substr(1).split('.').join(' ');
270
+      var inlineSelectorElements = global$4.makeMap('a,img');
271
+      if (selector[1]) {
272
+        format = { title: selectorText };
273
+        if (editor.schema.getTextBlockElements()[elementName]) {
274
+          format.block = elementName;
275
+        } else if (editor.schema.getBlockElements()[elementName] || inlineSelectorElements[elementName.toLowerCase()]) {
276
+          format.selector = elementName;
277
+        } else {
278
+          format.inline = elementName;
279
+        }
280
+      } else if (selector[2]) {
281
+        format = {
282
+          inline: 'span',
283
+          title: selectorText.substr(1),
284
+          classes: classes
285
+        };
286
+      }
287
+      if (Settings.shouldMergeClasses(editor) !== false) {
288
+        format.classes = classes;
289
+      } else {
290
+        format.attributes = { class: classes };
291
+      }
292
+      return format;
293
+    };
294
+    var getGroupsBySelector = function (groups, selector) {
295
+      return global$4.grep(groups, function (group) {
296
+        return !group.filter || group.filter(selector);
297
+      });
298
+    };
299
+    var compileUserDefinedGroups = function (groups) {
300
+      return global$4.map(groups, function (group) {
301
+        return global$4.extend({}, group, {
302
+          original: group,
303
+          selectors: {},
304
+          filter: compileFilter(group.filter),
305
+          item: {
306
+            text: group.title,
307
+            menu: []
308
+          }
309
+        });
310
+      });
311
+    };
312
+    var isExclusiveMode = function (editor, group) {
313
+      return group === null || Settings.shouldImportExclusive(editor) !== false;
314
+    };
315
+    var isUniqueSelector = function (editor, selector, group, globallyUniqueSelectors) {
316
+      return !(isExclusiveMode(editor, group) ? selector in globallyUniqueSelectors : selector in group.selectors);
317
+    };
318
+    var markUniqueSelector = function (editor, selector, group, globallyUniqueSelectors) {
319
+      if (isExclusiveMode(editor, group)) {
320
+        globallyUniqueSelectors[selector] = true;
321
+      } else {
322
+        group.selectors[selector] = true;
323
+      }
324
+    };
325
+    var convertSelectorToFormat = function (editor, plugin, selector, group) {
326
+      var selectorConverter;
327
+      if (group && group.selector_converter) {
328
+        selectorConverter = group.selector_converter;
329
+      } else if (Settings.getSelectorConverter(editor)) {
330
+        selectorConverter = Settings.getSelectorConverter(editor);
331
+      } else {
332
+        selectorConverter = function () {
333
+          return defaultConvertSelectorToFormat(editor, selector);
334
+        };
335
+      }
336
+      return selectorConverter.call(plugin, selector, group);
337
+    };
338
+    var setup = function (editor) {
339
+      editor.on('init', function (e) {
340
+        var model = generate();
341
+        var globallyUniqueSelectors = {};
342
+        var selectorFilter = compileFilter(Settings.getSelectorFilter(editor));
343
+        var groups = compileUserDefinedGroups(Settings.getCssGroups(editor));
344
+        var processSelector = function (selector, group) {
345
+          if (isUniqueSelector(editor, selector, group, globallyUniqueSelectors)) {
346
+            markUniqueSelector(editor, selector, group, globallyUniqueSelectors);
347
+            var format = convertSelectorToFormat(editor, editor.plugins.importcss, selector, group);
348
+            if (format) {
349
+              var formatName = format.name || global$1.DOM.uniqueId();
350
+              editor.formatter.register(formatName, format);
351
+              return global$4.extend({}, {
352
+                title: format.title,
353
+                format: formatName
354
+              });
355
+            }
356
+          }
357
+          return null;
358
+        };
359
+        global$4.each(getSelectors(editor, editor.getDoc(), compileFilter(Settings.getFileFilter(editor))), function (selector) {
360
+          if (selector.indexOf('.mce-') === -1) {
361
+            if (!selectorFilter || selectorFilter(selector)) {
362
+              var selectorGroups = getGroupsBySelector(groups, selector);
363
+              if (selectorGroups.length > 0) {
364
+                global$4.each(selectorGroups, function (group) {
365
+                  var menuItem = processSelector(selector, group);
366
+                  if (menuItem) {
367
+                    model.addItemToGroup(group.title, menuItem);
368
+                  }
369
+                });
370
+              } else {
371
+                var menuItem = processSelector(selector, null);
372
+                if (menuItem) {
373
+                  model.addItem(menuItem);
374
+                }
375
+              }
376
+            }
377
+          }
378
+        });
379
+        var items = model.toFormats();
380
+        editor.fire('addStyleModifications', {
381
+          items: items,
382
+          replace: !Settings.shouldAppend(editor)
383
+        });
384
+      });
385
+    };
386
+    var ImportCss = {
387
+      defaultConvertSelectorToFormat: defaultConvertSelectorToFormat,
388
+      setup: setup
389
+    };
390
+
391
+    var get = function (editor) {
392
+      var convertSelectorToFormat = function (selectorText) {
393
+        return ImportCss.defaultConvertSelectorToFormat(editor, selectorText);
394
+      };
395
+      return { convertSelectorToFormat: convertSelectorToFormat };
396
+    };
397
+    var Api = { get: get };
398
+
399
+    function Plugin () {
400
+      global.add('importcss', function (editor) {
401
+        ImportCss.setup(editor);
402
+        return Api.get(editor);
403
+      });
404
+    }
405
+
406
+    Plugin();
407
+
408
+}());

+ 9
- 0
vue-element-admin/static/tinymce/plugins/importcss/plugin.min.js Vedi File

@@ -0,0 +1,9 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+!function(){"use strict";function t(){}function n(t){return function(){return t}}function e(){return h}var r,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),f=tinymce.util.Tools.resolve("tinymce.EditorManager"),l=tinymce.util.Tools.resolve("tinymce.Env"),m=tinymce.util.Tools.resolve("tinymce.util.Tools"),c=function(t){return t.getParam("importcss_merge_classes")},i=function(t){return t.getParam("importcss_exclusive")},p=function(t){return t.getParam("importcss_selector_converter")},g=function(t){return t.getParam("importcss_selector_filter")},y=function(t){return t.getParam("importcss_groups")},v=function(t){return t.getParam("importcss_append")},d=function(t){return t.getParam("importcss_file_filter")},u=n(!1),s=n(!0),h=(r={fold:function(t,n){return t()},is:u,isSome:u,isNone:s,getOr:O,getOrThunk:x,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:n(null),getOrUndefined:n(undefined),or:O,orThunk:x,map:e,each:t,bind:e,exists:u,forall:s,filter:e,equals:_,equals_:_,toArray:function(){return[]},toString:n("none()")},Object.freeze&&Object.freeze(r),r);function _(t){return t.isNone()}function x(t){return t()}function O(t){return t}function T(n){return function(t){return function(t){if(null===t)return"null";var n=typeof t;return"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n}(t)===n}}function b(t,n){return function(t){for(var n=[],e=0,r=t.length;e<r;++e){if(!w(t[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+t);M.apply(n,t[e])}return n}(function(t,n){for(var e=t.length,r=new Array(e),o=0;o<e;o++){var i=t[o];r[o]=n(i,o)}return r}(t,n))}function k(n){return"string"==typeof n?function(t){return-1!==t.indexOf(n)}:n instanceof RegExp?function(t){return n.test(t)}:n}function S(i,t,u){var c=[],e={};function s(t,n){var e,r=t.href;if((r=function(t){var n=l.cacheSuffix;return"string"==typeof t&&(t=t.replace("?"+n,"").replace("&"+n,"")),t}(r))&&u(r,n)&&!function(t,n){var e=t.settings,r=!1!==e.skin&&(e.skin||"oxide");if(r){var o=e.skin_url?t.documentBaseURI.toAbsolute(e.skin_url):f.baseURL+"/skins/ui/"+r,i=f.baseURL+"/skins/content/";return n===o+"/content"+(t.inline?".inline":"")+".min.css"||-1!==n.indexOf(i)}return!1}(i,r)){m.each(t.imports,function(t){s(t,!0)});try{e=t.cssRules||t.rules}catch(o){}m.each(e,function(t){t.styleSheet?s(t.styleSheet,!0):t.selectorText&&m.each(t.selectorText.split(","),function(t){c.push(m.trim(t))})})}}m.each(i.contentCSS,function(t){e[t]=!0}),u=u||function(t,n){return n||e[t]};try{m.each(t.styleSheets,function(t){s(t)})}catch(n){}return c}function A(t,n){var e,r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(n);if(r){var o=r[1],i=r[2].substr(1).split(".").join(" "),u=m.makeMap("a,img");return r[1]?(e={title:n},t.schema.getTextBlockElements()[o]?e.block=o:t.schema.getBlockElements()[o]||u[o.toLowerCase()]?e.selector=o:e.inline=o):r[2]&&(e={inline:"span",title:n.substr(1),classes:i}),!1!==c(t)?e.classes=i:e.attributes={"class":i},e}}function P(t,n){return null===n||!1!==i(t)}var w=T("array"),E=T("function"),I=Array.prototype.slice,M=Array.prototype.push,j=(E(Array.from)&&Array.from,A),D=function(s){s.on("init",function(t){function r(t,n){if(function(t,n,e,r){return!(P(t,e)?n in r:n in e.selectors)}(s,t,n,i)){!function(t,n,e,r){P(t,e)?r[n]=!0:e.selectors[n]=!0}(s,t,n,i);var e=function(t,n,e,r){return(r&&r.selector_converter?r.selector_converter:p(t)?p(t):function(){return A(t,e)}).call(n,e,r)}(s,s.plugins.importcss,t,n);if(e){var r=e.name||a.DOM.uniqueId();return s.formatter.register(r,e),m.extend({},{title:e.title,format:r})}}return null}var o=function(){var n=[],e=[],r={};return{addItemToGroup:function(t,n){r[t]?r[t].push(n):(e.push(t),r[t]=[n])},addItem:function(t){n.push(t)},toFormats:function(){return b(e,function(t){var n=r[t];return 0===n.length?[]:[{title:t,items:n}]}).concat(n)}}}(),i={},u=k(g(s)),c=function(t){return m.map(t,function(t){return m.extend({},t,{original:t,selectors:{},filter:k(t.filter),item:{text:t.title,menu:[]}})})}(y(s));m.each(S(s,s.getDoc(),k(d(s))),function(e){if(-1===e.indexOf(".mce-")&&(!u||u(e))){var t=function(t,n){return m.grep(t,function(t){return!t.filter||t.filter(n)})}(c,e);if(0<t.length)m.each(t,function(t){var n=r(e,t);n&&o.addItemToGroup(t.title,n)});else{var n=r(e,null);n&&o.addItem(n)}}});var n=o.toFormats();s.fire("addStyleModifications",{items:n,replace:!v(s)})})},R=function(n){return{convertSelectorToFormat:function(t){return j(n,t)}}};!function U(){o.add("importcss",function(t){return D(t),R(t)})}()}();

+ 198
- 0
vue-element-admin/static/tinymce/plugins/insertdatetime/plugin.js Vedi File

@@ -0,0 +1,198 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+(function () {
10
+    'use strict';
11
+
12
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
+
14
+    var getDateFormat = function (editor) {
15
+      return editor.getParam('insertdatetime_dateformat', editor.translate('%Y-%m-%d'));
16
+    };
17
+    var getTimeFormat = function (editor) {
18
+      return editor.getParam('insertdatetime_timeformat', editor.translate('%H:%M:%S'));
19
+    };
20
+    var getFormats = function (editor) {
21
+      return editor.getParam('insertdatetime_formats', [
22
+        '%H:%M:%S',
23
+        '%Y-%m-%d',
24
+        '%I:%M:%S %p',
25
+        '%D'
26
+      ]);
27
+    };
28
+    var getDefaultDateTime = function (editor) {
29
+      var formats = getFormats(editor);
30
+      return formats.length > 0 ? formats[0] : getTimeFormat(editor);
31
+    };
32
+    var shouldInsertTimeElement = function (editor) {
33
+      return editor.getParam('insertdatetime_element', false);
34
+    };
35
+    var Settings = {
36
+      getDateFormat: getDateFormat,
37
+      getTimeFormat: getTimeFormat,
38
+      getFormats: getFormats,
39
+      getDefaultDateTime: getDefaultDateTime,
40
+      shouldInsertTimeElement: shouldInsertTimeElement
41
+    };
42
+
43
+    var daysShort = 'Sun Mon Tue Wed Thu Fri Sat Sun'.split(' ');
44
+    var daysLong = 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday'.split(' ');
45
+    var monthsShort = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' ');
46
+    var monthsLong = 'January February March April May June July August September October November December'.split(' ');
47
+    var addZeros = function (value, len) {
48
+      value = '' + value;
49
+      if (value.length < len) {
50
+        for (var i = 0; i < len - value.length; i++) {
51
+          value = '0' + value;
52
+        }
53
+      }
54
+      return value;
55
+    };
56
+    var getDateTime = function (editor, fmt, date) {
57
+      date = date || new Date();
58
+      fmt = fmt.replace('%D', '%m/%d/%Y');
59
+      fmt = fmt.replace('%r', '%I:%M:%S %p');
60
+      fmt = fmt.replace('%Y', '' + date.getFullYear());
61
+      fmt = fmt.replace('%y', '' + date.getYear());
62
+      fmt = fmt.replace('%m', addZeros(date.getMonth() + 1, 2));
63
+      fmt = fmt.replace('%d', addZeros(date.getDate(), 2));
64
+      fmt = fmt.replace('%H', '' + addZeros(date.getHours(), 2));
65
+      fmt = fmt.replace('%M', '' + addZeros(date.getMinutes(), 2));
66
+      fmt = fmt.replace('%S', '' + addZeros(date.getSeconds(), 2));
67
+      fmt = fmt.replace('%I', '' + ((date.getHours() + 11) % 12 + 1));
68
+      fmt = fmt.replace('%p', '' + (date.getHours() < 12 ? 'AM' : 'PM'));
69
+      fmt = fmt.replace('%B', '' + editor.translate(monthsLong[date.getMonth()]));
70
+      fmt = fmt.replace('%b', '' + editor.translate(monthsShort[date.getMonth()]));
71
+      fmt = fmt.replace('%A', '' + editor.translate(daysLong[date.getDay()]));
72
+      fmt = fmt.replace('%a', '' + editor.translate(daysShort[date.getDay()]));
73
+      fmt = fmt.replace('%%', '%');
74
+      return fmt;
75
+    };
76
+    var updateElement = function (editor, timeElm, computerTime, userTime) {
77
+      var newTimeElm = editor.dom.create('time', { datetime: computerTime }, userTime);
78
+      timeElm.parentNode.insertBefore(newTimeElm, timeElm);
79
+      editor.dom.remove(timeElm);
80
+      editor.selection.select(newTimeElm, true);
81
+      editor.selection.collapse(false);
82
+    };
83
+    var insertDateTime = function (editor, format) {
84
+      if (Settings.shouldInsertTimeElement(editor)) {
85
+        var userTime = getDateTime(editor, format);
86
+        var computerTime = void 0;
87
+        if (/%[HMSIp]/.test(format)) {
88
+          computerTime = getDateTime(editor, '%Y-%m-%dT%H:%M');
89
+        } else {
90
+          computerTime = getDateTime(editor, '%Y-%m-%d');
91
+        }
92
+        var timeElm = editor.dom.getParent(editor.selection.getStart(), 'time');
93
+        if (timeElm) {
94
+          updateElement(editor, timeElm, computerTime, userTime);
95
+        } else {
96
+          editor.insertContent('<time datetime="' + computerTime + '">' + userTime + '</time>');
97
+        }
98
+      } else {
99
+        editor.insertContent(getDateTime(editor, format));
100
+      }
101
+    };
102
+    var Actions = {
103
+      insertDateTime: insertDateTime,
104
+      getDateTime: getDateTime
105
+    };
106
+
107
+    var register = function (editor) {
108
+      editor.addCommand('mceInsertDate', function () {
109
+        Actions.insertDateTime(editor, Settings.getDateFormat(editor));
110
+      });
111
+      editor.addCommand('mceInsertTime', function () {
112
+        Actions.insertDateTime(editor, Settings.getTimeFormat(editor));
113
+      });
114
+    };
115
+    var Commands = { register: register };
116
+
117
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
118
+
119
+    var Cell = function (initial) {
120
+      var value = initial;
121
+      var get = function () {
122
+        return value;
123
+      };
124
+      var set = function (v) {
125
+        value = v;
126
+      };
127
+      var clone = function () {
128
+        return Cell(get());
129
+      };
130
+      return {
131
+        get: get,
132
+        set: set,
133
+        clone: clone
134
+      };
135
+    };
136
+
137
+    var register$1 = function (editor) {
138
+      var formats = Settings.getFormats(editor);
139
+      var defaultFormat = Cell(Settings.getDefaultDateTime(editor));
140
+      editor.ui.registry.addSplitButton('insertdatetime', {
141
+        icon: 'insert-time',
142
+        tooltip: 'Insert date/time',
143
+        select: function (value) {
144
+          return value === defaultFormat.get();
145
+        },
146
+        fetch: function (done) {
147
+          done(global$1.map(formats, function (format) {
148
+            return {
149
+              type: 'choiceitem',
150
+              text: Actions.getDateTime(editor, format),
151
+              value: format
152
+            };
153
+          }));
154
+        },
155
+        onAction: function () {
156
+          var args = [];
157
+          for (var _i = 0; _i < arguments.length; _i++) {
158
+            args[_i] = arguments[_i];
159
+          }
160
+          Actions.insertDateTime(editor, defaultFormat.get());
161
+        },
162
+        onItemAction: function (_, value) {
163
+          defaultFormat.set(value);
164
+          Actions.insertDateTime(editor, value);
165
+        }
166
+      });
167
+      var makeMenuItemHandler = function (format) {
168
+        return function () {
169
+          defaultFormat.set(format);
170
+          Actions.insertDateTime(editor, format);
171
+        };
172
+      };
173
+      editor.ui.registry.addNestedMenuItem('insertdatetime', {
174
+        icon: 'insert-time',
175
+        text: 'Date/time',
176
+        getSubmenuItems: function () {
177
+          return global$1.map(formats, function (format) {
178
+            return {
179
+              type: 'menuitem',
180
+              text: Actions.getDateTime(editor, format),
181
+              onAction: makeMenuItemHandler(format)
182
+            };
183
+          });
184
+        }
185
+      });
186
+    };
187
+    var Buttons = { register: register$1 };
188
+
189
+    function Plugin () {
190
+      global.add('insertdatetime', function (editor) {
191
+        Commands.register(editor);
192
+        Buttons.register(editor);
193
+      });
194
+    }
195
+
196
+    Plugin();
197
+
198
+}());

+ 9
- 0
vue-element-admin/static/tinymce/plugins/insertdatetime/plugin.min.js Vedi File

@@ -0,0 +1,9 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+!function(){"use strict";function n(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))}function r(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])}function a(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e}function i(e,t,n){return n=n||new Date,t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",a(n.getMonth()+1,2))).replace("%d",a(n.getDate(),2))).replace("%H",""+a(n.getHours(),2))).replace("%M",""+a(n.getMinutes(),2))).replace("%S",""+a(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(f[n.getMonth()]))).replace("%b",""+e.translate(d[n.getMonth()]))).replace("%A",""+e.translate(s[n.getDay()]))).replace("%a",""+e.translate(l[n.getDay()]))).replace("%%","%")}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){return e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d"))},o=n,u=r,c=function(e){var t=r(e);return 0<t.length?t[0]:n(e)},m=function(e){return e.getParam("insertdatetime_element",!1)},l="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),s="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),d="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),f="January February March April May June July August September October November December".split(" "),p=function(e,t){if(m(e)){var n=i(e,t),r=void 0;r=/%[HMSIp]/.test(t)?i(e,"%Y-%m-%dT%H:%M"):i(e,"%Y-%m-%d");var a=e.dom.getParent(e.selection.getStart(),"time");a?function(e,t,n,r){var a=e.dom.create("time",{datetime:n},r);t.parentNode.insertBefore(a,t),e.dom.remove(t),e.selection.select(a,!0),e.selection.collapse(!1)}(e,a,r,n):e.insertContent('<time datetime="'+r+'">'+n+"</time>")}else e.insertContent(i(e,t))},g=i,y=function(e){e.addCommand("mceInsertDate",function(){p(e,t(e))}),e.addCommand("mceInsertTime",function(){p(e,o(e))})},M=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return S(t())}}},v=function(n){var t=u(n),r=S(c(n));n.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:function(e){return e===r.get()},fetch:function(e){e(M.map(t,function(e){return{type:"choiceitem",text:g(n,e),value:e}}))},onAction:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];p(n,r.get())},onItemAction:function(e,t){r.set(t),p(n,t)}});n.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:function(){return M.map(t,function(e){return{type:"menuitem",text:g(n,e),onAction:function(e){return function(){r.set(e),p(n,e)}}(e)}})}})};!function h(){e.add("insertdatetime",function(e){y(e),v(e)})}()}();

+ 184
- 0
vue-element-admin/static/tinymce/plugins/legacyoutput/plugin.js Vedi File

@@ -0,0 +1,184 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+(function () {
10
+    'use strict';
11
+
12
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
+
14
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
15
+
16
+    var getFontSizeFormats = function (editor) {
17
+      return editor.getParam('fontsize_formats');
18
+    };
19
+    var setFontSizeFormats = function (editor, fontsize_formats) {
20
+      editor.settings.fontsize_formats = fontsize_formats;
21
+    };
22
+    var getFontFormats = function (editor) {
23
+      return editor.getParam('font_formats');
24
+    };
25
+    var setFontFormats = function (editor, font_formats) {
26
+      editor.settings.font_formats = font_formats;
27
+    };
28
+    var getFontSizeStyleValues = function (editor) {
29
+      return editor.getParam('font_size_style_values', 'xx-small,x-small,small,medium,large,x-large,xx-large');
30
+    };
31
+    var setInlineStyles = function (editor, inline_styles) {
32
+      editor.settings.inline_styles = inline_styles;
33
+    };
34
+    var Settings = {
35
+      getFontFormats: getFontFormats,
36
+      getFontSizeFormats: getFontSizeFormats,
37
+      setFontSizeFormats: setFontSizeFormats,
38
+      setFontFormats: setFontFormats,
39
+      getFontSizeStyleValues: getFontSizeStyleValues,
40
+      setInlineStyles: setInlineStyles
41
+    };
42
+
43
+    var overrideFormats = function (editor) {
44
+      var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table', fontSizes = global$1.explode(Settings.getFontSizeStyleValues(editor)), schema = editor.schema;
45
+      editor.formatter.register({
46
+        alignleft: {
47
+          selector: alignElements,
48
+          attributes: { align: 'left' }
49
+        },
50
+        aligncenter: {
51
+          selector: alignElements,
52
+          attributes: { align: 'center' }
53
+        },
54
+        alignright: {
55
+          selector: alignElements,
56
+          attributes: { align: 'right' }
57
+        },
58
+        alignjustify: {
59
+          selector: alignElements,
60
+          attributes: { align: 'justify' }
61
+        },
62
+        bold: [
63
+          {
64
+            inline: 'b',
65
+            remove: 'all'
66
+          },
67
+          {
68
+            inline: 'strong',
69
+            remove: 'all'
70
+          },
71
+          {
72
+            inline: 'span',
73
+            styles: { fontWeight: 'bold' }
74
+          }
75
+        ],
76
+        italic: [
77
+          {
78
+            inline: 'i',
79
+            remove: 'all'
80
+          },
81
+          {
82
+            inline: 'em',
83
+            remove: 'all'
84
+          },
85
+          {
86
+            inline: 'span',
87
+            styles: { fontStyle: 'italic' }
88
+          }
89
+        ],
90
+        underline: [
91
+          {
92
+            inline: 'u',
93
+            remove: 'all'
94
+          },
95
+          {
96
+            inline: 'span',
97
+            styles: { textDecoration: 'underline' },
98
+            exact: true
99
+          }
100
+        ],
101
+        strikethrough: [
102
+          {
103
+            inline: 'strike',
104
+            remove: 'all'
105
+          },
106
+          {
107
+            inline: 'span',
108
+            styles: { textDecoration: 'line-through' },
109
+            exact: true
110
+          }
111
+        ],
112
+        fontname: {
113
+          inline: 'font',
114
+          toggle: false,
115
+          attributes: { face: '%value' }
116
+        },
117
+        fontsize: {
118
+          inline: 'font',
119
+          toggle: false,
120
+          attributes: {
121
+            size: function (vars) {
122
+              return global$1.inArray(fontSizes, vars.value) + 1;
123
+            }
124
+          }
125
+        },
126
+        forecolor: {
127
+          inline: 'font',
128
+          attributes: { color: '%value' },
129
+          links: true,
130
+          remove_similar: true,
131
+          clear_child_styles: true
132
+        },
133
+        hilitecolor: {
134
+          inline: 'font',
135
+          styles: { backgroundColor: '%value' },
136
+          links: true,
137
+          remove_similar: true,
138
+          clear_child_styles: true
139
+        }
140
+      });
141
+      global$1.each('b,i,u,strike'.split(','), function (name) {
142
+        schema.addValidElements(name + '[*]');
143
+      });
144
+      if (!schema.getElementRule('font')) {
145
+        schema.addValidElements('font[face|size|color|style]');
146
+      }
147
+      global$1.each(alignElements.split(','), function (name) {
148
+        var rule = schema.getElementRule(name);
149
+        if (rule) {
150
+          if (!rule.attributes.align) {
151
+            rule.attributes.align = {};
152
+            rule.attributesOrder.push('align');
153
+          }
154
+        }
155
+      });
156
+    };
157
+    var overrideSettings = function (editor) {
158
+      var defaultFontsizeFormats = '8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7';
159
+      var defaultFontsFormats = 'Andale Mono=andale mono,monospace;' + 'Arial=arial,helvetica,sans-serif;' + 'Arial Black=arial black,sans-serif;' + 'Book Antiqua=book antiqua,palatino,serif;' + 'Comic Sans MS=comic sans ms,sans-serif;' + 'Courier New=courier new,courier,monospace;' + 'Georgia=georgia,palatino,serif;' + 'Helvetica=helvetica,arial,sans-serif;' + 'Impact=impact,sans-serif;' + 'Symbol=symbol;' + 'Tahoma=tahoma,arial,helvetica,sans-serif;' + 'Terminal=terminal,monaco,monospace;' + 'Times New Roman=times new roman,times,serif;' + 'Trebuchet MS=trebuchet ms,geneva,sans-serif;' + 'Verdana=verdana,geneva,sans-serif;' + 'Webdings=webdings;' + 'Wingdings=wingdings,zapf dingbats';
160
+      Settings.setInlineStyles(editor, false);
161
+      if (!Settings.getFontSizeFormats(editor)) {
162
+        Settings.setFontSizeFormats(editor, defaultFontsizeFormats);
163
+      }
164
+      if (!Settings.getFontFormats(editor)) {
165
+        Settings.setFontFormats(editor, defaultFontsFormats);
166
+      }
167
+    };
168
+    var setup = function (editor) {
169
+      overrideSettings(editor);
170
+      editor.on('PreInit', function () {
171
+        return overrideFormats(editor);
172
+      });
173
+    };
174
+    var Formats = { setup: setup };
175
+
176
+    function Plugin () {
177
+      global.add('legacyoutput', function (editor) {
178
+        Formats.setup(editor);
179
+      });
180
+    }
181
+
182
+    Plugin();
183
+
184
+}());

+ 9
- 0
vue-element-admin/static/tinymce/plugins/legacyoutput/plugin.min.js Vedi File

@@ -0,0 +1,9 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=function(e){return e.getParam("font_formats")},i=function(e){return e.getParam("fontsize_formats")},n=function(e,t){e.settings.fontsize_formats=t},l=function(e,t){e.settings.font_formats=t},s=function(e){return e.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large")},r=function(e,t){e.settings.inline_styles=t},o=function(e){!function(e){r(e,!1),i(e)||n(e,"8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7"),t(e)||l(e,"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats")}(e),e.on("PreInit",function(){return function(e){var t="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table",i=a.explode(s(e)),n=e.schema;e.formatter.register({alignleft:{selector:t,attributes:{align:"left"}},aligncenter:{selector:t,attributes:{align:"center"}},alignright:{selector:t,attributes:{align:"right"}},alignjustify:{selector:t,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",toggle:!1,attributes:{face:"%value"}},fontsize:{inline:"font",toggle:!1,attributes:{size:function(e){return a.inArray(i,e.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0}}),a.each("b,i,u,strike".split(","),function(e){n.addValidElements(e+"[*]")}),n.getElementRule("font")||n.addValidElements("font[face|size|color|style]"),a.each(t.split(","),function(e){var t=n.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})}(e)})};!function c(){e.add("legacyoutput",function(e){o(e)})}()}();

+ 1835
- 0
vue-element-admin/static/tinymce/plugins/link/plugin.js
File diff suppressed because it is too large
Vedi File


+ 9
- 0
vue-element-admin/static/tinymce/plugins/link/plugin.min.js
File diff suppressed because it is too large
Vedi File


+ 2177
- 0
vue-element-admin/static/tinymce/plugins/lists/plugin.js
File diff suppressed because it is too large
Vedi File


+ 9
- 0
vue-element-admin/static/tinymce/plugins/lists/plugin.min.js
File diff suppressed because it is too large
Vedi File


+ 7
- 0
vue-element-admin/static/tinymce/plugins/media/index.js Vedi File

@@ -0,0 +1,7 @@
1
+// Exports the "autosave" plugin for usage with module loaders
2
+// Usage:
3
+//   CommonJS:
4
+//     require('tinymce/plugins/autosave')
5
+//   ES2015:
6
+//     import 'tinymce/plugins/autosave'
7
+require('./plugin.js');

+ 1367
- 0
vue-element-admin/static/tinymce/plugins/media/plugin.js
File diff suppressed because it is too large
Vedi File


+ 9
- 0
vue-element-admin/static/tinymce/plugins/media/plugin.min.js
File diff suppressed because it is too large
Vedi File


+ 109
- 0
vue-element-admin/static/tinymce/plugins/nonbreaking/plugin.js Vedi File

@@ -0,0 +1,109 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+(function () {
10
+    'use strict';
11
+
12
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
+
14
+    var getKeyboardSpaces = function (editor) {
15
+      var spaces = editor.getParam('nonbreaking_force_tab', 0);
16
+      if (typeof spaces === 'boolean') {
17
+        return spaces === true ? 3 : 0;
18
+      } else {
19
+        return spaces;
20
+      }
21
+    };
22
+    var wrapNbsps = function (editor) {
23
+      return editor.getParam('nonbreaking_wrap', true, 'boolean');
24
+    };
25
+    var Settings = {
26
+      getKeyboardSpaces: getKeyboardSpaces,
27
+      wrapNbsps: wrapNbsps
28
+    };
29
+
30
+    var stringRepeat = function (string, repeats) {
31
+      var str = '';
32
+      for (var index = 0; index < repeats; index++) {
33
+        str += string;
34
+      }
35
+      return str;
36
+    };
37
+    var isVisualCharsEnabled = function (editor) {
38
+      return editor.plugins.visualchars ? editor.plugins.visualchars.isEnabled() : false;
39
+    };
40
+    var insertNbsp = function (editor, times) {
41
+      var classes = function () {
42
+        return isVisualCharsEnabled(editor) ? 'mce-nbsp-wrap mce-nbsp' : 'mce-nbsp-wrap';
43
+      };
44
+      var nbspSpan = function () {
45
+        return '<span class="' + classes() + '" contenteditable="false">' + stringRepeat('&nbsp;', times) + '</span>';
46
+      };
47
+      var shouldWrap = Settings.wrapNbsps(editor);
48
+      var html = shouldWrap || editor.plugins.visualchars ? nbspSpan() : stringRepeat('&nbsp;', times);
49
+      editor.undoManager.transact(function () {
50
+        return editor.insertContent(html);
51
+      });
52
+    };
53
+    var Actions = { insertNbsp: insertNbsp };
54
+
55
+    var register = function (editor) {
56
+      editor.addCommand('mceNonBreaking', function () {
57
+        Actions.insertNbsp(editor, 1);
58
+      });
59
+    };
60
+    var Commands = { register: register };
61
+
62
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.VK');
63
+
64
+    var setup = function (editor) {
65
+      var spaces = Settings.getKeyboardSpaces(editor);
66
+      if (spaces > 0) {
67
+        editor.on('keydown', function (e) {
68
+          if (e.keyCode === global$1.TAB && !e.isDefaultPrevented()) {
69
+            if (e.shiftKey) {
70
+              return;
71
+            }
72
+            e.preventDefault();
73
+            e.stopImmediatePropagation();
74
+            Actions.insertNbsp(editor, spaces);
75
+          }
76
+        });
77
+      }
78
+    };
79
+    var Keyboard = { setup: setup };
80
+
81
+    var register$1 = function (editor) {
82
+      editor.ui.registry.addButton('nonbreaking', {
83
+        icon: 'non-breaking',
84
+        tooltip: 'Nonbreaking space',
85
+        onAction: function () {
86
+          return editor.execCommand('mceNonBreaking');
87
+        }
88
+      });
89
+      editor.ui.registry.addMenuItem('nonbreaking', {
90
+        icon: 'non-breaking',
91
+        text: 'Nonbreaking space',
92
+        onAction: function () {
93
+          return editor.execCommand('mceNonBreaking');
94
+        }
95
+      });
96
+    };
97
+    var Buttons = { register: register$1 };
98
+
99
+    function Plugin () {
100
+      global.add('nonbreaking', function (editor) {
101
+        Commands.register(editor);
102
+        Buttons.register(editor);
103
+        Keyboard.setup(editor);
104
+      });
105
+    }
106
+
107
+    Plugin();
108
+
109
+}());

+ 9
- 0
vue-element-admin/static/tinymce/plugins/nonbreaking/plugin.min.js Vedi File

@@ -0,0 +1,9 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+!function(){"use strict";function o(n,e){for(var t="",o=0;o<e;o++)t+=n;return t}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(n){var e=n.getParam("nonbreaking_force_tab",0);return"boolean"==typeof e?!0===e?3:0:e},a=function(n){return n.getParam("nonbreaking_wrap",!0,"boolean")},r=function(n,e){var t=a(n)||n.plugins.visualchars?'<span class="'+(function(n){return!!n.plugins.visualchars&&n.plugins.visualchars.isEnabled()}(n)?"mce-nbsp-wrap mce-nbsp":"mce-nbsp-wrap")+'" contenteditable="false">'+o("&nbsp;",e)+"</span>":o("&nbsp;",e);n.undoManager.transact(function(){return n.insertContent(t)})},e=function(n){n.addCommand("mceNonBreaking",function(){r(n,1)})},c=tinymce.util.Tools.resolve("tinymce.util.VK"),t=function(e){var t=i(e);0<t&&e.on("keydown",function(n){if(n.keyCode===c.TAB&&!n.isDefaultPrevented()){if(n.shiftKey)return;n.preventDefault(),n.stopImmediatePropagation(),r(e,t)}})},u=function(n){n.ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:function(){return n.execCommand("mceNonBreaking")}}),n.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:function(){return n.execCommand("mceNonBreaking")}})};!function s(){n.add("nonbreaking",function(n){e(n),u(n),t(n)})}()}();

+ 124
- 0
vue-element-admin/static/tinymce/plugins/noneditable/plugin.js Vedi File

@@ -0,0 +1,124 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+(function () {
10
+    'use strict';
11
+
12
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
+
14
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
15
+
16
+    var getNonEditableClass = function (editor) {
17
+      return editor.getParam('noneditable_noneditable_class', 'mceNonEditable');
18
+    };
19
+    var getEditableClass = function (editor) {
20
+      return editor.getParam('noneditable_editable_class', 'mceEditable');
21
+    };
22
+    var getNonEditableRegExps = function (editor) {
23
+      var nonEditableRegExps = editor.getParam('noneditable_regexp', []);
24
+      if (nonEditableRegExps && nonEditableRegExps.constructor === RegExp) {
25
+        return [nonEditableRegExps];
26
+      } else {
27
+        return nonEditableRegExps;
28
+      }
29
+    };
30
+    var Settings = {
31
+      getNonEditableClass: getNonEditableClass,
32
+      getEditableClass: getEditableClass,
33
+      getNonEditableRegExps: getNonEditableRegExps
34
+    };
35
+
36
+    var hasClass = function (checkClassName) {
37
+      return function (node) {
38
+        return (' ' + node.attr('class') + ' ').indexOf(checkClassName) !== -1;
39
+      };
40
+    };
41
+    var replaceMatchWithSpan = function (editor, content, cls) {
42
+      return function (match) {
43
+        var args = arguments, index = args[args.length - 2];
44
+        var prevChar = index > 0 ? content.charAt(index - 1) : '';
45
+        if (prevChar === '"') {
46
+          return match;
47
+        }
48
+        if (prevChar === '>') {
49
+          var findStartTagIndex = content.lastIndexOf('<', index);
50
+          if (findStartTagIndex !== -1) {
51
+            var tagHtml = content.substring(findStartTagIndex, index);
52
+            if (tagHtml.indexOf('contenteditable="false"') !== -1) {
53
+              return match;
54
+            }
55
+          }
56
+        }
57
+        return '<span class="' + cls + '" data-mce-content="' + editor.dom.encode(args[0]) + '">' + editor.dom.encode(typeof args[1] === 'string' ? args[1] : args[0]) + '</span>';
58
+      };
59
+    };
60
+    var convertRegExpsToNonEditable = function (editor, nonEditableRegExps, e) {
61
+      var i = nonEditableRegExps.length, content = e.content;
62
+      if (e.format === 'raw') {
63
+        return;
64
+      }
65
+      while (i--) {
66
+        content = content.replace(nonEditableRegExps[i], replaceMatchWithSpan(editor, content, Settings.getNonEditableClass(editor)));
67
+      }
68
+      e.content = content;
69
+    };
70
+    var setup = function (editor) {
71
+      var editClass, nonEditClass;
72
+      var contentEditableAttrName = 'contenteditable';
73
+      editClass = ' ' + global$1.trim(Settings.getEditableClass(editor)) + ' ';
74
+      nonEditClass = ' ' + global$1.trim(Settings.getNonEditableClass(editor)) + ' ';
75
+      var hasEditClass = hasClass(editClass);
76
+      var hasNonEditClass = hasClass(nonEditClass);
77
+      var nonEditableRegExps = Settings.getNonEditableRegExps(editor);
78
+      editor.on('PreInit', function () {
79
+        if (nonEditableRegExps.length > 0) {
80
+          editor.on('BeforeSetContent', function (e) {
81
+            convertRegExpsToNonEditable(editor, nonEditableRegExps, e);
82
+          });
83
+        }
84
+        editor.parser.addAttributeFilter('class', function (nodes) {
85
+          var i = nodes.length, node;
86
+          while (i--) {
87
+            node = nodes[i];
88
+            if (hasEditClass(node)) {
89
+              node.attr(contentEditableAttrName, 'true');
90
+            } else if (hasNonEditClass(node)) {
91
+              node.attr(contentEditableAttrName, 'false');
92
+            }
93
+          }
94
+        });
95
+        editor.serializer.addAttributeFilter(contentEditableAttrName, function (nodes) {
96
+          var i = nodes.length, node;
97
+          while (i--) {
98
+            node = nodes[i];
99
+            if (!hasEditClass(node) && !hasNonEditClass(node)) {
100
+              continue;
101
+            }
102
+            if (nonEditableRegExps.length > 0 && node.attr('data-mce-content')) {
103
+              node.name = '#text';
104
+              node.type = 3;
105
+              node.raw = true;
106
+              node.value = node.attr('data-mce-content');
107
+            } else {
108
+              node.attr(contentEditableAttrName, null);
109
+            }
110
+          }
111
+        });
112
+      });
113
+    };
114
+    var FilterContent = { setup: setup };
115
+
116
+    function Plugin () {
117
+      global.add('noneditable', function (editor) {
118
+        FilterContent.setup(editor);
119
+      });
120
+    }
121
+
122
+    Plugin();
123
+
124
+}());

+ 9
- 0
vue-element-admin/static/tinymce/plugins/noneditable/plugin.min.js Vedi File

@@ -0,0 +1,9 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+!function(){"use strict";function c(n){return function(t){return-1!==(" "+t.attr("class")+" ").indexOf(n)}}function l(i,o,c){return function(t){var n=arguments,e=n[n.length-2],r=0<e?o.charAt(e-1):"";if('"'===r)return t;if(">"===r){var a=o.lastIndexOf("<",e);if(-1!==a)if(-1!==o.substring(a,e).indexOf('contenteditable="false"'))return t}return'<span class="'+c+'" data-mce-content="'+i.dom.encode(n[0])+'">'+i.dom.encode("string"==typeof n[1]?n[1]:n[0])+"</span>"}}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.Tools"),f=function(t){return t.getParam("noneditable_noneditable_class","mceNonEditable")},s=function(t){return t.getParam("noneditable_editable_class","mceEditable")},d=function(t){var n=t.getParam("noneditable_regexp",[]);return n&&n.constructor===RegExp?[n]:n},n=function(n){var t,e,r="contenteditable";t=" "+u.trim(s(n))+" ",e=" "+u.trim(f(n))+" ";var a=c(t),i=c(e),o=d(n);n.on("PreInit",function(){0<o.length&&n.on("BeforeSetContent",function(t){!function(t,n,e){var r=n.length,a=e.content;if("raw"!==e.format){for(;r--;)a=a.replace(n[r],l(t,a,f(t)));e.content=a}}(n,o,t)}),n.parser.addAttributeFilter("class",function(t){for(var n,e=t.length;e--;)n=t[e],a(n)?n.attr(r,"true"):i(n)&&n.attr(r,"false")}),n.serializer.addAttributeFilter(r,function(t){for(var n,e=t.length;e--;)n=t[e],(a(n)||i(n))&&(0<o.length&&n.attr("data-mce-content")?(n.name="#text",n.type=3,n.raw=!0,n.value=n.attr("data-mce-content")):n.attr(r,null))})})};!function e(){t.add("noneditable",function(t){n(t)})}()}();

+ 119
- 0
vue-element-admin/static/tinymce/plugins/pagebreak/plugin.js Vedi File

@@ -0,0 +1,119 @@
1
+/**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.1.5 (2019-12-19)
8
+ */
9
+(function () {
10
+    'use strict';
11
+
12
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
+
14
+    var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
15
+
16
+    var getSeparatorHtml = function (editor) {
17
+      return editor.getParam('pagebreak_separator', '<!-- pagebreak -->');
18
+    };
19
+    var shouldSplitBlock = function (editor) {
20
+      return editor.getParam('pagebreak_split_block', false);
21
+    };
22
+    var Settings = {
23
+      getSeparatorHtml: getSeparatorHtml,
24
+      shouldSplitBlock: shouldSplitBlock
25
+    };
26
+
27
+    var getPageBreakClass = function () {
28
+      return 'mce-pagebreak';
29
+    };
30
+    var getPlaceholderHtml = function () {
31
+      return '<img src="' + global$1.transparentSrc + '" class="' + getPageBreakClass() + '" data-mce-resize="false" data-mce-placeholder />';
32
+    };
33
+    var setup = function (editor) {
34
+      var separatorHtml = Settings.getSeparatorHtml(editor);
35
+      var pageBreakSeparatorRegExp = new RegExp(separatorHtml.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, function (a) {
36
+        return '\\' + a;
37
+      }), 'gi');
38
+      editor.on('BeforeSetContent', function (e) {
39
+        e.content = e.content.replace(pageBreakSeparatorRegExp, getPlaceholderHtml());
40
+      });
41
+      editor.on('PreInit', function () {
42
+        editor.serializer.addNodeFilter('img', function (nodes) {
43
+          var i = nodes.length, node, className;
44
+          while (i--) {
45
+            node = nodes[i];
46
+            className = node.attr('class');
47
+            if (className && className.indexOf('mce-pagebreak') !== -1) {
48
+              var parentNode = node.parent;
49
+              if (editor.schema.getBlockElements()[parentNode.name] && Settings.shouldSplitBlock(editor)) {
50
+                parentNode.type = 3;
51
+                parentNode.value = separatorHtml;
52
+                parentNode.raw = true;
53
+                node.remove();
54
+                continue;
55
+              }
56
+              node.type = 3;
57
+              node.value = separatorHtml;
58
+              node.raw = true;
59
+            }
60
+          }
61
+        });
62
+      });
63
+    };
64
+    var FilterContent = {
65
+      setup: setup,
66
+      getPlaceholderHtml: getPlaceholderHtml,
67
+      getPageBreakClass: getPageBreakClass
68
+    };
69
+
70
+    var register = function (editor) {
71
+      editor.addCommand('mcePageBreak', function () {
72
+        if (editor.settings.pagebreak_split_block) {
73
+          editor.insertContent('<p>' + FilterContent.getPlaceholderHtml() + '</p>');
74
+        } else {
75
+          editor.insertContent(FilterContent.getPlaceholderHtml());
76
+        }
77
+      });
78
+    };
79
+    var Commands = { register: register };
80
+
81
+    var setup$1 = function (editor) {
82
+      editor.on('ResolveName', function (e) {
83
+        if (e.target.nodeName === 'IMG' && editor.dom.hasClass(e.target, FilterContent.getPageBreakClass())) {
84
+          e.name = 'pagebreak';
85
+        }
86
+      });
87
+    };
88
+    var ResolveName = { setup: setup$1 };
89
+
90
+    var register$1 = function (editor) {
91
+      editor.ui.registry.addButton('pagebreak', {
92
+        icon: 'page-break',
93
+        tooltip: 'Page break',
94
+        onAction: function () {
95
+          return editor.execCommand('mcePageBreak');
96
+        }
97
+      });
98
+      editor.ui.registry.addMenuItem('pagebreak', {
99
+        text: 'Page break',
100
+        icon: 'page-break',
101
+        onAction: function () {
102
+          return editor.execCommand('mcePageBreak');
103
+        }
104
+      });
105
+    };
106
+    var Buttons = { register: register$1 };
107
+
108
+    function Plugin () {
109
+      global.add('pagebreak', function (editor) {
110
+        Commands.register(editor);
111
+        Buttons.register(editor);
112
+        FilterContent.setup(editor);
113
+        ResolveName.setup(editor);
114
+      });
115
+    }
116
+
117
+    Plugin();
118
+
119
+}());

+ 0
- 0
vue-element-admin/static/tinymce/plugins/pagebreak/plugin.min.js Vedi File


Some files were not shown because too many files changed in this diff