diff --git a/assets/120060.jpg b/assets/120060.jpg deleted file mode 100644 index 2e1fd02..0000000 Binary files a/assets/120060.jpg and /dev/null differ diff --git a/assets/1573592459699.png b/assets/1573592459699.png deleted file mode 100644 index 8b22156..0000000 Binary files a/assets/1573592459699.png and /dev/null differ diff --git a/assets/1588548668698.gif b/assets/1588548668698.gif deleted file mode 100644 index 5659f99..0000000 Binary files a/assets/1588548668698.gif and /dev/null differ diff --git a/assets/1588548784395.gif b/assets/1588548784395.gif deleted file mode 100644 index 212cbb3..0000000 Binary files a/assets/1588548784395.gif and /dev/null differ diff --git a/assets/1588548916980.gif b/assets/1588548916980.gif deleted file mode 100644 index e7d38c7..0000000 Binary files a/assets/1588548916980.gif and /dev/null differ diff --git a/assets/640x100.jpg b/assets/640x100.jpg deleted file mode 100644 index 72d6ae0..0000000 Binary files a/assets/640x100.jpg and /dev/null differ diff --git a/assets/IMG_1736.JPG b/assets/IMG_1736.JPG deleted file mode 100644 index e5c3c81..0000000 Binary files a/assets/IMG_1736.JPG and /dev/null differ diff --git a/assets/IMG_1737.JPG b/assets/IMG_1737.JPG deleted file mode 100644 index b616576..0000000 Binary files a/assets/IMG_1737.JPG and /dev/null differ diff --git a/assets/QQ20200520-215756.png b/assets/QQ20200520-215756.png deleted file mode 100644 index 6519ee2..0000000 Binary files a/assets/QQ20200520-215756.png and /dev/null differ diff --git a/assets/QQ图片20191018161330.jpg b/assets/QQ图片20191018161330.jpg deleted file mode 100644 index 382c485..0000000 Binary files a/assets/QQ图片20191018161330.jpg and /dev/null differ diff --git a/assets/QQ图片20191018161901.png b/assets/QQ图片20191018161901.png deleted file mode 100644 index c85b900..0000000 Binary files a/assets/QQ图片20191018161901.png and /dev/null differ diff --git a/assets/QQ图片20191018162208.jpg b/assets/QQ图片20191018162208.jpg deleted file mode 100644 index 7ecd37c..0000000 Binary files a/assets/QQ图片20191018162208.jpg and /dev/null differ diff --git a/assets/QQ图片20191108022250.png b/assets/QQ图片20191108022250.png deleted file mode 100644 index 903b0ea..0000000 Binary files a/assets/QQ图片20191108022250.png and /dev/null differ diff --git a/assets/android_index.png b/assets/android_index.png deleted file mode 100644 index ee94c31..0000000 Binary files a/assets/android_index.png and /dev/null differ diff --git a/assets/baijiahao.jpg b/assets/baijiahao.jpg deleted file mode 100644 index 6a32840..0000000 Binary files a/assets/baijiahao.jpg and /dev/null differ diff --git a/assets/chapter_manager.png b/assets/chapter_manager.png deleted file mode 100644 index 80913ce..0000000 Binary files a/assets/chapter_manager.png and /dev/null differ diff --git a/assets/chapter_pub.png b/assets/chapter_pub.png deleted file mode 100644 index 8b037c9..0000000 Binary files a/assets/chapter_pub.png and /dev/null differ diff --git a/assets/charset_config.png b/assets/charset_config.png deleted file mode 100644 index 3cfe6ef..0000000 Binary files a/assets/charset_config.png and /dev/null differ diff --git a/assets/craw_config.png b/assets/craw_config.png deleted file mode 100644 index fe521d7..0000000 Binary files a/assets/craw_config.png and /dev/null differ diff --git a/assets/crawl_config.png b/assets/crawl_config.png deleted file mode 100644 index 11a07e6..0000000 Binary files a/assets/crawl_config.png and /dev/null differ diff --git a/assets/crawl_index.png b/assets/crawl_index.png deleted file mode 100644 index 7731011..0000000 Binary files a/assets/crawl_index.png and /dev/null differ diff --git a/assets/crawl_pic.png b/assets/crawl_pic.png deleted file mode 100644 index bb68e8b..0000000 Binary files a/assets/crawl_pic.png and /dev/null differ diff --git a/assets/database_config.png b/assets/database_config.png deleted file mode 100644 index c71c726..0000000 Binary files a/assets/database_config.png and /dev/null differ diff --git a/assets/index_config.png b/assets/index_config.png deleted file mode 100644 index 9fae308..0000000 Binary files a/assets/index_config.png and /dev/null differ diff --git a/assets/jk.png b/assets/jk.png deleted file mode 100644 index 82a7203..0000000 Binary files a/assets/jk.png and /dev/null differ diff --git a/assets/jk_ali.png b/assets/jk_ali.png deleted file mode 100644 index 201acbd..0000000 Binary files a/assets/jk_ali.png and /dev/null differ diff --git a/assets/jk_wc.png b/assets/jk_wc.png deleted file mode 100644 index 7855a32..0000000 Binary files a/assets/jk_wc.png and /dev/null differ diff --git a/assets/login.png b/assets/login.png deleted file mode 100644 index bb8c221..0000000 Binary files a/assets/login.png and /dev/null differ diff --git a/assets/manhua_content.png b/assets/manhua_content.png deleted file mode 100644 index 1c4a158..0000000 Binary files a/assets/manhua_content.png and /dev/null differ diff --git a/assets/mh_content.png b/assets/mh_content.png deleted file mode 100644 index 82fe634..0000000 Binary files a/assets/mh_content.png and /dev/null differ diff --git a/assets/mh_index.png b/assets/mh_index.png deleted file mode 100644 index 9cf2965..0000000 Binary files a/assets/mh_index.png and /dev/null differ diff --git a/assets/mini-code.png b/assets/mini-code.png deleted file mode 100644 index 607065a..0000000 Binary files a/assets/mini-code.png and /dev/null differ diff --git a/assets/mini4.png b/assets/mini4.png deleted file mode 100644 index 1a23418..0000000 Binary files a/assets/mini4.png and /dev/null differ diff --git a/assets/novel_list.png b/assets/novel_list.png deleted file mode 100644 index e7f9274..0000000 Binary files a/assets/novel_list.png and /dev/null differ diff --git a/assets/novel_pub.png b/assets/novel_pub.png deleted file mode 100644 index b20f3c0..0000000 Binary files a/assets/novel_pub.png and /dev/null differ diff --git a/assets/oschina_tp.png b/assets/oschina_tp.png deleted file mode 100644 index 801a9cd..0000000 Binary files a/assets/oschina_tp.png and /dev/null differ diff --git a/assets/pc_all.png b/assets/pc_all.png deleted file mode 100644 index 24e557d..0000000 Binary files a/assets/pc_all.png and /dev/null differ diff --git a/assets/pc_catalog.png b/assets/pc_catalog.png deleted file mode 100644 index af5d108..0000000 Binary files a/assets/pc_catalog.png and /dev/null differ diff --git a/assets/pc_content1.png b/assets/pc_content1.png deleted file mode 100644 index 2f4cb95..0000000 Binary files a/assets/pc_content1.png and /dev/null differ diff --git a/assets/pc_content2.png b/assets/pc_content2.png deleted file mode 100644 index 5d261ab..0000000 Binary files a/assets/pc_content2.png and /dev/null differ diff --git a/assets/pc_detail.png b/assets/pc_detail.png deleted file mode 100644 index e66c038..0000000 Binary files a/assets/pc_detail.png and /dev/null differ diff --git a/assets/pc_index.png b/assets/pc_index.png deleted file mode 100644 index 600b16d..0000000 Binary files a/assets/pc_index.png and /dev/null differ diff --git a/assets/pc_rank.png b/assets/pc_rank.png deleted file mode 100644 index 3f1aca9..0000000 Binary files a/assets/pc_rank.png and /dev/null differ diff --git a/assets/pic_save_type.png b/assets/pic_save_type.png deleted file mode 100644 index 5c31e9b..0000000 Binary files a/assets/pic_save_type.png and /dev/null differ diff --git a/assets/qq_group.png b/assets/qq_group.png deleted file mode 100644 index 2de74b4..0000000 Binary files a/assets/qq_group.png and /dev/null differ diff --git a/assets/score_config.png b/assets/score_config.png deleted file mode 100644 index e6f665a..0000000 Binary files a/assets/score_config.png and /dev/null differ diff --git a/assets/springcloud.jpg b/assets/springcloud.jpg deleted file mode 100644 index d60bf3b..0000000 Binary files a/assets/springcloud.jpg and /dev/null differ diff --git a/assets/upload_config.png b/assets/upload_config.png deleted file mode 100644 index e5b6975..0000000 Binary files a/assets/upload_config.png and /dev/null differ diff --git a/assets/小说精品屋功能清单.bak b/assets/小说精品屋功能清单.bak deleted file mode 100644 index d904b72..0000000 Binary files a/assets/小说精品屋功能清单.bak and /dev/null differ diff --git a/assets/小说精品屋功能清单.twdx b/assets/小说精品屋功能清单.twdx deleted file mode 100644 index e991baf..0000000 Binary files a/assets/小说精品屋功能清单.twdx and /dev/null differ diff --git a/assets/小说精品屋开源项目交流群群二维码.png b/assets/小说精品屋开源项目交流群群二维码.png deleted file mode 100644 index 561e209..0000000 Binary files a/assets/小说精品屋开源项目交流群群二维码.png and /dev/null differ diff --git a/assets/小说精品屋开源项目交流群群聊二维码.png b/assets/小说精品屋开源项目交流群群聊二维码.png deleted file mode 100644 index 73204e0..0000000 Binary files a/assets/小说精品屋开源项目交流群群聊二维码.png and /dev/null differ diff --git a/assets/微信图片_20190904181558.png b/assets/微信图片_20190904181558.png deleted file mode 100644 index 60d1c0d..0000000 Binary files a/assets/微信图片_20190904181558.png and /dev/null differ diff --git a/assets/热门云产品1040.100.jpg b/assets/热门云产品1040.100.jpg deleted file mode 100644 index d798b98..0000000 Binary files a/assets/热门云产品1040.100.jpg and /dev/null differ diff --git a/assets/精品小说楼.png b/assets/精品小说楼.png deleted file mode 100644 index 11e3921..0000000 Binary files a/assets/精品小说楼.png and /dev/null differ diff --git a/assets/精品小说楼_轻小说专区.png b/assets/精品小说楼_轻小说专区.png deleted file mode 100644 index d36e9e2..0000000 Binary files a/assets/精品小说楼_轻小说专区.png and /dev/null differ diff --git a/doc/api/api.md b/doc/api/api.md deleted file mode 100644 index 89e9ba3..0000000 --- a/doc/api/api.md +++ /dev/null @@ -1,116 +0,0 @@ - -

小说精品屋-plus

- 小说精品屋-plus接口 - - -# 作家模块 - -## 小说章节分页列表查询接口 - -### 基本信息 - -**Path:** /book/queryIndexList - -**Method:** GET - -**接口描述:** -

作家后台章节管理页面需要请求该接口获取小说章节分页列表信息

- - -### 请求参数 -**Query** - -| 参数名称 | 是否必须 | 示例 | 备注 | -| ------------ | ------------ | ------------ | ------------ | -| bookId | 是 | 1334337530296893441 | 小说ID | -| curr | 否 | 1 | 查询页码,默认1 | -| limit | 否 | 5 | 分页大小,默认5 | - -### 返回数据 - - - - - - - - -
名称类型是否必须默认值备注其他信息
codenumber必须响应状态吗,200表示成功
msgstring必须响应信息
dataobject必须响应数据
├─ totalnumber必须总数量
├─ listobject []必须章节数据集合

item 类型: object

├─ idstring必须章节ID
├─ bookIdstring必须小说ID
├─ indexNamestring必须章节名
├─ isVipnumber必须是否收费,1:收费,0:免费
├─ updateTimestring必须更新时间
├─ pageNumnumber必须页码
├─ pageSizenumber必须分页大小
├─ sizenumber必须当前页数量
- -## 小说章节删除接口 - -### 基本信息 - -**Path:** /author/deleteIndex/{indexId} - -**Method:** DELETE - -**接口描述:** -

作家后台章节管理页面点击删除按钮请求该接口删除小说章节内容

- - -### 请求参数 -**Headers** - -| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | -| ------------ | ------------ | ------------ | ------------ | ------------ | -| Content-Type | application/x-www-form-urlencoded | 是 | | | -| Authorization | | 是 | eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE2MDgzNDg0NzksInN1YiI6IntcImlkXCI6MTI1NTA2MDMyODMyMjAyNzUyMCxcInVzZXJuYW1lXCI6XCIxMzU2MDQyMTMyNFwiLFwibmlja05hbWVcIjpcIjEzNTYwNDIxMzI0XCJ9IiwiY3JlYXRlZCI6MTYwNzc0MzY3OTkxM30.0qhwis_zPb6t8wGNejMhDZ2iHCL9Tgh2UHd1gcQBCp8t6RW3ggSwtfo4l_RgMT_v8jOkLW91GzTVWlNnTE6LCA | 认证JWT,请求登录接口成功后返回 | -**路径参数** - -| 参数名称 | 示例 | 备注 | -| ------------ | ------------ | ------------ | -| indexId | 1337603246936645632 | 章节ID | - -### 返回数据 - - - - - - - - -
名称类型是否必须默认值备注其他信息
codenumber必须响应状态吗,200表示成功
msgstring必须响应信息
- -## 小说章节发布接口 - -### 基本信息 - -**Path:** /author/addBookContent - -**Method:** POST - -**接口描述:** -

作家后台章节发布页面点击提交按钮请求该接口新增小说章节内容

- - -### 请求参数 -**Headers** - -| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | -| ------------ | ------------ | ------------ | ------------ | ------------ | -| Content-Type | application/x-www-form-urlencoded | 是 | | | -| Authorization | | 是 | eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE2MDgzNDg0NzksInN1YiI6IntcImlkXCI6MTI1NTA2MDMyODMyMjAyNzUyMCxcInVzZXJuYW1lXCI6XCIxMzU2MDQyMTMyNFwiLFwibmlja05hbWVcIjpcIjEzNTYwNDIxMzI0XCJ9IiwiY3JlYXRlZCI6MTYwNzc0MzY3OTkxM30.0qhwis_zPb6t8wGNejMhDZ2iHCL9Tgh2UHd1gcQBCp8t6RW3ggSwtfo4l_RgMT_v8jOkLW91GzTVWlNnTE6LCA | 认证JWT,请求登录接口成功后返回 | -**Body** - -| 参数名称 | 参数类型 | 是否必须 | 示例 | 备注 | -| ------------ | ------------ | ------------ | ------------ | ------------ | -| bookId | text | 是 | 1334337530296893441 | 小说ID | -| indexName | text | 是 | 第六章未婚妻(下) | 章节名 | -| content | text | 是 | 开始之时,李七夜还是生疏无比,那怕他对于刀术的所有奥义了然于胸,但是,他出刀之时依然会颤抖,无法达到妙及巅毫的要求。 | 章节内容 | -| isVip | text | 是 | 1 | 是否收费,1:收费,0:免费 | - - - -### 返回数据 - - - - - - - - -
名称类型是否必须默认值备注其他信息
codenumber必须响应状态吗,200表示成功
msgstring必须响应信息
- \ No newline at end of file diff --git a/doc/es/index_create.txt b/doc/es/book.http similarity index 100% rename from doc/es/index_create.txt rename to doc/es/book.http diff --git a/novel-front/src/main/resources/static/mobile/IMG_1470.JPG b/novel-front/src/main/resources/static/mobile/IMG_1470.JPG deleted file mode 100644 index 26304c5..0000000 Binary files a/novel-front/src/main/resources/static/mobile/IMG_1470.JPG and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/baidu_verify_ANtJi2eSPQ.html b/novel-front/src/main/resources/static/mobile/baidu_verify_ANtJi2eSPQ.html deleted file mode 100644 index 494b211..0000000 --- a/novel-front/src/main/resources/static/mobile/baidu_verify_ANtJi2eSPQ.html +++ /dev/null @@ -1 +0,0 @@ -ANtJi2eSPQ \ No newline at end of file diff --git a/novel-front/src/main/resources/static/mobile/baidu_verify_Ep8xaWQJAI.html b/novel-front/src/main/resources/static/mobile/baidu_verify_Ep8xaWQJAI.html deleted file mode 100644 index 98d54f8..0000000 --- a/novel-front/src/main/resources/static/mobile/baidu_verify_Ep8xaWQJAI.html +++ /dev/null @@ -1 +0,0 @@ -Ep8xaWQJAI \ No newline at end of file diff --git a/novel-front/src/main/resources/static/mobile/baidu_verify_L6sR9GjEtg.html b/novel-front/src/main/resources/static/mobile/baidu_verify_L6sR9GjEtg.html deleted file mode 100644 index 7ddd7fd..0000000 --- a/novel-front/src/main/resources/static/mobile/baidu_verify_L6sR9GjEtg.html +++ /dev/null @@ -1 +0,0 @@ -L6sR9GjEtg \ No newline at end of file diff --git a/novel-front/src/main/resources/static/mobile/book_content.html b/novel-front/src/main/resources/static/mobile/book_content.html deleted file mode 100644 index d6d9d48..0000000 --- a/novel-front/src/main/resources/static/mobile/book_content.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - 帝霸 - - - - - -
- -
- - -
- -
- -
-
- - -
- - - - 字体: - - - -
-
- - 上一章目录下一章 -
-
-

     - 『章节错误,点此举报』

-   很快,所有人都离开了小圣山,只有独孤岚留下。

  当众人都离开之后,独孤岚起身,行至溪边,向李七夜鞠身大拜,说道:“云泥学院弟子,拜见少爷。”

  独孤岚行大礼,李七夜缓缓张开眼睛,看了她一眼,点了点头。

  “有事吗?”李七夜也仅仅是看了独孤岚一眼,依然持钓杆,神态自若,似乎没有什么比钓鱼更吸引他一样。

  那怕独孤岚这样的绝世美女,李七夜那也仅仅是看了一眼而已。

  独孤岚也是十分好奇,难道李七夜真的是在钓鱼吗?这都让她不由有点出神,但,她很快就收回了心思,她轻轻地向李七夜说道:“弟子只怕不是正一少师的对手。”

  独孤岚也没有转弯抹角,而是直接说出了自己心中的疑惑。

  李七夜不由笑了一下,轻轻地摇头,说道:“不是只怕,你的的确确不是他的对手。你与他一战,必败。”

  李七夜这样的断言,独孤岚也不由沉默了一下,没有生气,也没有发怒。

  换作是其他人,或者有些不悦,甚至是怒火上冲,毕竟,决战还没有开始,就已经断言独孤岚不敌正一少师了,这不是一种羞辱是什么?

  独孤岚回过神来,向李七夜一鞠身,说道:“所以,弟子向少爷请教,还望少爷指点迷津。”

  独孤岚的态度很诚恳,也十分的谦卑,这样的姿态,的的确确是让人喜欢,更何况她不仅仅是绝世美女,还是天姿绝世的天才。

  “我没有什么好指点的。”李七夜轻轻摇了摇头,笑了笑,说道:“你对大道的领悟,已经超过了许许多多的同辈中人,你自己心里面也应该一清二楚。”

  这样的赞美,独孤岚没有自傲,她沉吟了一下,最后轻轻地说道:“弟子见少爷可破解‘吞攻’,我想,少爷一定会破……”

  “你猜对了。”李七夜笑着说道:“没错,我可以破正一教的‘魔吞七卷’。”

  李七夜这样的话,独孤岚并没有吃惊,这是她意料之中,如果换作是别人,一定会大吃一惊,甚至对李七夜的话将信将疑。

  毕竟,“魔吞七卷”那是博大精深,能破一卷,那都已经是天纵其才了,更何况是七卷呢。

  说到这里,李七夜是顿了一下,看了独孤岚一眼,淡淡地说道:“就算我授你破七卷之法,你认为你就能战胜正一少师吗?”

  “这个”李七夜这样的话,顿时让独孤岚不由沉吟了一下,最后她轻轻摇头,说道:“我未与正一少师交过手,不敢下断论,但,我尽全力而为。”

  “心态很好。”李七夜笑了一下,淡淡地说道:“就算你修练了破解七法之术,也不见得你就是胜券在握。”

  独孤岚不由沉默了一下,最后她轻轻地说道:“但,少爷一定有击败正一少师之法。”

  独孤岚这样的话,李七夜没有立即回答,只是看着自己的钓杆而已,过了好一会儿之后,他这才轻轻点头,说道:“是的,击败正一少师,有何难也,千百种手段,随手拈来而已。”

  李七夜这样的话是轻措淡写,若是在场有外人听了,一定会认为李七夜口出狂言,一定是会认为李七夜又在吹牛皮。

  正一少师是何许人也,当今南西皇第一天才,大道无双,毫不夸张地说,在当今南西皇,举世之间,年轻一辈,只怕无人能敌也。

  李七夜竟然说可以轻而易举地击败他,这只怕连正一少师自己都不会相信。

  独孤岚没有置疑,她静静地听着李七夜的话,她说道:“若是少爷出手,必定是威慑八荒,正一少师败北,那也是意料中的事情。”

  “好了,别给我戴高帽子。”李七夜不由笑了一下,轻轻摆手,打断了独孤岚的话。

  说到这里,李七夜顿了一下,看着独孤岚,徐徐地说道:“你是想赢正一少师,还是想怎么样呢?”

  独孤岚沉默了一下,然后抬头,迎上李七夜的目光,认真而坦然,说道:“对于我来说,若是能赢正一少师,那是再好不过,若是不敌,那也是情理之中的事情。我道行不如正一少师,实力有着甚大的差距,败在正一少师的手中,也未见得是什么耻辱之事。”

  说到这里,独孤岚顿了一下,说道:“败在正一少师手中,只能说是愧对师门,也愧于佛陀圣地。当然,佛陀圣地屹立千百万年之久,不会因为我败于正一少师而没落,也不会因为我败于正一少师而崩溃倒塌。只能说,是我自己不够优秀,未能做到尽善尽美。”

  说出这样的一席话,独孤岚神态自然,也没有任何矫情之处。

  “这话说得好,说得很好。”李七夜笑了起来,为独孤岚鼓掌,这可以说是对独孤岚极高的赞美了。

  独孤岚也只是笑了笑,她展颜一笑,那是美丽绝伦,不知道让多少男人是神魂颠倒,让多少男人为之一见倾魂。

  李七夜也仅仅是含笑看了一眼而已。

  “少爷是不是也会出手呢?”过了片刻之后,独孤岚轻轻地问道。

  李七夜笑了一下,说道:“你不也是说了吗?佛陀圣地屹立千百万年之久,不会因为一败而衰落,也不会因为一败而崩分离析,佛陀圣地的底蕴依然还在,依然是藏龙卧虎,这样的一场挑战,战与不战,有什么区别呢。对于我来说,没有任何区别,也没有任何影响。”

  “可是。”独孤岚忍不住说道:“以少爷的身份而言,可代表着佛陀圣地,少爷乃是佛陀圣地的……”

  “不,你理解错了。”李七夜轻轻地摆手,笑着摇了摇头说道:“我从来没有代表过佛陀圣地,也没有代表过金杵王朝,那只不过是世人自作多情而已。我只是我,我也仅仅是代表着我自己而已,没有任何其他的身份。”

  李七夜这样的话,让独孤岚不由呆了一下,在此之前,李七夜说出的其他任何话,独孤岚都并不为奇,但是,现在李七夜说出了这样的话,却让独孤岚不由为之吃惊了。

  “少爷的意思……”独孤岚不由犹豫地看了李七夜一眼,她都不是十分肯定了。

  李七夜淡淡地笑了一下,看了独孤岚一眼,意味深长,淡淡地说道:“这一战,你不能指望于我,对于这样的决战,我是没有什么兴趣。这场关乎佛陀圣地和正一教的年轻一辈之争,最后还是需要你扛起大旗,去面对这一场艰难的决战。”

  独孤岚不由怔了怔,过了好一会儿,她不由深深地呼吸了一口气,不由苦笑地说道:“少爷这样的话,顿时让我感觉肩上如负千钧之重,让人窒息。”

  “对于你来说,不也是一件好事?”李七夜淡淡地说道:“这正是你独挡一面的时候,也是你迈向更高峰的时刻。”独孤岚不由苦笑,说道:“但,少爷也知道,背负佛陀圣地名誉,此乃是大任也。”

  天将降斯人也,必劳其心智。“李七夜悠然地说道。

  既然李七夜都这样说话了,独孤岚那也没什么话可以说了。

  “那,那,决战一天,少爷会来吗?”最后,独孤岚只能是这样轻轻地问道。

  李七夜没有立即回答,过了片刻之后,这才看了独孤岚一下,淡淡地笑着说道:“放心吧,出不了什么大事,既然是了不起的一战,那我当然是捧场了。”

  不知道为什么,李七夜这样的话,顿时让独孤岚在心里面长长地吁了一口气,李七夜没有给出任何承诺,但却让独孤岚如释重负一般。

  说完这话,李七夜没有再多说什么,他闭目养神,手持钓杆,好像是睡着了一样。

  独孤岚也十分好奇,为什么李七夜会一直在这里钓鱼呢,难道李七夜真的是在这里钓鱼吗?这让独孤岚充满了好奇,但,李七夜已经钓了这么久了,好像是一条鱼都没有钓到。

  “少爷真的是在钓鱼吗?”过了好一会儿,独孤岚就忍不住轻轻地问道了。

  但是,李七夜没有回答独孤岚的话,依然静静地坐在那里,好像真的睡着了一样。

  独孤岚也没有再打扰,只是静静地站在一旁,静静地看着李七夜手持着钓杆,不过,说来也奇怪,也不知道多久过去了,李七夜的钓杆一点动静都没有,根本就没有钓到一条鱼,这都让人怀疑,李七夜会不会钓鱼呢?

  也不知道过了多久,李七夜这才睁开眼睛,看了独孤岚一下,笑了一下,轻轻摇头,说道:“谁说,持杆,一定就是要钓鱼?”

  独孤岚不由怔了一下,但,也觉得这话有道理,这不一定是需要钓鱼。

  就在这个时候,李七夜开始收线了,一直在收,也不知道这钓线究竟有多长,一直收线都好像收不完一样,收了大半天,都没有看到钓钩。

  也不知道过了多久要,李七夜终于收完了错,钓钩脱水而出。

  但,当钓钩脱水而出的时候,独孤岚看得一清二楚,那根本就不是什么钓钩。

  大爆料,杀死贼老天的一千种方法曝光啦!想知道怎么杀死贼老天吗?想了解这些手段都有哪些吗?来这里!!关注贼老天”即可阅览相关信息!! -

『加入书签,方便阅读』

-
-
- - 上一章目录下一章 -
- - - - - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/mobile/book_detail.html b/novel-front/src/main/resources/static/mobile/book_detail.html deleted file mode 100644 index d63e88e..0000000 --- a/novel-front/src/main/resources/static/mobile/book_detail.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - 帝霸 - - - - - -
- -
- - -
- 帝霸 -
- -
-
- -
-
- - -
-
-
作者:厌笔萧生
-
类别:玄幻奇幻
-
状态:连载
-
更新:2019-08-22
-
评分:9.2分
- -
-
-
- - -
-

-   万火儿莫名其妙的重生了,而且从堂堂的金丹修士,直接坠落尘埃,变成天赋极差的炼气期小透明。

  小透明无父无母小可怜,柔弱无骨真小白花。

  万火儿仰天长叹。

  天道你大爷!

  不过这一次不仅附赠随身空间,还另有极重承诺的天之骄子美貌未婚夫一枚。

  万火儿抚胸感叹:还好,还好。

  但是,除此之外,还附赠另一枚重生女!

  重生女杂灵根,蓦然醒转变为天之骄女,自此之后,丹药在她手,神兽就她有。人生处处是机缘,所到处处有福缘,更有无数美男前仆后继,后宫日益壮大。

  万火儿哀叹。

  不同命啊~

  什么?

  重生女抢她名额,找未婚夫揍她。

  什么?

  重生女抢她好友?让好友接着揍她。

  什么?

  重生女要将她未婚夫收后宫?

  抱歉,绝对不行!

  自此之后,柔弱小白花,踏上漫漫极品女盗之路。

  信奉宗旨,只要是重生女的机缘,那就抢抢抢。只要是重生女的桃花,那就破破破。

  什么?机缘本是她的?桃花也是她的?

  桃花就算了,机缘绝对不放过。

  敬请收看:妖孽无双女盗贼是如何装作可怜无助小白花,一路扮猪吃老虎,踏上漫漫修仙路的。 -

- - -
-
-

- 最新章节 - - 更新: 2019-08-22 12:56:09 - -

- -
-
-
- - 查看完整目录 -
- - - - - - - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/mobile/book_index.html b/novel-front/src/main/resources/static/mobile/book_index.html deleted file mode 100644 index d21f887..0000000 --- a/novel-front/src/main/resources/static/mobile/book_index.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - 帝霸 - - - - - -
- -
- - -
- 帝霸 -
- -
-
- - - -

- -↓直达页面底部 -

- -

第345章 我在钓鱼

-

第344章 我在钓鱼

-

第343章 我在钓鱼

-

第342章 我在钓鱼

-

第341章 我在钓鱼

-

第340章 我在钓鱼

-

第345章 我在钓鱼

-

第344章 我在钓鱼

-

第343章 我在钓鱼

-

第342章 我在钓鱼

-

第341章 我在钓鱼

-

第340章 我在钓鱼

-

第345章 我在钓鱼

-

第344章 我在钓鱼

-

第343章 我在钓鱼

-

第342章 我在钓鱼

-

第341章 我在钓鱼

-

第340章 我在钓鱼

-

第345章 我在钓鱼

-

第344章 我在钓鱼

-

第343章 我在钓鱼

-

第342章 我在钓鱼

-

第341章 我在钓鱼

-

第340章 我在钓鱼

-

第345章 我在钓鱼

-

第344章 我在钓鱼

-

第343章 我在钓鱼

-

第342章 我在钓鱼

-

第341章 我在钓鱼

-

第340章 我在钓鱼

-

第345章 我在钓鱼

-

第344章 我在钓鱼

-

第343章 我在钓鱼

-

第342章 我在钓鱼

-

第341章 我在钓鱼

-

第340章 我在钓鱼

- - - - - - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/mobile/book_search.html b/novel-front/src/main/resources/static/mobile/book_search.html deleted file mode 100644 index 81e5183..0000000 --- a/novel-front/src/main/resources/static/mobile/book_search.html +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - - - 帝霸 - - - - - -
- -
- - -
- 搜索小说 -
- -
-
- -
-
- -
- -
-
- -
-
- -
-
-
- -
-
-
帝霸
-
9.2分
-
作者:厌笔萧生
-
类别:玄幻奇幻
-
状态:连载
-
更新:2019-08-22
-
-
-

简介:

-
- - 一觉醒来,世界大变。熟悉的高中传授的是魔法, - 告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽, - 虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师, - 一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师! -
-
-
- - -
- -
-
-
- -
-
-
帝霸
-
9.2分
-
作者:厌笔萧生
-
类别:玄幻奇幻
-
状态:连载
-
更新:2019-08-22
-
-
-

简介:

-
- - 一觉醒来,世界大变。熟悉的高中传授的是魔法, - 告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽, - 虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师, - 一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师! -
-
-
- - -
- -
-
-
- -
-
-
帝霸
-
9.2分
-
作者:厌笔萧生
-
类别:玄幻奇幻
-
状态:连载
-
更新:2019-08-22
-
-
-

简介:

-
- - 一觉醒来,世界大变。熟悉的高中传授的是魔法, - 告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽, - 虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师, - 一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师! -
-
-
- - -
- -
-
-
- -
-
-
帝霸
-
9.2分
-
作者:厌笔萧生
-
类别:玄幻奇幻
-
状态:连载
-
更新:2019-08-22
-
-
-

简介:

-
- - 一觉醒来,世界大变。熟悉的高中传授的是魔法, - 告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽, - 虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师, - 一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师! -
-
-
- - -
- -
-
-
- -
-
-
帝霸
-
9.2分
-
作者:厌笔萧生
-
类别:玄幻奇幻
-
状态:连载
-
更新:2019-08-22
-
-
-

简介:

-
- - 一觉醒来,世界大变。熟悉的高中传授的是魔法, - 告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽, - 虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师, - 一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师! -
-
-
- - -
- -
-
-
- -
-
-
帝霸
-
9.2分
-
作者:厌笔萧生
-
类别:玄幻奇幻
-
状态:连载
-
更新:2019-08-22
-
-
-

简介:

-
- - 一觉醒来,世界大变。熟悉的高中传授的是魔法, - 告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽, - 虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师, - 一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师! -
-
-
- - -
- -
-
-
- -
-
-
帝霸
-
9.2分
-
作者:厌笔萧生
-
类别:玄幻奇幻
-
状态:连载
-
更新:2019-08-22
-
-
-

简介:

-
- - 一觉醒来,世界大变。熟悉的高中传授的是魔法, - 告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽, - 虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师, - 一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师! -
-
-
- - -
- -
- - -
- - - - - - - - - - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/mobile/favicon.ico b/novel-front/src/main/resources/static/mobile/favicon.ico deleted file mode 100644 index 7782d23..0000000 Binary files a/novel-front/src/main/resources/static/mobile/favicon.ico and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/fiction_house.apk b/novel-front/src/main/resources/static/mobile/fiction_house.apk deleted file mode 100644 index fac9b7a..0000000 Binary files a/novel-front/src/main/resources/static/mobile/fiction_house.apk and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/index.html b/novel-front/src/main/resources/static/mobile/index.html deleted file mode 100644 index e78ef2d..0000000 --- a/novel-front/src/main/resources/static/mobile/index.html +++ /dev/null @@ -1,376 +0,0 @@ - - - - - - 首页 - - - - - - - - -
-
- -
- -
-
- -
-
- -
-
-
-

本站推荐

-
- - -
- -
-
- -
- 三寸人间 - - -
-
- -
- 三寸人间 -
-
- -
- 三寸人间 -
-
-
-
-
-
-

热门小说推荐

-
- -
-
-
-
- -
-
-
绝世唐门 -
9.3分
-
-
作者:唐家三少
-
- 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
-
-
-
-
- -
-
-
绝世唐门 -
9.3分
-
-
作者:唐家三少
-
- 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
-
-
-
-
- -
-
-
绝世唐门 -
9.3分
-
-
作者:唐家三少
-
- 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
-
-
-
-
- -
-
-
绝世唐门 -
9.3分
-
-
作者:唐家三少
-
- 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
-
-
-
-
- -
-
-
绝世唐门 -
9.3分
-
-
作者:唐家三少
-
- 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
-
-
-
-
- -
-
-
绝世唐门 -
9.3分
-
-
作者:唐家三少
-
- 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
-
-
-
-
- -
-
-
绝世唐门 -
9.3分
-
-
作者:唐家三少
-
- 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
-
-
-
- -
-
-
-
-

最近更新小说
更多

-
- -
-
-
- -
1.我真的要飞天了 - 柳一条 -
-
08-22 19:13
-
-
- 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
-
-
- -
1.我真的要飞天了 - 柳一条 -
-
08-22 19:13
-
-
- 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
-
-
- -
1.我真的要飞天了 - 柳一条 -
-
08-22 19:13
-
-
- 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
-
-
- -
1.我真的要飞天了 - 柳一条 -
-
08-22 19:13
-
-
- 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
-
-
- -
1.我真的要飞天了 - 柳一条 -
-
08-22 19:13
-
-
- 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
-
-
- -
1.我真的要飞天了 - 柳一条 -
-
08-22 19:13
-
-
- 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
-
-
- -
1.我真的要飞天了 - 柳一条 -
-
08-22 19:13
-
-
- 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
-
-
- -
1.我真的要飞天了 - 柳一条 -
-
08-22 19:13
-
-
- 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
-
-
- -
1.我真的要飞天了 - 柳一条 -
-
08-22 19:13
-
-
- 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
-
-
- -
1.我真的要飞天了 - 柳一条 -
-
08-22 19:13
-
-
- 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
-
-
- -
1.我真的要飞天了 - 柳一条 -
-
08-22 19:13
-
-
- 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
-
-
- -
1.我真的要飞天了 - 柳一条 -
-
08-22 19:13
-
-
- 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
-
-
- -
1.我真的要飞天了 - 柳一条 -
-
08-22 19:13
-
-
- 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
-
- - -
-
- -
-
-
- - - - - - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/mobile/mang.html b/novel-front/src/main/resources/static/mobile/mang.html deleted file mode 100644 index 9883d49..0000000 --- a/novel-front/src/main/resources/static/mobile/mang.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - 服务器忙 - - - - - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/mobile/mang.png b/novel-front/src/main/resources/static/mobile/mang.png deleted file mode 100644 index c7d20d7..0000000 Binary files a/novel-front/src/main/resources/static/mobile/mang.png and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/shenma-site-verification.txt b/novel-front/src/main/resources/static/mobile/shenma-site-verification.txt deleted file mode 100644 index 75fef84..0000000 --- a/novel-front/src/main/resources/static/mobile/shenma-site-verification.txt +++ /dev/null @@ -1 +0,0 @@ -shenma-site-verification:5548d4bd962d5cdd4cf6aeba92b991a8_1565952381 \ No newline at end of file diff --git a/novel-front/src/main/resources/static/mobile/shenma-site-verification2.txt b/novel-front/src/main/resources/static/mobile/shenma-site-verification2.txt deleted file mode 100644 index d28e688..0000000 --- a/novel-front/src/main/resources/static/mobile/shenma-site-verification2.txt +++ /dev/null @@ -1 +0,0 @@ -shenma-site-verification:e93eadfe16868eab152e1c0d5520905c_1566024934 \ No newline at end of file diff --git a/novel-front/src/main/resources/static/mobile/static/23446.jpg b/novel-front/src/main/resources/static/mobile/static/23446.jpg deleted file mode 100644 index 16e037d..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/23446.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/4868.jpg b/novel-front/src/main/resources/static/mobile/static/4868.jpg deleted file mode 100644 index bc35c75..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/4868.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/5082.jpg b/novel-front/src/main/resources/static/mobile/static/5082.jpg deleted file mode 100644 index 7f9e01c..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/5082.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/851bd749efa54b8a8445b03108722163.jpg b/novel-front/src/main/resources/static/mobile/static/851bd749efa54b8a8445b03108722163.jpg deleted file mode 100644 index ac8fca3..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/851bd749efa54b8a8445b03108722163.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/U770P4T8D8933761F19930DT20190821203252.jpg b/novel-front/src/main/resources/static/mobile/static/U770P4T8D8933761F19930DT20190821203252.jpg deleted file mode 100644 index 6cbb5b0..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/U770P4T8D8933761F19930DT20190821203252.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/U770P4T8D8933772F19930DT20190821204700.jpg b/novel-front/src/main/resources/static/mobile/static/U770P4T8D8933772F19930DT20190821204700.jpg deleted file mode 100644 index c028481..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/U770P4T8D8933772F19930DT20190821204700.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/U770P4T8D8933775F19930DT20190821204952.jpg b/novel-front/src/main/resources/static/mobile/static/U770P4T8D8933775F19930DT20190821204952.jpg deleted file mode 100644 index d22e635..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/U770P4T8D8933775F19930DT20190821204952.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/U770P4T8D8933777F19930DT20190821205124.jpg b/novel-front/src/main/resources/static/mobile/static/U770P4T8D8933777F19930DT20190821205124.jpg deleted file mode 100644 index 172c8a2..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/U770P4T8D8933777F19930DT20190821205124.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/U849P4T8D8933738F19930DT20190821200104.jpg b/novel-front/src/main/resources/static/mobile/static/U849P4T8D8933738F19930DT20190821200104.jpg deleted file mode 100644 index c317b48..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/U849P4T8D8933738F19930DT20190821200104.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/core.php b/novel-front/src/main/resources/static/mobile/static/core.php deleted file mode 100644 index cbb848f..0000000 --- a/novel-front/src/main/resources/static/mobile/static/core.php +++ /dev/null @@ -1 +0,0 @@ -!function(){var p,q,r,a=function(){var b,c,d,e,a=document.getElementsByTagName("script");for(b=0,c=a.length;c>b;b++)if(e=a[b],e.src&&(d=/^(https?:)\/\/[\w\.\-]+\.cnzz\.com\//i.exec(e.src)))return d[1];return window.location.protocol}(),b=encodeURIComponent,c="1264351521",d="",e="",f="online_v3.php",g="z8.cnzz.com",h="1",i="text",j="z",k="站长统计",l=window["_CNZZDbridge_"+c]["bobject"],m="1",n=a+"//online.cnzz.com/online/"+f,o=[];o.push("id="+c),o.push("h="+g),o.push("on="+b(e)),o.push("s="+b(d)),n+="?"+o.join("&"),"0"===m&&l["callRequest"]([a+"//cnzz.mmstat.com/9.gif?abc=1"]),h&&(""!==e?l["createScriptIcon"](n,"utf-8"):(q="z"==j?"https://www.cnzz.com/stat/website.php?web_id="+c:"https://quanjing.cnzz.com","pic"===i?(r=a+"//icon.cnzz.com/img/"+d+".gif",p=""):p=""+k+"",l["createIcon"]([p])))}(); \ No newline at end of file diff --git a/novel-front/src/main/resources/static/mobile/static/icon-backtop.gif b/novel-front/src/main/resources/static/mobile/static/icon-backtop.gif deleted file mode 100644 index f4cf013..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/icon-backtop.gif and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/index.css b/novel-front/src/main/resources/static/mobile/static/index.css deleted file mode 100644 index d26f66d..0000000 --- a/novel-front/src/main/resources/static/mobile/static/index.css +++ /dev/null @@ -1,176 +0,0 @@ -header {height:54px; background:#4baacd; line-height:54px; border-bottom:1px #4399b8 solid;} -header img{float:left; width:142px; height:54px;} -header a{float:right; font-size:12px; color:#C5F1FF; line-height:80px;} -.Index_Header a{margin:0 6px;} -header .regis{background:url(../images/icon-regis.gif);} -header .login{background:url(../images/icon-login.gif);} -header .regis:hover{background:url(../images/icon-regis-press.gif);} -header .login:hover{background:url(../images/icon-login-press.gif);} -header .regis, header .login{width:25px; height:54px;} -header .regis, header .login, header .regis:hover, header .login:hover{background-repeat:no-repeat; background-position:50% 30%; background-size:18px 19px;} -header .username{float:right; text-align:right; line-height:54px; font-size:12px; color:#c5f1ff; height:54px; width:140px; overflow:hidden;} -header .username img{float:right; width:18px; height:19px; margin-top:17px; margin-right:5px;} -header .username b{float:right; font-weight:normal; max-width:115px; text-align:left; white-space: nowrap;} -header .username a {margin:0; color:#c5f1ff; line-height:55px;} -.smallNav{height:40px; background:#4baacd; line-height:40px; text-align:center; border-bottom:1px #4399b8 solid; font-size:14px; padding:0 10px; border-top:1px #5db3d2 solid;} -.smallNav a{color:#fff; float:left; width:14%;} -.smallNav .sel{color:#4aaccf;} -.subNav{height:162px; background:#68aac2; border-top:1px #3580a4 solid; border-bottom:1px #3580a4 solid; line-height:40px; text-align:center; position:relative; font-size:14px; display:none;} -.subNav a{float:left; width:16.6%; color:#b6d3df;} -.subNav .sel{color:#fff;} -.searchForm{text-align:center; margin:10px; position:relative; clear:both;} -.searchForm_input{border:1px #c0deea solid; font-size:14px; background:#f8fdff; padding:0 5px; width:100%; height:30px; line-height:30px; color:#cbcfd1;} -.searchForm_btn{position:absolute; right:0; top:0; padding:0; height:30px; width:60px; color:#C0DEEA; padding-left:25px; line-height:30px; border:none; background:url(../images/icon-search.gif) no-repeat 15% 50%; background-size:18px; border-left:1px #C0DEEA solid;} -.del{background:url(../images/icon-searchdel.gif) no-repeat 50% 50%; background-size:18px;} - -.notearea{height:auto; overflow:hidden; margin-bottom:5px; padding:0 10px;} -.notearea img{margin-top:2px; float: left; padding:; width: 50px; height:20px; margin-right:10px;} -.note{text-align:center; margin-bottom:10px; font-size:12px; height:25px; line-height:25px; overflow:hidden;} -.note a{color:#db7f7f; padding-left:18px; cursor:pointer; background:url(../images/icon-note.gif) no-repeat 3px 50%; background-size:10px; } -#marqueebox1{margin:0; /*float:left; width:70%;*/ text-align:center; } - -.big-pic{width:100%; overflow:hidden;} -.big-pic-in, .pic-list, .pic-list img{position:relative; width:320px; height:150px; } -.big-pic-in{-webkit-transform:translateZ(0);} -.big-pic-in{overflow:hidden; margin:0 auto;} -.pic-list{-webkit-transform:translate3d(0, 0, 0);} -.big-pic a{float:left;} -.big-pic a p{width:320px;} -.big-pic a p:first-child {height: 120px;} -.big-pic3 .pic-list {width: 960px;} -.big-pic4 .pic-list {width: 1280px;} -.cap{height:30px; line-height:30px; padding:0 10px; color:#fff; display:block; background:#000; opacity:0.8; font-size:14px; overflow:hidden;} -.slide-dot{position:absolute; bottom:12px; right:5px;} -.slide-dot span{float:left; border-radius:5px; background:#69aac1; height:4px; width:10px; margin:0 3px;} -.slide-dot .slide-dot-cur{height:6px; width:12px; background:#fff; margin-top:-1px;} - -.slide {width:100%; overflow:hidden;} -.slide-con {-webkit-transform:translate3d(0, 0, 0);} -.slide-item {float:left;} -.slide-con2 {width:200%;} .slide-con2 .slide-item {width:50%;} -.slide-con3 {width:300%;} .slide-con3 .slide-item {width:33.33%;} -.slide-con4 {width:400%;} .slide-con4 .slide-item {width:25%;} -.slide-con5 {width:400%;} .slide-con5 .slide-item {width:20%;} -.slide-con6 {width:500%;} .slide-con6 .slide-item {width:20%;} -.slide-con61{width:600%;} .slide-con61 .slide-item{width:16.66%;} -.slide-con7 {width:700%;} .slide-con7 .slide-item {width:14.286%;} -.slide-con8 {width:800%;} .slide-con8 .slide-item {width:12.5%;} -.transition {-webkit-transition:-webkit-transform 0.3s ease-out; -o-transition:-o-transform 0.3s ease-out; transition: transform 0.3s ease-out;} - -.tabArea{width:100%; overflow:hidden; margin:0 auto;} -.tab-navarea{background:#68aac2; width:100%;} -.tabArea .tab-nav{height:40px; overflow:hidden;} -.tabArea .tab-nav h2{font-size:16px; background:#68aac2; float:left; width:33.3%; text-align:center; height:40px; line-height:40px; cursor:pointer;} -.tabArea .tab-nav h2 a{color:#d2e4eb; text-shadow:1px 1px #3c84a6;} -.tabArea .tab-nav h2 .tab-nav-cur{color:#fff; border-bottom:2px #fff solid; padding-bottom:5px;} -.tabArea2 .tab-nav h2{width:50%;} -.tabArea4 .tab-nav h2{width:25%;} -.tabArea5 .tab-nav h2{width:20%;} -.tabArea6 .tab-nav h2{width:16.66%;} -.tabArea7 .tab-nav h2{width:14.286%;} -.tabArea8 .tab-nav h2{width:12.5%; font-size:15px;} -.tabArea8 .tab-nav h2 .tab-nav-cur{font-size:16px;} -.bannerLink p{font-size:16px; padding:0 10px; height:40px; display:block; line-height:40px; overflow:hidden;} -.bannerLink .sort{margin-right:10px;} -.bannerLink .em{background:#f6fcff;} - -.recommend{width:100%; clear:both;} -.recommend h2{font-size:16px; height:40px; line-height:40px; background:#68aac2; padding:0 10px;} -.recommend h2 a{color:#fff; text-shadow:1px 1px #2a779d;} -.recommend .more{float:right; margin-top:-40px;} -.hot_sale{clear:both; background:#edfaff; border-top:2px #edfaff solid; border-bottom:2px #edfaff solid; overflow:hidden;} -.hot_sale{position:relative; height:145px; padding:7px 10px 0 110px;} -.hot_sale img{position:absolute; left:10px; top:10px; border:1px #b4dae8 solid; width:87px; height:117px;} -.hot_sale .title{color:#375868; font-size:16px;} -.hot_sale .author, .hot_sale .review{font-size:14px; color:#7f9ba8; line-height:22px;} -.hot_sale .review{line-height:20px;} -.hot_sale:hover{background:#d9f5ff; border-bottom:2px #9dcada solid; border-top:2px #9dcada solid;} -.hot_saleEm{background:#fff; border-bottom:2px #fff solid; border-top:2px #fff solid;} -.girl .hot_sale:hover{background:#fef1f5; border-bottom:2px #ffdee9 solid; border-top:2px #ffdee9 solid;} -.partner .hot_sale:hover{background:#fbfff2; border-bottom:2px #dce59a solid; border-top:2px #dce59a solid;} -.hot_salehavDate .author{margin-bottom:2px;} -.hot_sale .date{color:#e76767; font-size:12px; margin-bottom:4px;} -.hot_link div{clear:both; padding:2px 10px 2px 50px; height:52px; position:relative; border-top:1px #fff solid; border-bottom:1px #fff solid;} -.hot_link .em{background:#f6fcff;} -.hot_link .sort{width:18px; padding-right:8px; position:absolute; left:10px; top:10px; border-right:2px #a9bfc8 solid; font-size:14px;} -.hot_link .title{font-size:14px; color:#375868; line-height:30px; height:30px; overflow:hidden;} -.hot_link .review{color:#7f9ba8; font-size:12px; line-height:10px;} -.hot_link div:hover{background:#f6fcff; border-top:1px #d1e5ec solid; border-bottom:1px #d1e5ec solid;} - - -.directorySel, .directorySel2{text-align:center;} -.directorySel{width:95%; display:block; margin:0 auto; margin-top:10px;} -.directorySel2{font-size:14px; margin:0 4px;} -.directoryArea p, .directoryLink, .directoryLink a{height:40px; line-height:40px; font-size:16px;} -.directoryArea p{height:auto;} -.directoryArea p{padding:0 10px;} -.directoryArea .em{background:#f6fcff;} -.directoryArea img{margin-left:8px;} -.directoryLink a{float:left; width:33.3%; text-align:center;} - -.Readpage{font-size:14px; padding:0; background:#d4eaf2; height:40px; line-height:40px; text-align:center;} -.Readpage a{font-size:16px; padding:8px 12px; line-height:35px;} -.Readpage .Readpage_up{color: #2a779d; background:url(../images/bg-pageup.png) no-repeat 0 70%; padding-left:27px; background-size:90px;} -.Readpage .Readpage_down{text-shadow: 1px 1px #2a779d; color:#fff; background:url(../images/bg-pagedown.png) no-repeat 0px 50%; padding-right:27px; background-size:90px;} -.Readpage .page_txt{width:45px; padding:4px; border:1px #68aac2 solid; font-size:14px; margin-left:15px; background:#f2fcff;} -.Readpage .page_btn{font-size:14px; border:none; background:none; color:#4c6978; padding:4px 5px; margin-right:15px; background:#f2fcff; font-weight:bold;} - - -/*搜索结果页*/ -.searchInfo{text-align:center; padding:0 10px; margin-bottom:10px; font-size:16px; line-height:28px;} -.searchInfo em{color:#db7f7f;} -.searchrec h2{margin-bottom:5px;} -.searchrec p {padding:5px 10px;} -.searchrec p a{margin-right:13px; color:#68AAC2; font-size:16px;} -.searchInfo label{margin-right:10px; line-height:20px; font-size:14px;} -.mybook em{color:#d25151;} -.mybook .hot_sale p{line-height:20px;} -.mybook .date{margin:0;} -.mybook .hot_sale{padding:7px 8px 5px 40px; height:auto; overflow:hidden;} -.mybook .hot_sale div a{width:80px; height:30px; line-height:30px; text-align:center; font-size:12px; border-radius:5px; color:#fff; margin-left:3px;} -.mybook .hot_sale img{left:5px;} -.mybook .hot_sale .author{font-size:12px;} -.mybook .hot_sale div .dashang{background:#ff3e3e;} -.mybook .hot_sale div .tuijian{background:#68aac2;} -.mybook .hot_sale div .kuaiding{background:#b3b3b3;} -.mybook .num{position:absolute; left:5px; top:10px; text-align:center; letter-spacing:-1px; height:25px; width:30px; line-height:25px; background:#B3B3B3; color:#fff; border-radius:5px;} -.mybook .num1{background:#FF3E3E;} -.mybook .num2{background:#68aac2;} - -.page{background:#68aac2; padding:0 10px; color:#c5d7df; height:40px; line-height:40px; text-align:center;} -.page a{color:#fff; margin:0 5px;} -.pageinput{float:right;} -.page .page_txt{padding:2px 5px; border:1px #c5d7df solid; background:#f6fcff; color:#4c6978; border-radius:5px; font-size:14px; width:80px; margin-right:5px; color:#333; text-align:center;} - -.hot_sale .btn{margin-top:5px; height:auto; overflow:hidden; line-height:normal;} -.hot_sale .btn_inpt{font-size:14px; line-height:30px; background:#68aac2; color:#fff; border:0; font-family:"微软雅黑"; margin-right:8px; padding:8px 15px; padding-top:0;} -.hot_sale .btn_inptem{background:#d25151;} -.booklist .hot_sale{padding:5px 10px 8px 10px;} -.booklist h3{padding:10px; font-size:14px;} -.booklist h3 a{color:#d25151;} - -/***************************************************************************************/ -*{margin:0; padding:0;/* background-attachment:fixed;*/} - -div,p{wrap-work: break-word; word-break: break-all; word-wrap:break-word; word-break:normal; -moz-box-sizing:border-box; -webkit-box-sizing:border-box; box-sizing:border-box; -ms-box-sizing:border-box;} - -li{list-style:none;} -em{font-style:normal;} -body{color:#4c6978; font:14px 'microsoft yahei',Arial,Helvetica,sans-serif;} -input,textarea{font:12px '宋体',Arial,Helvetica,sans-serif; -moz-box-sizing:border-box; -webkit-box-sizing:border-box; -box-sizing:border-box;} -img{border:none;} -a{color:#4c6978; text-decoration:none; border:none; cursor:pointer;} -a:hover{text-decoration:none;} -.clearfix:after {clear: both; content: "."; display: block; height: 0; visibility: hidden;} -.clearfix {display: inline-block;} -*html .clearfix {height: 1%;} -.clearfix {display: block;} -h1,h2,h3,h4,h5,h6{font-size:16px; font-weight:normal;} - -footer{padding:15px 10px; text-align:center; line-height:33px; background:#68aac2; position:relative; font-size:14px;} -footer .version a{margin:0 10px; color:#c5d7df; text-shadow:1px 1px #3e86a8;} -footer .version .sel{color:#fff; font-size:16px;} -footer .link a{margin:0 10px; color:#accad6; font-size:14px;} -footer img{position:absolute; right:25px; top:15px; cursor:pointer; width:31px;} - -footer .channel a{margin:0 5px; color:#c5d7df; text-shadow:1px 1px #3e86a8;} \ No newline at end of file diff --git a/novel-front/src/main/resources/static/mobile/static/logo.png b/novel-front/src/main/resources/static/mobile/static/logo.png deleted file mode 100644 index 61d6103..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/logo.png and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/page/book_detail.html b/novel-front/src/main/resources/static/mobile/static/page/book_detail.html deleted file mode 100644 index e69de29..0000000 diff --git a/novel-front/src/main/resources/static/mobile/static/sl_104147940.jpg b/novel-front/src/main/resources/static/mobile/static/sl_104147940.jpg deleted file mode 100644 index 39f6441..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/sl_104147940.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/sl_104148030.jpg b/novel-front/src/main/resources/static/mobile/static/sl_104148030.jpg deleted file mode 100644 index a38a136..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/sl_104148030.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/sl_104148150.jpg b/novel-front/src/main/resources/static/mobile/static/sl_104148150.jpg deleted file mode 100644 index 59a8fa2..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/sl_104148150.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/sl_104152260.jpg b/novel-front/src/main/resources/static/mobile/static/sl_104152260.jpg deleted file mode 100644 index 1093aed..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/sl_104152260.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/sl_104153130.jpg b/novel-front/src/main/resources/static/mobile/static/sl_104153130.jpg deleted file mode 100644 index 131ff9e..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/sl_104153130.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/sl_104155330.jpg b/novel-front/src/main/resources/static/mobile/static/sl_104155330.jpg deleted file mode 100644 index 9717a66..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/sl_104155330.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/sl_104155520.JPG b/novel-front/src/main/resources/static/mobile/static/sl_104155520.JPG deleted file mode 100644 index a28690f..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/sl_104155520.JPG and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/sl_104156600.JPG b/novel-front/src/main/resources/static/mobile/static/sl_104156600.JPG deleted file mode 100644 index 51d5418..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/sl_104156600.JPG and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/sl_104157470.jpg b/novel-front/src/main/resources/static/mobile/static/sl_104157470.jpg deleted file mode 100644 index 4e930fe..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/sl_104157470.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/sl_104157670.jpg b/novel-front/src/main/resources/static/mobile/static/sl_104157670.jpg deleted file mode 100644 index c6a2217..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/sl_104157670.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/sl_104158410.jpg b/novel-front/src/main/resources/static/mobile/static/sl_104158410.jpg deleted file mode 100644 index 9c776a6..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/sl_104158410.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/smimg_8992d763a682448aa74347c634da3d94.jpg b/novel-front/src/main/resources/static/mobile/static/smimg_8992d763a682448aa74347c634da3d94.jpg deleted file mode 100644 index 823ac88..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/smimg_8992d763a682448aa74347c634da3d94.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/smimg_d640709a27df412d82b084b64677b115.jpg b/novel-front/src/main/resources/static/mobile/static/smimg_d640709a27df412d82b084b64677b115.jpg deleted file mode 100644 index ff9b297..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/smimg_d640709a27df412d82b084b64677b115.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/smimg_e5dd6053d3344ea49bd7e6df022b969a.jpg b/novel-front/src/main/resources/static/mobile/static/smimg_e5dd6053d3344ea49bd7e6df022b969a.jpg deleted file mode 100644 index bb809ee..0000000 Binary files a/novel-front/src/main/resources/static/mobile/static/smimg_e5dd6053d3344ea49bd7e6df022b969a.jpg and /dev/null differ diff --git a/novel-front/src/main/resources/static/mobile/static/z_stat.php b/novel-front/src/main/resources/static/mobile/static/z_stat.php deleted file mode 100644 index e0052ed..0000000 --- a/novel-front/src/main/resources/static/mobile/static/z_stat.php +++ /dev/null @@ -1,23 +0,0 @@ -(function(){function p(){this.c="1264351521";this.ca="z";this.Y="";this.V="";this.X="";this.D="1566422043";this.$="z8.cnzz.com";this.W="";this.H="CNZZDATA"+this.c;this.G="_CNZZDbridge_"+this.c;this.O="_cnzz_CV"+this.c;this.P="CZ_UUID"+this.c;this.K="UM_distinctid";this.A="0";this.J={};this.a={};this.Ca()}function h(a, - b){try{var c=[];c.push("siteid=1264351521");c.push("name="+g(a.name));c.push("msg="+g(a.message));c.push("r="+g(l.referrer));c.push("page="+g(e.location.href));c.push("agent="+g(e.navigator.userAgent));c.push("ex="+g(b));c.push("rnd="+Math.floor(2147483648*Math.random()));(new Image).src="http://jserr.cnzz.com/log.php?"+c.join("&")}catch(d){}return!0}var q=function(){for(var a=document.getElementsByTagName("script"),b=0,c=a.length;bthis.a.b[b].h&&delete this.a.b[b];this.I()}catch(c){h(c, - "cCV failed")}},I:function(){try{var a=[],b;for(b in this.a.b){var c=[];c.push(b);c.push(this.a.b[b].da);c.push(this.a.b[b].h);var d=c.join("|");a.push(d)}if(0===a.length)return!0;var f=new Date;f.setTime(f.getTime()+157248E5);var k=this.O+"=";this.b=g(a.join("&"));k+=this.b;k+="; expires="+f.toUTCString();l.cookie=k+"; path=/"}catch(n){h(n,"sCV failed")}},sa:function(){try{return this.N=e.location.href}catch(a){h(a,"gCP failed")}},o:function(){try{return this.a.Ha=l.referrer||""}catch(a){h(a,"gR failed")}}, - ua:function(){try{return this.a.B=e.navigator.systemLanguage||e.navigator.language,this.a.B=this.a.B.toLowerCase(),this.a.B}catch(a){h(a,"gL failed")}},xa:function(){try{return this.a.ba=e.screen.width&&e.screen.height?e.screen.width+"x"+e.screen.height:"0x0",this.a.ba}catch(a){h(a,"gS failed")}},w:function(){try{return this.a.Da=this.i("ntime")||"none"}catch(a){h(a,"gLVST failed")}},T:function(){try{return this.a.ea=this.i("ltime")||(new Date).getTime()}catch(a){h(a,"gFVBT failed")}},wa:function(){try{var a= - this.i("cnzz_a");if(null===a)a=0;else{var b=1E3*this.w(),c=new Date;c.setTime(b);(new Date).getDate()===c.getDate()?a++:a=0}return this.a.La=a}catch(d){h(d,"gRT failed")}},va:function(){try{return this.a.C=this.i("rtime"),null===this.a.C&&(this.a.C=0),0b;b++)if(-1

` -- [done] 不选中任何内容,点击“加粗”报错:Failed to execute 'setEnd' on 'Range' -- [done] toolbar 小图标的 z-index 可配置 - -### v3.0.4 - -- [done] 允许使用者通过`replace`实现多语言 -- [done] `_alert()`,可自定义配置提示框 -- [done] 支持用户自定义上传图片的事件,如用户要上传到七牛云、阿里云 - -### v3.0.5 - -- [done] 图片上传中,insertLinkImg 方法中,去掉 img.onload 之后再插入的逻辑吧,这样会打乱多个图片的顺序 -- [done] `` 标签重叠问题,两行文字都是`h2`,然后将第一行选中设置为`h1`,结果是 `

测试1

测试2` -- [done] 补充 ng 集成的示例 https://github.com/wangfupeng1988/wangEditor/issues/859 -- [done] 菜单不能折叠的说明,加入到文档中 -- [done] 上传图片 before 函数中,增加一个判断,可以让用户终止图片的上传 - -### v3.0.6 - -- [done] src/fonts 中的字体文件名改一下,用 icomoon 容易发生冲突 -- [done] 将禁用编辑器的操作完善到文档中 https://www.kancloud.cn/wangfupeng/wangeditor3/368562 -- [done] 开放表格中的粘贴功能(之前因不明问题而封闭) -- [done] 代码块中,光标定位到最后位置时,连续两次回车要跳出代码块 - -### v3.0.7 - -- [done] 紧急修复上一个版本导致的菜单图标不显示的 bug - -### v3.0.8 - -- [done] 修复 backColor 和 foreColor 代码文件名混淆的问题 -- [done] 修改 IE 中 “引用” 的功能 -- [done] 增加粘贴过滤样式的可配置 -- [done] 修复 IE 粘贴文字的问题 - -### v3.0.9 - -- [done] config 中,上传图片的 token 注视掉 -- [done] 将一些常见 API 开放,写到文档中 https://www.kancloud.cn/wangfupeng/wangeditor3/404586 -- [done] IE 火狐 插入多行代码有问题 -- [done] 粘贴时,在`

`中,不能只粘贴纯文本,还得要图片 -- [done] 粘贴内容中,过滤掉``注释 -- [done] **支持上传七牛云存储** - -### v3.0.10 - -- [done] 支持插入网络图片的回调函数 -- [done] 插入链接时候的格式校验 -- [done] 支持拖拽上传 - -### v3.0.11 - -- [done] 如何用 textarea 创建编辑器,完善到文档中,许多人提问 -- [done] 修复`editor.customConfig.customUploadImg`不触发的 bug -- [done] 修复有序列表和无序列表切换时 onchange 不触发的 bug - -### v3.0.12 - -- [done] 增加 onfocus 和 onblur (感谢 [hold-baby](https://github.com/hold-baby) 提交的 [PR](https://github.com/wangfupeng1988/wangEditor/pull/1076)) -- [done] 上传的自定义参数`editor.customConfig.uploadImgParams`是否拼接到 url 中,支持可配置 -- [done] onchange 触发的延迟时间,支持可配置 - -### v3.0.13 - -- [done] 修复图片 选中/取消选中 时,触发 onchange 的问题 -- [done] 修复只通过 length 判断 onchange 是否触发的问题 -- [done] 增加插入网络图片的校验函数 -- [done] 增加自定义处理粘贴文本的事件 -- [done] 修复选中一个图片时点击删除键会误删除其他内容的 bug -- [done] 修复 window chrome 中“复制图片”然后粘贴图片,会粘贴为两张的 bug -- [done] 修复无法撤销“引用”的问题 - -### v3.0.14 - -- [done] 可以配置前景色、背景色 -- [done] 回车时无法从`

....

`中跳出 -- [done] 增加获取 JSON 格式内容的 API - -### v3.0.15 - -- [done] 表情兼容图片和 emoji ,都可自定义配置 - -### v3.0.16 - -- [done] 修复粘贴图片的 bug -- [done] 修复`pasteTextHandle`执行两次的问题 -- [done] 修复插入链接时,文字和链接为空时,`linkCheck`不执行的 bug -- [done] 粘贴 html 时,过滤掉其中的`data-xxx`属性 -- [done] 修复中文输入法输入过程中出发 onchange 的问题,感谢 [github.com/CongAn](https://github.com/CongAn) PR -- [done] `editor.txt.html`和`editor.txt.text`中,替换`​`字符为空字符串 -- [done] 精确图片大小计算,将`maxSize / 1000 / 1000`改为`maxSize / 1024 / 1024` -- [done] 修复 droplist 类型菜单(颜色、背景色等)点击不准确的问题 - -### v3.0.17 - -- [done] 合并 pr [菜单和编辑区域分离 onfocus onblur 失效bug](https://github.com/wangfupeng1988/wangEditor/pull/1174) ,感谢 [hold-baby](https://github.com/hold-baby) 提供 pr -- [done] 使用`document.execCommand("styleWithCSS", null, true)`,这样设置字体颜色就会用 css 而不是用`` - - -### 近期计划解决 - -- 撤销的兼容性问题(会误伤其他编辑器或者 input textarea 等),考虑用 onchange 记录 undo 和 redo 的内容(但是得考虑直接修改 dom 的情况,如 quote code img list table 菜单) - - 列表撤销会删除一行?https://github.com/wangfupeng1988/wangEditor/issues/1131 - - 页面中有 input 等输入标签时,undo redo 会误伤 https://github.com/wangfupeng1988/wangEditor/issues/1024 - - 两个编辑器 undo 的问题 https://github.com/wangfupeng1988/wangEditor/issues/1010 - - list undo redo 有问题。选中几行,先设置有序列表,再设置无序列表,然后撤销,就能复现问题 -- 粘贴文字的样式问题(可暂时配置 `pasteTextHandle` 自行处理) - - 先输入文字,再粘贴 excel 表格,样式丢失 https://github.com/wangfupeng1988/wangEditor/issues/1000 - - IE 11 直接输入文字会空一行在第二行出现内容 https://github.com/wangfupeng1988/wangEditor/issues/919 - - windows 下 word excel 的粘贴,存在垃圾数据 - -## 待排期 - -- 调研 safari、IE 和ff中粘贴图片 https://github.com/wangfupeng1988/wangEditor/issues/831 -- 图片调整大小,表格调整的方式,是否用 toolbar 的方式? -- 删除掉`./release`之后,执行`npm run release`会报错,原因是`fonts`文件没拷贝全,就要去替换`css`中的字体文件为`base64`格式,导致找不到文件。 -- 先点击'B'再输入内容这种形式,前期先支持 webkit 和 IE,火狐的支持后面再加上 -- 图片压缩 canvas https://github.com/think2011/localResizeIMG -- github 徽章 https://github.com/EyreFree/GitHubBadgeIntroduction -- 将代码在进行拆分,做到“每个程序只做一件事”,不要出现过长的代码文件。例如 `src/js/command/index.js` 和 `src/js/selection/index.js` - diff --git a/novel-front/src/main/resources/static/wangEditor/LICENSE b/novel-front/src/main/resources/static/wangEditor/LICENSE deleted file mode 100644 index 5239660..0000000 --- a/novel-front/src/main/resources/static/wangEditor/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 王福朋 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/novel-front/src/main/resources/static/wangEditor/README.md b/novel-front/src/main/resources/static/wangEditor/README.md deleted file mode 100644 index 0ab9445..0000000 --- a/novel-front/src/main/resources/static/wangEditor/README.md +++ /dev/null @@ -1,70 +0,0 @@ - -# wangEditor - -## 介绍 - -**wangEditor** —— 轻量级 web 富文本编辑器,配置方便,使用简单。支持 IE10+ 浏览器。 - -- 官网:[www.wangEditor.com](http://www.wangeditor.com/) -- 文档:[www.kancloud.cn/wangfupeng/wangeditor3/332599](http://www.kancloud.cn/wangfupeng/wangeditor3/332599) -- 源码:[github.com/wangfupeng1988/wangEditor](https://github.com/wangfupeng1988/wangEditor) (欢迎 star) - -![图片](http://images2015.cnblogs.com/blog/138012/201705/138012-20170530202905633-1840158981.png) - -*查看 v2 版本的代码和文档点击[这里](https://github.com/wangfupeng1988/wangEditor/tree/v2)* - - -## 下载 - -- 直接下载:[https://github.com/wangfupeng1988/wangEditor/releases](https://github.com/wangfupeng1988/wangEditor/releases) -- 使用`npm`下载:`npm install wangeditor` (注意 `wangeditor` 全部是**小写字母**) -- 使用`bower`下载:`bower install wangEditor` (前提保证电脑已安装了`bower`) -- 使用CDN:[//unpkg.com/wangeditor/release/wangEditor.min.js](https://unpkg.com/wangeditor/release/wangEditor.min.js) - - -## 使用 - -```javascript -var E = window.wangEditor -var editor = new E('#div1') -editor.create() -``` - - -## 运行 demo - -- 下载源码 `git clone git@github.com:wangfupeng1988/wangEditor.git` -- 安装或者升级最新版本 node(最低`v6.x.x`) -- 进入目录,安装依赖包 `cd wangEditor && npm i` -- 安装包完成之后,windows 用户运行`npm run win-example`,Mac 用户运行`npm run example` -- 打开浏览器访问[localhost:3000/index.html](http://localhost:3000/index.html) -- 用于 React、vue 或者 angular 可查阅[文档](http://www.kancloud.cn/wangfupeng/wangeditor3/332599)中[其他](https://www.kancloud.cn/wangfupeng/wangeditor3/335783)章节中的相关介绍 - -## 交流 - -### QQ 群 - -以下 QQ 群欢迎加入交流问题(可能有些群已经满员) - -- 164999061 -- 281268320 - -### 提问 - -注意,作者只受理以下几种提问方式,其他方式直接忽略 - -- 直接在 [github issues](https://github.com/wangfupeng1988/wangEditor/issues) 提交问题 -- 去[知乎](https://www.zhihu.com/)提问,并邀请[作者](https://www.zhihu.com/people/wang-fu-peng-54/activities)来回答 -- 去[segmentfault](https://segmentfault.com)提问,并邀请[作者](https://segmentfault.com/u/wangfupeng1988)来回答 - -每次升级版本修复的问题记录在[这里](./ISSUE.md) - -## 关于作者 - -- 关注作者的博客 - 《[深入理解javascript原型和闭包系列](http://www.cnblogs.com/wangfupeng1988/p/4001284.html)》《[深入理解javascript异步系列](https://github.com/wangfupeng1988/js-async-tutorial)》《[CSS知多少](http://www.cnblogs.com/wangfupeng1988/p/4325007.html)》 -- 学习作者的教程 - 《[前端JS基础面试题](http://coding.imooc.com/class/115.html)》《[React.js模拟大众点评webapp](http://coding.imooc.com/class/99.html)》《[zepto设计与源码分析](http://www.imooc.com/learn/745)》《[用grunt搭建自动化的web前端开发环境](http://study.163.com/course/courseMain.htm?courseId=1103003)》《[json2.js源码解读](http://study.163.com/course/courseMain.htm?courseId=691008)》 - -如果你感觉有收获,欢迎给我打赏 ———— 以激励我更多输出优质开源内容 - -![图片](https://camo.githubusercontent.com/e1558b631931e0a1606c769a61f48770cc0ccb56/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3133383031322f3230313730322f3133383031322d32303137303232383131323233373739382d313530373139363634332e706e67) - diff --git a/novel-front/src/main/resources/static/wangEditor/bower.json b/novel-front/src/main/resources/static/wangEditor/bower.json deleted file mode 100644 index 0c4ed0d..0000000 --- a/novel-front/src/main/resources/static/wangEditor/bower.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "wangEditor", - "description": "wangEditor - 基于javascript和css开发的 web 富文本编辑器, 轻量、简洁、易用、开源免费", - "main": "release/wangEditor.js", - "authors": [ - "wangfupeng " - ], - "license": "MIT", - "keywords": [ - "wangEditor", - "web 富文本编辑器" - ], - "homepage": "https://github.com/wangfupeng1988/wangEditor", - "moduleType": [ - "amd", - "cmd", - "node" - ], - "private": true -} diff --git a/novel-front/src/main/resources/static/wangEditor/docs/dev/README.md b/novel-front/src/main/resources/static/wangEditor/docs/dev/README.md deleted file mode 100644 index 473dbcb..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/dev/README.md +++ /dev/null @@ -1,25 +0,0 @@ -面向开发者的文档 - - -框架介绍 - -- 下载和运行 -- 目录结构介绍 -- `example`目录 -- `src`目录(`js`目录,`less`目录) -- `package.json` -- `gulpfile.js` - -如何提交 PR - - - -上线 - -- 修改`package.json`版本 -- 提交到github,并创建tag -- 提交到 npm -- 更新 .md 文档 -- 文档同步到 kancloud -- …… - diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/01-getstart/01-demo.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/01-getstart/01-demo.md deleted file mode 100644 index b71612f..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/01-getstart/01-demo.md +++ /dev/null @@ -1,41 +0,0 @@ -# 简单的 demo - -## 下载 - -- 点击 [https://github.com/wangfupeng1988/wangEditor/releases](https://github.com/wangfupeng1988/wangEditor/releases) 下载最新版。进入`release`文件夹下找到`wangEditor.js`或者`wangEditor.min.js`即可 -- 使用CDN:[//unpkg.com/wangeditor/release/wangEditor.min.js](https://unpkg.com/wangeditor/release/wangEditor.min.js) -- 使用`bower`下载:`bower install wangEditor` (前提保证电脑已安装了`bower`) - -*PS:支持`npm`安装,请参见后面的章节* - -## 制作 demo - -编辑器效果如下。 - -![图片](https://camo.githubusercontent.com/f3d072718d8fcbbacf8cc80465a34cceffcf5b4a/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3133383031322f3230313730352f3133383031322d32303137303533303230323930353633332d313834303135383938312e706e67) - -代码示例如下。**注意,以下代码中无需引用任何 CSS 文件!!!** - -```html - - - - - wangEditor demo - - -
-

欢迎使用 wangEditor 富文本编辑器

-
- - - - - - -``` diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/01-getstart/02-use-module.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/01-getstart/02-use-module.md deleted file mode 100644 index 0356a68..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/01-getstart/02-use-module.md +++ /dev/null @@ -1,49 +0,0 @@ -# 使用模块定义 - -wangEditor 除了直接使用` - - -``` - -## CommonJS - -可以使用`npm install wangeditor`安装(注意,这里`wangeditor`全是**小写字母**) - -```javascript -// 引用 -var E = require('wangeditor') // 使用 npm 安装 -var E = require('/wangEditor.min.js') // 使用下载的源码 - -// 创建编辑器 -var editor = new E('#editor') -editor.create() -``` diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/01-getstart/03-sperate.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/01-getstart/03-sperate.md deleted file mode 100644 index 0fcd276..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/01-getstart/03-sperate.md +++ /dev/null @@ -1,48 +0,0 @@ -# 菜单和编辑区域分离 - -如果你想要像 知乎专栏、简书、石墨、网易云笔记 这些编辑页面一样,将编辑区域和菜单分离,也可以实现。 - -这样,菜单和编辑器区域就是使用者可自己控制的元素,可自定义样式。例如:将菜单`fixed`、编辑器区域高度自动增加等 - -## 代码示例 - -```html - - - - - wangEditor 菜单和编辑器区域分离 - - - -
-
-
中间隔离带
-
-

请输入内容

-
- - - - - -``` - -## 显示效果 - -从上面代码可以看出,菜单和编辑区域其实就是两个单独的`
`,位置、尺寸都可以随便定义。 - -![](http://images2015.cnblogs.com/blog/138012/201705/138012-20170531224756289-7442240.png) - diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/01-getstart/04-multi.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/01-getstart/04-multi.md deleted file mode 100644 index aee3540..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/01-getstart/04-multi.md +++ /dev/null @@ -1,50 +0,0 @@ -# 同一个页面创建多个编辑器 - -wangEditor 支持一个页面创建多个编辑器 - -## 代码示例 - -```html - - - - - wangEditor 一个页面多个编辑器 - - - -
-
-
中间隔离带
-
-

第一个 demo(菜单和编辑器区域分开)

-
- -
-

第二个 demo(常规)

-
- - - - - - -``` - diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/02-content/01-set-content.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/02-content/01-set-content.md deleted file mode 100644 index 7631f6f..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/02-content/01-set-content.md +++ /dev/null @@ -1,46 +0,0 @@ -# 设置内容 - -以下方式中,如果条件允许,尽量使用第一种方式,效率最高。 - -## html 初始化内容 - -直接将内容写到要创建编辑器的`
`标签中 - -```html -
-

初始化的内容

-

初始化的内容

-
- - - -``` - -## js 设置内容 - -创建编辑器之后,使用`editor.txt.html(...)`设置编辑器内容 - -```html -
-
- - - -``` - -## 追加内容 - -创建编辑器之后,可使用`editor.txt.append('

追加的内容

')`继续追加内容。 - -## 清空内容 - -可使用`editor.txt.clear()`清空编辑器内容 diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/02-content/02-get-content.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/02-content/02-get-content.md deleted file mode 100644 index e21c277..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/02-content/02-get-content.md +++ /dev/null @@ -1,80 +0,0 @@ -# 读取内容 - -可以`html`和`text`的方式读取编辑器的内容。 - -```html -
-

欢迎使用 wangEditor 编辑器

-
- - - - - -``` - -需要注意的是:**从编辑器中获取的 html 代码是不包含任何样式的纯 html**,如果显示的时候需要对其中的`` `` `
`等标签进行自定义样式(这样既可实现多皮肤功能),下面提供了编辑器中使用的样式供参考 - -```css -/* table 样式 */ -table { - border-top: 1px solid #ccc; - border-left: 1px solid #ccc; -} -table td, -table th { - border-bottom: 1px solid #ccc; - border-right: 1px solid #ccc; - padding: 3px 5px; -} -table th { - border-bottom: 2px solid #ccc; - text-align: center; -} - -/* blockquote 样式 */ -blockquote { - display: block; - border-left: 8px solid #d0e5f2; - padding: 5px 10px; - margin: 10px 0; - line-height: 1.4; - font-size: 100%; - background-color: #f1f1f1; -} - -/* code 样式 */ -code { - display: inline-block; - *display: inline; - *zoom: 1; - background-color: #f1f1f1; - border-radius: 3px; - padding: 3px 5px; - margin: 0 3px; -} -pre code { - display: block; -} - -/* ul ol 样式 */ -ul, ol { - margin: 10px 0 10px 20px; -} -``` - diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/02-content/03-use-textarea.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/02-content/03-use-textarea.md deleted file mode 100644 index 1707e13..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/02-content/03-use-textarea.md +++ /dev/null @@ -1,25 +0,0 @@ -# 使用 textarea - -wangEditor 从`v3`版本开始不支持 textarea ,但是可以通过`onchange`来实现 textarea 中提交富文本内容。 - -```html -
-

欢迎使用 wangEditor 富文本编辑器

-
- - - - - -``` \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/02-content/04-get-json.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/02-content/04-get-json.md deleted file mode 100644 index d623ac4..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/02-content/04-get-json.md +++ /dev/null @@ -1,82 +0,0 @@ -# 获取 JSON 格式的内容 - -可以通过`editor.txt.getJSON`获取 JSON 格式的编辑器的内容,`v3.0.14`开始支持,示例如下 - -```html -
-

欢迎使用 wangEditor 富文本编辑器

- -
- - - - -``` - - ------ - -如果编辑器区域的 html 内容是如下: - -```html -

欢迎使用 wangEditor 富文本编辑器

- -``` - -那么获取的 JSON 格式就如下: - -```json -[ - { - "tag": "p", - "attrs": [], - "children": [ - "欢迎使用 ", - { - "tag": "b", - "attrs": [], - "children": [ - "wangEditor" - ] - }, - " 富文本编辑器" - ] - }, - { - "tag": "img", - "attrs": [ - { - "name": "src", - "value": "https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo_top_ca79a146.png" - }, - { - "name": "style", - "value": "max-width:100%;" - } - ], - "children": [] - }, - { - "tag": "p", - "attrs": [], - "children": [ - { - "tag": "br", - "attrs": [], - "children": [] - } - ] - } -] -``` \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/01-menu.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/01-menu.md deleted file mode 100644 index bce6ba7..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/01-menu.md +++ /dev/null @@ -1,52 +0,0 @@ -# 自定义菜单 - -编辑器创建之前,可使用`editor.customConfig.menus`定义显示哪些菜单和菜单的顺序。**注意:v3 版本的菜单不支持换行折叠了(因为换行之后菜单栏是在太难看),如果菜单栏宽度不够,建议精简菜单项。** - -## 代码示例 - -```html -
-

欢迎使用 wangEditor 富文本编辑器

-
- - - -``` - -## 默认菜单 - -编辑默认的菜单配置如下 - -```javascript -[ - 'head', // 标题 - 'bold', // 粗体 - 'italic', // 斜体 - 'underline', // 下划线 - 'strikeThrough', // 删除线 - 'foreColor', // 文字颜色 - 'backColor', // 背景颜色 - 'link', // 插入链接 - 'list', // 列表 - 'justify', // 对齐方式 - 'quote', // 引用 - 'emoticon', // 表情 - 'image', // 插入图片 - 'table', // 表格 - 'video', // 插入视频 - 'code', // 插入代码 - 'undo', // 撤销 - 'redo' // 重复 -] -``` diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/02-debug.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/02-debug.md deleted file mode 100644 index e94d7a4..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/02-debug.md +++ /dev/null @@ -1,21 +0,0 @@ -# 定义 debug 模式 - -可通过`editor.customConfig.debug = true`配置`debug`模式,`debug`模式下,有 JS 错误会以`throw Error`方式提示出来。默认值为`false`,即不会抛出异常。 - -但是,在实际开发中不建议直接定义为`true`或者`false`,可通过 url 参数进行干预,示例如下: - -```html -
-

欢迎使用 wangEditor 富文本编辑器

-
- - - -``` - diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/03-onchange.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/03-onchange.md deleted file mode 100644 index 296091c..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/03-onchange.md +++ /dev/null @@ -1,40 +0,0 @@ -# 配置 onchange 函数 - -配置`onchange`函数之后,用户操作(鼠标点击、键盘打字等)导致的内容变化之后,会自动触发`onchange`函数执行。 - -但是,**用户自己使用 JS 修改了`div1`的`innerHTML`,不会自动触发`onchange`函数**,此时你可以通过执行`editor.change()`来手动触发`onchange`函数的执行。 - -```html -
-

欢迎使用 wangEditor 富文本编辑器

-
- -

手动触发 onchange 函数执行

- - - - -``` - ------ - -另外,如果需要修改 onchange 触发的延迟时间(onchange 会在用户无任何操作的 xxx 毫秒之后被触发),可通过如下配置 - -```js -// 自定义 onchange 触发的延迟时间,默认为 200 ms -editor.customConfig.onchangeTimeout = 1000 // 单位 ms -``` diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/04-z-index.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/04-z-index.md deleted file mode 100644 index 129bf1c..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/04-z-index.md +++ /dev/null @@ -1,19 +0,0 @@ -# 配置编辑区域的 z-index - -编辑区域的`z-index`默认为`10000`,可自定义修改,代码配置如下。需改之后,编辑区域和菜单的`z-index`会同时生效。 - -```html -
-

欢迎使用 wangEditor 富文本编辑器

-
- - - -``` - - diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/05-lang.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/05-lang.md deleted file mode 100644 index 01900fe..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/05-lang.md +++ /dev/null @@ -1,30 +0,0 @@ -# 多语言 - -可以通过`lang`配置项配置多语言,其实就是通过该配置项中的配置,将编辑器显示的文字,替换成你需要的文字。 - -```html -
-

欢迎使用 wangEditor 富文本编辑器

-
- - - -``` - -**注意,以上代码中的`链接文字`要写在`链接`前面,`上传图片`要写在`上传`前面,因为前者包含后者。如果不这样做,可能会出现替换不全的问题,切记切记!** diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/06-paste.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/06-paste.md deleted file mode 100644 index a7126c8..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/06-paste.md +++ /dev/null @@ -1,33 +0,0 @@ -# 粘贴文本 - -**注意,以下配置暂时对 IE 无效。IE 暂时使用系统自带的粘贴功能,没有样式过滤!** - -## 关闭粘贴样式的过滤 - -当从其他网页复制文本内容粘贴到编辑器中,编辑器会默认过滤掉复制文本中自带的样式,目的是让粘贴后的文本变得更加简洁和轻量。用户可通过`editor.customConfig.pasteFilterStyle = false`手动关闭掉粘贴样式的过滤。 - -## 自定义处理粘贴的文本内容 - -使用者可通过`editor.customConfig.pasteTextHandle`对粘贴的文本内容进行自定义的过滤、处理等操作,然后返回处理之后的文本内容。编辑器最终会粘贴用户处理之后并且返回的的内容。 - -## 示例代码 - -```html -
-

欢迎使用 wangEditor 富文本编辑器

-
- - - -``` \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/07-linkImgCallback.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/07-linkImgCallback.md deleted file mode 100644 index 52169e8..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/07-linkImgCallback.md +++ /dev/null @@ -1,12 +0,0 @@ -# 插入网络图片的回调 - -插入网络图片时,可通过如下配置获取到图片的信息。`v3.0.10`开始支持。 - -```js -var E = window.wangEditor -var editor = new E('#div1') -editor.customConfig.linkImgCallback = function (url) { - console.log(url) // url 即插入图片的地址 -} -editor.create() -``` diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/08-linkCheck.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/08-linkCheck.md deleted file mode 100644 index b581438..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/08-linkCheck.md +++ /dev/null @@ -1,16 +0,0 @@ -# 插入链接的校验 - -插入链接时,可通过如下配置对文字和链接进行校验。`v3.0.10`开始支持。 - -```js -var E = window.wangEditor -var editor = new E('#div1') -editor.customConfig.linkCheck = function (text, link) { - console.log(text) // 插入的文字 - console.log(link) // 插入的链接 - - return true // 返回 true 表示校验成功 - // return '验证失败' // 返回字符串,即校验失败的提示信息 -} -editor.create() -``` \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/09-onfocus.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/09-onfocus.md deleted file mode 100644 index 7caba6b..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/09-onfocus.md +++ /dev/null @@ -1,19 +0,0 @@ -# 配置 onfocus 函数 - -配置`onfocus`函数之后,用户点击富文本区域会触发`onfocus`函数执行。 - -```html -
-

欢迎使用 wangEditor 富文本编辑器

-
- - - -``` diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/10-onblur.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/10-onblur.md deleted file mode 100644 index f7544bc..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/10-onblur.md +++ /dev/null @@ -1,20 +0,0 @@ -# 配置 onblur 函数 - -配置`onblur`函数之后,如果当前有手动获取焦点的富文本并且鼠标点击富文本以外的区域,则会触发`onblur`函数执行。 - -```html -
-

欢迎使用 wangEditor 富文本编辑器

-
- - - -``` diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/11-linkImgCheck.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/11-linkImgCheck.md deleted file mode 100644 index efb3320..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/11-linkImgCheck.md +++ /dev/null @@ -1,15 +0,0 @@ -# 插入网络图片的校验 - -插入网络图片时,可对图片地址做自定义校验。`v3.0.13`开始支持。 - -```js -var E = window.wangEditor -var editor = new E('#div1') -editor.customConfig.linkImgCheck = function (src) { - console.log(src) // 图片的链接 - - return true // 返回 true 表示校验成功 - // return '验证失败' // 返回字符串,即校验失败的提示信息 -} -editor.create() -``` \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/12-colors.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/12-colors.md deleted file mode 100644 index e86e57d..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/12-colors.md +++ /dev/null @@ -1,29 +0,0 @@ -# 配置字体颜色、背景色 - -编辑器的字体颜色和背景色,可以通过`editor.customConfig.colors`自定义配置 - -```html -
-

欢迎使用 wangEditor 富文本编辑器

-
- - - -``` \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/13-emot.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/13-emot.md deleted file mode 100644 index 5363834..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/03-config/13-emot.md +++ /dev/null @@ -1,48 +0,0 @@ -# 配置表情 - -`v3.0.15`开始支持配置表情,支持图片格式和 emoji ,可通过`editor.customConfig.emotions`配置。**注意看代码示例中的注释:** - -```html -
-

欢迎使用 wangEditor 富文本编辑器

-
- - - -``` - -温馨提示:需要表情图片可以去 https://api.weibo.com/2/emotions.json?source=1362404091 和 http://yuncode.net/code/c_524ba520e58ce30 逛一逛,或者自己搜索。 diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/04-uploadimg/01-show-tab.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/04-uploadimg/01-show-tab.md deleted file mode 100644 index 8261950..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/04-uploadimg/01-show-tab.md +++ /dev/null @@ -1,52 +0,0 @@ -# 隐藏/显示 tab - -## 显示“上传图片”tab - -默认情况下,编辑器不会显示“上传图片”的tab,因为你还没有配置上传图片的信息。 - -![](http://images2015.cnblogs.com/blog/138012/201706/138012-20170601204308039-691571074.png) - -参考一下示例显示“上传图片”tab - -```html -
-

欢迎使用 wangEditor 富文本编辑器

-
- - - -``` - -显示效果 - -![](http://images2015.cnblogs.com/blog/138012/201706/138012-20170601204504524-830243744.png) - -## 隐藏“网络图片”tab - -默认情况下,“网络图片”tab是一直存在的。如果不需要,可以参考一下示例来隐藏它。 - -```html -
-

欢迎使用 wangEditor 富文本编辑器

-
- - - -``` diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/04-uploadimg/02-base64.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/04-uploadimg/02-base64.md deleted file mode 100644 index 3a2d71a..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/04-uploadimg/02-base64.md +++ /dev/null @@ -1,23 +0,0 @@ -# 使用 base64 保存图片 - -如果需要使用 base64 编码直接将图片插入到内容中,可参考一下示例配置 - -```html -
-

欢迎使用 wangEditor 富文本编辑器

-
- - - -``` - -示例效果如下 - -![](http://images2015.cnblogs.com/blog/138012/201706/138012-20170601204759258-1412289899.png) - - diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/04-uploadimg/03-upload-config.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/04-uploadimg/03-upload-config.md deleted file mode 100644 index 6720ce6..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/04-uploadimg/03-upload-config.md +++ /dev/null @@ -1,188 +0,0 @@ -# 上传图片 & 配置 - -将图片上传到服务器上的配置方式 - -## 上传图片 - -参考如下代码 - -```html -
-

欢迎使用 wangEditor 富文本编辑器

-
- - - -``` - -其中`/upload`是上传图片的服务器端接口,接口返回的**数据格式**如下(**实际返回数据时,不要加任何注释!!!**) - -```json -{ - // errno 即错误代码,0 表示没有错误。 - // 如果有错误,errno != 0,可通过下文中的监听函数 fail 拿到该错误码进行自定义处理 - "errno": 0, - - // data 是一个数组,返回若干图片的线上地址 - "data": [ - "图片1地址", - "图片2地址", - "……" - ] -} -``` - -## 限制图片大小 - -默认限制图片大小是 5M - -```javascript -// 将图片大小限制为 3M -editor.customConfig.uploadImgMaxSize = 3 * 1024 * 1024 -``` - -## 限制一次最多能传几张图片 - -默认为 10000 张(即不限制),需要限制可自己配置 - -```javascript -// 限制一次最多上传 5 张图片 -editor.customConfig.uploadImgMaxLength = 5 -``` - -## 自定义上传参数 - -上传图片时可自定义传递一些参数,例如传递验证的`token`等。参数会被添加到`formdata`中。 - -```javascript -editor.customConfig.uploadImgParams = { - token: 'abcdef12345' // 属性值会自动进行 encode ,此处无需 encode -} -``` - -如果**还需要**将参数拼接到 url 中,可再加上如下配置 - -``` -editor.customConfig.uploadImgParamsWithUrl = true -``` - -## 自定义 fileName - -上传图片时,可自定义`filename`,即在使用`formdata.append(name, file)`添加图片文件时,自定义第一个参数。 - -```javascript -editor.customConfig.uploadFileName = 'yourFileName' -``` - -## 自定义 header - -上传图片时刻自定义设置 header - -```javascript -editor.customConfig.uploadImgHeaders = { - 'Accept': 'text/x-json' -} -``` - -## withCredentials(跨域传递 cookie) - -跨域上传中如果需要传递 cookie 需设置 withCredentials - -```javascript -editor.customConfig.withCredentials = true -``` - -## 自定义 timeout 时间 - -默认的 timeout 时间是 10 秒钟 - -```javascript -// 将 timeout 时间改为 3s -editor.customConfig.uploadImgTimeout = 3000 -``` - -## 监听函数 - -可使用监听函数在上传图片的不同阶段做相应处理 - -```javascript -editor.customConfig.uploadImgHooks = { - before: function (xhr, editor, files) { - // 图片上传之前触发 - // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象,files 是选择的图片文件 - - // 如果返回的结果是 {prevent: true, msg: 'xxxx'} 则表示用户放弃上传 - // return { - // prevent: true, - // msg: '放弃上传' - // } - }, - success: function (xhr, editor, result) { - // 图片上传并返回结果,图片插入成功之后触发 - // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象,result 是服务器端返回的结果 - }, - fail: function (xhr, editor, result) { - // 图片上传并返回结果,但图片插入错误时触发 - // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象,result 是服务器端返回的结果 - }, - error: function (xhr, editor) { - // 图片上传出错时触发 - // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象 - }, - timeout: function (xhr, editor) { - // 图片上传超时时触发 - // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象 - }, - - // 如果服务器端返回的不是 {errno:0, data: [...]} 这种格式,可使用该配置 - // (但是,服务器端返回的必须是一个 JSON 格式字符串!!!否则会报错) - customInsert: function (insertImg, result, editor) { - // 图片上传并返回结果,自定义插入图片的事件(而不是编辑器自动插入图片!!!) - // insertImg 是插入图片的函数,editor 是编辑器对象,result 是服务器端返回的结果 - - // 举例:假如上传图片成功后,服务器端返回的是 {url:'....'} 这种格式,即可这样插入图片: - var url = result.url - insertImg(url) - - // result 必须是一个 JSON 格式字符串!!!否则报错 - } -} -``` - -## 自定义提示方法 - -上传图片的错误提示默认使用`alert`弹出,你也可以自定义用户体验更好的提示方式 - -```javascript -editor.customConfig.customAlert = function (info) { - // info 是需要提示的内容 - alert('自定义提示:' + info) -} -``` - -## 自定义上传图片事件 - -如果想完全自己控制图片上传的过程,可以使用如下代码 - -```javascript -editor.customConfig.customUploadImg = function (files, insert) { - // files 是 input 中选中的文件列表 - // insert 是获取图片 url 后,插入到编辑器的方法 - - // 上传代码返回结果之后,将图片插入到编辑器中 - insert(imgUrl) -} -``` diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/04-uploadimg/04-qiniu.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/04-uploadimg/04-qiniu.md deleted file mode 100644 index e5c2ca4..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/04-uploadimg/04-qiniu.md +++ /dev/null @@ -1,115 +0,0 @@ -# 上传到七牛云存储 - -完整的 demo 请参见 https://github.com/wangfupeng1988/js-sdk ,可下载下来本地运行 demo - -> 注意:配置了上传七牛云存储之后,**无法再使用插入网络图片** - -核心代码如下: - -```js -var E = window.wangEditor -var editor = new E('#div1') -// 允许上传到七牛云存储 -editor.customConfig.qiniu = true -editor.create() - -// 初始化七牛上传 -uploadInit() - -// 初始化七牛上传的方法 -function uploadInit() { - // 获取相关 DOM 节点的 ID - var btnId = editor.imgMenuId; - var containerId = editor.toolbarElemId; - var textElemId = editor.textElemId; - - // 创建上传对象 - var uploader = Qiniu.uploader({ - runtimes: 'html5,flash,html4', //上传模式,依次退化 - browse_button: btnId, //上传选择的点选按钮,**必需** - uptoken_url: '/uptoken', - //Ajax请求upToken的Url,**强烈建议设置**(服务端提供) - // uptoken : '', - //若未指定uptoken_url,则必须指定 uptoken ,uptoken由其他程序生成 - // unique_names: true, - // 默认 false,key为文件名。若开启该选项,SDK会为每个文件自动生成key(文件名) - // save_key: true, - // 默认 false。若在服务端生成uptoken的上传策略中指定了 `sava_key`,则开启,SDK在前端将不对key进行任何处理 - domain: 'http://7xrjl5.com1.z0.glb.clouddn.com/', - //bucket 域名,下载资源时用到,**必需** - container: containerId, //上传区域DOM ID,默认是browser_button的父元素, - max_file_size: '100mb', //最大文件体积限制 - flash_swf_url: '../js/plupload/Moxie.swf', //引入flash,相对路径 - filters: { - mime_types: [ - //只允许上传图片文件 (注意,extensions中,逗号后面不要加空格) - { title: "图片文件", extensions: "jpg,gif,png,bmp" } - ] - }, - max_retries: 3, //上传失败最大重试次数 - dragdrop: true, //开启可拖曳上传 - drop_element: textElemId, //拖曳上传区域元素的ID,拖曳文件或文件夹后可触发上传 - chunk_size: '4mb', //分块上传时,每片的体积 - auto_start: true, //选择文件后自动上传,若关闭需要自己绑定事件触发上传 - init: { - 'FilesAdded': function(up, files) { - plupload.each(files, function(file) { - // 文件添加进队列后,处理相关的事情 - printLog('on FilesAdded'); - }); - }, - 'BeforeUpload': function(up, file) { - // 每个文件上传前,处理相关的事情 - printLog('on BeforeUpload'); - }, - 'UploadProgress': function(up, file) { - // 显示进度 - printLog('进度 ' + file.percent) - }, - 'FileUploaded': function(up, file, info) { - // 每个文件上传成功后,处理相关的事情 - // 其中 info 是文件上传成功后,服务端返回的json,形式如 - // { - // "hash": "Fh8xVqod2MQ1mocfI4S4KpRL6D98", - // "key": "gogopher.jpg" - // } - printLog(info); - // 参考http://developer.qiniu.com/docs/v6/api/overview/up/response/simple-response.html - - var domain = up.getOption('domain'); - var res = $.parseJSON(info); - var sourceLink = domain + res.key; //获取上传成功后的文件的Url - - printLog(sourceLink); - - // 插入图片到editor - editor.cmd.do('insertHtml', '') - }, - 'Error': function(up, err, errTip) { - //上传出错时,处理相关的事情 - printLog('on Error'); - }, - 'UploadComplete': function() { - //队列文件处理完毕后,处理相关的事情 - printLog('on UploadComplete'); - } - // Key 函数如果有需要自行配置,无特殊需要请注释 - //, - // 'Key': function(up, file) { - // // 若想在前端对每个文件的key进行个性化处理,可以配置该函数 - // // 该配置必须要在 unique_names: false , save_key: false 时才生效 - // var key = ""; - // // do something with key here - // return key - // } - } - // domain 为七牛空间(bucket)对应的域名,选择某个空间后,可通过"空间设置->基本设置->域名设置"查看获取 - // uploader 为一个plupload对象,继承了所有plupload的方法,参考http://plupload.com/docs - }); -} - -// 封装 console.log 函数 -function printLog(title, info) { - window.console && console.log(title, info); -} -``` \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/01-全屏-预览-查看源码.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/01-全屏-预览-查看源码.md deleted file mode 100644 index 27588c8..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/01-全屏-预览-查看源码.md +++ /dev/null @@ -1,10 +0,0 @@ -# 全屏 & 预览 & 查看源码 - -## 全屏 - -虽然 wangEditor 没有内置全屏功能,但是你可以通过简单的代码来搞定,作者已经做了一个demo来示范。通过运行 demo(文档一开始就介绍了)即可看到该示例页面,直接查看页面源代码即可。 - -## 预览 & 查看源码 - -如果需要预览和查看源码的功能,也需要跟全屏功能一样,自己定义按钮。点击按钮时通过`editor.txt.html()`获取编辑器内容,然后自定义实现预览和查看源码功能。 - diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/02-上传附件.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/02-上传附件.md deleted file mode 100644 index 1f3cc88..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/02-上传附件.md +++ /dev/null @@ -1,24 +0,0 @@ -# 关于上传附件 - -**有用户问到编辑器能否有上传附件的功能?我的建议是不要把附件做到内容中。** - -原因很简单,如果将附件上传之后再插入到富文本内容中,其实就是一个链接的形式。如下图: - -![](http://box.kancloud.cn/2016-02-19_56c718ec6f9bf.png) - -而用户在用编辑器编辑文本时,操作是非常随意多样的,他把这个链接删了,你服务器要想实时删除上传的附件文件,是难监控到的。 - -还有,用户如果要上传很多个附件,也是很难管理的,还是因为富文本的内容变化多样,用户可以随便在什么地方插入附件,而且形式和链接一样。 - -------- - -反过来,我们想一下平时用附件和编辑器最多的产品是什么——是邮箱。邮箱如何处理附件的,大家应该很清楚。它把文本内容和附件分开,这样附件就可以很轻松、明了的进行管理,绝对不会和编辑内容的链接产生混淆。 - -![](http://box.kancloud.cn/2016-02-19_56c718ec83f7e.png) - -你能看到的所有的邮箱产品,几乎都是这样设计的。 - -------- - -因此,在你提问编辑器能否上传附件这个问题的时候,可以想一下能否参照邮箱的实现来设计? - diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/03-markdown.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/03-markdown.md deleted file mode 100644 index c723347..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/03-markdown.md +++ /dev/null @@ -1,12 +0,0 @@ -# 关于 markdown - -**好多使用者问到,wangEditor编辑器能否集成markdown?——答案是:富文本编辑器无法和markdown集成到一起。** - ------ - - -你可以参考 [简书](http://www.jianshu.com/) 的实现方式,简书中编辑器也无法实现富文本和`markdown`的自由切换。要么使用富文本编写文章,要么使用`markdown`编写文章,不能公用。 - -本质上,富文本编辑器和`markdown`编辑器是两回事儿。 - - diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/04-xss.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/04-xss.md deleted file mode 100644 index 286337f..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/04-xss.md +++ /dev/null @@ -1,23 +0,0 @@ -# 预防 XSS 攻击 - -> 术业有专攻 - -要想在前端预防 xss 攻击,还得依赖于其他工具,例如[xss.js](http://jsxss.com/zh/index.html)(如果打不开页面,就从百度搜一下) - -代码示例如下 - -```html - - - -``` - diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/05-react.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/05-react.md deleted file mode 100644 index 8dcc2d4..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/05-react.md +++ /dev/null @@ -1,7 +0,0 @@ -# 用于 React - -如果需要将 wangEditor 用于 React 中,可参见如下示例 - -- 下载源码 `git clone git@github.com:wangfupeng1988/wangEditor.git` -- 进入 React 示例目录 `cd wangEditor/example/demo/in-react/`,查看`src/App.js`即可 -- 也可以运行`npm install && npm start`查看在 React 中的效果(`http://localhost:3000/`) diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/06-vue.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/06-vue.md deleted file mode 100644 index 47e167a..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/06-vue.md +++ /dev/null @@ -1,7 +0,0 @@ -# 用于 Vue - -如果需要将 wangEditor 用于 Vue 中,可参见如下示例 - -- 下载源码 `git clone git@github.com:wangfupeng1988/wangEditor.git` -- 进入 vue 示例目录 `cd wangEditor/example/demo/in-vue/`,查看`src/components/Editor.vue`即可 -- 也可以运行`npm install && npm run dev`查看在 vue 中的效果(`http://localhost:8080/`) diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/07-ng.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/07-ng.md deleted file mode 100644 index 1d59afc..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/07-ng.md +++ /dev/null @@ -1,3 +0,0 @@ -# 用于 Angular - -感谢 [@fengnovo](https://github.com/fengnovo) 提供了一个 angular2 的兼容示例,可供参考 https://github.com/fengnovo/wangEditor/tree/master/example/demo/in-ng2 diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/08-api.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/08-api.md deleted file mode 100644 index e8b4f6d..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/05-other/08-api.md +++ /dev/null @@ -1,27 +0,0 @@ -# 常用 API - -## 属性 - -- 获取编辑器的唯一标识 `editor.id` -- 获取编辑区域 DOM 节点 `editor.$textElem[0]` -- 获取菜单栏 DOM 节点 `editor.$toolbarElem[0]` -- 获取编辑器配置信息 `editor.config` -- 获取编辑区域 DOM 节点 ID `editor.textElemId` -- 获取菜单栏 DOM 节点 ID `editor.toolbarElemId` -- 获取菜单栏中“图片”菜单的 DOM 节点 ID `editor.imgMenuId` - -## 方法 - -### 选取操作 - -- 获取选中的文字 `editor.selection.getSelectionText()` -- 获取选取所在的 DOM 节点 `editor.selection.getSelectionContainerElem()[0]` - - 开始节点 `editor.selection.getSelectionStartElem()[0]` - - 结束节点 `editor.selection.getSelectionEndElem()[0]` -- 折叠选取 `editor.selection.collapseRange()` -- 更多可参见[源码中](https://github.com/wangfupeng1988/wangEditor/blob/master/src/js/selection/index.js)定义的方法 - -### 编辑内容操作 - -- 插入 HTML `editor.cmd.do('insertHTML', '

...

')` -- 可通过`editor.cmd.do(name, value)`来执行`document.execCommand(name, false, value)`的操作 \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/docs/usage/README.md b/novel-front/src/main/resources/static/wangEditor/docs/usage/README.md deleted file mode 100644 index 4c801e6..0000000 --- a/novel-front/src/main/resources/static/wangEditor/docs/usage/README.md +++ /dev/null @@ -1,3 +0,0 @@ -同步[../../README.md](../../README.md)的内容 - -将所有文档跟新到 www.kancloud.cn/wangfupeng/wangeditor3/332599 中 diff --git a/novel-front/src/main/resources/static/wangEditor/example/README.md b/novel-front/src/main/resources/static/wangEditor/example/README.md deleted file mode 100644 index 6e17ca0..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/README.md +++ /dev/null @@ -1 +0,0 @@ -wangEditor demo diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/package.json b/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/package.json deleted file mode 100644 index 054d5cd..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "wangeditor-in-react", - "version": "0.1.0", - "private": true, - "dependencies": { - "react": "^15.5.4", - "react-dom": "^15.5.4", - "wangeditor": ">=3.0.0" - }, - "devDependencies": { - "react-scripts": "1.0.7" - }, - "scripts": { - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test --env=jsdom", - "eject": "react-scripts eject" - } -} diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/public/favicon.ico b/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/public/favicon.ico deleted file mode 100644 index 5c125de..0000000 Binary files a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/public/favicon.ico and /dev/null differ diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/public/index.html b/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/public/index.html deleted file mode 100644 index 7bee027..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/public/index.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - React App - - - -
- - - diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/public/manifest.json b/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/public/manifest.json deleted file mode 100644 index be607e4..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/public/manifest.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "192x192", - "type": "image/png" - } - ], - "start_url": "./index.html", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/App.css b/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/App.css deleted file mode 100644 index 15adfdc..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/App.css +++ /dev/null @@ -1,24 +0,0 @@ -.App { - text-align: center; -} - -.App-logo { - animation: App-logo-spin infinite 20s linear; - height: 80px; -} - -.App-header { - background-color: #222; - height: 150px; - padding: 20px; - color: white; -} - -.App-intro { - font-size: large; -} - -@keyframes App-logo-spin { - from { transform: rotate(0deg); } - to { transform: rotate(360deg); } -} diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/App.js b/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/App.js deleted file mode 100644 index 95b21fb..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/App.js +++ /dev/null @@ -1,48 +0,0 @@ -import React, { Component } from 'react'; -import logo from './logo.svg'; -import './App.css'; -import E from 'wangeditor' - -class App extends Component { - constructor(props, context) { - super(props, context); - this.state = { - editorContent: '' - } - } - render() { - return ( -
-
- logo -

Welcome to React

-
-

- To get started, edit src/App.js and save to reload. -

- - {/* 将生成编辑器 */} -
-
- - -
- ); - } - componentDidMount() { - const elem = this.refs.editorElem - const editor = new E(elem) - // 使用 onchange 函数监听内容的变化,并实时更新到 state 中 - editor.customConfig.onchange = html => { - this.setState({ - editorContent: html - }) - } - editor.create() - } - clickHandle() { - alert(this.state.editorContent) - } -} - -export default App; diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/App.test.js b/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/App.test.js deleted file mode 100644 index b84af98..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/App.test.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; -import App from './App'; - -it('renders without crashing', () => { - const div = document.createElement('div'); - ReactDOM.render(, div); -}); diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/index.css b/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/index.css deleted file mode 100644 index b4cc725..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/index.css +++ /dev/null @@ -1,5 +0,0 @@ -body { - margin: 0; - padding: 0; - font-family: sans-serif; -} diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/index.js b/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/index.js deleted file mode 100644 index 53c7688..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; -import App from './App'; -import registerServiceWorker from './registerServiceWorker'; -import './index.css'; - -ReactDOM.render(, document.getElementById('root')); -registerServiceWorker(); diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/logo.svg b/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/logo.svg deleted file mode 100644 index 6b60c10..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/registerServiceWorker.js b/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/registerServiceWorker.js deleted file mode 100644 index 9966897..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-react/src/registerServiceWorker.js +++ /dev/null @@ -1,51 +0,0 @@ -// In production, we register a service worker to serve assets from local cache. - -// This lets the app load faster on subsequent visits in production, and gives -// it offline capabilities. However, it also means that developers (and users) -// will only see deployed updates on the "N+1" visit to a page, since previously -// cached resources are updated in the background. - -// To learn more about the benefits of this model, read https://goo.gl/KwvDNy. -// This link also includes instructions on opting out of this behavior. - -export default function register() { - if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { - window.addEventListener('load', () => { - const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; - navigator.serviceWorker - .register(swUrl) - .then(registration => { - registration.onupdatefound = () => { - const installingWorker = registration.installing; - installingWorker.onstatechange = () => { - if (installingWorker.state === 'installed') { - if (navigator.serviceWorker.controller) { - // At this point, the old content will have been purged and - // the fresh content will have been added to the cache. - // It's the perfect time to display a "New content is - // available; please refresh." message in your web app. - console.log('New content is available; please refresh.'); - } else { - // At this point, everything has been precached. - // It's the perfect time to display a - // "Content is cached for offline use." message. - console.log('Content is cached for offline use.'); - } - } - }; - }; - }) - .catch(error => { - console.error('Error during service worker registration:', error); - }); - }); - } -} - -export function unregister() { - if ('serviceWorker' in navigator) { - navigator.serviceWorker.ready.then(registration => { - registration.unregister(); - }); - } -} diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/.babelrc b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/.babelrc deleted file mode 100644 index 13f0e47..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/.babelrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "presets": [ - ["env", { "modules": false }], - "stage-2" - ], - "plugins": ["transform-runtime"], - "comments": false, - "env": { - "test": { - "presets": ["env", "stage-2"], - "plugins": [ "istanbul" ] - } - } -} diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/.editorconfig b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/.editorconfig deleted file mode 100644 index 9d08a1a..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/.editorconfig +++ /dev/null @@ -1,9 +0,0 @@ -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 2 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/.postcssrc.js b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/.postcssrc.js deleted file mode 100644 index ea9a5ab..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/.postcssrc.js +++ /dev/null @@ -1,8 +0,0 @@ -// https://github.com/michael-ciniawsky/postcss-load-config - -module.exports = { - "plugins": { - // to edit target browsers: use "browserlist" field in package.json - "autoprefixer": {} - } -} diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/build.js b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/build.js deleted file mode 100644 index 6b8add1..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/build.js +++ /dev/null @@ -1,35 +0,0 @@ -require('./check-versions')() - -process.env.NODE_ENV = 'production' - -var ora = require('ora') -var rm = require('rimraf') -var path = require('path') -var chalk = require('chalk') -var webpack = require('webpack') -var config = require('../config') -var webpackConfig = require('./webpack.prod.conf') - -var spinner = ora('building for production...') -spinner.start() - -rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { - if (err) throw err - webpack(webpackConfig, function (err, stats) { - spinner.stop() - if (err) throw err - process.stdout.write(stats.toString({ - colors: true, - modules: false, - children: false, - chunks: false, - chunkModules: false - }) + '\n\n') - - console.log(chalk.cyan(' Build complete.\n')) - console.log(chalk.yellow( - ' Tip: built files are meant to be served over an HTTP server.\n' + - ' Opening index.html over file:// won\'t work.\n' - )) - }) -}) diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/check-versions.js b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/check-versions.js deleted file mode 100644 index 100f3a0..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/check-versions.js +++ /dev/null @@ -1,48 +0,0 @@ -var chalk = require('chalk') -var semver = require('semver') -var packageConfig = require('../package.json') -var shell = require('shelljs') -function exec (cmd) { - return require('child_process').execSync(cmd).toString().trim() -} - -var versionRequirements = [ - { - name: 'node', - currentVersion: semver.clean(process.version), - versionRequirement: packageConfig.engines.node - }, -] - -if (shell.which('npm')) { - versionRequirements.push({ - name: 'npm', - currentVersion: exec('npm --version'), - versionRequirement: packageConfig.engines.npm - }) -} - -module.exports = function () { - var warnings = [] - for (var i = 0; i < versionRequirements.length; i++) { - var mod = versionRequirements[i] - if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { - warnings.push(mod.name + ': ' + - chalk.red(mod.currentVersion) + ' should be ' + - chalk.green(mod.versionRequirement) - ) - } - } - - if (warnings.length) { - console.log('') - console.log(chalk.yellow('To use this template, you must update following to modules:')) - console.log() - for (var i = 0; i < warnings.length; i++) { - var warning = warnings[i] - console.log(' ' + warning) - } - console.log() - process.exit(1) - } -} diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/dev-client.js b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/dev-client.js deleted file mode 100644 index 18aa1e2..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/dev-client.js +++ /dev/null @@ -1,9 +0,0 @@ -/* eslint-disable */ -require('eventsource-polyfill') -var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true') - -hotClient.subscribe(function (event) { - if (event.action === 'reload') { - window.location.reload() - } -}) diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/dev-server.js b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/dev-server.js deleted file mode 100644 index 782dc6f..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/dev-server.js +++ /dev/null @@ -1,89 +0,0 @@ -require('./check-versions')() - -var config = require('../config') -if (!process.env.NODE_ENV) { - process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV) -} - -var opn = require('opn') -var path = require('path') -var express = require('express') -var webpack = require('webpack') -var proxyMiddleware = require('http-proxy-middleware') -var webpackConfig = require('./webpack.dev.conf') - -// default port where dev server listens for incoming traffic -var port = process.env.PORT || config.dev.port -// automatically open browser, if not set will be false -var autoOpenBrowser = !!config.dev.autoOpenBrowser -// Define HTTP proxies to your custom API backend -// https://github.com/chimurai/http-proxy-middleware -var proxyTable = config.dev.proxyTable - -var app = express() -var compiler = webpack(webpackConfig) - -var devMiddleware = require('webpack-dev-middleware')(compiler, { - publicPath: webpackConfig.output.publicPath, - quiet: true -}) - -var hotMiddleware = require('webpack-hot-middleware')(compiler, { - log: () => {} -}) -// force page reload when html-webpack-plugin template changes -compiler.plugin('compilation', function (compilation) { - compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) { - hotMiddleware.publish({ action: 'reload' }) - cb() - }) -}) - -// proxy api requests -Object.keys(proxyTable).forEach(function (context) { - var options = proxyTable[context] - if (typeof options === 'string') { - options = { target: options } - } - app.use(proxyMiddleware(options.filter || context, options)) -}) - -// handle fallback for HTML5 history API -app.use(require('connect-history-api-fallback')()) - -// serve webpack bundle output -app.use(devMiddleware) - -// enable hot-reload and state-preserving -// compilation error display -app.use(hotMiddleware) - -// serve pure static assets -var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory) -app.use(staticPath, express.static('./static')) - -var uri = 'http://localhost:' + port - -var _resolve -var readyPromise = new Promise(resolve => { - _resolve = resolve -}) - -console.log('> Starting dev server...') -devMiddleware.waitUntilValid(() => { - console.log('> Listening at ' + uri + '\n') - // when env is testing, don't need open it - if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') { - opn(uri) - } - _resolve() -}) - -var server = app.listen(port) - -module.exports = { - ready: readyPromise, - close: () => { - server.close() - } -} diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/utils.js b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/utils.js deleted file mode 100644 index b1d54b4..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/utils.js +++ /dev/null @@ -1,71 +0,0 @@ -var path = require('path') -var config = require('../config') -var ExtractTextPlugin = require('extract-text-webpack-plugin') - -exports.assetsPath = function (_path) { - var assetsSubDirectory = process.env.NODE_ENV === 'production' - ? config.build.assetsSubDirectory - : config.dev.assetsSubDirectory - return path.posix.join(assetsSubDirectory, _path) -} - -exports.cssLoaders = function (options) { - options = options || {} - - var cssLoader = { - loader: 'css-loader', - options: { - minimize: process.env.NODE_ENV === 'production', - sourceMap: options.sourceMap - } - } - - // generate loader string to be used with extract text plugin - function generateLoaders (loader, loaderOptions) { - var loaders = [cssLoader] - if (loader) { - loaders.push({ - loader: loader + '-loader', - options: Object.assign({}, loaderOptions, { - sourceMap: options.sourceMap - }) - }) - } - - // Extract CSS when that option is specified - // (which is the case during production build) - if (options.extract) { - return ExtractTextPlugin.extract({ - use: loaders, - fallback: 'vue-style-loader' - }) - } else { - return ['vue-style-loader'].concat(loaders) - } - } - - // https://vue-loader.vuejs.org/en/configurations/extract-css.html - return { - css: generateLoaders(), - postcss: generateLoaders(), - less: generateLoaders('less'), - sass: generateLoaders('sass', { indentedSyntax: true }), - scss: generateLoaders('sass'), - stylus: generateLoaders('stylus'), - styl: generateLoaders('stylus') - } -} - -// Generate loaders for standalone style files (outside of .vue) -exports.styleLoaders = function (options) { - var output = [] - var loaders = exports.cssLoaders(options) - for (var extension in loaders) { - var loader = loaders[extension] - output.push({ - test: new RegExp('\\.' + extension + '$'), - use: loader - }) - } - return output -} diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/vue-loader.conf.js b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/vue-loader.conf.js deleted file mode 100644 index 7aee79b..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/vue-loader.conf.js +++ /dev/null @@ -1,12 +0,0 @@ -var utils = require('./utils') -var config = require('../config') -var isProduction = process.env.NODE_ENV === 'production' - -module.exports = { - loaders: utils.cssLoaders({ - sourceMap: isProduction - ? config.build.productionSourceMap - : config.dev.cssSourceMap, - extract: isProduction - }) -} diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/webpack.base.conf.js b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/webpack.base.conf.js deleted file mode 100644 index daa3589..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/webpack.base.conf.js +++ /dev/null @@ -1,58 +0,0 @@ -var path = require('path') -var utils = require('./utils') -var config = require('../config') -var vueLoaderConfig = require('./vue-loader.conf') - -function resolve (dir) { - return path.join(__dirname, '..', dir) -} - -module.exports = { - entry: { - app: './src/main.js' - }, - output: { - path: config.build.assetsRoot, - filename: '[name].js', - publicPath: process.env.NODE_ENV === 'production' - ? config.build.assetsPublicPath - : config.dev.assetsPublicPath - }, - resolve: { - extensions: ['.js', '.vue', '.json'], - alias: { - 'vue$': 'vue/dist/vue.esm.js', - '@': resolve('src') - } - }, - module: { - rules: [ - { - test: /\.vue$/, - loader: 'vue-loader', - options: vueLoaderConfig - }, - { - test: /\.js$/, - loader: 'babel-loader', - include: [resolve('src'), resolve('test')] - }, - { - test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, - loader: 'url-loader', - options: { - limit: 10000, - name: utils.assetsPath('img/[name].[hash:7].[ext]') - } - }, - { - test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, - loader: 'url-loader', - options: { - limit: 10000, - name: utils.assetsPath('fonts/[name].[hash:7].[ext]') - } - } - ] - } -} diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/webpack.dev.conf.js b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/webpack.dev.conf.js deleted file mode 100644 index 5470402..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/webpack.dev.conf.js +++ /dev/null @@ -1,35 +0,0 @@ -var utils = require('./utils') -var webpack = require('webpack') -var config = require('../config') -var merge = require('webpack-merge') -var baseWebpackConfig = require('./webpack.base.conf') -var HtmlWebpackPlugin = require('html-webpack-plugin') -var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') - -// add hot-reload related code to entry chunks -Object.keys(baseWebpackConfig.entry).forEach(function (name) { - baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name]) -}) - -module.exports = merge(baseWebpackConfig, { - module: { - rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap }) - }, - // cheap-module-eval-source-map is faster for development - devtool: '#cheap-module-eval-source-map', - plugins: [ - new webpack.DefinePlugin({ - 'process.env': config.dev.env - }), - // https://github.com/glenjamin/webpack-hot-middleware#installation--usage - new webpack.HotModuleReplacementPlugin(), - new webpack.NoEmitOnErrorsPlugin(), - // https://github.com/ampedandwired/html-webpack-plugin - new HtmlWebpackPlugin({ - filename: 'index.html', - template: 'index.html', - inject: true - }), - new FriendlyErrorsPlugin() - ] -}) diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/webpack.prod.conf.js b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/webpack.prod.conf.js deleted file mode 100644 index da44b65..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/build/webpack.prod.conf.js +++ /dev/null @@ -1,120 +0,0 @@ -var path = require('path') -var utils = require('./utils') -var webpack = require('webpack') -var config = require('../config') -var merge = require('webpack-merge') -var baseWebpackConfig = require('./webpack.base.conf') -var CopyWebpackPlugin = require('copy-webpack-plugin') -var HtmlWebpackPlugin = require('html-webpack-plugin') -var ExtractTextPlugin = require('extract-text-webpack-plugin') -var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') - -var env = config.build.env - -var webpackConfig = merge(baseWebpackConfig, { - module: { - rules: utils.styleLoaders({ - sourceMap: config.build.productionSourceMap, - extract: true - }) - }, - devtool: config.build.productionSourceMap ? '#source-map' : false, - output: { - path: config.build.assetsRoot, - filename: utils.assetsPath('js/[name].[chunkhash].js'), - chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') - }, - plugins: [ - // http://vuejs.github.io/vue-loader/en/workflow/production.html - new webpack.DefinePlugin({ - 'process.env': env - }), - new webpack.optimize.UglifyJsPlugin({ - compress: { - warnings: false - }, - sourceMap: true - }), - // extract css into its own file - new ExtractTextPlugin({ - filename: utils.assetsPath('css/[name].[contenthash].css') - }), - // Compress extracted CSS. We are using this plugin so that possible - // duplicated CSS from different components can be deduped. - new OptimizeCSSPlugin({ - cssProcessorOptions: { - safe: true - } - }), - // generate dist index.html with correct asset hash for caching. - // you can customize output by editing /index.html - // see https://github.com/ampedandwired/html-webpack-plugin - new HtmlWebpackPlugin({ - filename: config.build.index, - template: 'index.html', - inject: true, - minify: { - removeComments: true, - collapseWhitespace: true, - removeAttributeQuotes: true - // more options: - // https://github.com/kangax/html-minifier#options-quick-reference - }, - // necessary to consistently work with multiple chunks via CommonsChunkPlugin - chunksSortMode: 'dependency' - }), - // split vendor js into its own file - new webpack.optimize.CommonsChunkPlugin({ - name: 'vendor', - minChunks: function (module, count) { - // any required modules inside node_modules are extracted to vendor - return ( - module.resource && - /\.js$/.test(module.resource) && - module.resource.indexOf( - path.join(__dirname, '../node_modules') - ) === 0 - ) - } - }), - // extract webpack runtime and module manifest to its own file in order to - // prevent vendor hash from being updated whenever app bundle is updated - new webpack.optimize.CommonsChunkPlugin({ - name: 'manifest', - chunks: ['vendor'] - }), - // copy custom static assets - new CopyWebpackPlugin([ - { - from: path.resolve(__dirname, '../static'), - to: config.build.assetsSubDirectory, - ignore: ['.*'] - } - ]) - ] -}) - -if (config.build.productionGzip) { - var CompressionWebpackPlugin = require('compression-webpack-plugin') - - webpackConfig.plugins.push( - new CompressionWebpackPlugin({ - asset: '[path].gz[query]', - algorithm: 'gzip', - test: new RegExp( - '\\.(' + - config.build.productionGzipExtensions.join('|') + - ')$' - ), - threshold: 10240, - minRatio: 0.8 - }) - ) -} - -if (config.build.bundleAnalyzerReport) { - var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin - webpackConfig.plugins.push(new BundleAnalyzerPlugin()) -} - -module.exports = webpackConfig diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/config/dev.env.js b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/config/dev.env.js deleted file mode 100644 index efead7c..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/config/dev.env.js +++ /dev/null @@ -1,6 +0,0 @@ -var merge = require('webpack-merge') -var prodEnv = require('./prod.env') - -module.exports = merge(prodEnv, { - NODE_ENV: '"development"' -}) diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/config/index.js b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/config/index.js deleted file mode 100644 index 196da1f..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/config/index.js +++ /dev/null @@ -1,38 +0,0 @@ -// see http://vuejs-templates.github.io/webpack for documentation. -var path = require('path') - -module.exports = { - build: { - env: require('./prod.env'), - index: path.resolve(__dirname, '../dist/index.html'), - assetsRoot: path.resolve(__dirname, '../dist'), - assetsSubDirectory: 'static', - assetsPublicPath: '/', - productionSourceMap: true, - // Gzip off by default as many popular static hosts such as - // Surge or Netlify already gzip all static assets for you. - // Before setting to `true`, make sure to: - // npm install --save-dev compression-webpack-plugin - productionGzip: false, - productionGzipExtensions: ['js', 'css'], - // Run the build command with an extra argument to - // View the bundle analyzer report after build finishes: - // `npm run build --report` - // Set to `true` or `false` to always turn it on or off - bundleAnalyzerReport: process.env.npm_config_report - }, - dev: { - env: require('./dev.env'), - port: 8080, - autoOpenBrowser: true, - assetsSubDirectory: 'static', - assetsPublicPath: '/', - proxyTable: {}, - // CSS Sourcemaps off by default because relative paths are "buggy" - // with this option, according to the CSS-Loader README - // (https://github.com/webpack/css-loader#sourcemaps) - // In our experience, they generally work as expected, - // just be aware of this issue when enabling this option. - cssSourceMap: false - } -} diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/config/prod.env.js b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/config/prod.env.js deleted file mode 100644 index 773d263..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/config/prod.env.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - NODE_ENV: '"production"' -} diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/index.html b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/index.html deleted file mode 100644 index 47ae14a..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - wangeditor-in-vue - - -
- - - diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/package.json b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/package.json deleted file mode 100644 index 80cf68f..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "wangeditor-in-vue", - "version": "1.0.0", - "description": "A Vue.js project", - "author": "git ", - "private": true, - "scripts": { - "dev": "node build/dev-server.js", - "start": "node build/dev-server.js", - "build": "node build/build.js" - }, - "dependencies": { - "vue": "^2.3.3", - "wangeditor": ">=3.0.0" - }, - "devDependencies": { - "autoprefixer": "^6.7.2", - "babel-core": "^6.22.1", - "babel-loader": "^6.2.10", - "babel-plugin-transform-runtime": "^6.22.0", - "babel-preset-env": "^1.3.2", - "babel-preset-stage-2": "^6.22.0", - "babel-register": "^6.22.0", - "chalk": "^1.1.3", - "connect-history-api-fallback": "^1.3.0", - "copy-webpack-plugin": "^4.0.1", - "css-loader": "^0.28.0", - "eventsource-polyfill": "^0.9.6", - "express": "^4.14.1", - "extract-text-webpack-plugin": "^2.0.0", - "file-loader": "^0.11.1", - "friendly-errors-webpack-plugin": "^1.1.3", - "html-webpack-plugin": "^2.28.0", - "http-proxy-middleware": "^0.17.3", - "webpack-bundle-analyzer": "^2.2.1", - "semver": "^5.3.0", - "shelljs": "^0.7.6", - "opn": "^4.0.2", - "optimize-css-assets-webpack-plugin": "^1.3.0", - "ora": "^1.2.0", - "rimraf": "^2.6.0", - "url-loader": "^0.5.8", - "vue-loader": "^12.1.0", - "vue-style-loader": "^3.0.1", - "vue-template-compiler": "^2.3.3", - "webpack": "^2.6.1", - "webpack-dev-middleware": "^1.10.0", - "webpack-hot-middleware": "^2.18.0", - "webpack-merge": "^4.1.0" - }, - "engines": { - "node": ">= 4.0.0", - "npm": ">= 3.0.0" - }, - "browserslist": [ - "> 1%", - "last 2 versions", - "not ie <= 8" - ] -} diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/src/App.vue b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/src/App.vue deleted file mode 100644 index 27d15ff..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/src/App.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - - - diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/src/assets/logo.png b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/src/assets/logo.png deleted file mode 100644 index f3d2503..0000000 Binary files a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/src/assets/logo.png and /dev/null differ diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/src/components/Editor.vue b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/src/components/Editor.vue deleted file mode 100644 index aee43c2..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/src/components/Editor.vue +++ /dev/null @@ -1,34 +0,0 @@ - - - - - diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/src/components/Hello.vue b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/src/components/Hello.vue deleted file mode 100644 index 2d80539..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/src/components/Hello.vue +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/src/main.js b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/src/main.js deleted file mode 100644 index 7b7fec7..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/src/main.js +++ /dev/null @@ -1,13 +0,0 @@ -// The Vue build version to load with the `import` command -// (runtime-only or standalone) has been set in webpack.base.conf with an alias. -import Vue from 'vue' -import App from './App' - -Vue.config.productionTip = false - -/* eslint-disable no-new */ -new Vue({ - el: '#app', - template: '', - components: { App } -}) diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/static/.gitkeep b/novel-front/src/main/resources/static/wangEditor/example/demo/in-vue/static/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/test-amd-main.js b/novel-front/src/main/resources/static/wangEditor/example/demo/test-amd-main.js deleted file mode 100644 index 444b2da..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/test-amd-main.js +++ /dev/null @@ -1,4 +0,0 @@ -require(['/wangEditor.min.js'], function (E) { - var editor2 = new E('#div3') - editor2.create() -}) \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/test-amd.html b/novel-front/src/main/resources/static/wangEditor/example/demo/test-amd.html deleted file mode 100644 index 6a3d666..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/test-amd.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - wangEditor 使用 AMD 加载 - - -

wangEditor 使用 AMD 加载

-
-

欢迎使用 wangEditor 富文本编辑器

-
- - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/test-css-reset.html b/novel-front/src/main/resources/static/wangEditor/example/demo/test-css-reset.html deleted file mode 100644 index c01a10d..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/test-css-reset.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - wangEditor css reset - - - -

wangEditor css reset

-
-

欢迎使用 wangEditor 富文本编辑器

-
- - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/test-emot.html b/novel-front/src/main/resources/static/wangEditor/example/demo/test-emot.html deleted file mode 100644 index 02d8f7f..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/test-emot.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - wangEditor 配置表情 - - -

wangEditor 配置表情

-
-

欢迎使用 wangEditor 富文本编辑器

-
- - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/test-fullscreen.html b/novel-front/src/main/resources/static/wangEditor/example/demo/test-fullscreen.html deleted file mode 100644 index cbbaa01..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/test-fullscreen.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - wangEditor 全屏 - - - -

wangEditor 全屏

- - -
- -
-
-
- -
-
- -
-

wangEditor 本身不包含“全屏”功能,不过可以很简单的开发出来

-

注意,全屏模式与max-height有冲突,尽量避免一起使用

-
-
- - -
- - - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/test-get-content.html b/novel-front/src/main/resources/static/wangEditor/example/demo/test-get-content.html deleted file mode 100644 index 012c81c..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/test-get-content.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - wangEditor 获取内容 - - -

wangEditor 获取内容

-
-

欢迎使用 wangEditor 富文本编辑器

-

欢迎使用 wangEditor 富文本编辑器

-
-
- - -
- - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/test-getJSON.html b/novel-front/src/main/resources/static/wangEditor/example/demo/test-getJSON.html deleted file mode 100644 index 68cd155..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/test-getJSON.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - wangEditor demo getJSON - - -

获取 JSON

-
-

欢迎使用 wangEditor 富文本编辑器

- -
- - - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/test-lang.html b/novel-front/src/main/resources/static/wangEditor/example/demo/test-lang.html deleted file mode 100644 index 6c77826..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/test-lang.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - wangEditor lang test - - -

多语言测试

-
-

欢迎使用 wangEditor 富文本编辑器

-
- - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/test-menus.html b/novel-front/src/main/resources/static/wangEditor/example/demo/test-menus.html deleted file mode 100644 index 4afd45f..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/test-menus.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - wangEditor 菜单配置 - - -

wangEditor 自定义菜单配置

-
-

欢迎使用 wangEditor 富文本编辑器

-
- - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/test-mult.html b/novel-front/src/main/resources/static/wangEditor/example/demo/test-mult.html deleted file mode 100644 index bd6f7e1..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/test-mult.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - wangEditor 一个页面多个编辑器 - - - - -

第一个 demo(菜单和编辑器区域分开)

-
-
-
中间隔离带
-
-

请输入内容

-
- -

第二个 demo(常规)

-
-

请输入内容

-
- - - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/test-onblur.html b/novel-front/src/main/resources/static/wangEditor/example/demo/test-onblur.html deleted file mode 100644 index a6644bf..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/test-onblur.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - wangEditor test onblur - - -
-

欢迎使用 wangEditor 富文本编辑器

-
- - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/test-onchange.html b/novel-front/src/main/resources/static/wangEditor/example/demo/test-onchange.html deleted file mode 100644 index 231de10..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/test-onchange.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - wangEditor test onchange - - -
-

欢迎使用 wangEditor 富文本编辑器

-
- - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/test-onfocus.html b/novel-front/src/main/resources/static/wangEditor/example/demo/test-onfocus.html deleted file mode 100644 index 7d95de0..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/test-onfocus.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - wangEditor test onfocus - - -
-

欢迎使用 wangEditor 富文本编辑器

-
- - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/test-paste.html b/novel-front/src/main/resources/static/wangEditor/example/demo/test-paste.html deleted file mode 100644 index a3a7477..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/test-paste.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - wangEditor paste test - - -

wangEditor paste test

-
-

欢迎使用 wangEditor 富文本编辑器

-
- - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/test-set-content.html b/novel-front/src/main/resources/static/wangEditor/example/demo/test-set-content.html deleted file mode 100644 index 42eff3b..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/test-set-content.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - wangEditor 设置内容 - - -

wangEditor 设置内容

-
-

欢迎使用 wangEditor 富文本编辑器

-
-
- - -
- - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/test-sperate.html b/novel-front/src/main/resources/static/wangEditor/example/demo/test-sperate.html deleted file mode 100644 index 0d0b857..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/test-sperate.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - wangEditor 菜单和编辑器区域分离 - - - - -

wangEditor 菜单和编辑器区域分离

-
-
-
中间隔离带
-
-

请输入内容

-
- - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/test-textarea.html b/novel-front/src/main/resources/static/wangEditor/example/demo/test-textarea.html deleted file mode 100644 index 8e41119..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/test-textarea.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - wangEditor demo textarea - - -

编辑器

-
-

欢迎使用 wangEditor 富文本编辑器

-
- -
- -

textarea

- - - - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/demo/test-uploadimg.html b/novel-front/src/main/resources/static/wangEditor/example/demo/test-uploadimg.html deleted file mode 100644 index 97246ca..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/demo/test-uploadimg.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - wangEditor 上传图片 - - -

wangEditor 上传图片到服务器

-
-

欢迎使用 wangEditor 富文本编辑器

-
- -

wangEditor 以base64保存图片文件

-
-

欢迎使用 wangEditor 富文本编辑器

-
- -

wangEditor 自定义上传图片

-
-

欢迎使用 wangEditor 富文本编辑器

-
- - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/favicon.ico b/novel-front/src/main/resources/static/wangEditor/example/favicon.ico deleted file mode 100644 index 6075775..0000000 Binary files a/novel-front/src/main/resources/static/wangEditor/example/favicon.ico and /dev/null differ diff --git a/novel-front/src/main/resources/static/wangEditor/example/icomoon/Read Me.txt b/novel-front/src/main/resources/static/wangEditor/example/icomoon/Read Me.txt deleted file mode 100644 index 8491652..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/icomoon/Read Me.txt +++ /dev/null @@ -1,7 +0,0 @@ -Open *demo.html* to see a list of all the glyphs in your font along with their codes/ligatures. - -To use the generated font in desktop programs, you can install the TTF font. In order to copy the character associated with each icon, refer to the text box at the bottom right corner of each glyph in demo.html. The character inside this text box may be invisible; but it can still be copied. See this guide for more info: https://icomoon.io/#docs/local-fonts - -You won't need any of the files located under the *demo-files* directory when including the generated font in your own projects. - -You can import *selection.json* back to the IcoMoon app using the *Import Icons* button (or via Main Menu → Manage Projects) to retrieve your icon selection. diff --git a/novel-front/src/main/resources/static/wangEditor/example/icomoon/demo-files/demo.css b/novel-front/src/main/resources/static/wangEditor/example/icomoon/demo-files/demo.css deleted file mode 100644 index f9ab27c..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/icomoon/demo-files/demo.css +++ /dev/null @@ -1,155 +0,0 @@ -body { - padding: 0; - margin: 0; - font-family: sans-serif; - font-size: 1em; - line-height: 1.5; - color: #555; - background: #fff; -} -h1 { - font-size: 1.5em; - font-weight: normal; -} -small { - font-size: .66666667em; -} -a { - color: #e74c3c; - text-decoration: none; -} -a:hover, a:focus { - box-shadow: 0 1px #e74c3c; -} -.bshadow0, input { - box-shadow: inset 0 -2px #e7e7e7; -} -input:hover { - box-shadow: inset 0 -2px #ccc; -} -input, fieldset { - font-family: sans-serif; - font-size: 1em; - margin: 0; - padding: 0; - border: 0; -} -input { - color: inherit; - line-height: 1.5; - height: 1.5em; - padding: .25em 0; -} -input:focus { - outline: none; - box-shadow: inset 0 -2px #449fdb; -} -.glyph { - font-size: 16px; - width: 15em; - padding-bottom: 1em; - margin-right: 4em; - margin-bottom: 1em; - float: left; - overflow: hidden; -} -.liga { - width: 80%; - width: calc(100% - 2.5em); -} -.talign-right { - text-align: right; -} -.talign-center { - text-align: center; -} -.bgc1 { - background: #f1f1f1; -} -.fgc1 { - color: #999; -} -.fgc0 { - color: #000; -} -p { - margin-top: 1em; - margin-bottom: 1em; -} -.mvm { - margin-top: .75em; - margin-bottom: .75em; -} -.mtn { - margin-top: 0; -} -.mtl, .mal { - margin-top: 1.5em; -} -.mbl, .mal { - margin-bottom: 1.5em; -} -.mal, .mhl { - margin-left: 1.5em; - margin-right: 1.5em; -} -.mhmm { - margin-left: 1em; - margin-right: 1em; -} -.mls { - margin-left: .25em; -} -.ptl { - padding-top: 1.5em; -} -.pbs, .pvs { - padding-bottom: .25em; -} -.pvs, .pts { - padding-top: .25em; -} -.unit { - float: left; -} -.unitRight { - float: right; -} -.size1of2 { - width: 50%; -} -.size1of1 { - width: 100%; -} -.clearfix:before, .clearfix:after { - content: " "; - display: table; -} -.clearfix:after { - clear: both; -} -.hidden-true { - display: none; -} -.textbox0 { - width: 3em; - background: #f1f1f1; - padding: .25em .5em; - line-height: 1.5; - height: 1.5em; -} -#testDrive { - display: block; - padding-top: 24px; - line-height: 1.5; -} -.fs0 { - font-size: 16px; -} -.fs1 { - font-size: 16px; -} -.fs2 { - font-size: 16px; -} - diff --git a/novel-front/src/main/resources/static/wangEditor/example/icomoon/demo-files/demo.js b/novel-front/src/main/resources/static/wangEditor/example/icomoon/demo-files/demo.js deleted file mode 100644 index 6f45f1c..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/icomoon/demo-files/demo.js +++ /dev/null @@ -1,30 +0,0 @@ -if (!('boxShadow' in document.body.style)) { - document.body.setAttribute('class', 'noBoxShadow'); -} - -document.body.addEventListener("click", function(e) { - var target = e.target; - if (target.tagName === "INPUT" && - target.getAttribute('class').indexOf('liga') === -1) { - target.select(); - } -}); - -(function() { - var fontSize = document.getElementById('fontSize'), - testDrive = document.getElementById('testDrive'), - testText = document.getElementById('testText'); - function updateTest() { - testDrive.innerHTML = testText.value || String.fromCharCode(160); - if (window.icomoonLiga) { - window.icomoonLiga(testDrive); - } - } - function updateSize() { - testDrive.style.fontSize = fontSize.value + 'px'; - } - fontSize.addEventListener('change', updateSize, false); - testText.addEventListener('input', updateTest, false); - testText.addEventListener('change', updateTest, false); - updateSize(); -}()); diff --git a/novel-front/src/main/resources/static/wangEditor/example/icomoon/demo.html b/novel-front/src/main/resources/static/wangEditor/example/icomoon/demo.html deleted file mode 100644 index a36d3ba..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/icomoon/demo.html +++ /dev/null @@ -1,505 +0,0 @@ - - - - - IcoMoon Demo - - - - - -
-

Font Name: icomoon (Glyphs: 27)

-
-
-

Grid Size: 14

-
-
- - - - icon-close -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-remove -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-times -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-trash-o -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-terminal -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-header -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-paint-brush -
-
- - -
-
- liga: - -
-
-
-
-

Grid Size: 16

-
-
- - - - icon-pencil2 -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-image -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-play -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-location -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-undo -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-redo -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-quotes-left -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-list-numbered -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-list2 -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-upload2 -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-link -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-happy -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-cancel-circle -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-bold -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-underline -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-italic -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-strikethrough -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-page-break -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-table2 -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-paragraph-left -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-paragraph-center -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-paragraph-right -
-
- - -
-
- liga: - -
-
-
- - -
-

Font Test Drive

- - -
  -
-
- -
-

Generated by IcoMoon

-
- - - - diff --git a/novel-front/src/main/resources/static/wangEditor/example/icomoon/fonts/icomoon.eot b/novel-front/src/main/resources/static/wangEditor/example/icomoon/fonts/icomoon.eot deleted file mode 100644 index 0d144fd..0000000 Binary files a/novel-front/src/main/resources/static/wangEditor/example/icomoon/fonts/icomoon.eot and /dev/null differ diff --git a/novel-front/src/main/resources/static/wangEditor/example/icomoon/fonts/icomoon.svg b/novel-front/src/main/resources/static/wangEditor/example/icomoon/fonts/icomoon.svg deleted file mode 100644 index 21be016..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/icomoon/fonts/icomoon.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/icomoon/fonts/icomoon.ttf b/novel-front/src/main/resources/static/wangEditor/example/icomoon/fonts/icomoon.ttf deleted file mode 100644 index 80be9ad..0000000 Binary files a/novel-front/src/main/resources/static/wangEditor/example/icomoon/fonts/icomoon.ttf and /dev/null differ diff --git a/novel-front/src/main/resources/static/wangEditor/example/icomoon/fonts/icomoon.woff b/novel-front/src/main/resources/static/wangEditor/example/icomoon/fonts/icomoon.woff deleted file mode 100644 index fa64c4d..0000000 Binary files a/novel-front/src/main/resources/static/wangEditor/example/icomoon/fonts/icomoon.woff and /dev/null differ diff --git a/novel-front/src/main/resources/static/wangEditor/example/icomoon/selection.json b/novel-front/src/main/resources/static/wangEditor/example/icomoon/selection.json deleted file mode 100644 index b4a875f..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/icomoon/selection.json +++ /dev/null @@ -1,775 +0,0 @@ -{ - "IcoMoonType": "selection", - "icons": [ - { - "icon": { - "paths": [ - "M741.714 755.429q0 22.857-16 38.857l-77.714 77.714q-16 16-38.857 16t-38.857-16l-168-168-168 168q-16 16-38.857 16t-38.857-16l-77.714-77.714q-16-16-16-38.857t16-38.857l168-168-168-168q-16-16-16-38.857t16-38.857l77.714-77.714q16-16 38.857-16t38.857 16l168 168 168-168q16-16 38.857-16t38.857 16l77.714 77.714q16 16 16 38.857t-16 38.857l-168 168 168 168q16 16 16 38.857z" - ], - "width": 804.5720062255859, - "attrs": [], - "isMulticolor": false, - "isMulticolor2": false, - "tags": [ - "close", - "remove", - "times" - ], - "defaultCode": 61453, - "grid": 14 - }, - "attrs": [], - "properties": { - "name": "close, remove, times", - "id": 13, - "order": 60, - "prevSize": 16, - "code": 61453 - }, - "setIdx": 0, - "setId": 2, - "iconIdx": 13 - }, - { - "icon": { - "paths": [ - "M292.571 420.571v329.143q0 8-5.143 13.143t-13.143 5.143h-36.571q-8 0-13.143-5.143t-5.143-13.143v-329.143q0-8 5.143-13.143t13.143-5.143h36.571q8 0 13.143 5.143t5.143 13.143zM438.857 420.571v329.143q0 8-5.143 13.143t-13.143 5.143h-36.571q-8 0-13.143-5.143t-5.143-13.143v-329.143q0-8 5.143-13.143t13.143-5.143h36.571q8 0 13.143 5.143t5.143 13.143zM585.143 420.571v329.143q0 8-5.143 13.143t-13.143 5.143h-36.571q-8 0-13.143-5.143t-5.143-13.143v-329.143q0-8 5.143-13.143t13.143-5.143h36.571q8 0 13.143 5.143t5.143 13.143zM658.286 834.286v-541.714h-512v541.714q0 12.571 4 23.143t8.286 15.429 6 4.857h475.429q1.714 0 6-4.857t8.286-15.429 4-23.143zM274.286 219.429h256l-27.429-66.857q-4-5.143-9.714-6.286h-181.143q-5.714 1.143-9.714 6.286zM804.571 237.714v36.571q0 8-5.143 13.143t-13.143 5.143h-54.857v541.714q0 47.429-26.857 82t-64.571 34.571h-475.429q-37.714 0-64.571-33.429t-26.857-80.857v-544h-54.857q-8 0-13.143-5.143t-5.143-13.143v-36.571q0-8 5.143-13.143t13.143-5.143h176.571l40-95.429q8.571-21.143 30.857-36t45.143-14.857h182.857q22.857 0 45.143 14.857t30.857 36l40 95.429h176.571q8 0 13.143 5.143t5.143 13.143z" - ], - "width": 804.5710134506226, - "attrs": [], - "isMulticolor": false, - "isMulticolor2": false, - "tags": [ - "trash-o" - ], - "defaultCode": 61460, - "grid": 14 - }, - "attrs": [], - "properties": { - "name": "trash-o", - "id": 19, - "order": 53, - "prevSize": 16, - "code": 61460 - }, - "setIdx": 0, - "setId": 2, - "iconIdx": 19 - }, - { - "icon": { - "paths": [ - "M334.286 561.714l-266.286 266.286q-5.714 5.714-13.143 5.714t-13.143-5.714l-28.571-28.571q-5.714-5.714-5.714-13.143t5.714-13.143l224.571-224.571-224.571-224.571q-5.714-5.714-5.714-13.143t5.714-13.143l28.571-28.571q5.714-5.714 13.143-5.714t13.143 5.714l266.286 266.286q5.714 5.714 5.714 13.143t-5.714 13.143zM950.857 822.857v36.571q0 8-5.143 13.143t-13.143 5.143h-548.571q-8 0-13.143-5.143t-5.143-13.143v-36.571q0-8 5.143-13.143t13.143-5.143h548.571q8 0 13.143 5.143t5.143 13.143z" - ], - "width": 958.2859897613525, - "attrs": [], - "isMulticolor": false, - "isMulticolor2": false, - "tags": [ - "terminal" - ], - "defaultCode": 61728, - "grid": 14 - }, - "attrs": [], - "properties": { - "name": "terminal", - "id": 256, - "order": 55, - "prevSize": 16, - "code": 61728 - }, - "setIdx": 0, - "setId": 2, - "iconIdx": 256 - }, - { - "icon": { - "paths": [ - "M961.143 950.857q-25.143 0-75.714-2t-76.286-2q-25.143 0-75.429 2t-75.429 2q-13.714 0-21.143-11.714t-7.429-26q0-17.714 9.714-26.286t22.286-9.714 29.143-4 25.714-8.571q18.857-12 18.857-80l-0.571-223.429q0-12-0.571-17.714-7.429-2.286-28.571-2.286h-385.714q-21.714 0-29.143 2.286-0.571 5.714-0.571 17.714l-0.571 212q0 81.143 21.143 93.714 9.143 5.714 27.429 7.429t32.571 2 25.714 8.571 11.429 26q0 14.857-7.143 27.429t-20.857 12.571q-26.857 0-79.714-2t-79.143-2q-24.571 0-73.143 2t-72.571 2q-13.143 0-20.286-12t-7.143-25.714q0-17.143 8.857-25.714t20.571-10 27.143-4.286 24-8.571q18.857-13.143 18.857-81.714l-0.571-32.571v-464.571q0-1.714 0.286-14.857t0-20.857-0.857-22-2-24-3.714-20.857-6.286-18-9.143-10.286q-8.571-5.714-25.714-6.857t-30.286-1.143-23.429-8-10.286-25.714q0-14.857 6.857-27.429t20.571-12.571q26.286 0 79.143 2t79.143 2q24 0 72.286-2t72.286-2q14.286 0 21.429 12.571t7.143 27.429q0 17.143-9.714 24.857t-22 8.286-28.286 2.286-24.571 7.429q-20 12-20 91.429l0.571 182.857q0 12 0.571 18.286 7.429 1.714 22.286 1.714h399.429q14.286 0 21.714-1.714 0.571-6.286 0.571-18.286l0.571-182.857q0-79.429-20-91.429-10.286-6.286-33.429-7.143t-37.714-7.429-14.571-28.286q0-14.857 7.143-27.429t21.429-12.571q25.143 0 75.429 2t75.429 2q24.571 0 73.714-2t73.714-2q14.286 0 21.429 12.571t7.143 27.429q0 17.143-10 25.143t-22.857 8.286-29.429 1.714-25.143 7.143q-20 13.143-20 92l0.571 538.857q0 68 19.429 80 9.143 5.714 26.286 7.714t30.571 2.571 23.714 8.857 10.286 25.429q0 14.857-6.857 27.429t-20.571 12.571z" - ], - "width": 1024.001937866211, - "attrs": [], - "isMulticolor": false, - "isMulticolor2": false, - "tags": [ - "header" - ], - "defaultCode": 61916, - "grid": 14 - }, - "attrs": [], - "properties": { - "name": "header", - "id": 433, - "order": 49, - "prevSize": 16, - "code": 61916 - }, - "setIdx": 0, - "setId": 2, - "iconIdx": 433 - }, - { - "icon": { - "paths": [ - "M922.857 0q40 0 70 26.571t30 66.571q0 36-25.714 86.286-189.714 359.429-265.714 429.714-55.429 52-124.571 52-72 0-123.714-52.857t-51.714-125.429q0-73.143 52.571-121.143l364.571-330.857q33.714-30.857 74.286-30.857zM403.429 590.857q22.286 43.429 60.857 74.286t86 43.429l0.571 40.571q2.286 121.714-74 198.286t-199.143 76.571q-70.286 0-124.571-26.571t-87.143-72.857-49.429-104.571-16.571-125.714q4 2.857 23.429 17.143t35.429 25.429 33.714 20.857 26.286 9.714q23.429 0 31.429-21.143 14.286-37.714 32.857-64.286t39.714-43.429 50.286-27.143 58.857-14.571 71.429-6z" - ], - "width": 1022.8569793701172, - "attrs": [], - "isMulticolor": false, - "isMulticolor2": false, - "tags": [ - "paint-brush" - ], - "defaultCode": 61948, - "grid": 14 - }, - "attrs": [], - "properties": { - "name": "paint-brush", - "id": 463, - "order": 54, - "prevSize": 16, - "code": 61948 - }, - "setIdx": 0, - "setId": 2, - "iconIdx": 463 - }, - { - "icon": { - "paths": [ - "M384 640l128-64 448-448-64-64-448 448-64 128zM289.3 867.098c-31.632-66.728-65.666-100.762-132.396-132.394l99.096-272.792 128-77.912 384-384h-192l-384 384-192 640 640-192 384-384v-192l-384 384-77.912 128z" - ], - "tags": [ - "pencil", - "write", - "edit" - ], - "defaultCode": 59654, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "pencil2, write2", - "name": "pencil2", - "order": 32, - "id": 7, - "prevSize": 16, - "code": 59654 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 6 - }, - { - "icon": { - "paths": [ - "M959.884 128c0.040 0.034 0.082 0.076 0.116 0.116v767.77c-0.034 0.040-0.076 0.082-0.116 0.116h-895.77c-0.040-0.034-0.082-0.076-0.114-0.116v-767.772c0.034-0.040 0.076-0.082 0.114-0.114h895.77zM960 64h-896c-35.2 0-64 28.8-64 64v768c0 35.2 28.8 64 64 64h896c35.2 0 64-28.8 64-64v-768c0-35.2-28.8-64-64-64v0z", - "M832 288c0 53.020-42.98 96-96 96s-96-42.98-96-96 42.98-96 96-96 96 42.98 96 96z", - "M896 832h-768v-128l224-384 256 320h64l224-192z" - ], - "tags": [ - "image", - "picture", - "photo", - "graphic" - ], - "defaultCode": 59661, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "image, picture", - "name": "image", - "order": 44, - "id": 14, - "prevSize": 16, - "code": 59661 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 13 - }, - { - "icon": { - "paths": [ - "M981.188 160.108c-143.632-20.65-302.332-32.108-469.186-32.108-166.86 0-325.556 11.458-469.194 32.108-27.53 107.726-42.808 226.75-42.808 351.892 0 125.14 15.278 244.166 42.808 351.89 143.638 20.652 302.336 32.11 469.194 32.11 166.854 0 325.552-11.458 469.186-32.11 27.532-107.724 42.812-226.75 42.812-351.89 0-125.142-15.28-244.166-42.812-351.892zM384.002 704v-384l320 192-320 192z" - ], - "tags": [ - "play", - "video", - "movie" - ], - "defaultCode": 59666, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "play, video", - "name": "play", - "order": 51, - "id": 19, - "prevSize": 16, - "code": 59666 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 18 - }, - { - "icon": { - "paths": [ - "M512 0c-176.732 0-320 143.268-320 320 0 320 320 704 320 704s320-384 320-704c0-176.732-143.27-320-320-320zM512 512c-106.040 0-192-85.96-192-192s85.96-192 192-192 192 85.96 192 192-85.96 192-192 192z" - ], - "tags": [ - "location", - "map-marker", - "pin" - ], - "defaultCode": 59719, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "location, map-marker", - "name": "location", - "order": 48, - "id": 72, - "prevSize": 16, - "code": 59719 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 71 - }, - { - "icon": { - "paths": [ - "M512 64c-141.384 0-269.376 57.32-362.032 149.978l-149.968-149.978v384h384l-143.532-143.522c69.496-69.492 165.492-112.478 271.532-112.478 212.068 0 384 171.924 384 384 0 114.696-50.292 217.636-130.018 288l84.666 96c106.302-93.816 173.352-231.076 173.352-384 0-282.77-229.23-512-512-512z" - ], - "tags": [ - "undo", - "ccw", - "arrow" - ], - "defaultCode": 59749, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "undo, ccw", - "name": "undo", - "order": 35, - "id": 102, - "prevSize": 16, - "code": 59749 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 101 - }, - { - "icon": { - "paths": [ - "M0 576c0 152.924 67.048 290.184 173.35 384l84.666-96c-79.726-70.364-130.016-173.304-130.016-288 0-212.076 171.93-384 384-384 106.042 0 202.038 42.986 271.53 112.478l-143.53 143.522h384v-384l-149.97 149.978c-92.654-92.658-220.644-149.978-362.030-149.978-282.77 0-512 229.23-512 512z" - ], - "tags": [ - "redo", - "cw", - "arrow" - ], - "defaultCode": 59750, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "redo, cw", - "name": "redo", - "order": 36, - "id": 103, - "prevSize": 16, - "code": 59750 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 102 - }, - { - "icon": { - "paths": [ - "M225 448c123.712 0 224 100.29 224 224 0 123.712-100.288 224-224 224s-224-100.288-224-224l-1-32c0-247.424 200.576-448 448-448v128c-85.474 0-165.834 33.286-226.274 93.726-11.634 11.636-22.252 24.016-31.83 37.020 11.438-1.8 23.16-2.746 35.104-2.746zM801 448c123.71 0 224 100.29 224 224 0 123.712-100.29 224-224 224s-224-100.288-224-224l-1-32c0-247.424 200.576-448 448-448v128c-85.474 0-165.834 33.286-226.274 93.726-11.636 11.636-22.254 24.016-31.832 37.020 11.44-1.8 23.16-2.746 35.106-2.746z" - ], - "tags": [ - "quotes-left", - "ldquo" - ], - "defaultCode": 59767, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "quotes-left, ldquo", - "name": "quotes-left", - "order": 34, - "id": 120, - "prevSize": 16, - "code": 59767 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 119 - }, - { - "icon": { - "paths": [ - "M384 832h640v128h-640zM384 448h640v128h-640zM384 64h640v128h-640zM192 0v256h-64v-192h-64v-64zM128 526v50h128v64h-192v-146l128-60v-50h-128v-64h192v146zM256 704v320h-192v-64h128v-64h-128v-64h128v-64h-128v-64z" - ], - "tags": [ - "list-numbered", - "options" - ], - "defaultCode": 59833, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "list-numbered, options", - "name": "list-numbered", - "order": 37, - "id": 186, - "prevSize": 16, - "code": 59833 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 185 - }, - { - "icon": { - "paths": [ - "M384 64h640v128h-640v-128zM384 448h640v128h-640v-128zM384 832h640v128h-640v-128zM0 128c0-70.692 57.308-128 128-128s128 57.308 128 128c0 70.692-57.308 128-128 128s-128-57.308-128-128zM0 512c0-70.692 57.308-128 128-128s128 57.308 128 128c0 70.692-57.308 128-128 128s-128-57.308-128-128zM0 896c0-70.692 57.308-128 128-128s128 57.308 128 128c0 70.692-57.308 128-128 128s-128-57.308-128-128z" - ], - "tags": [ - "list", - "todo", - "bullet", - "menu", - "options" - ], - "defaultCode": 59835, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "list2, todo2", - "name": "list2", - "order": 38, - "id": 188, - "prevSize": 16, - "code": 59835 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 187 - }, - { - "icon": { - "paths": [ - "M0 896h1024v64h-1024zM1024 768v64h-1024v-64l128-256h256v128h256v-128h256zM224 320l288-288 288 288h-224v256h-128v-256z" - ], - "tags": [ - "upload", - "load", - "open" - ], - "defaultCode": 59846, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "upload2, load2", - "name": "upload2", - "order": 52, - "id": 199, - "prevSize": 16, - "code": 59846 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 198 - }, - { - "icon": { - "paths": [ - "M440.236 635.766c-13.31 0-26.616-5.076-36.77-15.23-95.134-95.136-95.134-249.934 0-345.070l192-192c46.088-46.086 107.36-71.466 172.534-71.466s126.448 25.38 172.536 71.464c95.132 95.136 95.132 249.934 0 345.070l-87.766 87.766c-20.308 20.308-53.23 20.308-73.54 0-20.306-20.306-20.306-53.232 0-73.54l87.766-87.766c54.584-54.586 54.584-143.404 0-197.99-26.442-26.442-61.6-41.004-98.996-41.004s-72.552 14.562-98.996 41.006l-192 191.998c-54.586 54.586-54.586 143.406 0 197.992 20.308 20.306 20.306 53.232 0 73.54-10.15 10.152-23.462 15.23-36.768 15.23z", - "M256 1012c-65.176 0-126.45-25.38-172.534-71.464-95.134-95.136-95.134-249.934 0-345.070l87.764-87.764c20.308-20.306 53.234-20.306 73.54 0 20.308 20.306 20.308 53.232 0 73.54l-87.764 87.764c-54.586 54.586-54.586 143.406 0 197.992 26.44 26.44 61.598 41.002 98.994 41.002s72.552-14.562 98.998-41.006l192-191.998c54.584-54.586 54.584-143.406 0-197.992-20.308-20.308-20.306-53.232 0-73.54 20.306-20.306 53.232-20.306 73.54 0.002 95.132 95.134 95.132 249.932 0.002 345.068l-192.002 192c-46.090 46.088-107.364 71.466-172.538 71.466z" - ], - "tags": [ - "link", - "chain", - "url", - "uri", - "anchor" - ], - "defaultCode": 59851, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "link, chain", - "name": "link", - "order": 42, - "id": 204, - "prevSize": 16, - "code": 59851 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 203 - }, - { - "icon": { - "paths": [ - "M512 1024c282.77 0 512-229.23 512-512s-229.23-512-512-512-512 229.23-512 512 229.23 512 512 512zM512 96c229.75 0 416 186.25 416 416s-186.25 416-416 416-416-186.25-416-416 186.25-416 416-416zM512 598.76c115.95 0 226.23-30.806 320-84.92-14.574 178.438-153.128 318.16-320 318.16-166.868 0-305.422-139.872-320-318.304 93.77 54.112 204.050 85.064 320 85.064zM256 352c0-53.019 28.654-96 64-96s64 42.981 64 96c0 53.019-28.654 96-64 96s-64-42.981-64-96zM640 352c0-53.019 28.654-96 64-96s64 42.981 64 96c0 53.019-28.654 96-64 96s-64-42.981-64-96z" - ], - "tags": [ - "happy", - "emoticon", - "smiley", - "face" - ], - "defaultCode": 59871, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "happy, emoticon", - "name": "happy", - "order": 31, - "id": 224, - "prevSize": 16, - "code": 59871 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 223 - }, - { - "icon": { - "paths": [ - "M512 0c-282.77 0-512 229.23-512 512s229.23 512 512 512 512-229.23 512-512-229.23-512-512-512zM512 928c-229.75 0-416-186.25-416-416s186.25-416 416-416 416 186.25 416 416-186.25 416-416 416z", - "M672 256l-160 160-160-160-96 96 160 160-160 160 96 96 160-160 160 160 96-96-160-160 160-160z" - ], - "tags": [ - "cancel-circle", - "close", - "remove", - "delete" - ], - "defaultCode": 59917, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "cancel-circle, close", - "name": "cancel-circle", - "order": 59, - "id": 270, - "prevSize": 16, - "code": 59917 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 269 - }, - { - "icon": { - "paths": [ - "M707.88 484.652c37.498-44.542 60.12-102.008 60.12-164.652 0-141.16-114.842-256-256-256h-320v896h384c141.158 0 256-114.842 256-256 0-92.956-49.798-174.496-124.12-219.348zM384 192h101.5c55.968 0 101.5 57.42 101.5 128s-45.532 128-101.5 128h-101.5v-256zM543 832h-159v-256h159c58.45 0 106 57.42 106 128s-47.55 128-106 128z" - ], - "tags": [ - "bold", - "wysiwyg" - ], - "defaultCode": 60002, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "bold, wysiwyg4", - "name": "bold", - "order": 27, - "id": 355, - "prevSize": 16, - "code": 60002 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 354 - }, - { - "icon": { - "paths": [ - "M704 64h128v416c0 159.058-143.268 288-320 288-176.73 0-320-128.942-320-288v-416h128v416c0 40.166 18.238 78.704 51.354 108.506 36.896 33.204 86.846 51.494 140.646 51.494s103.75-18.29 140.646-51.494c33.116-29.802 51.354-68.34 51.354-108.506v-416zM192 832h640v128h-640z" - ], - "tags": [ - "underline", - "wysiwyg" - ], - "defaultCode": 60003, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "underline, wysiwyg5", - "name": "underline", - "order": 28, - "id": 356, - "prevSize": 16, - "code": 60003 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 355 - }, - { - "icon": { - "paths": [ - "M896 64v64h-128l-320 768h128v64h-448v-64h128l320-768h-128v-64z" - ], - "tags": [ - "italic", - "wysiwyg" - ], - "defaultCode": 60004, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "italic, wysiwyg6", - "name": "italic", - "order": 29, - "id": 357, - "prevSize": 16, - "code": 60004 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 356 - }, - { - "icon": { - "paths": [ - "M1024 512v64h-234.506c27.504 38.51 42.506 82.692 42.506 128 0 70.878-36.66 139.026-100.58 186.964-59.358 44.518-137.284 69.036-219.42 69.036-82.138 0-160.062-24.518-219.42-69.036-63.92-47.938-100.58-116.086-100.58-186.964h128c0 69.382 87.926 128 192 128s192-58.618 192-128c0-69.382-87.926-128-192-128h-512v-64h299.518c-2.338-1.654-4.656-3.324-6.938-5.036-63.92-47.94-100.58-116.086-100.58-186.964s36.66-139.024 100.58-186.964c59.358-44.518 137.282-69.036 219.42-69.036 82.136 0 160.062 24.518 219.42 69.036 63.92 47.94 100.58 116.086 100.58 186.964h-128c0-69.382-87.926-128-192-128s-192 58.618-192 128c0 69.382 87.926 128 192 128 78.978 0 154.054 22.678 212.482 64h299.518z" - ], - "tags": [ - "strikethrough", - "wysiwyg" - ], - "defaultCode": 60005, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "strikethrough, wysiwyg7", - "name": "strikethrough", - "order": 30, - "id": 358, - "prevSize": 16, - "code": 60005 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 357 - }, - { - "icon": { - "paths": [ - "M0 512h128v64h-128zM192 512h192v64h-192zM448 512h128v64h-128zM640 512h192v64h-192zM896 512h128v64h-128zM880 0l16 448h-768l16-448h32l16 384h640l16-384zM144 1024l-16-384h768l-16 384h-32l-16-320h-640l-16 320z" - ], - "tags": [ - "page-break", - "wysiwyg" - ], - "defaultCode": 60008, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "page-break, wysiwyg10", - "name": "page-break", - "order": 57, - "id": 361, - "prevSize": 16, - "code": 60008 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 360 - }, - { - "icon": { - "paths": [ - "M0 64v896h1024v-896h-1024zM384 640v-192h256v192h-256zM640 704v192h-256v-192h256zM640 192v192h-256v-192h256zM320 192v192h-256v-192h256zM64 448h256v192h-256v-192zM704 448h256v192h-256v-192zM704 384v-192h256v192h-256zM64 704h256v192h-256v-192zM704 896v-192h256v192h-256z" - ], - "tags": [ - "table", - "wysiwyg" - ], - "defaultCode": 60017, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "table2, wysiwyg19", - "name": "table2", - "order": 43, - "id": 370, - "prevSize": 16, - "code": 60017 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 369 - }, - { - "icon": { - "paths": [ - "M0 64h1024v128h-1024zM0 256h640v128h-640zM0 640h640v128h-640zM0 448h1024v128h-1024zM0 832h1024v128h-1024z" - ], - "tags": [ - "paragraph-left", - "wysiwyg", - "align-left", - "left" - ], - "defaultCode": 60023, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "paragraph-left, wysiwyg25", - "name": "paragraph-left", - "order": 39, - "id": 376, - "prevSize": 16, - "code": 60023 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 375 - }, - { - "icon": { - "paths": [ - "M0 64h1024v128h-1024zM192 256h640v128h-640zM192 640h640v128h-640zM0 448h1024v128h-1024zM0 832h1024v128h-1024z" - ], - "tags": [ - "paragraph-center", - "wysiwyg", - "align-center", - "center" - ], - "defaultCode": 60024, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "paragraph-center, wysiwyg26", - "name": "paragraph-center", - "order": 40, - "id": 377, - "prevSize": 16, - "code": 60024 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 376 - }, - { - "icon": { - "paths": [ - "M0 64h1024v128h-1024zM384 256h640v128h-640zM384 640h640v128h-640zM0 448h1024v128h-1024zM0 832h1024v128h-1024z" - ], - "tags": [ - "paragraph-right", - "wysiwyg", - "align-right", - "right" - ], - "defaultCode": 60025, - "grid": 16, - "attrs": [] - }, - "attrs": [], - "properties": { - "ligatures": "paragraph-right, wysiwyg27", - "name": "paragraph-right", - "order": 41, - "id": 378, - "prevSize": 16, - "code": 60025 - }, - "setIdx": 1, - "setId": 1, - "iconIdx": 377 - } - ], - "height": 1024, - "metadata": { - "name": "icomoon" - }, - "preferences": { - "showGlyphs": true, - "showQuickUse": true, - "showQuickUse2": true, - "showSVGs": true, - "fontPref": { - "prefix": "icon-", - "metadata": { - "fontFamily": "icomoon" - }, - "metrics": { - "emSize": 1024, - "baseline": 6.25, - "whitespace": 50 - }, - "embed": false - }, - "imagePref": { - "prefix": "icon-", - "png": true, - "useClassSelector": true, - "color": 0, - "bgColor": 16777215, - "classSelector": ".icon" - }, - "historySize": 100, - "showCodes": true, - "gridSize": 16 - } -} \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/icomoon/style.css b/novel-front/src/main/resources/static/wangEditor/example/icomoon/style.css deleted file mode 100644 index e8caa25..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/icomoon/style.css +++ /dev/null @@ -1,113 +0,0 @@ -@font-face { - font-family: 'icomoon'; - src: url('fonts/icomoon.eot?b1ngen'); - src: url('fonts/icomoon.eot?b1ngen#iefix') format('embedded-opentype'), - url('fonts/icomoon.ttf?b1ngen') format('truetype'), - url('fonts/icomoon.woff?b1ngen') format('woff'), - url('fonts/icomoon.svg?b1ngen#icomoon') format('svg'); - font-weight: normal; - font-style: normal; -} - -[class^="icon-"], [class*=" icon-"] { - /* use !important to prevent issues with browser extensions that change fonts */ - font-family: 'icomoon' !important; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - - /* Better Font Rendering =========== */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.icon-close:before { - content: "\f00d"; -} -.icon-remove:before { - content: "\f00d"; -} -.icon-times:before { - content: "\f00d"; -} -.icon-trash-o:before { - content: "\f014"; -} -.icon-terminal:before { - content: "\f120"; -} -.icon-header:before { - content: "\f1dc"; -} -.icon-paint-brush:before { - content: "\f1fc"; -} -.icon-pencil2:before { - content: "\e906"; -} -.icon-image:before { - content: "\e90d"; -} -.icon-play:before { - content: "\e912"; -} -.icon-location:before { - content: "\e947"; -} -.icon-undo:before { - content: "\e965"; -} -.icon-redo:before { - content: "\e966"; -} -.icon-quotes-left:before { - content: "\e977"; -} -.icon-list-numbered:before { - content: "\e9b9"; -} -.icon-list2:before { - content: "\e9bb"; -} -.icon-upload2:before { - content: "\e9c6"; -} -.icon-link:before { - content: "\e9cb"; -} -.icon-happy:before { - content: "\e9df"; -} -.icon-cancel-circle:before { - content: "\ea0d"; -} -.icon-bold:before { - content: "\ea62"; -} -.icon-underline:before { - content: "\ea63"; -} -.icon-italic:before { - content: "\ea64"; -} -.icon-strikethrough:before { - content: "\ea65"; -} -.icon-page-break:before { - content: "\ea68"; -} -.icon-table2:before { - content: "\ea71"; -} -.icon-paragraph-left:before { - content: "\ea77"; -} -.icon-paragraph-center:before { - content: "\ea78"; -} -.icon-paragraph-right:before { - content: "\ea79"; -} diff --git a/novel-front/src/main/resources/static/wangEditor/example/index.html b/novel-front/src/main/resources/static/wangEditor/example/index.html deleted file mode 100644 index 6f55c8b..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/index.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - wangEditor demo list - - - -
-

可访问 wangEditor 官网 了解更多内容

-
-

欢迎使用 wangEditor 富文本编辑器

-
- -

wangEditor demo list(demo页面直接查看网页源代码即可)

- - -

其他链接

-
- -
- -

向我捐赠

- -
- - - - - - \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/pay.png b/novel-front/src/main/resources/static/wangEditor/example/pay.png deleted file mode 100644 index 98efb8d..0000000 Binary files a/novel-front/src/main/resources/static/wangEditor/example/pay.png and /dev/null differ diff --git a/novel-front/src/main/resources/static/wangEditor/example/server/index.js b/novel-front/src/main/resources/static/wangEditor/example/server/index.js deleted file mode 100644 index 28d8a60..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/server/index.js +++ /dev/null @@ -1,88 +0,0 @@ -const fs = require('fs') -const path = require('path') -const formidable = require('formidable') -const util = require('./util.js') - -const koa = require('koa') -const app = koa() - -// 捕获错误 -const onerror = require('koa-onerror') -onerror(app) - -// post body 解析 -const bodyParser = require('koa-bodyparser') -app.use(bodyParser()) - -// 静态文件服务,针对 html js css fonts 文件 -const staticCache = require('koa-static-cache') -function setStaticCache() { - const exampleDir = path.join(__dirname, '..', '..', 'example') - const releaseDir = path.join(__dirname, '..', '..', 'release') - app.use(staticCache(exampleDir)) - app.use(staticCache(releaseDir)) -} -setStaticCache() - -// 配置路由 -const router = require('koa-router')() - -// 保存上传的文件 -function saveFiles(req) { - return new Promise((resolve, reject) => { - const imgLinks = [] - const form = new formidable.IncomingForm() - form.parse(req, function (err, fields, files) { - if (err) { - reject('formidable, form.parse err', err.stack) - } - // 存储图片的文件夹 - const storePath = path.resolve(__dirname, '..', 'upload-files') - if (!fs.existsSync(storePath)) { - fs.mkdirSync(storePath) - } - - // 遍历所有上传来的图片 - util.objForEach(files, (name, file) => { - // 图片临时位置 - const tempFilePath = file.path - // 图片名称和路径 - const fileName = file.name - const fullFileName = path.join(storePath, fileName) - // 将临时文件保存为正式文件 - fs.renameSync(tempFilePath, fullFileName) - // 存储链接 - imgLinks.push('/upload-files/' + fileName) - }) - - // 重新设置静态文件缓存 - setStaticCache() - - // 返回结果 - resolve({ - errno: 0, - data: imgLinks - }) - }) - }) -} - -// 上传图片 -router.post('/upload-img', function* () { - const ctx = this - const req = ctx.req - const res = ctx.res - - // 获取数据 - const data = yield saveFiles(req) - - // 返回结果 - this.body = JSON.stringify(data) -}) -app.use(router.routes()).use(router.allowedMethods()); - -// 启动服务 -app.listen(3000) -console.log('listening on port %s', 3000) - -module.exports = app \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/example/server/util.js b/novel-front/src/main/resources/static/wangEditor/example/server/util.js deleted file mode 100644 index 62477f2..0000000 --- a/novel-front/src/main/resources/static/wangEditor/example/server/util.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = { - // 遍历对象 - objForEach: function (obj, fn) { - let key, result - for (key in obj) { - if (obj.hasOwnProperty(key)) { - result = fn.call(obj, key, obj[key]) - if (result === false) { - break - } - } - } - } -} \ No newline at end of file diff --git a/novel-front/src/main/resources/static/wangEditor/gulpfile.js b/novel-front/src/main/resources/static/wangEditor/gulpfile.js deleted file mode 100644 index 171e7e5..0000000 --- a/novel-front/src/main/resources/static/wangEditor/gulpfile.js +++ /dev/null @@ -1,122 +0,0 @@ -const path = require('path') -const fs = require('fs') -const gulp = require('gulp') -const rollup = require('rollup') -const uglify = require('gulp-uglify') -const sourcemaps = require('gulp-sourcemaps') -const rename = require('gulp-rename') -const less = require('gulp-less') -const concat = require('gulp-concat') -const cssmin = require('gulp-cssmin') -const eslint = require('rollup-plugin-eslint') -const postcss = require('gulp-postcss') -const autoprefixer = require('autoprefixer') -const cssgrace = require('cssgrace') -const resolve = require('rollup-plugin-node-resolve') -const babel = require('rollup-plugin-babel') -const gulpReplace = require('gulp-replace') - -// 拷贝 fonts 文件 -gulp.task('copy-fonts', () => { - gulp.src('./src/fonts/*') - .pipe(gulp.dest('./release/fonts')) -}) - -// 处理 css -gulp.task('css', () => { - gulp.src('./src/less/**/*.less') - .pipe(less()) - // 产出的未压缩的文件名 - .pipe(concat('wangEditor.css')) - // 配置 postcss - .pipe(postcss([ - autoprefixer, - cssgrace - ])) - // 将 css 引用的字体文件转换为 base64 格式 - .pipe(gulpReplace( /'fonts\/w-e-icon\..+?'/gm, function (fontFile) { - // fontFile 例如 'fonts/w-e-icon.eot?paxlku' - fontFile = fontFile.slice(0, -1).slice(1) - fontFile = fontFile.split('?')[0] - var ext = fontFile.split('.')[1] - // 读取文件内容,转换为 base64 格式 - var filePath = path.resolve(__dirname, 'release', fontFile) - var content = fs.readFileSync(filePath) - var base64 = content.toString('base64') - // 返回 - return 'data:application/x-font-' + ext + ';charset=utf-8;base64,' + base64 - })) - // 产出文件的位置 - .pipe(gulp.dest('./release')) - // 产出的压缩后的文件名 - .pipe(rename('wangEditor.min.css')) - .pipe(cssmin()) - .pipe(gulp.dest('./release')) -}) - -// 处理 JS -gulp.task('script', () => { - // rollup 打包 js 模块 - return rollup.rollup({ - // 入口文件 - entry: './src/js/index.js', - plugins: [ - // 对原始文件启动 eslint 检查,配置参见 ./.eslintrc.json - eslint(), - resolve(), - babel({ - exclude: 'node_modules/**' // only transpile our source code - }) - ] - }).then(bundle => { - bundle.write({ - // 产出文件使用 umd 规范(即兼容 amd cjs 和 iife) - format: 'umd', - // iife 规范下的全局变量名称 - moduleName: 'wangEditor', - // 产出的未压缩的文件名 - dest: './release/wangEditor.js' - }).then(() => { - // 待 rollup 打包 js 完毕之后,再进行如下的处理: - gulp.src('./release/wangEditor.js') - // inline css - .pipe(gulpReplace(/__INLINE_CSS__/gm, function () { - // 读取 css 文件内容 - var filePath = path.resolve(__dirname, 'release', 'wangEditor.css') - var content = fs.readFileSync(filePath).toString('utf-8') - // 替换 \n \ ' 三个字符 - content = content.replace(/\n/g, '').replace(/\\/g, '\\\\').replace(/'/g, '\\\'') - return content - })) - .pipe(gulp.dest('./release')) - .pipe(sourcemaps.init()) - // 压缩 - .pipe(uglify()) - // 产出的压缩的文件名 - .pipe(rename('wangEditor.min.js')) - // 生成 sourcemap - .pipe(sourcemaps.write('')) - .pipe(gulp.dest('./release')) - }) - }) -}) - - -// 默认任务配置 -gulp.task('default', () => { - gulp.run('copy-fonts', 'css', 'script') - - // 监听 js 原始文件的变化 - gulp.watch('./src/js/**/*.js', () => { - gulp.run('script') - }) - // 监听 css 原始文件的变化 - gulp.watch('./src/less/**/*.less', () => { - gulp.run('css', 'script') - }) - // 监听 icon.less 的变化,变化时重新拷贝 fonts 文件 - gulp.watch('./src/less/icon.less', () => { - gulp.run('copy-fonts') - }) -}) - diff --git a/novel-front/src/main/resources/static/wangEditor/package.json b/novel-front/src/main/resources/static/wangEditor/package.json deleted file mode 100644 index b42d94d..0000000 --- a/novel-front/src/main/resources/static/wangEditor/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "wangeditor", - "title": "wangEditor", - "version": "3.0.17", - "description": "wangEditor - 基于javascript和css开发的 web 富文本编辑器, 轻量、简洁、易用、开源免费", - "homepage": "http://wangeditor.github.io/", - "author": { - "name": "wangfupeng1988", - "url": "https://github.com/wangfupeng1988" - }, - "keywords": [ - "wangEditor", - "web 富文本编辑器" - ], - "main": "release/wangEditor.js", - "maintainers": [ - { - "name": "wangfupeng1988", - "web": "http://www.cnblogs.com/wangfupeng1988/default.html?OnlyTitle=1", - "mail": "wangfupeng1988@163.com" - } - ], - "repositories": [ - { - "type": "git", - "url": "https://github.com/wangfupeng1988/wangEditor" - } - ], - "scripts": { - "release": "gulp", - "win-example": "node ./example/server/index.js", - "example": "/bin/rm -rf ./example/upload-files && mkdir ./example/upload-files && npm run win-example" - }, - "devDependencies": { - "autoprefixer": "^6.7.7", - "babel-plugin-external-helpers": "^6.22.0", - "babel-preset-latest": "^6.24.0", - "cssgrace": "^3.0.0", - "formidable": "^1.1.1", - "gulp": "^3.9.1", - "gulp-concat": "^2.6.1", - "gulp-cssmin": "^0.1.7", - "gulp-less": "^3.3.0", - "gulp-postcss": "^6.4.0", - "gulp-rename": "^1.2.2", - "gulp-replace": "^0.5.4", - "gulp-sourcemaps": "^2.5.0", - "gulp-uglify": "^2.1.2", - "koa": "^1.2.4", - "koa-bodyparser": "^2.3.0", - "koa-onerror": "^3.1.0", - "koa-router": "^5.4.0", - "koa-static-cache": "^4.0.0", - "rollup": "^0.41.6", - "rollup-plugin-babel": "^2.7.1", - "rollup-plugin-eslint": "^3.0.0", - "rollup-plugin-node-resolve": "^3.0.0" - }, - "dependencies": {} -} diff --git a/novel-front/src/main/resources/static/wangEditor/release/fonts/w-e-icon.woff b/novel-front/src/main/resources/static/wangEditor/release/fonts/w-e-icon.woff deleted file mode 100644 index fa64c4d..0000000 Binary files a/novel-front/src/main/resources/static/wangEditor/release/fonts/w-e-icon.woff and /dev/null differ diff --git a/novel-front/src/main/resources/static/wangEditor/release/wangEditor.css b/novel-front/src/main/resources/static/wangEditor/release/wangEditor.css deleted file mode 100644 index 78a4c41..0000000 --- a/novel-front/src/main/resources/static/wangEditor/release/wangEditor.css +++ /dev/null @@ -1,405 +0,0 @@ -.w-e-toolbar, -.w-e-text-container, -.w-e-menu-panel { - padding: 0; - margin: 0; - box-sizing: border-box; -} -.w-e-toolbar *, -.w-e-text-container *, -.w-e-menu-panel * { - padding: 0; - margin: 0; - box-sizing: border-box; -} -.w-e-clear-fix:after { - content: ""; - display: table; - clear: both; -} - -.w-e-toolbar .w-e-droplist { - position: absolute; - left: 0; - top: 0; - background-color: #fff; - border: 1px solid #f1f1f1; - border-right-color: #ccc; - border-bottom-color: #ccc; -} -.w-e-toolbar .w-e-droplist .w-e-dp-title { - text-align: center; - color: #999; - line-height: 2; - border-bottom: 1px solid #f1f1f1; - font-size: 13px; -} -.w-e-toolbar .w-e-droplist ul.w-e-list { - list-style: none; - line-height: 1; -} -.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item { - color: #333; - padding: 5px 0; -} -.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item:hover { - background-color: #f1f1f1; -} -.w-e-toolbar .w-e-droplist ul.w-e-block { - list-style: none; - text-align: left; - padding: 5px; -} -.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item { - display: inline-block; - *display: inline; - *zoom: 1; - padding: 3px 5px; -} -.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item:hover { - background-color: #f1f1f1; -} - -@font-face { - font-family: 'w-e-icon'; - src: url(data:application/x-font-woff;charset=utf-8;base64,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) format('truetype'); - font-weight: normal; - font-style: normal; -} -[class^="w-e-icon-"], -[class*=" w-e-icon-"] { - /* use !important to prevent issues with browser extensions that change fonts */ - font-family: 'w-e-icon' !important; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - /* Better Font Rendering =========== */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} -.w-e-icon-close:before { - content: "\f00d"; -} -.w-e-icon-upload2:before { - content: "\e9c6"; -} -.w-e-icon-trash-o:before { - content: "\f014"; -} -.w-e-icon-header:before { - content: "\f1dc"; -} -.w-e-icon-pencil2:before { - content: "\e906"; -} -.w-e-icon-paint-brush:before { - content: "\f1fc"; -} -.w-e-icon-image:before { - content: "\e90d"; -} -.w-e-icon-play:before { - content: "\e912"; -} -.w-e-icon-location:before { - content: "\e947"; -} -.w-e-icon-undo:before { - content: "\e965"; -} -.w-e-icon-redo:before { - content: "\e966"; -} -.w-e-icon-quotes-left:before { - content: "\e977"; -} -.w-e-icon-list-numbered:before { - content: "\e9b9"; -} -.w-e-icon-list2:before { - content: "\e9bb"; -} -.w-e-icon-link:before { - content: "\e9cb"; -} -.w-e-icon-happy:before { - content: "\e9df"; -} -.w-e-icon-bold:before { - content: "\ea62"; -} -.w-e-icon-underline:before { - content: "\ea63"; -} -.w-e-icon-italic:before { - content: "\ea64"; -} -.w-e-icon-strikethrough:before { - content: "\ea65"; -} -.w-e-icon-table2:before { - content: "\ea71"; -} -.w-e-icon-paragraph-left:before { - content: "\ea77"; -} -.w-e-icon-paragraph-center:before { - content: "\ea78"; -} -.w-e-icon-paragraph-right:before { - content: "\ea79"; -} -.w-e-icon-terminal:before { - content: "\f120"; -} -.w-e-icon-page-break:before { - content: "\ea68"; -} -.w-e-icon-cancel-circle:before { - content: "\ea0d"; -} - -.w-e-toolbar { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - padding: 0 5px; - /* flex-wrap: wrap; */ - /* 单个菜单 */ -} -.w-e-toolbar .w-e-menu { - position: relative; - text-align: center; - padding: 5px 10px; - cursor: pointer; -} -.w-e-toolbar .w-e-menu i { - color: #999; -} -.w-e-toolbar .w-e-menu:hover i { - color: #333; -} -.w-e-toolbar .w-e-active i { - color: #1e88e5; -} -.w-e-toolbar .w-e-active:hover i { - color: #1e88e5; -} - -.w-e-text-container .w-e-panel-container { - position: absolute; - top: 0; - left: 50%; - border: 1px solid #ccc; - border-top: 0; - box-shadow: 1px 1px 2px #ccc; - color: #333; - background-color: #fff; - /* 为 emotion panel 定制的样式 */ - /* 上传图片的 panel 定制样式 */ -} -.w-e-text-container .w-e-panel-container .w-e-panel-close { - position: absolute; - right: 0; - top: 0; - padding: 5px; - margin: 2px 5px 0 0; - cursor: pointer; - color: #999; -} -.w-e-text-container .w-e-panel-container .w-e-panel-close:hover { - color: #333; -} -.w-e-text-container .w-e-panel-container .w-e-panel-tab-title { - list-style: none; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - font-size: 14px; - margin: 2px 10px 0 10px; - border-bottom: 1px solid #f1f1f1; -} -.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-item { - padding: 3px 5px; - color: #999; - cursor: pointer; - margin: 0 3px; - position: relative; - top: 1px; -} -.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-active { - color: #333; - border-bottom: 1px solid #333; - cursor: default; - font-weight: 700; -} -.w-e-text-container .w-e-panel-container .w-e-panel-tab-content { - padding: 10px 15px 10px 15px; - font-size: 16px; - /* 输入框的样式 */ - /* 按钮的样式 */ -} -.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input:focus, -.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus, -.w-e-text-container .w-e-panel-container .w-e-panel-tab-content button:focus { - outline: none; -} -.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea { - width: 100%; - border: 1px solid #ccc; - padding: 5px; -} -.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus { - border-color: #1e88e5; -} -.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text] { - border: none; - border-bottom: 1px solid #ccc; - font-size: 14px; - height: 20px; - color: #333; - text-align: left; -} -.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].small { - width: 30px; - text-align: center; -} -.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].block { - display: block; - width: 100%; - margin: 10px 0; -} -.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text]:focus { - border-bottom: 2px solid #1e88e5; -} -.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button { - font-size: 14px; - color: #1e88e5; - border: none; - padding: 5px 10px; - background-color: #fff; - cursor: pointer; - border-radius: 3px; -} -.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.left { - float: left; - margin-right: 10px; -} -.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.right { - float: right; - margin-left: 10px; -} -.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.gray { - color: #999; -} -.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.red { - color: #c24f4a; -} -.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button:hover { - background-color: #f1f1f1; -} -.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container:after { - content: ""; - display: table; - clear: both; -} -.w-e-text-container .w-e-panel-container .w-e-emoticon-container .w-e-item { - cursor: pointer; - font-size: 18px; - padding: 0 3px; - display: inline-block; - *display: inline; - *zoom: 1; -} -.w-e-text-container .w-e-panel-container .w-e-up-img-container { - text-align: center; -} -.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn { - display: inline-block; - *display: inline; - *zoom: 1; - color: #999; - cursor: pointer; - font-size: 60px; - line-height: 1; -} -.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn:hover { - color: #333; -} - -.w-e-text-container { - position: relative; -} -.w-e-text-container .w-e-progress { - position: absolute; - background-color: #1e88e5; - bottom: 0; - left: 0; - height: 1px; -} -.w-e-text { - padding: 0 10px; - overflow-y: scroll; -} -.w-e-text p, -.w-e-text h1, -.w-e-text h2, -.w-e-text h3, -.w-e-text h4, -.w-e-text h5, -.w-e-text table, -.w-e-text pre { - margin: 10px 0; - line-height: 1.5; -} -.w-e-text ul, -.w-e-text ol { - margin: 10px 0 10px 20px; -} -.w-e-text blockquote { - display: block; - border-left: 8px solid #d0e5f2; - padding: 5px 10px; - margin: 10px 0; - line-height: 1.4; - font-size: 100%; - background-color: #f1f1f1; -} -.w-e-text code { - display: inline-block; - *display: inline; - *zoom: 1; - background-color: #f1f1f1; - border-radius: 3px; - padding: 3px 5px; - margin: 0 3px; -} -.w-e-text pre code { - display: block; -} -.w-e-text table { - border-top: 1px solid #ccc; - border-left: 1px solid #ccc; -} -.w-e-text table td, -.w-e-text table th { - border-bottom: 1px solid #ccc; - border-right: 1px solid #ccc; - padding: 3px 5px; -} -.w-e-text table th { - border-bottom: 2px solid #ccc; - text-align: center; -} -.w-e-text:focus { - outline: none; -} -.w-e-text img { - cursor: pointer; -} -.w-e-text img:hover { - box-shadow: 0 0 5px #333; -} diff --git a/novel-front/src/main/resources/static/wangEditor/release/wangEditor.js b/novel-front/src/main/resources/static/wangEditor/release/wangEditor.js deleted file mode 100644 index ea701f1..0000000 --- a/novel-front/src/main/resources/static/wangEditor/release/wangEditor.js +++ /dev/null @@ -1,4679 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global.wangEditor = factory()); -}(this, (function () { 'use strict'; - -/* - poly-fill -*/ - -var polyfill = function () { - - // Object.assign - if (typeof Object.assign != 'function') { - Object.assign = function (target, varArgs) { - // .length of function is 2 - if (target == null) { - // TypeError if undefined or null - throw new TypeError('Cannot convert undefined or null to object'); - } - - var to = Object(target); - - for (var index = 1; index < arguments.length; index++) { - var nextSource = arguments[index]; - - if (nextSource != null) { - // Skip over if undefined or null - for (var nextKey in nextSource) { - // Avoid bugs when hasOwnProperty is shadowed - if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { - to[nextKey] = nextSource[nextKey]; - } - } - } - } - return to; - }; - } - - // IE 中兼容 Element.prototype.matches - if (!Element.prototype.matches) { - Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function (s) { - var matches = (this.document || this.ownerDocument).querySelectorAll(s), - i = matches.length; - while (--i >= 0 && matches.item(i) !== this) {} - return i > -1; - }; - } -}; - -/* - DOM 操作 API -*/ - -// 根据 html 代码片段创建 dom 对象 -function createElemByHTML(html) { - var div = void 0; - div = document.createElement('div'); - div.innerHTML = html; - return div.children; -} - -// 是否是 DOM List -function isDOMList(selector) { - if (!selector) { - return false; - } - if (selector instanceof HTMLCollection || selector instanceof NodeList) { - return true; - } - return false; -} - -// 封装 document.querySelectorAll -function querySelectorAll(selector) { - var result = document.querySelectorAll(selector); - if (isDOMList(result)) { - return result; - } else { - return [result]; - } -} - -// 记录所有的事件绑定 -var eventList = []; - -// 创建构造函数 -function DomElement(selector) { - if (!selector) { - return; - } - - // selector 本来就是 DomElement 对象,直接返回 - if (selector instanceof DomElement) { - return selector; - } - - this.selector = selector; - var nodeType = selector.nodeType; - - // 根据 selector 得出的结果(如 DOM,DOM List) - var selectorResult = []; - if (nodeType === 9) { - // document 节点 - selectorResult = [selector]; - } else if (nodeType === 1) { - // 单个 DOM 节点 - selectorResult = [selector]; - } else if (isDOMList(selector) || selector instanceof Array) { - // DOM List 或者数组 - selectorResult = selector; - } else if (typeof selector === 'string') { - // 字符串 - selector = selector.replace('/\n/mg', '').trim(); - if (selector.indexOf('<') === 0) { - // 如
- selectorResult = createElemByHTML(selector); - } else { - // 如 #id .class - selectorResult = querySelectorAll(selector); - } - } - - var length = selectorResult.length; - if (!length) { - // 空数组 - return this; - } - - // 加入 DOM 节点 - var i = void 0; - for (i = 0; i < length; i++) { - this[i] = selectorResult[i]; - } - this.length = length; -} - -// 修改原型 -DomElement.prototype = { - constructor: DomElement, - - // 类数组,forEach - forEach: function forEach(fn) { - var i = void 0; - for (i = 0; i < this.length; i++) { - var elem = this[i]; - var result = fn.call(elem, elem, i); - if (result === false) { - break; - } - } - return this; - }, - - // clone - clone: function clone(deep) { - var cloneList = []; - this.forEach(function (elem) { - cloneList.push(elem.cloneNode(!!deep)); - }); - return $(cloneList); - }, - - // 获取第几个元素 - get: function get(index) { - var length = this.length; - if (index >= length) { - index = index % length; - } - return $(this[index]); - }, - - // 第一个 - first: function first() { - return this.get(0); - }, - - // 最后一个 - last: function last() { - var length = this.length; - return this.get(length - 1); - }, - - // 绑定事件 - on: function on(type, selector, fn) { - // selector 不为空,证明绑定事件要加代理 - if (!fn) { - fn = selector; - selector = null; - } - - // type 是否有多个 - var types = []; - types = type.split(/\s+/); - - return this.forEach(function (elem) { - types.forEach(function (type) { - if (!type) { - return; - } - - // 记录下,方便后面解绑 - eventList.push({ - elem: elem, - type: type, - fn: fn - }); - - if (!selector) { - // 无代理 - elem.addEventListener(type, fn); - return; - } - - // 有代理 - elem.addEventListener(type, function (e) { - var target = e.target; - if (target.matches(selector)) { - fn.call(target, e); - } - }); - }); - }); - }, - - // 取消事件绑定 - off: function off(type, fn) { - return this.forEach(function (elem) { - elem.removeEventListener(type, fn); - }); - }, - - // 获取/设置 属性 - attr: function attr(key, val) { - if (val == null) { - // 获取值 - return this[0].getAttribute(key); - } else { - // 设置值 - return this.forEach(function (elem) { - elem.setAttribute(key, val); - }); - } - }, - - // 添加 class - addClass: function addClass(className) { - if (!className) { - return this; - } - return this.forEach(function (elem) { - var arr = void 0; - if (elem.className) { - // 解析当前 className 转换为数组 - arr = elem.className.split(/\s/); - arr = arr.filter(function (item) { - return !!item.trim(); - }); - // 添加 class - if (arr.indexOf(className) < 0) { - arr.push(className); - } - // 修改 elem.class - elem.className = arr.join(' '); - } else { - elem.className = className; - } - }); - }, - - // 删除 class - removeClass: function removeClass(className) { - if (!className) { - return this; - } - return this.forEach(function (elem) { - var arr = void 0; - if (elem.className) { - // 解析当前 className 转换为数组 - arr = elem.className.split(/\s/); - arr = arr.filter(function (item) { - item = item.trim(); - // 删除 class - if (!item || item === className) { - return false; - } - return true; - }); - // 修改 elem.class - elem.className = arr.join(' '); - } - }); - }, - - // 修改 css - css: function css(key, val) { - var currentStyle = key + ':' + val + ';'; - return this.forEach(function (elem) { - var style = (elem.getAttribute('style') || '').trim(); - var styleArr = void 0, - resultArr = []; - if (style) { - // 将 style 按照 ; 拆分为数组 - styleArr = style.split(';'); - styleArr.forEach(function (item) { - // 对每项样式,按照 : 拆分为 key 和 value - var arr = item.split(':').map(function (i) { - return i.trim(); - }); - if (arr.length === 2) { - resultArr.push(arr[0] + ':' + arr[1]); - } - }); - // 替换或者新增 - resultArr = resultArr.map(function (item) { - if (item.indexOf(key) === 0) { - return currentStyle; - } else { - return item; - } - }); - if (resultArr.indexOf(currentStyle) < 0) { - resultArr.push(currentStyle); - } - // 结果 - elem.setAttribute('style', resultArr.join('; ')); - } else { - // style 无值 - elem.setAttribute('style', currentStyle); - } - }); - }, - - // 显示 - show: function show() { - return this.css('display', 'block'); - }, - - // 隐藏 - hide: function hide() { - return this.css('display', 'none'); - }, - - // 获取子节点 - children: function children() { - var elem = this[0]; - if (!elem) { - return null; - } - - return $(elem.children); - }, - - // 获取子节点(包括文本节点) - childNodes: function childNodes() { - var elem = this[0]; - if (!elem) { - return null; - } - - return $(elem.childNodes); - }, - - // 增加子节点 - append: function append($children) { - return this.forEach(function (elem) { - $children.forEach(function (child) { - elem.appendChild(child); - }); - }); - }, - - // 移除当前节点 - remove: function remove() { - return this.forEach(function (elem) { - if (elem.remove) { - elem.remove(); - } else { - var parent = elem.parentElement; - parent && parent.removeChild(elem); - } - }); - }, - - // 是否包含某个子节点 - isContain: function isContain($child) { - var elem = this[0]; - var child = $child[0]; - return elem.contains(child); - }, - - // 尺寸数据 - getSizeData: function getSizeData() { - var elem = this[0]; - return elem.getBoundingClientRect(); // 可得到 bottom height left right top width 的数据 - }, - - // 封装 nodeName - getNodeName: function getNodeName() { - var elem = this[0]; - return elem.nodeName; - }, - - // 从当前元素查找 - find: function find(selector) { - var elem = this[0]; - return $(elem.querySelectorAll(selector)); - }, - - // 获取当前元素的 text - text: function text(val) { - if (!val) { - // 获取 text - var elem = this[0]; - return elem.innerHTML.replace(/<.*?>/g, function () { - return ''; - }); - } else { - // 设置 text - return this.forEach(function (elem) { - elem.innerHTML = val; - }); - } - }, - - // 获取 html - html: function html(value) { - var elem = this[0]; - if (value == null) { - return elem.innerHTML; - } else { - elem.innerHTML = value; - return this; - } - }, - - // 获取 value - val: function val() { - var elem = this[0]; - return elem.value.trim(); - }, - - // focus - focus: function focus() { - return this.forEach(function (elem) { - elem.focus(); - }); - }, - - // parent - parent: function parent() { - var elem = this[0]; - return $(elem.parentElement); - }, - - // parentUntil 找到符合 selector 的父节点 - parentUntil: function parentUntil(selector, _currentElem) { - var results = document.querySelectorAll(selector); - var length = results.length; - if (!length) { - // 传入的 selector 无效 - return null; - } - - var elem = _currentElem || this[0]; - if (elem.nodeName === 'BODY') { - return null; - } - - var parent = elem.parentElement; - var i = void 0; - for (i = 0; i < length; i++) { - if (parent === results[i]) { - // 找到,并返回 - return $(parent); - } - } - - // 继续查找 - return this.parentUntil(selector, parent); - }, - - // 判断两个 elem 是否相等 - equal: function equal($elem) { - if ($elem.nodeType === 1) { - return this[0] === $elem; - } else { - return this[0] === $elem[0]; - } - }, - - // 将该元素插入到某个元素前面 - insertBefore: function insertBefore(selector) { - var $referenceNode = $(selector); - var referenceNode = $referenceNode[0]; - if (!referenceNode) { - return this; - } - return this.forEach(function (elem) { - var parent = referenceNode.parentNode; - parent.insertBefore(elem, referenceNode); - }); - }, - - // 将该元素插入到某个元素后面 - insertAfter: function insertAfter(selector) { - var $referenceNode = $(selector); - var referenceNode = $referenceNode[0]; - if (!referenceNode) { - return this; - } - return this.forEach(function (elem) { - var parent = referenceNode.parentNode; - if (parent.lastChild === referenceNode) { - // 最后一个元素 - parent.appendChild(elem); - } else { - // 不是最后一个元素 - parent.insertBefore(elem, referenceNode.nextSibling); - } - }); - } -}; - -// new 一个对象 -function $(selector) { - return new DomElement(selector); -} - -// 解绑所有事件,用于销毁编辑器 -$.offAll = function () { - eventList.forEach(function (item) { - var elem = item.elem; - var type = item.type; - var fn = item.fn; - // 解绑 - elem.removeEventListener(type, fn); - }); -}; - -/* - 配置信息 -*/ - -var config = { - - // 默认菜单配置 - menus: ['head', 'bold', 'italic', 'underline', 'strikeThrough', 'foreColor', 'backColor', 'link', 'list', 'justify', 'quote', 'emoticon', 'image', 'table', 'video', 'code', 'undo', 'redo'], - - colors: ['#000000', '#eeece0', '#1c487f', '#4d80bf', '#c24f4a', '#8baa4a', '#7b5ba1', '#46acc8', '#f9963b', '#ffffff'], - - // // 语言配置 - // lang: { - // '设置标题': 'title', - // '正文': 'p', - // '链接文字': 'link text', - // '链接': 'link', - // '插入': 'insert', - // '创建': 'init' - // }, - - // 表情 - emotions: [{ - // tab 的标题 - title: '默认', - // type -> 'emoji' / 'image' - type: 'image', - // content -> 数组 - content: [{ - alt: '[坏笑]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/50/pcmoren_huaixiao_org.png' - }, { - alt: '[舔屏]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/pcmoren_tian_org.png' - }, { - alt: '[污]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3c/pcmoren_wu_org.png' - }, { - alt: '[允悲]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/2c/moren_yunbei_org.png' - }, { - alt: '[笑而不语]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3a/moren_xiaoerbuyu_org.png' - }, { - alt: '[费解]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3c/moren_feijie_org.png' - }, { - alt: '[憧憬]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/37/moren_chongjing_org.png' - }, { - alt: '[并不简单]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/fc/moren_bbjdnew_org.png' - }, { - alt: '[微笑]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/5c/huanglianwx_org.gif' - }, { - alt: '[酷]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/8a/pcmoren_cool2017_org.png' - }, { - alt: '[嘻嘻]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0b/tootha_org.gif' - }, { - alt: '[哈哈]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6a/laugh.gif' - }, { - alt: '[可爱]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/14/tza_org.gif' - }, { - alt: '[可怜]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/af/kl_org.gif' - }, { - alt: '[挖鼻]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0b/wabi_org.gif' - }, { - alt: '[吃惊]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/f4/cj_org.gif' - }, { - alt: '[害羞]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6e/shamea_org.gif' - }, { - alt: '[挤眼]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c3/zy_org.gif' - }, { - alt: '[闭嘴]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/29/bz_org.gif' - }, { - alt: '[鄙视]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/71/bs2_org.gif' - }, { - alt: '[爱你]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6d/lovea_org.gif' - }, { - alt: '[泪]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/9d/sada_org.gif' - }, { - alt: '[偷笑]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/19/heia_org.gif' - }, { - alt: '[亲亲]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/8f/qq_org.gif' - }, { - alt: '[生病]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/b6/sb_org.gif' - }, { - alt: '[太开心]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/58/mb_org.gif' - }, { - alt: '[白眼]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d9/landeln_org.gif' - }, { - alt: '[右哼哼]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/98/yhh_org.gif' - }, { - alt: '[左哼哼]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6d/zhh_org.gif' - }, { - alt: '[嘘]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a6/x_org.gif' - }, { - alt: '[衰]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/af/cry.gif' - }] - }, { - // tab 的标题 - title: '新浪', - // type -> 'emoji' / 'image' - type: 'image', - // content -> 数组 - content: [{ - src: 'http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/7a/shenshou_thumb.gif', - alt: '[草泥马]' - }, { - src: 'http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/60/horse2_thumb.gif', - alt: '[神马]' - }, { - src: 'http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/bc/fuyun_thumb.gif', - alt: '[浮云]' - }, { - src: 'http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/c9/geili_thumb.gif', - alt: '[给力]' - }, { - src: 'http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/f2/wg_thumb.gif', - alt: '[围观]' - }, { - src: 'http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/70/vw_thumb.gif', - alt: '[威武]' - }, { - src: 'http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/6e/panda_thumb.gif', - alt: '[熊猫]' - }, { - src: 'http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/81/rabbit_thumb.gif', - alt: '[兔子]' - }, { - src: 'http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/bc/otm_thumb.gif', - alt: '[奥特曼]' - }, { - src: 'http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/15/j_thumb.gif', - alt: '[囧]' - }, { - src: 'http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/89/hufen_thumb.gif', - alt: '[互粉]' - }, { - src: 'http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/c4/liwu_thumb.gif', - alt: '[礼物]' - }] - }, { - // tab 的标题 - title: 'emoji', - // type -> 'emoji' / 'image' - type: 'emoji', - // content -> 数组 - content: '😀 😃 😄 😁 😆 😅 😂 😊 😇 🙂 🙃 😉 😌 😍 😘 😗 😙 😚 😋 😜 😝 😛 🤑 🤗 🤓 😎 😏 😒 😞 😔 😟 😕 🙁 😣 😖 😫 😩 😤 😠 😡 😶 😐 😑 😯 😦 😧 😮 😲 😵 😳 😱 😨 😰 😢 😥 😭 😓 😪 😴 🙄 🤔 😬 🤐'.split(/\s/) - }], - - // 编辑区域的 z-index - zIndex: 10000, - - // 是否开启 debug 模式(debug 模式下错误会 throw error 形式抛出) - debug: false, - - // 插入链接时候的格式校验 - linkCheck: function linkCheck(text, link) { - // text 是插入的文字 - // link 是插入的链接 - return true; // 返回 true 即表示成功 - // return '校验失败' // 返回字符串即表示失败的提示信息 - }, - - // 插入网络图片的校验 - linkImgCheck: function linkImgCheck(src) { - // src 即图片的地址 - return true; // 返回 true 即表示成功 - // return '校验失败' // 返回字符串即表示失败的提示信息 - }, - - // 粘贴过滤样式,默认开启 - pasteFilterStyle: true, - - // 对粘贴的文字进行自定义处理,返回处理后的结果。编辑器会将处理后的结果粘贴到编辑区域中。 - // IE 暂时不支持 - pasteTextHandle: function pasteTextHandle(content) { - // content 即粘贴过来的内容(html 或 纯文本),可进行自定义处理然后返回 - return content; - }, - - // onchange 事件 - // onchange: function (html) { - // // html 即变化之后的内容 - // console.log(html) - // }, - - // 是否显示添加网络图片的 tab - showLinkImg: true, - - // 插入网络图片的回调 - linkImgCallback: function linkImgCallback(url) { - // console.log(url) // url 即插入图片的地址 - }, - - // 默认上传图片 max size: 5M - uploadImgMaxSize: 5 * 1024 * 1024, - - // 配置一次最多上传几个图片 - // uploadImgMaxLength: 5, - - // 上传图片,是否显示 base64 格式 - uploadImgShowBase64: false, - - // 上传图片,server 地址(如果有值,则 base64 格式的配置则失效) - // uploadImgServer: '/upload', - - // 自定义配置 filename - uploadFileName: '', - - // 上传图片的自定义参数 - uploadImgParams: { - // token: 'abcdef12345' - }, - - // 上传图片的自定义header - uploadImgHeaders: { - // 'Accept': 'text/x-json' - }, - - // 配置 XHR withCredentials - withCredentials: false, - - // 自定义上传图片超时时间 ms - uploadImgTimeout: 10000, - - // 上传图片 hook - uploadImgHooks: { - // customInsert: function (insertLinkImg, result, editor) { - // console.log('customInsert') - // // 图片上传并返回结果,自定义插入图片的事件,而不是编辑器自动插入图片 - // const data = result.data1 || [] - // data.forEach(link => { - // insertLinkImg(link) - // }) - // }, - before: function before(xhr, editor, files) { - // 图片上传之前触发 - - // 如果返回的结果是 {prevent: true, msg: 'xxxx'} 则表示用户放弃上传 - // return { - // prevent: true, - // msg: '放弃上传' - // } - }, - success: function success(xhr, editor, result) { - // 图片上传并返回结果,图片插入成功之后触发 - }, - fail: function fail(xhr, editor, result) { - // 图片上传并返回结果,但图片插入错误时触发 - }, - error: function error(xhr, editor) { - // 图片上传出错时触发 - }, - timeout: function timeout(xhr, editor) { - // 图片上传超时时触发 - } - }, - - // 是否上传七牛云,默认为 false - qiniu: false - -}; - -/* - 工具 -*/ - -// 和 UA 相关的属性 -var UA = { - _ua: navigator.userAgent, - - // 是否 webkit - isWebkit: function isWebkit() { - var reg = /webkit/i; - return reg.test(this._ua); - }, - - // 是否 IE - isIE: function isIE() { - return 'ActiveXObject' in window; - } -}; - -// 遍历对象 -function objForEach(obj, fn) { - var key = void 0, - result = void 0; - for (key in obj) { - if (obj.hasOwnProperty(key)) { - result = fn.call(obj, key, obj[key]); - if (result === false) { - break; - } - } - } -} - -// 遍历类数组 -function arrForEach(fakeArr, fn) { - var i = void 0, - item = void 0, - result = void 0; - var length = fakeArr.length || 0; - for (i = 0; i < length; i++) { - item = fakeArr[i]; - result = fn.call(fakeArr, item, i); - if (result === false) { - break; - } - } -} - -// 获取随机数 -function getRandom(prefix) { - return prefix + Math.random().toString().slice(2); -} - -// 替换 html 特殊字符 -function replaceHtmlSymbol(html) { - if (html == null) { - return ''; - } - return html.replace(//gm, '>').replace(/"/gm, '"'); -} - -// 返回百分比的格式 - - -// 判断是不是 function -function isFunction(fn) { - return typeof fn === 'function'; -} - -/* - bold-menu -*/ -// 构造函数 -function Bold(editor) { - this.editor = editor; - this.$elem = $('
\n \n
'); - this.type = 'click'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Bold.prototype = { - constructor: Bold, - - // 点击事件 - onClick: function onClick(e) { - // 点击菜单将触发这里 - - var editor = this.editor; - var isSeleEmpty = editor.selection.isSelectionEmpty(); - - if (isSeleEmpty) { - // 选区是空的,插入并选中一个“空白” - editor.selection.createEmptyRange(); - } - - // 执行 bold 命令 - editor.cmd.do('bold'); - - if (isSeleEmpty) { - // 需要将选取折叠起来 - editor.selection.collapseRange(); - editor.selection.restoreSelection(); - } - }, - - // 试图改变 active 状态 - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - if (editor.cmd.queryCommandState('bold')) { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - 替换多语言 - */ - -var replaceLang = function (editor, str) { - var langArgs = editor.config.langArgs || []; - var result = str; - - langArgs.forEach(function (item) { - var reg = item.reg; - var val = item.val; - - if (reg.test(result)) { - result = result.replace(reg, function () { - return val; - }); - } - }); - - return result; -}; - -/* - droplist -*/ -var _emptyFn = function _emptyFn() {}; - -// 构造函数 -function DropList(menu, opt) { - var _this = this; - - // droplist 所依附的菜单 - var editor = menu.editor; - this.menu = menu; - this.opt = opt; - // 容器 - var $container = $('
'); - - // 标题 - var $title = opt.$title; - var titleHtml = void 0; - if ($title) { - // 替换多语言 - titleHtml = $title.html(); - titleHtml = replaceLang(editor, titleHtml); - $title.html(titleHtml); - - $title.addClass('w-e-dp-title'); - $container.append($title); - } - - var list = opt.list || []; - var type = opt.type || 'list'; // 'list' 列表形式(如“标题”菜单) / 'inline-block' 块状形式(如“颜色”菜单) - var onClick = opt.onClick || _emptyFn; - - // 加入 DOM 并绑定事件 - var $list = $('
    '); - $container.append($list); - list.forEach(function (item) { - var $elem = item.$elem; - - // 替换多语言 - var elemHtml = $elem.html(); - elemHtml = replaceLang(editor, elemHtml); - $elem.html(elemHtml); - - var value = item.value; - var $li = $('
  • '); - if ($elem) { - $li.append($elem); - $list.append($li); - $li.on('click', function (e) { - onClick(value); - - // 隐藏 - _this.hideTimeoutId = setTimeout(function () { - _this.hide(); - }, 0); - }); - } - }); - - // 绑定隐藏事件 - $container.on('mouseleave', function (e) { - _this.hideTimeoutId = setTimeout(function () { - _this.hide(); - }, 0); - }); - - // 记录属性 - this.$container = $container; - - // 基本属性 - this._rendered = false; - this._show = false; -} - -// 原型 -DropList.prototype = { - constructor: DropList, - - // 显示(插入DOM) - show: function show() { - if (this.hideTimeoutId) { - // 清除之前的定时隐藏 - clearTimeout(this.hideTimeoutId); - } - - var menu = this.menu; - var $menuELem = menu.$elem; - var $container = this.$container; - if (this._show) { - return; - } - if (this._rendered) { - // 显示 - $container.show(); - } else { - // 加入 DOM 之前先定位位置 - var menuHeight = $menuELem.getSizeData().height || 0; - var width = this.opt.width || 100; // 默认为 100 - $container.css('margin-top', menuHeight + 'px').css('width', width + 'px'); - - // 加入到 DOM - $menuELem.append($container); - this._rendered = true; - } - - // 修改属性 - this._show = true; - }, - - // 隐藏(移除DOM) - hide: function hide() { - if (this.showTimeoutId) { - // 清除之前的定时显示 - clearTimeout(this.showTimeoutId); - } - - var $container = this.$container; - if (!this._show) { - return; - } - // 隐藏并需改属性 - $container.hide(); - this._show = false; - } -}; - -/* - menu - header -*/ -// 构造函数 -function Head(editor) { - var _this = this; - - this.editor = editor; - this.$elem = $('
    '); - this.type = 'droplist'; - - // 当前是否 active 状态 - this._active = false; - - // 初始化 droplist - this.droplist = new DropList(this, { - width: 100, - $title: $('

    设置标题

    '), - type: 'list', // droplist 以列表形式展示 - list: [{ $elem: $('

    H1

    '), value: '

    ' }, { $elem: $('

    H2

    '), value: '

    ' }, { $elem: $('

    H3

    '), value: '

    ' }, { $elem: $('

    H4

    '), value: '

    ' }, { $elem: $('

    H5
    '), value: '
    ' }, { $elem: $('

    正文

    '), value: '

    ' }], - onClick: function onClick(value) { - // 注意 this 是指向当前的 Head 对象 - _this._command(value); - } - }); -} - -// 原型 -Head.prototype = { - constructor: Head, - - // 执行命令 - _command: function _command(value) { - var editor = this.editor; - - var $selectionElem = editor.selection.getSelectionContainerElem(); - if (editor.$textElem.equal($selectionElem)) { - // 不能选中多行来设置标题,否则会出现问题 - // 例如选中的是

    xxx

    yyy

    来设置标题,设置之后会成为

    xxx
    yyy

    不符合预期 - return; - } - - editor.cmd.do('formatBlock', value); - }, - - // 试图改变 active 状态 - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - var reg = /^h/i; - var cmdValue = editor.cmd.queryCommandValue('formatBlock'); - if (reg.test(cmdValue)) { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - panel -*/ - -var emptyFn = function emptyFn() {}; - -// 记录已经显示 panel 的菜单 -var _isCreatedPanelMenus = []; - -// 构造函数 -function Panel(menu, opt) { - this.menu = menu; - this.opt = opt; -} - -// 原型 -Panel.prototype = { - constructor: Panel, - - // 显示(插入DOM) - show: function show() { - var _this = this; - - var menu = this.menu; - if (_isCreatedPanelMenus.indexOf(menu) >= 0) { - // 该菜单已经创建了 panel 不能再创建 - return; - } - - var editor = menu.editor; - var $body = $('body'); - var $textContainerElem = editor.$textContainerElem; - var opt = this.opt; - - // panel 的容器 - var $container = $('
    '); - var width = opt.width || 300; // 默认 300px - $container.css('width', width + 'px').css('margin-left', (0 - width) / 2 + 'px'); - - // 添加关闭按钮 - var $closeBtn = $(''); - $container.append($closeBtn); - $closeBtn.on('click', function () { - _this.hide(); - }); - - // 准备 tabs 容器 - var $tabTitleContainer = $('
      '); - var $tabContentContainer = $('
      '); - $container.append($tabTitleContainer).append($tabContentContainer); - - // 设置高度 - var height = opt.height; - if (height) { - $tabContentContainer.css('height', height + 'px').css('overflow-y', 'auto'); - } - - // tabs - var tabs = opt.tabs || []; - var tabTitleArr = []; - var tabContentArr = []; - tabs.forEach(function (tab, tabIndex) { - if (!tab) { - return; - } - var title = tab.title || ''; - var tpl = tab.tpl || ''; - - // 替换多语言 - title = replaceLang(editor, title); - tpl = replaceLang(editor, tpl); - - // 添加到 DOM - var $title = $('
    • ' + title + '
    • '); - $tabTitleContainer.append($title); - var $content = $(tpl); - $tabContentContainer.append($content); - - // 记录到内存 - $title._index = tabIndex; - tabTitleArr.push($title); - tabContentArr.push($content); - - // 设置 active 项 - if (tabIndex === 0) { - $title._active = true; - $title.addClass('w-e-active'); - } else { - $content.hide(); - } - - // 绑定 tab 的事件 - $title.on('click', function (e) { - if ($title._active) { - return; - } - // 隐藏所有的 tab - tabTitleArr.forEach(function ($title) { - $title._active = false; - $title.removeClass('w-e-active'); - }); - tabContentArr.forEach(function ($content) { - $content.hide(); - }); - - // 显示当前的 tab - $title._active = true; - $title.addClass('w-e-active'); - $content.show(); - }); - }); - - // 绑定关闭事件 - $container.on('click', function (e) { - // 点击时阻止冒泡 - e.stopPropagation(); - }); - $body.on('click', function (e) { - _this.hide(); - }); - - // 添加到 DOM - $textContainerElem.append($container); - - // 绑定 opt 的事件,只有添加到 DOM 之后才能绑定成功 - tabs.forEach(function (tab, index) { - if (!tab) { - return; - } - var events = tab.events || []; - events.forEach(function (event) { - var selector = event.selector; - var type = event.type; - var fn = event.fn || emptyFn; - var $content = tabContentArr[index]; - $content.find(selector).on(type, function (e) { - e.stopPropagation(); - var needToHide = fn(e); - // 执行完事件之后,是否要关闭 panel - if (needToHide) { - _this.hide(); - } - }); - }); - }); - - // focus 第一个 elem - var $inputs = $container.find('input[type=text],textarea'); - if ($inputs.length) { - $inputs.get(0).focus(); - } - - // 添加到属性 - this.$container = $container; - - // 隐藏其他 panel - this._hideOtherPanels(); - // 记录该 menu 已经创建了 panel - _isCreatedPanelMenus.push(menu); - }, - - // 隐藏(移除DOM) - hide: function hide() { - var menu = this.menu; - var $container = this.$container; - if ($container) { - $container.remove(); - } - - // 将该 menu 记录中移除 - _isCreatedPanelMenus = _isCreatedPanelMenus.filter(function (item) { - if (item === menu) { - return false; - } else { - return true; - } - }); - }, - - // 一个 panel 展示时,隐藏其他 panel - _hideOtherPanels: function _hideOtherPanels() { - if (!_isCreatedPanelMenus.length) { - return; - } - _isCreatedPanelMenus.forEach(function (menu) { - var panel = menu.panel || {}; - if (panel.hide) { - panel.hide(); - } - }); - } -}; - -/* - menu - link -*/ -// 构造函数 -function Link(editor) { - this.editor = editor; - this.$elem = $('
      '); - this.type = 'panel'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Link.prototype = { - constructor: Link, - - // 点击事件 - onClick: function onClick(e) { - var editor = this.editor; - var $linkelem = void 0; - - if (this._active) { - // 当前选区在链接里面 - $linkelem = editor.selection.getSelectionContainerElem(); - if (!$linkelem) { - return; - } - // 将该元素都包含在选取之内,以便后面整体替换 - editor.selection.createRangeByElem($linkelem); - editor.selection.restoreSelection(); - // 显示 panel - this._createPanel($linkelem.text(), $linkelem.attr('href')); - } else { - // 当前选区不在链接里面 - if (editor.selection.isSelectionEmpty()) { - // 选区是空的,未选中内容 - this._createPanel('', ''); - } else { - // 选中内容了 - this._createPanel(editor.selection.getSelectionText(), ''); - } - } - }, - - // 创建 panel - _createPanel: function _createPanel(text, link) { - var _this = this; - - // panel 中需要用到的id - var inputLinkId = getRandom('input-link'); - var inputTextId = getRandom('input-text'); - var btnOkId = getRandom('btn-ok'); - var btnDelId = getRandom('btn-del'); - - // 是否显示“删除链接” - var delBtnDisplay = this._active ? 'inline-block' : 'none'; - - // 初始化并显示 panel - var panel = new Panel(this, { - width: 300, - // panel 中可包含多个 tab - tabs: [{ - // tab 的标题 - title: '链接', - // 模板 - tpl: '
      \n \n \n
      \n \n \n
      \n
      ', - // 事件绑定 - events: [ - // 插入链接 - { - selector: '#' + btnOkId, - type: 'click', - fn: function fn() { - // 执行插入链接 - var $link = $('#' + inputLinkId); - var $text = $('#' + inputTextId); - var link = $link.val(); - var text = $text.val(); - _this._insertLink(text, link); - - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }, - // 删除链接 - { - selector: '#' + btnDelId, - type: 'click', - fn: function fn() { - // 执行删除链接 - _this._delLink(); - - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }] - } // tab end - ] // tabs end - }); - - // 显示 panel - panel.show(); - - // 记录属性 - this.panel = panel; - }, - - // 删除当前链接 - _delLink: function _delLink() { - if (!this._active) { - return; - } - var editor = this.editor; - var $selectionELem = editor.selection.getSelectionContainerElem(); - if (!$selectionELem) { - return; - } - var selectionText = editor.selection.getSelectionText(); - editor.cmd.do('insertHTML', '' + selectionText + ''); - }, - - // 插入链接 - _insertLink: function _insertLink(text, link) { - var editor = this.editor; - var config = editor.config; - var linkCheck = config.linkCheck; - var checkResult = true; // 默认为 true - if (linkCheck && typeof linkCheck === 'function') { - checkResult = linkCheck(text, link); - } - if (checkResult === true) { - editor.cmd.do('insertHTML', '' + text + ''); - } else { - alert(checkResult); - } - }, - - // 试图改变 active 状态 - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - var $selectionELem = editor.selection.getSelectionContainerElem(); - if (!$selectionELem) { - return; - } - if ($selectionELem.getNodeName() === 'A') { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - italic-menu -*/ -// 构造函数 -function Italic(editor) { - this.editor = editor; - this.$elem = $('
      \n \n
      '); - this.type = 'click'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Italic.prototype = { - constructor: Italic, - - // 点击事件 - onClick: function onClick(e) { - // 点击菜单将触发这里 - - var editor = this.editor; - var isSeleEmpty = editor.selection.isSelectionEmpty(); - - if (isSeleEmpty) { - // 选区是空的,插入并选中一个“空白” - editor.selection.createEmptyRange(); - } - - // 执行 italic 命令 - editor.cmd.do('italic'); - - if (isSeleEmpty) { - // 需要将选取折叠起来 - editor.selection.collapseRange(); - editor.selection.restoreSelection(); - } - }, - - // 试图改变 active 状态 - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - if (editor.cmd.queryCommandState('italic')) { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - redo-menu -*/ -// 构造函数 -function Redo(editor) { - this.editor = editor; - this.$elem = $('
      \n \n
      '); - this.type = 'click'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Redo.prototype = { - constructor: Redo, - - // 点击事件 - onClick: function onClick(e) { - // 点击菜单将触发这里 - - var editor = this.editor; - - // 执行 redo 命令 - editor.cmd.do('redo'); - } -}; - -/* - strikeThrough-menu -*/ -// 构造函数 -function StrikeThrough(editor) { - this.editor = editor; - this.$elem = $('
      \n \n
      '); - this.type = 'click'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -StrikeThrough.prototype = { - constructor: StrikeThrough, - - // 点击事件 - onClick: function onClick(e) { - // 点击菜单将触发这里 - - var editor = this.editor; - var isSeleEmpty = editor.selection.isSelectionEmpty(); - - if (isSeleEmpty) { - // 选区是空的,插入并选中一个“空白” - editor.selection.createEmptyRange(); - } - - // 执行 strikeThrough 命令 - editor.cmd.do('strikeThrough'); - - if (isSeleEmpty) { - // 需要将选取折叠起来 - editor.selection.collapseRange(); - editor.selection.restoreSelection(); - } - }, - - // 试图改变 active 状态 - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - if (editor.cmd.queryCommandState('strikeThrough')) { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - underline-menu -*/ -// 构造函数 -function Underline(editor) { - this.editor = editor; - this.$elem = $('
      \n \n
      '); - this.type = 'click'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Underline.prototype = { - constructor: Underline, - - // 点击事件 - onClick: function onClick(e) { - // 点击菜单将触发这里 - - var editor = this.editor; - var isSeleEmpty = editor.selection.isSelectionEmpty(); - - if (isSeleEmpty) { - // 选区是空的,插入并选中一个“空白” - editor.selection.createEmptyRange(); - } - - // 执行 underline 命令 - editor.cmd.do('underline'); - - if (isSeleEmpty) { - // 需要将选取折叠起来 - editor.selection.collapseRange(); - editor.selection.restoreSelection(); - } - }, - - // 试图改变 active 状态 - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - if (editor.cmd.queryCommandState('underline')) { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - undo-menu -*/ -// 构造函数 -function Undo(editor) { - this.editor = editor; - this.$elem = $('
      \n \n
      '); - this.type = 'click'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Undo.prototype = { - constructor: Undo, - - // 点击事件 - onClick: function onClick(e) { - // 点击菜单将触发这里 - - var editor = this.editor; - - // 执行 undo 命令 - editor.cmd.do('undo'); - } -}; - -/* - menu - list -*/ -// 构造函数 -function List(editor) { - var _this = this; - - this.editor = editor; - this.$elem = $('
      '); - this.type = 'droplist'; - - // 当前是否 active 状态 - this._active = false; - - // 初始化 droplist - this.droplist = new DropList(this, { - width: 120, - $title: $('

      设置列表

      '), - type: 'list', // droplist 以列表形式展示 - list: [{ $elem: $(' 有序列表'), value: 'insertOrderedList' }, { $elem: $(' 无序列表'), value: 'insertUnorderedList' }], - onClick: function onClick(value) { - // 注意 this 是指向当前的 List 对象 - _this._command(value); - } - }); -} - -// 原型 -List.prototype = { - constructor: List, - - // 执行命令 - _command: function _command(value) { - var editor = this.editor; - var $textElem = editor.$textElem; - editor.selection.restoreSelection(); - if (editor.cmd.queryCommandState(value)) { - return; - } - editor.cmd.do(value); - - // 验证列表是否被包裹在

      之内 - var $selectionElem = editor.selection.getSelectionContainerElem(); - if ($selectionElem.getNodeName() === 'LI') { - $selectionElem = $selectionElem.parent(); - } - if (/^ol|ul$/i.test($selectionElem.getNodeName()) === false) { - return; - } - if ($selectionElem.equal($textElem)) { - // 证明是顶级标签,没有被

      包裹 - return; - } - var $parent = $selectionElem.parent(); - if ($parent.equal($textElem)) { - // $parent 是顶级标签,不能删除 - return; - } - - $selectionElem.insertAfter($parent); - $parent.remove(); - }, - - // 试图改变 active 状态 - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - if (editor.cmd.queryCommandState('insertUnOrderedList') || editor.cmd.queryCommandState('insertOrderedList')) { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - menu - justify -*/ -// 构造函数 -function Justify(editor) { - var _this = this; - - this.editor = editor; - this.$elem = $('

      '); - this.type = 'droplist'; - - // 当前是否 active 状态 - this._active = false; - - // 初始化 droplist - this.droplist = new DropList(this, { - width: 100, - $title: $('

      对齐方式

      '), - type: 'list', // droplist 以列表形式展示 - list: [{ $elem: $(' 靠左'), value: 'justifyLeft' }, { $elem: $(' 居中'), value: 'justifyCenter' }, { $elem: $(' 靠右'), value: 'justifyRight' }], - onClick: function onClick(value) { - // 注意 this 是指向当前的 List 对象 - _this._command(value); - } - }); -} - -// 原型 -Justify.prototype = { - constructor: Justify, - - // 执行命令 - _command: function _command(value) { - var editor = this.editor; - editor.cmd.do(value); - } -}; - -/* - menu - Forecolor -*/ -// 构造函数 -function ForeColor(editor) { - var _this = this; - - this.editor = editor; - this.$elem = $('
      '); - this.type = 'droplist'; - - // 获取配置的颜色 - var config = editor.config; - var colors = config.colors || []; - - // 当前是否 active 状态 - this._active = false; - - // 初始化 droplist - this.droplist = new DropList(this, { - width: 120, - $title: $('

      文字颜色

      '), - type: 'inline-block', // droplist 内容以 block 形式展示 - list: colors.map(function (color) { - return { $elem: $(''), value: color }; - }), - onClick: function onClick(value) { - // 注意 this 是指向当前的 ForeColor 对象 - _this._command(value); - } - }); -} - -// 原型 -ForeColor.prototype = { - constructor: ForeColor, - - // 执行命令 - _command: function _command(value) { - var editor = this.editor; - editor.cmd.do('foreColor', value); - } -}; - -/* - menu - BackColor -*/ -// 构造函数 -function BackColor(editor) { - var _this = this; - - this.editor = editor; - this.$elem = $('
      '); - this.type = 'droplist'; - - // 获取配置的颜色 - var config = editor.config; - var colors = config.colors || []; - - // 当前是否 active 状态 - this._active = false; - - // 初始化 droplist - this.droplist = new DropList(this, { - width: 120, - $title: $('

      背景色

      '), - type: 'inline-block', // droplist 内容以 block 形式展示 - list: colors.map(function (color) { - return { $elem: $(''), value: color }; - }), - onClick: function onClick(value) { - // 注意 this 是指向当前的 BackColor 对象 - _this._command(value); - } - }); -} - -// 原型 -BackColor.prototype = { - constructor: BackColor, - - // 执行命令 - _command: function _command(value) { - var editor = this.editor; - editor.cmd.do('backColor', value); - } -}; - -/* - menu - quote -*/ -// 构造函数 -function Quote(editor) { - this.editor = editor; - this.$elem = $('
      \n \n
      '); - this.type = 'click'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Quote.prototype = { - constructor: Quote, - - onClick: function onClick(e) { - var editor = this.editor; - var $selectionElem = editor.selection.getSelectionContainerElem(); - var nodeName = $selectionElem.getNodeName(); - - if (!UA.isIE()) { - if (nodeName === 'BLOCKQUOTE') { - // 撤销 quote - editor.cmd.do('formatBlock', '

      '); - } else { - // 转换为 quote - editor.cmd.do('formatBlock', '

      '); - } - return; - } - - // IE 中不支持 formatBlock
      ,要用其他方式兼容 - var content = void 0, - $targetELem = void 0; - if (nodeName === 'P') { - // 将 P 转换为 quote - content = $selectionElem.text(); - $targetELem = $('
      ' + content + '
      '); - $targetELem.insertAfter($selectionElem); - $selectionElem.remove(); - return; - } - if (nodeName === 'BLOCKQUOTE') { - // 撤销 quote - content = $selectionElem.text(); - $targetELem = $('

      ' + content + '

      '); - $targetELem.insertAfter($selectionElem); - $selectionElem.remove(); - } - }, - - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - var reg = /^BLOCKQUOTE$/i; - var cmdValue = editor.cmd.queryCommandValue('formatBlock'); - if (reg.test(cmdValue)) { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - menu - code -*/ -// 构造函数 -function Code(editor) { - this.editor = editor; - this.$elem = $('
      \n \n
      '); - this.type = 'panel'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Code.prototype = { - constructor: Code, - - onClick: function onClick(e) { - var editor = this.editor; - var $startElem = editor.selection.getSelectionStartElem(); - var $endElem = editor.selection.getSelectionEndElem(); - var isSeleEmpty = editor.selection.isSelectionEmpty(); - var selectionText = editor.selection.getSelectionText(); - var $code = void 0; - - if (!$startElem.equal($endElem)) { - // 跨元素选择,不做处理 - editor.selection.restoreSelection(); - return; - } - if (!isSeleEmpty) { - // 选取不是空,用 包裹即可 - $code = $('' + selectionText + ''); - editor.cmd.do('insertElem', $code); - editor.selection.createRangeByElem($code, false); - editor.selection.restoreSelection(); - return; - } - - // 选取是空,且没有夸元素选择,则插入
      
      -        if (this._active) {
      -            // 选中状态,将编辑内容
      -            this._createPanel($startElem.html());
      -        } else {
      -            // 未选中状态,将创建内容
      -            this._createPanel();
      -        }
      -    },
      -
      -    _createPanel: function _createPanel(value) {
      -        var _this = this;
      -
      -        // value - 要编辑的内容
      -        value = value || '';
      -        var type = !value ? 'new' : 'edit';
      -        var textId = getRandom('texxt');
      -        var btnId = getRandom('btn');
      -
      -        var panel = new Panel(this, {
      -            width: 500,
      -            // 一个 Panel 包含多个 tab
      -            tabs: [{
      -                // 标题
      -                title: '插入代码',
      -                // 模板
      -                tpl: '
      \n \n
      \n \n
      \n
      ', - // 事件绑定 - events: [ - // 插入代码 - { - selector: '#' + btnId, - type: 'click', - fn: function fn() { - var $text = $('#' + textId); - var text = $text.val() || $text.html(); - text = replaceHtmlSymbol(text); - if (type === 'new') { - // 新插入 - _this._insertCode(text); - } else { - // 编辑更新 - _this._updateCode(text); - } - - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }] - } // first tab end - ] // tabs end - }); // new Panel end - - // 显示 panel - panel.show(); - - // 记录属性 - this.panel = panel; - }, - - // 插入代码 - _insertCode: function _insertCode(value) { - var editor = this.editor; - editor.cmd.do('insertHTML', '
      ' + value + '


      '); - }, - - // 更新代码 - _updateCode: function _updateCode(value) { - var editor = this.editor; - var $selectionELem = editor.selection.getSelectionContainerElem(); - if (!$selectionELem) { - return; - } - $selectionELem.html(value); - editor.selection.restoreSelection(); - }, - - // 试图改变 active 状态 - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - var $selectionELem = editor.selection.getSelectionContainerElem(); - if (!$selectionELem) { - return; - } - var $parentElem = $selectionELem.parent(); - if ($selectionELem.getNodeName() === 'CODE' && $parentElem.getNodeName() === 'PRE') { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - menu - emoticon -*/ -// 构造函数 -function Emoticon(editor) { - this.editor = editor; - this.$elem = $('
      \n \n
      '); - this.type = 'panel'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Emoticon.prototype = { - constructor: Emoticon, - - onClick: function onClick() { - this._createPanel(); - }, - - _createPanel: function _createPanel() { - var _this = this; - - var editor = this.editor; - var config = editor.config; - // 获取表情配置 - var emotions = config.emotions || []; - - // 创建表情 dropPanel 的配置 - var tabConfig = []; - emotions.forEach(function (emotData) { - var emotType = emotData.type; - var content = emotData.content || []; - - // 这一组表情最终拼接出来的 html - var faceHtml = ''; - - // emoji 表情 - if (emotType === 'emoji') { - content.forEach(function (item) { - if (item) { - faceHtml += '' + item + ''; - } - }); - } - // 图片表情 - if (emotType === 'image') { - content.forEach(function (item) { - var src = item.src; - var alt = item.alt; - if (src) { - // 加一个 data-w-e 属性,点击图片的时候不再提示编辑图片 - faceHtml += '' + alt + ''; - } - }); - } - - tabConfig.push({ - title: emotData.title, - tpl: '
      ' + faceHtml + '
      ', - events: [{ - selector: 'span.w-e-item', - type: 'click', - fn: function fn(e) { - var target = e.target; - var $target = $(target); - var nodeName = $target.getNodeName(); - - var insertHtml = void 0; - if (nodeName === 'IMG') { - // 插入图片 - insertHtml = $target.parent().html(); - } else { - // 插入 emoji - insertHtml = '' + $target.html() + ''; - } - - _this._insert(insertHtml); - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }] - }); - }); - - var panel = new Panel(this, { - width: 300, - height: 200, - // 一个 Panel 包含多个 tab - tabs: tabConfig - }); - - // 显示 panel - panel.show(); - - // 记录属性 - this.panel = panel; - }, - - // 插入表情 - _insert: function _insert(emotHtml) { - var editor = this.editor; - editor.cmd.do('insertHTML', emotHtml); - } -}; - -/* - menu - table -*/ -// 构造函数 -function Table(editor) { - this.editor = editor; - this.$elem = $('
      '); - this.type = 'panel'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Table.prototype = { - constructor: Table, - - onClick: function onClick() { - if (this._active) { - // 编辑现有表格 - this._createEditPanel(); - } else { - // 插入新表格 - this._createInsertPanel(); - } - }, - - // 创建插入新表格的 panel - _createInsertPanel: function _createInsertPanel() { - var _this = this; - - // 用到的 id - var btnInsertId = getRandom('btn'); - var textRowNum = getRandom('row'); - var textColNum = getRandom('col'); - - var panel = new Panel(this, { - width: 250, - // panel 包含多个 tab - tabs: [{ - // 标题 - title: '插入表格', - // 模板 - tpl: '
      \n

      \n \u521B\u5EFA\n \n \u884C\n \n \u5217\u7684\u8868\u683C\n

      \n
      \n \n
      \n
      ', - // 事件绑定 - events: [{ - // 点击按钮,插入表格 - selector: '#' + btnInsertId, - type: 'click', - fn: function fn() { - var rowNum = parseInt($('#' + textRowNum).val()); - var colNum = parseInt($('#' + textColNum).val()); - - if (rowNum && colNum && rowNum > 0 && colNum > 0) { - // form 数据有效 - _this._insert(rowNum, colNum); - } - - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }] - } // first tab end - ] // tabs end - }); // panel end - - // 展示 panel - panel.show(); - - // 记录属性 - this.panel = panel; - }, - - // 插入表格 - _insert: function _insert(rowNum, colNum) { - // 拼接 table 模板 - var r = void 0, - c = void 0; - var html = '
      '; - for (r = 0; r < rowNum; r++) { - html += ''; - if (r === 0) { - for (c = 0; c < colNum; c++) { - html += ''; - } - } else { - for (c = 0; c < colNum; c++) { - html += ''; - } - } - html += ''; - } - html += '
        


      '; - - // 执行命令 - var editor = this.editor; - editor.cmd.do('insertHTML', html); - - // 防止 firefox 下出现 resize 的控制点 - editor.cmd.do('enableObjectResizing', false); - editor.cmd.do('enableInlineTableEditing', false); - }, - - // 创建编辑表格的 panel - _createEditPanel: function _createEditPanel() { - var _this2 = this; - - // 可用的 id - var addRowBtnId = getRandom('add-row'); - var addColBtnId = getRandom('add-col'); - var delRowBtnId = getRandom('del-row'); - var delColBtnId = getRandom('del-col'); - var delTableBtnId = getRandom('del-table'); - - // 创建 panel 对象 - var panel = new Panel(this, { - width: 320, - // panel 包含多个 tab - tabs: [{ - // 标题 - title: '编辑表格', - // 模板 - tpl: '
      \n
      \n \n \n \n \n
      \n
      \n \n \n
      ', - // 事件绑定 - events: [{ - // 增加行 - selector: '#' + addRowBtnId, - type: 'click', - fn: function fn() { - _this2._addRow(); - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }, { - // 增加列 - selector: '#' + addColBtnId, - type: 'click', - fn: function fn() { - _this2._addCol(); - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }, { - // 删除行 - selector: '#' + delRowBtnId, - type: 'click', - fn: function fn() { - _this2._delRow(); - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }, { - // 删除列 - selector: '#' + delColBtnId, - type: 'click', - fn: function fn() { - _this2._delCol(); - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }, { - // 删除表格 - selector: '#' + delTableBtnId, - type: 'click', - fn: function fn() { - _this2._delTable(); - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }] - }] - }); - // 显示 panel - panel.show(); - }, - - // 获取选中的单元格的位置信息 - _getLocationData: function _getLocationData() { - var result = {}; - var editor = this.editor; - var $selectionELem = editor.selection.getSelectionContainerElem(); - if (!$selectionELem) { - return; - } - var nodeName = $selectionELem.getNodeName(); - if (nodeName !== 'TD' && nodeName !== 'TH') { - return; - } - - // 获取 td index - var $tr = $selectionELem.parent(); - var $tds = $tr.children(); - var tdLength = $tds.length; - $tds.forEach(function (td, index) { - if (td === $selectionELem[0]) { - // 记录并跳出循环 - result.td = { - index: index, - elem: td, - length: tdLength - }; - return false; - } - }); - - // 获取 tr index - var $tbody = $tr.parent(); - var $trs = $tbody.children(); - var trLength = $trs.length; - $trs.forEach(function (tr, index) { - if (tr === $tr[0]) { - // 记录并跳出循环 - result.tr = { - index: index, - elem: tr, - length: trLength - }; - return false; - } - }); - - // 返回结果 - return result; - }, - - // 增加行 - _addRow: function _addRow() { - // 获取当前单元格的位置信息 - var locationData = this._getLocationData(); - if (!locationData) { - return; - } - var trData = locationData.tr; - var $currentTr = $(trData.elem); - var tdData = locationData.td; - var tdLength = tdData.length; - - // 拼接即将插入的字符串 - var newTr = document.createElement('tr'); - var tpl = '', - i = void 0; - for (i = 0; i < tdLength; i++) { - tpl += ' '; - } - newTr.innerHTML = tpl; - // 插入 - $(newTr).insertAfter($currentTr); - }, - - // 增加列 - _addCol: function _addCol() { - // 获取当前单元格的位置信息 - var locationData = this._getLocationData(); - if (!locationData) { - return; - } - var trData = locationData.tr; - var tdData = locationData.td; - var tdIndex = tdData.index; - var $currentTr = $(trData.elem); - var $trParent = $currentTr.parent(); - var $trs = $trParent.children(); - - // 遍历所有行 - $trs.forEach(function (tr) { - var $tr = $(tr); - var $tds = $tr.children(); - var $currentTd = $tds.get(tdIndex); - var name = $currentTd.getNodeName().toLowerCase(); - - // new 一个 td,并插入 - var newTd = document.createElement(name); - $(newTd).insertAfter($currentTd); - }); - }, - - // 删除行 - _delRow: function _delRow() { - // 获取当前单元格的位置信息 - var locationData = this._getLocationData(); - if (!locationData) { - return; - } - var trData = locationData.tr; - var $currentTr = $(trData.elem); - $currentTr.remove(); - }, - - // 删除列 - _delCol: function _delCol() { - // 获取当前单元格的位置信息 - var locationData = this._getLocationData(); - if (!locationData) { - return; - } - var trData = locationData.tr; - var tdData = locationData.td; - var tdIndex = tdData.index; - var $currentTr = $(trData.elem); - var $trParent = $currentTr.parent(); - var $trs = $trParent.children(); - - // 遍历所有行 - $trs.forEach(function (tr) { - var $tr = $(tr); - var $tds = $tr.children(); - var $currentTd = $tds.get(tdIndex); - // 删除 - $currentTd.remove(); - }); - }, - - // 删除表格 - _delTable: function _delTable() { - var editor = this.editor; - var $selectionELem = editor.selection.getSelectionContainerElem(); - if (!$selectionELem) { - return; - } - var $table = $selectionELem.parentUntil('table'); - if (!$table) { - return; - } - $table.remove(); - }, - - // 试图改变 active 状态 - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - var $selectionELem = editor.selection.getSelectionContainerElem(); - if (!$selectionELem) { - return; - } - var nodeName = $selectionELem.getNodeName(); - if (nodeName === 'TD' || nodeName === 'TH') { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - menu - video -*/ -// 构造函数 -function Video(editor) { - this.editor = editor; - this.$elem = $('
      '); - this.type = 'panel'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Video.prototype = { - constructor: Video, - - onClick: function onClick() { - this._createPanel(); - }, - - _createPanel: function _createPanel() { - var _this = this; - - // 创建 id - var textValId = getRandom('text-val'); - var btnId = getRandom('btn'); - - // 创建 panel - var panel = new Panel(this, { - width: 350, - // 一个 panel 多个 tab - tabs: [{ - // 标题 - title: '插入视频', - // 模板 - tpl: '
      \n \n
      \n \n
      \n
      ', - // 事件绑定 - events: [{ - selector: '#' + btnId, - type: 'click', - fn: function fn() { - var $text = $('#' + textValId); - var val = $text.val().trim(); - - // 测试用视频地址 - // - - if (val) { - // 插入视频 - _this._insert(val); - } - - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }] - } // first tab end - ] // tabs end - }); // panel end - - // 显示 panel - panel.show(); - - // 记录属性 - this.panel = panel; - }, - - // 插入视频 - _insert: function _insert(val) { - var editor = this.editor; - editor.cmd.do('insertHTML', val + '


      '); - } -}; - -/* - menu - img -*/ -// 构造函数 -function Image(editor) { - this.editor = editor; - var imgMenuId = getRandom('w-e-img'); - this.$elem = $('
      '); - editor.imgMenuId = imgMenuId; - this.type = 'panel'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Image.prototype = { - constructor: Image, - - onClick: function onClick() { - var editor = this.editor; - var config = editor.config; - if (config.qiniu) { - return; - } - if (this._active) { - this._createEditPanel(); - } else { - this._createInsertPanel(); - } - }, - - _createEditPanel: function _createEditPanel() { - var editor = this.editor; - - // id - var width30 = getRandom('width-30'); - var width50 = getRandom('width-50'); - var width100 = getRandom('width-100'); - var delBtn = getRandom('del-btn'); - - // tab 配置 - var tabsConfig = [{ - title: '编辑图片', - tpl: '
      \n
      \n \u6700\u5927\u5BBD\u5EA6\uFF1A\n \n \n \n
      \n
      \n \n \n
      ', - events: [{ - selector: '#' + width30, - type: 'click', - fn: function fn() { - var $img = editor._selectedImg; - if ($img) { - $img.css('max-width', '30%'); - } - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }, { - selector: '#' + width50, - type: 'click', - fn: function fn() { - var $img = editor._selectedImg; - if ($img) { - $img.css('max-width', '50%'); - } - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }, { - selector: '#' + width100, - type: 'click', - fn: function fn() { - var $img = editor._selectedImg; - if ($img) { - $img.css('max-width', '100%'); - } - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }, { - selector: '#' + delBtn, - type: 'click', - fn: function fn() { - var $img = editor._selectedImg; - if ($img) { - $img.remove(); - } - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }] - }]; - - // 创建 panel 并显示 - var panel = new Panel(this, { - width: 300, - tabs: tabsConfig - }); - panel.show(); - - // 记录属性 - this.panel = panel; - }, - - _createInsertPanel: function _createInsertPanel() { - var editor = this.editor; - var uploadImg = editor.uploadImg; - var config = editor.config; - - // id - var upTriggerId = getRandom('up-trigger'); - var upFileId = getRandom('up-file'); - var linkUrlId = getRandom('link-url'); - var linkBtnId = getRandom('link-btn'); - - // tabs 的配置 - var tabsConfig = [{ - title: '上传图片', - tpl: '
      \n
      \n \n
      \n
      \n \n
      \n
      ', - events: [{ - // 触发选择图片 - selector: '#' + upTriggerId, - type: 'click', - fn: function fn() { - var $file = $('#' + upFileId); - var fileElem = $file[0]; - if (fileElem) { - fileElem.click(); - } else { - // 返回 true 可关闭 panel - return true; - } - } - }, { - // 选择图片完毕 - selector: '#' + upFileId, - type: 'change', - fn: function fn() { - var $file = $('#' + upFileId); - var fileElem = $file[0]; - if (!fileElem) { - // 返回 true 可关闭 panel - return true; - } - - // 获取选中的 file 对象列表 - var fileList = fileElem.files; - if (fileList.length) { - uploadImg.uploadImg(fileList); - } - - // 返回 true 可关闭 panel - return true; - } - }] - }, // first tab end - { - title: '网络图片', - tpl: '
      \n \n
      \n \n
      \n
      ', - events: [{ - selector: '#' + linkBtnId, - type: 'click', - fn: function fn() { - var $linkUrl = $('#' + linkUrlId); - var url = $linkUrl.val().trim(); - - if (url) { - uploadImg.insertLinkImg(url); - } - - // 返回 true 表示函数执行结束之后关闭 panel - return true; - } - }] - } // second tab end - ]; // tabs end - - // 判断 tabs 的显示 - var tabsConfigResult = []; - if ((config.uploadImgShowBase64 || config.uploadImgServer || config.customUploadImg) && window.FileReader) { - // 显示“上传图片” - tabsConfigResult.push(tabsConfig[0]); - } - if (config.showLinkImg) { - // 显示“网络图片” - tabsConfigResult.push(tabsConfig[1]); - } - - // 创建 panel 并显示 - var panel = new Panel(this, { - width: 300, - tabs: tabsConfigResult - }); - panel.show(); - - // 记录属性 - this.panel = panel; - }, - - // 试图改变 active 状态 - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - if (editor._selectedImg) { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - 所有菜单的汇总 -*/ - -// 存储菜单的构造函数 -var MenuConstructors = {}; - -MenuConstructors.bold = Bold; - -MenuConstructors.head = Head; - -MenuConstructors.link = Link; - -MenuConstructors.italic = Italic; - -MenuConstructors.redo = Redo; - -MenuConstructors.strikeThrough = StrikeThrough; - -MenuConstructors.underline = Underline; - -MenuConstructors.undo = Undo; - -MenuConstructors.list = List; - -MenuConstructors.justify = Justify; - -MenuConstructors.foreColor = ForeColor; - -MenuConstructors.backColor = BackColor; - -MenuConstructors.quote = Quote; - -MenuConstructors.code = Code; - -MenuConstructors.emoticon = Emoticon; - -MenuConstructors.table = Table; - -MenuConstructors.video = Video; - -MenuConstructors.image = Image; - -/* - 菜单集合 -*/ -// 构造函数 -function Menus(editor) { - this.editor = editor; - this.menus = {}; -} - -// 修改原型 -Menus.prototype = { - constructor: Menus, - - // 初始化菜单 - init: function init() { - var _this = this; - - var editor = this.editor; - var config = editor.config || {}; - var configMenus = config.menus || []; // 获取配置中的菜单 - - // 根据配置信息,创建菜单 - configMenus.forEach(function (menuKey) { - var MenuConstructor = MenuConstructors[menuKey]; - if (MenuConstructor && typeof MenuConstructor === 'function') { - // 创建单个菜单 - _this.menus[menuKey] = new MenuConstructor(editor); - } - }); - - // 添加到菜单栏 - this._addToToolbar(); - - // 绑定事件 - this._bindEvent(); - }, - - // 添加到菜单栏 - _addToToolbar: function _addToToolbar() { - var editor = this.editor; - var $toolbarElem = editor.$toolbarElem; - var menus = this.menus; - var config = editor.config; - // config.zIndex 是配置的编辑区域的 z-index,菜单的 z-index 得在其基础上 +1 - var zIndex = config.zIndex + 1; - objForEach(menus, function (key, menu) { - var $elem = menu.$elem; - if ($elem) { - // 设置 z-index - $elem.css('z-index', zIndex); - $toolbarElem.append($elem); - } - }); - }, - - // 绑定菜单 click mouseenter 事件 - _bindEvent: function _bindEvent() { - var menus = this.menus; - var editor = this.editor; - objForEach(menus, function (key, menu) { - var type = menu.type; - if (!type) { - return; - } - var $elem = menu.$elem; - var droplist = menu.droplist; - var panel = menu.panel; - - // 点击类型,例如 bold - if (type === 'click' && menu.onClick) { - $elem.on('click', function (e) { - if (editor.selection.getRange() == null) { - return; - } - menu.onClick(e); - }); - } - - // 下拉框,例如 head - if (type === 'droplist' && droplist) { - $elem.on('mouseenter', function (e) { - if (editor.selection.getRange() == null) { - return; - } - // 显示 - droplist.showTimeoutId = setTimeout(function () { - droplist.show(); - }, 200); - }).on('mouseleave', function (e) { - // 隐藏 - droplist.hideTimeoutId = setTimeout(function () { - droplist.hide(); - }, 0); - }); - } - - // 弹框类型,例如 link - if (type === 'panel' && menu.onClick) { - $elem.on('click', function (e) { - e.stopPropagation(); - if (editor.selection.getRange() == null) { - return; - } - // 在自定义事件中显示 panel - menu.onClick(e); - }); - } - }); - }, - - // 尝试修改菜单状态 - changeActive: function changeActive() { - var menus = this.menus; - objForEach(menus, function (key, menu) { - if (menu.tryChangeActive) { - setTimeout(function () { - menu.tryChangeActive(); - }, 100); - } - }); - } -}; - -/* - 粘贴信息的处理 -*/ - -// 获取粘贴的纯文本 -function getPasteText(e) { - var clipboardData = e.clipboardData || e.originalEvent && e.originalEvent.clipboardData; - var pasteText = void 0; - if (clipboardData == null) { - pasteText = window.clipboardData && window.clipboardData.getData('text'); - } else { - pasteText = clipboardData.getData('text/plain'); - } - - return replaceHtmlSymbol(pasteText); -} - -// 获取粘贴的html -function getPasteHtml(e, filterStyle) { - var clipboardData = e.clipboardData || e.originalEvent && e.originalEvent.clipboardData; - var pasteText = void 0, - pasteHtml = void 0; - if (clipboardData == null) { - pasteText = window.clipboardData && window.clipboardData.getData('text'); - } else { - pasteText = clipboardData.getData('text/plain'); - pasteHtml = clipboardData.getData('text/html'); - } - if (!pasteHtml && pasteText) { - pasteHtml = '

      ' + replaceHtmlSymbol(pasteText) + '

      '; - } - if (!pasteHtml) { - return; - } - - // 过滤word中状态过来的无用字符 - var docSplitHtml = pasteHtml.split(''); - if (docSplitHtml.length === 2) { - pasteHtml = docSplitHtml[0]; - } - - // 过滤无用标签 - pasteHtml = pasteHtml.replace(/<(meta|script|link).+?>/igm, ''); - // 去掉注释 - pasteHtml = pasteHtml.replace(//mg, ''); - // 过滤 data-xxx 属性 - pasteHtml = pasteHtml.replace(/\s?data-.+?=('|").+?('|")/igm, ''); - - if (filterStyle) { - // 过滤样式 - pasteHtml = pasteHtml.replace(/\s?(class|style)=('|").+?('|")/igm, ''); - } else { - // 保留样式 - pasteHtml = pasteHtml.replace(/\s?class=('|").+?('|")/igm, ''); - } - - return pasteHtml; -} - -// 获取粘贴的图片文件 -function getPasteImgs(e) { - var result = []; - var txt = getPasteText(e); - if (txt) { - // 有文字,就忽略图片 - return result; - } - - var clipboardData = e.clipboardData || e.originalEvent && e.originalEvent.clipboardData || {}; - var items = clipboardData.items; - if (!items) { - return result; - } - - objForEach(items, function (key, value) { - var type = value.type; - if (/image/i.test(type)) { - result.push(value.getAsFile()); - } - }); - - return result; -} - -/* - 编辑区域 -*/ - -// 获取一个 elem.childNodes 的 JSON 数据 -function getChildrenJSON($elem) { - var result = []; - var $children = $elem.childNodes() || []; // 注意 childNodes() 可以获取文本节点 - $children.forEach(function (curElem) { - var elemResult = void 0; - var nodeType = curElem.nodeType; - - // 文本节点 - if (nodeType === 3) { - elemResult = curElem.textContent; - } - - // 普通 DOM 节点 - if (nodeType === 1) { - elemResult = {}; - - // tag - elemResult.tag = curElem.nodeName.toLowerCase(); - // attr - var attrData = []; - var attrList = curElem.attributes || {}; - var attrListLength = attrList.length || 0; - for (var i = 0; i < attrListLength; i++) { - var attr = attrList[i]; - attrData.push({ - name: attr.name, - value: attr.value - }); - } - elemResult.attrs = attrData; - // children(递归) - elemResult.children = getChildrenJSON($(curElem)); - } - - result.push(elemResult); - }); - return result; -} - -// 构造函数 -function Text(editor) { - this.editor = editor; -} - -// 修改原型 -Text.prototype = { - constructor: Text, - - // 初始化 - init: function init() { - // 绑定事件 - this._bindEvent(); - }, - - // 清空内容 - clear: function clear() { - this.html('


      '); - }, - - // 获取 设置 html - html: function html(val) { - var editor = this.editor; - var $textElem = editor.$textElem; - var html = void 0; - if (val == null) { - html = $textElem.html(); - // 未选中任何内容的时候点击“加粗”或者“斜体”等按钮,就得需要一个空的占位符 ​ ,这里替换掉 - html = html.replace(/\u200b/gm, ''); - return html; - } else { - $textElem.html(val); - - // 初始化选取,将光标定位到内容尾部 - editor.initSelection(); - } - }, - - // 获取 JSON - getJSON: function getJSON() { - var editor = this.editor; - var $textElem = editor.$textElem; - return getChildrenJSON($textElem); - }, - - // 获取 设置 text - text: function text(val) { - var editor = this.editor; - var $textElem = editor.$textElem; - var text = void 0; - if (val == null) { - text = $textElem.text(); - // 未选中任何内容的时候点击“加粗”或者“斜体”等按钮,就得需要一个空的占位符 ​ ,这里替换掉 - text = text.replace(/\u200b/gm, ''); - return text; - } else { - $textElem.text('

      ' + val + '

      '); - - // 初始化选取,将光标定位到内容尾部 - editor.initSelection(); - } - }, - - // 追加内容 - append: function append(html) { - var editor = this.editor; - var $textElem = editor.$textElem; - $textElem.append($(html)); - - // 初始化选取,将光标定位到内容尾部 - editor.initSelection(); - }, - - // 绑定事件 - _bindEvent: function _bindEvent() { - // 实时保存选取 - this._saveRangeRealTime(); - - // 按回车建时的特殊处理 - this._enterKeyHandle(); - - // 清空时保留


      - this._clearHandle(); - - // 粘贴事件(粘贴文字,粘贴图片) - this._pasteHandle(); - - // tab 特殊处理 - this._tabHandle(); - - // img 点击 - this._imgHandle(); - - // 拖拽事件 - this._dragHandle(); - }, - - // 实时保存选取 - _saveRangeRealTime: function _saveRangeRealTime() { - var editor = this.editor; - var $textElem = editor.$textElem; - - // 保存当前的选区 - function saveRange(e) { - // 随时保存选区 - editor.selection.saveRange(); - // 更新按钮 ative 状态 - editor.menus.changeActive(); - } - // 按键后保存 - $textElem.on('keyup', saveRange); - $textElem.on('mousedown', function (e) { - // mousedown 状态下,鼠标滑动到编辑区域外面,也需要保存选区 - $textElem.on('mouseleave', saveRange); - }); - $textElem.on('mouseup', function (e) { - saveRange(); - // 在编辑器区域之内完成点击,取消鼠标滑动到编辑区外面的事件 - $textElem.off('mouseleave', saveRange); - }); - }, - - // 按回车键时的特殊处理 - _enterKeyHandle: function _enterKeyHandle() { - var editor = this.editor; - var $textElem = editor.$textElem; - - function insertEmptyP($selectionElem) { - var $p = $('


      '); - $p.insertBefore($selectionElem); - editor.selection.createRangeByElem($p, true); - editor.selection.restoreSelection(); - $selectionElem.remove(); - } - - // 将回车之后生成的非

      的顶级标签,改为

      - function pHandle(e) { - var $selectionElem = editor.selection.getSelectionContainerElem(); - var $parentElem = $selectionElem.parent(); - - if ($parentElem.html() === '
      ') { - // 回车之前光标所在一个

      .....

      ,忽然回车生成一个空的


      - // 而且继续回车跳不出去,因此只能特殊处理 - insertEmptyP($selectionElem); - return; - } - - if (!$parentElem.equal($textElem)) { - // 不是顶级标签 - return; - } - - var nodeName = $selectionElem.getNodeName(); - if (nodeName === 'P') { - // 当前的标签是 P ,不用做处理 - return; - } - - if ($selectionElem.text()) { - // 有内容,不做处理 - return; - } - - // 插入

      ,并将选取定位到

      ,删除当前标签 - insertEmptyP($selectionElem); - } - - $textElem.on('keyup', function (e) { - if (e.keyCode !== 13) { - // 不是回车键 - return; - } - // 将回车之后生成的非

      的顶级标签,改为

      - pHandle(e); - }); - - //

      回车时 特殊处理 - function codeHandle(e) { - var $selectionElem = editor.selection.getSelectionContainerElem(); - if (!$selectionElem) { - return; - } - var $parentElem = $selectionElem.parent(); - var selectionNodeName = $selectionElem.getNodeName(); - var parentNodeName = $parentElem.getNodeName(); - - if (selectionNodeName !== 'CODE' || parentNodeName !== 'PRE') { - // 不符合要求 忽略 - return; - } - - if (!editor.cmd.queryCommandSupported('insertHTML')) { - // 必须原生支持 insertHTML 命令 - return; - } - - // 处理:光标定位到代码末尾,联系点击两次回车,即跳出代码块 - if (editor._willBreakCode === true) { - // 此时可以跳出代码块 - // 插入

      ,并将选取定位到

      - var $p = $('


      '); - $p.insertAfter($parentElem); - editor.selection.createRangeByElem($p, true); - editor.selection.restoreSelection(); - - // 修改状态 - editor._willBreakCode = false; - - e.preventDefault(); - return; - } - - var _startOffset = editor.selection.getRange().startOffset; - - // 处理:回车时,不能插入
      而是插入 \n ,因为是在 pre 标签里面 - editor.cmd.do('insertHTML', '\n'); - editor.selection.saveRange(); - if (editor.selection.getRange().startOffset === _startOffset) { - // 没起作用,再来一遍 - editor.cmd.do('insertHTML', '\n'); - } - - var codeLength = $selectionElem.html().length; - if (editor.selection.getRange().startOffset + 1 === codeLength) { - // 说明光标在代码最后的位置,执行了回车操作 - // 记录下来,以便下次回车时候跳出 code - editor._willBreakCode = true; - } - - // 阻止默认行为 - e.preventDefault(); - } - - $textElem.on('keydown', function (e) { - if (e.keyCode !== 13) { - // 不是回车键 - // 取消即将跳转代码块的记录 - editor._willBreakCode = false; - return; - } - //
      回车时 特殊处理 - codeHandle(e); - }); - }, - - // 清空时保留


      - _clearHandle: function _clearHandle() { - var editor = this.editor; - var $textElem = editor.$textElem; - - $textElem.on('keydown', function (e) { - if (e.keyCode !== 8) { - return; - } - var txtHtml = $textElem.html().toLowerCase().trim(); - if (txtHtml === '


      ') { - // 最后剩下一个空行,就不再删除了 - e.preventDefault(); - return; - } - }); - - $textElem.on('keyup', function (e) { - if (e.keyCode !== 8) { - return; - } - var $p = void 0; - var txtHtml = $textElem.html().toLowerCase().trim(); - - // firefox 时用 txtHtml === '
      ' 判断,其他用 !txtHtml 判断 - if (!txtHtml || txtHtml === '
      ') { - // 内容空了 - $p = $('


      '); - $textElem.html(''); // 一定要先清空,否则在 firefox 下有问题 - $textElem.append($p); - editor.selection.createRangeByElem($p, false, true); - editor.selection.restoreSelection(); - } - }); - }, - - // 粘贴事件(粘贴文字 粘贴图片) - _pasteHandle: function _pasteHandle() { - var editor = this.editor; - var config = editor.config; - var pasteFilterStyle = config.pasteFilterStyle; - var pasteTextHandle = config.pasteTextHandle; - var $textElem = editor.$textElem; - - // 粘贴图片、文本的事件,每次只能执行一个 - // 判断该次粘贴事件是否可以执行 - var pasteTime = 0; - function canDo() { - var now = Date.now(); - var flag = false; - if (now - pasteTime >= 500) { - // 间隔大于 500 ms ,可以执行 - flag = true; - } - pasteTime = now; - return flag; - } - function resetTime() { - pasteTime = 0; - } - - // 粘贴文字 - $textElem.on('paste', function (e) { - if (UA.isIE()) { - return; - } else { - // 阻止默认行为,使用 execCommand 的粘贴命令 - e.preventDefault(); - } - - // 粘贴图片和文本,只能同时使用一个 - if (!canDo()) { - return; - } - - // 获取粘贴的文字 - var pasteHtml = getPasteHtml(e, pasteFilterStyle); - var pasteText = getPasteText(e); - pasteText = pasteText.replace(/\n/gm, '
      '); - - var $selectionElem = editor.selection.getSelectionContainerElem(); - if (!$selectionElem) { - return; - } - var nodeName = $selectionElem.getNodeName(); - - // code 中只能粘贴纯文本 - if (nodeName === 'CODE' || nodeName === 'PRE') { - if (pasteTextHandle && isFunction(pasteTextHandle)) { - // 用户自定义过滤处理粘贴内容 - pasteText = '' + (pasteTextHandle(pasteText) || ''); - } - editor.cmd.do('insertHTML', '

      ' + pasteText + '

      '); - return; - } - - // 先放开注释,有问题再追查 ———— - // // 表格中忽略,可能会出现异常问题 - // if (nodeName === 'TD' || nodeName === 'TH') { - // return - // } - - if (!pasteHtml) { - // 没有内容,可继续执行下面的图片粘贴 - resetTime(); - return; - } - try { - // firefox 中,获取的 pasteHtml 可能是没有
        包裹的
      • - // 因此执行 insertHTML 会报错 - if (pasteTextHandle && isFunction(pasteTextHandle)) { - // 用户自定义过滤处理粘贴内容 - pasteHtml = '' + (pasteTextHandle(pasteHtml) || ''); - } - editor.cmd.do('insertHTML', pasteHtml); - } catch (ex) { - // 此时使用 pasteText 来兼容一下 - if (pasteTextHandle && isFunction(pasteTextHandle)) { - // 用户自定义过滤处理粘贴内容 - pasteText = '' + (pasteTextHandle(pasteText) || ''); - } - editor.cmd.do('insertHTML', '

        ' + pasteText + '

        '); - } - }); - - // 粘贴图片 - $textElem.on('paste', function (e) { - if (UA.isIE()) { - return; - } else { - e.preventDefault(); - } - - // 粘贴图片和文本,只能同时使用一个 - if (!canDo()) { - return; - } - - // 获取粘贴的图片 - var pasteFiles = getPasteImgs(e); - if (!pasteFiles || !pasteFiles.length) { - return; - } - - // 获取当前的元素 - var $selectionElem = editor.selection.getSelectionContainerElem(); - if (!$selectionElem) { - return; - } - var nodeName = $selectionElem.getNodeName(); - - // code 中粘贴忽略 - if (nodeName === 'CODE' || nodeName === 'PRE') { - return; - } - - // 上传图片 - var uploadImg = editor.uploadImg; - uploadImg.uploadImg(pasteFiles); - }); - }, - - // tab 特殊处理 - _tabHandle: function _tabHandle() { - var editor = this.editor; - var $textElem = editor.$textElem; - - $textElem.on('keydown', function (e) { - if (e.keyCode !== 9) { - return; - } - if (!editor.cmd.queryCommandSupported('insertHTML')) { - // 必须原生支持 insertHTML 命令 - return; - } - var $selectionElem = editor.selection.getSelectionContainerElem(); - if (!$selectionElem) { - return; - } - var $parentElem = $selectionElem.parent(); - var selectionNodeName = $selectionElem.getNodeName(); - var parentNodeName = $parentElem.getNodeName(); - - if (selectionNodeName === 'CODE' && parentNodeName === 'PRE') { - //
         里面
        -                editor.cmd.do('insertHTML', '    ');
        -            } else {
        -                // 普通文字
        -                editor.cmd.do('insertHTML', '    ');
        -            }
        -
        -            e.preventDefault();
        -        });
        -    },
        -
        -    // img 点击
        -    _imgHandle: function _imgHandle() {
        -        var editor = this.editor;
        -        var $textElem = editor.$textElem;
        -
        -        // 为图片增加 selected 样式
        -        $textElem.on('click', 'img', function (e) {
        -            var img = this;
        -            var $img = $(img);
        -
        -            if ($img.attr('data-w-e') === '1') {
        -                // 是表情图片,忽略
        -                return;
        -            }
        -
        -            // 记录当前点击过的图片
        -            editor._selectedImg = $img;
        -
        -            // 修改选区并 restore ,防止用户此时点击退格键,会删除其他内容
        -            editor.selection.createRangeByElem($img);
        -            editor.selection.restoreSelection();
        -        });
        -
        -        // 去掉图片的 selected 样式
        -        $textElem.on('click  keyup', function (e) {
        -            if (e.target.matches('img')) {
        -                // 点击的是图片,忽略
        -                return;
        -            }
        -            // 删除记录
        -            editor._selectedImg = null;
        -        });
        -    },
        -
        -    // 拖拽事件
        -    _dragHandle: function _dragHandle() {
        -        var editor = this.editor;
        -
        -        // 禁用 document 拖拽事件
        -        var $document = $(document);
        -        $document.on('dragleave drop dragenter dragover', function (e) {
        -            e.preventDefault();
        -        });
        -
        -        // 添加编辑区域拖拽事件
        -        var $textElem = editor.$textElem;
        -        $textElem.on('drop', function (e) {
        -            e.preventDefault();
        -            var files = e.dataTransfer && e.dataTransfer.files;
        -            if (!files || !files.length) {
        -                return;
        -            }
        -
        -            // 上传图片
        -            var uploadImg = editor.uploadImg;
        -            uploadImg.uploadImg(files);
        -        });
        -    }
        -};
        -
        -/*
        -    命令,封装 document.execCommand
        -*/
        -
        -// 构造函数
        -function Command(editor) {
        -    this.editor = editor;
        -}
        -
        -// 修改原型
        -Command.prototype = {
        -    constructor: Command,
        -
        -    // 执行命令
        -    do: function _do(name, value) {
        -        var editor = this.editor;
        -
        -        // 使用 styleWithCSS
        -        if (!editor._useStyleWithCSS) {
        -            document.execCommand('styleWithCSS', null, true);
        -            editor._useStyleWithCSS = true;
        -        }
        -
        -        // 如果无选区,忽略
        -        if (!editor.selection.getRange()) {
        -            return;
        -        }
        -
        -        // 恢复选取
        -        editor.selection.restoreSelection();
        -
        -        // 执行
        -        var _name = '_' + name;
        -        if (this[_name]) {
        -            // 有自定义事件
        -            this[_name](value);
        -        } else {
        -            // 默认 command
        -            this._execCommand(name, value);
        -        }
        -
        -        // 修改菜单状态
        -        editor.menus.changeActive();
        -
        -        // 最后,恢复选取保证光标在原来的位置闪烁
        -        editor.selection.saveRange();
        -        editor.selection.restoreSelection();
        -
        -        // 触发 onchange
        -        editor.change && editor.change();
        -    },
        -
        -    // 自定义 insertHTML 事件
        -    _insertHTML: function _insertHTML(html) {
        -        var editor = this.editor;
        -        var range = editor.selection.getRange();
        -
        -        if (this.queryCommandSupported('insertHTML')) {
        -            // W3C
        -            this._execCommand('insertHTML', html);
        -        } else if (range.insertNode) {
        -            // IE
        -            range.deleteContents();
        -            range.insertNode($(html)[0]);
        -        } else if (range.pasteHTML) {
        -            // IE <= 10
        -            range.pasteHTML(html);
        -        }
        -    },
        -
        -    // 插入 elem
        -    _insertElem: function _insertElem($elem) {
        -        var editor = this.editor;
        -        var range = editor.selection.getRange();
        -
        -        if (range.insertNode) {
        -            range.deleteContents();
        -            range.insertNode($elem[0]);
        -        }
        -    },
        -
        -    // 封装 execCommand
        -    _execCommand: function _execCommand(name, value) {
        -        document.execCommand(name, false, value);
        -    },
        -
        -    // 封装 document.queryCommandValue
        -    queryCommandValue: function queryCommandValue(name) {
        -        return document.queryCommandValue(name);
        -    },
        -
        -    // 封装 document.queryCommandState
        -    queryCommandState: function queryCommandState(name) {
        -        return document.queryCommandState(name);
        -    },
        -
        -    // 封装 document.queryCommandSupported
        -    queryCommandSupported: function queryCommandSupported(name) {
        -        return document.queryCommandSupported(name);
        -    }
        -};
        -
        -/*
        -    selection range API
        -*/
        -
        -// 构造函数
        -function API(editor) {
        -    this.editor = editor;
        -    this._currentRange = null;
        -}
        -
        -// 修改原型
        -API.prototype = {
        -    constructor: API,
        -
        -    // 获取 range 对象
        -    getRange: function getRange() {
        -        return this._currentRange;
        -    },
        -
        -    // 保存选区
        -    saveRange: function saveRange(_range) {
        -        if (_range) {
        -            // 保存已有选区
        -            this._currentRange = _range;
        -            return;
        -        }
        -
        -        // 获取当前的选区
        -        var selection = window.getSelection();
        -        if (selection.rangeCount === 0) {
        -            return;
        -        }
        -        var range = selection.getRangeAt(0);
        -
        -        // 判断选区内容是否在编辑内容之内
        -        var $containerElem = this.getSelectionContainerElem(range);
        -        if (!$containerElem) {
        -            return;
        -        }
        -        var editor = this.editor;
        -        var $textElem = editor.$textElem;
        -        if ($textElem.isContain($containerElem)) {
        -            // 是编辑内容之内的
        -            this._currentRange = range;
        -        }
        -    },
        -
        -    // 折叠选区
        -    collapseRange: function collapseRange(toStart) {
        -        if (toStart == null) {
        -            // 默认为 false
        -            toStart = false;
        -        }
        -        var range = this._currentRange;
        -        if (range) {
        -            range.collapse(toStart);
        -        }
        -    },
        -
        -    // 选中区域的文字
        -    getSelectionText: function getSelectionText() {
        -        var range = this._currentRange;
        -        if (range) {
        -            return this._currentRange.toString();
        -        } else {
        -            return '';
        -        }
        -    },
        -
        -    // 选区的 $Elem
        -    getSelectionContainerElem: function getSelectionContainerElem(range) {
        -        range = range || this._currentRange;
        -        var elem = void 0;
        -        if (range) {
        -            elem = range.commonAncestorContainer;
        -            return $(elem.nodeType === 1 ? elem : elem.parentNode);
        -        }
        -    },
        -    getSelectionStartElem: function getSelectionStartElem(range) {
        -        range = range || this._currentRange;
        -        var elem = void 0;
        -        if (range) {
        -            elem = range.startContainer;
        -            return $(elem.nodeType === 1 ? elem : elem.parentNode);
        -        }
        -    },
        -    getSelectionEndElem: function getSelectionEndElem(range) {
        -        range = range || this._currentRange;
        -        var elem = void 0;
        -        if (range) {
        -            elem = range.endContainer;
        -            return $(elem.nodeType === 1 ? elem : elem.parentNode);
        -        }
        -    },
        -
        -    // 选区是否为空
        -    isSelectionEmpty: function isSelectionEmpty() {
        -        var range = this._currentRange;
        -        if (range && range.startContainer) {
        -            if (range.startContainer === range.endContainer) {
        -                if (range.startOffset === range.endOffset) {
        -                    return true;
        -                }
        -            }
        -        }
        -        return false;
        -    },
        -
        -    // 恢复选区
        -    restoreSelection: function restoreSelection() {
        -        var selection = window.getSelection();
        -        selection.removeAllRanges();
        -        selection.addRange(this._currentRange);
        -    },
        -
        -    // 创建一个空白(即 ​ 字符)选区
        -    createEmptyRange: function createEmptyRange() {
        -        var editor = this.editor;
        -        var range = this.getRange();
        -        var $elem = void 0;
        -
        -        if (!range) {
        -            // 当前无 range
        -            return;
        -        }
        -        if (!this.isSelectionEmpty()) {
        -            // 当前选区必须没有内容才可以
        -            return;
        -        }
        -
        -        try {
        -            // 目前只支持 webkit 内核
        -            if (UA.isWebkit()) {
        -                // 插入 ​
        -                editor.cmd.do('insertHTML', '​');
        -                // 修改 offset 位置
        -                range.setEnd(range.endContainer, range.endOffset + 1);
        -                // 存储
        -                this.saveRange(range);
        -            } else {
        -                $elem = $('');
        -                editor.cmd.do('insertElem', $elem);
        -                this.createRangeByElem($elem, true);
        -            }
        -        } catch (ex) {
        -            // 部分情况下会报错,兼容一下
        -        }
        -    },
        -
        -    // 根据 $Elem 设置选区
        -    createRangeByElem: function createRangeByElem($elem, toStart, isContent) {
        -        // $elem - 经过封装的 elem
        -        // toStart - true 开始位置,false 结束位置
        -        // isContent - 是否选中Elem的内容
        -        if (!$elem.length) {
        -            return;
        -        }
        -
        -        var elem = $elem[0];
        -        var range = document.createRange();
        -
        -        if (isContent) {
        -            range.selectNodeContents(elem);
        -        } else {
        -            range.selectNode(elem);
        -        }
        -
        -        if (typeof toStart === 'boolean') {
        -            range.collapse(toStart);
        -        }
        -
        -        // 存储 range
        -        this.saveRange(range);
        -    }
        -};
        -
        -/*
        -    上传进度条
        -*/
        -
        -function Progress(editor) {
        -    this.editor = editor;
        -    this._time = 0;
        -    this._isShow = false;
        -    this._isRender = false;
        -    this._timeoutId = 0;
        -    this.$textContainer = editor.$textContainerElem;
        -    this.$bar = $('
        '); -} - -Progress.prototype = { - constructor: Progress, - - show: function show(progress) { - var _this = this; - - // 状态处理 - if (this._isShow) { - return; - } - this._isShow = true; - - // 渲染 - var $bar = this.$bar; - if (!this._isRender) { - var $textContainer = this.$textContainer; - $textContainer.append($bar); - } else { - this._isRender = true; - } - - // 改变进度(节流,100ms 渲染一次) - if (Date.now() - this._time > 100) { - if (progress <= 1) { - $bar.css('width', progress * 100 + '%'); - this._time = Date.now(); - } - } - - // 隐藏 - var timeoutId = this._timeoutId; - if (timeoutId) { - clearTimeout(timeoutId); - } - timeoutId = setTimeout(function () { - _this._hide(); - }, 500); - }, - - _hide: function _hide() { - var $bar = this.$bar; - $bar.remove(); - - // 修改状态 - this._time = 0; - this._isShow = false; - this._isRender = false; - } -}; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { - return typeof obj; -} : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; -}; - -/* - 上传图片 -*/ - -// 构造函数 -function UploadImg(editor) { - this.editor = editor; -} - -// 原型 -UploadImg.prototype = { - constructor: UploadImg, - - // 根据 debug 弹出不同的信息 - _alert: function _alert(alertInfo, debugInfo) { - var editor = this.editor; - var debug = editor.config.debug; - var customAlert = editor.config.customAlert; - - if (debug) { - throw new Error('wangEditor: ' + (debugInfo || alertInfo)); - } else { - if (customAlert && typeof customAlert === 'function') { - customAlert(alertInfo); - } else { - alert(alertInfo); - } - } - }, - - // 根据链接插入图片 - insertLinkImg: function insertLinkImg(link) { - var _this2 = this; - - if (!link) { - return; - } - var editor = this.editor; - var config = editor.config; - - // 校验格式 - var linkImgCheck = config.linkImgCheck; - var checkResult = void 0; - if (linkImgCheck && typeof linkImgCheck === 'function') { - checkResult = linkImgCheck(link); - if (typeof checkResult === 'string') { - // 校验失败,提示信息 - alert(checkResult); - return; - } - } - - editor.cmd.do('insertHTML', ''); - - // 验证图片 url 是否有效,无效的话给出提示 - var img = document.createElement('img'); - img.onload = function () { - var callback = config.linkImgCallback; - if (callback && typeof callback === 'function') { - callback(link); - } - - img = null; - }; - img.onerror = function () { - img = null; - // 无法成功下载图片 - _this2._alert('插入图片错误', 'wangEditor: \u63D2\u5165\u56FE\u7247\u51FA\u9519\uFF0C\u56FE\u7247\u94FE\u63A5\u662F "' + link + '"\uFF0C\u4E0B\u8F7D\u8BE5\u94FE\u63A5\u5931\u8D25'); - return; - }; - img.onabort = function () { - img = null; - }; - img.src = link; - }, - - // 上传图片 - uploadImg: function uploadImg(files) { - var _this3 = this; - - if (!files || !files.length) { - return; - } - - // ------------------------------ 获取配置信息 ------------------------------ - var editor = this.editor; - var config = editor.config; - var uploadImgServer = config.uploadImgServer; - var uploadImgShowBase64 = config.uploadImgShowBase64; - - var maxSize = config.uploadImgMaxSize; - var maxSizeM = maxSize / 1024 / 1024; - var maxLength = config.uploadImgMaxLength || 10000; - var uploadFileName = config.uploadFileName || ''; - var uploadImgParams = config.uploadImgParams || {}; - var uploadImgParamsWithUrl = config.uploadImgParamsWithUrl; - var uploadImgHeaders = config.uploadImgHeaders || {}; - var hooks = config.uploadImgHooks || {}; - var timeout = config.uploadImgTimeout || 3000; - var withCredentials = config.withCredentials; - if (withCredentials == null) { - withCredentials = false; - } - var customUploadImg = config.customUploadImg; - - if (!customUploadImg) { - // 没有 customUploadImg 的情况下,需要如下两个配置才能继续进行图片上传 - if (!uploadImgServer && !uploadImgShowBase64) { - return; - } - } - - // ------------------------------ 验证文件信息 ------------------------------ - var resultFiles = []; - var errInfo = []; - arrForEach(files, function (file) { - var name = file.name; - var size = file.size; - - // chrome 低版本 name === undefined - if (!name || !size) { - return; - } - - if (/\.(jpg|jpeg|png|bmp|gif)$/i.test(name) === false) { - // 后缀名不合法,不是图片 - errInfo.push('\u3010' + name + '\u3011\u4E0D\u662F\u56FE\u7247'); - return; - } - if (maxSize < size) { - // 上传图片过大 - errInfo.push('\u3010' + name + '\u3011\u5927\u4E8E ' + maxSizeM + 'M'); - return; - } - - // 验证通过的加入结果列表 - resultFiles.push(file); - }); - // 抛出验证信息 - if (errInfo.length) { - this._alert('图片验证未通过: \n' + errInfo.join('\n')); - return; - } - if (resultFiles.length > maxLength) { - this._alert('一次最多上传' + maxLength + '张图片'); - return; - } - - // ------------------------------ 自定义上传 ------------------------------ - if (customUploadImg && typeof customUploadImg === 'function') { - customUploadImg(resultFiles, this.insertLinkImg.bind(this)); - - // 阻止以下代码执行 - return; - } - - // 添加图片数据 - var formdata = new FormData(); - arrForEach(resultFiles, function (file) { - var name = uploadFileName || file.name; - formdata.append(name, file); - }); - - // ------------------------------ 上传图片 ------------------------------ - if (uploadImgServer && typeof uploadImgServer === 'string') { - // 添加参数 - var uploadImgServerArr = uploadImgServer.split('#'); - uploadImgServer = uploadImgServerArr[0]; - var uploadImgServerHash = uploadImgServerArr[1] || ''; - objForEach(uploadImgParams, function (key, val) { - val = encodeURIComponent(val); - - // 第一,将参数拼接到 url 中 - if (uploadImgParamsWithUrl) { - if (uploadImgServer.indexOf('?') > 0) { - uploadImgServer += '&'; - } else { - uploadImgServer += '?'; - } - uploadImgServer = uploadImgServer + key + '=' + val; - } - - // 第二,将参数添加到 formdata 中 - formdata.append(key, val); - }); - if (uploadImgServerHash) { - uploadImgServer += '#' + uploadImgServerHash; - } - - // 定义 xhr - var xhr = new XMLHttpRequest(); - xhr.open('POST', uploadImgServer); - - // 设置超时 - xhr.timeout = timeout; - xhr.ontimeout = function () { - // hook - timeout - if (hooks.timeout && typeof hooks.timeout === 'function') { - hooks.timeout(xhr, editor); - } - - _this3._alert('上传图片超时'); - }; - - // 监控 progress - if (xhr.upload) { - xhr.upload.onprogress = function (e) { - var percent = void 0; - // 进度条 - var progressBar = new Progress(editor); - if (e.lengthComputable) { - percent = e.loaded / e.total; - progressBar.show(percent); - } - }; - } - - // 返回数据 - xhr.onreadystatechange = function () { - var result = void 0; - if (xhr.readyState === 4) { - if (xhr.status < 200 || xhr.status >= 300) { - // hook - error - if (hooks.error && typeof hooks.error === 'function') { - hooks.error(xhr, editor); - } - - // xhr 返回状态错误 - _this3._alert('上传图片发生错误', '\u4E0A\u4F20\u56FE\u7247\u53D1\u751F\u9519\u8BEF\uFF0C\u670D\u52A1\u5668\u8FD4\u56DE\u72B6\u6001\u662F ' + xhr.status); - return; - } - - result = xhr.responseText; - if ((typeof result === 'undefined' ? 'undefined' : _typeof(result)) !== 'object') { - try { - result = JSON.parse(result); - } catch (ex) { - // hook - fail - if (hooks.fail && typeof hooks.fail === 'function') { - hooks.fail(xhr, editor, result); - } - - _this3._alert('上传图片失败', '上传图片返回结果错误,返回结果是: ' + result); - return; - } - } - if (!hooks.customInsert && result.errno != '0') { - // hook - fail - if (hooks.fail && typeof hooks.fail === 'function') { - hooks.fail(xhr, editor, result); - } - - // 数据错误 - _this3._alert('上传图片失败', '上传图片返回结果错误,返回结果 errno=' + result.errno); - } else { - if (hooks.customInsert && typeof hooks.customInsert === 'function') { - // 使用者自定义插入方法 - hooks.customInsert(_this3.insertLinkImg.bind(_this3), result, editor); - } else { - // 将图片插入编辑器 - var data = result.data || []; - data.forEach(function (link) { - _this3.insertLinkImg(link); - }); - } - - // hook - success - if (hooks.success && typeof hooks.success === 'function') { - hooks.success(xhr, editor, result); - } - } - } - }; - - // hook - before - if (hooks.before && typeof hooks.before === 'function') { - var beforeResult = hooks.before(xhr, editor, resultFiles); - if (beforeResult && (typeof beforeResult === 'undefined' ? 'undefined' : _typeof(beforeResult)) === 'object') { - if (beforeResult.prevent) { - // 如果返回的结果是 {prevent: true, msg: 'xxxx'} 则表示用户放弃上传 - this._alert(beforeResult.msg); - return; - } - } - } - - // 自定义 headers - objForEach(uploadImgHeaders, function (key, val) { - xhr.setRequestHeader(key, val); - }); - - // 跨域传 cookie - xhr.withCredentials = withCredentials; - - // 发送请求 - xhr.send(formdata); - - // 注意,要 return 。不去操作接下来的 base64 显示方式 - return; - } - - // ------------------------------ 显示 base64 格式 ------------------------------ - if (uploadImgShowBase64) { - arrForEach(files, function (file) { - var _this = _this3; - var reader = new FileReader(); - reader.readAsDataURL(file); - reader.onload = function () { - _this.insertLinkImg(this.result); - }; - }); - } - } -}; - -/* - 编辑器构造函数 -*/ - -// id,累加 -var editorId = 1; - -// 构造函数 -function Editor(toolbarSelector, textSelector) { - if (toolbarSelector == null) { - // 没有传入任何参数,报错 - throw new Error('错误:初始化编辑器时候未传入任何参数,请查阅文档'); - } - // id,用以区分单个页面不同的编辑器对象 - this.id = 'wangEditor-' + editorId++; - - this.toolbarSelector = toolbarSelector; - this.textSelector = textSelector; - - // 自定义配置 - this.customConfig = {}; -} - -// 修改原型 -Editor.prototype = { - constructor: Editor, - - // 初始化配置 - _initConfig: function _initConfig() { - // _config 是默认配置,this.customConfig 是用户自定义配置,将它们 merge 之后再赋值 - var target = {}; - this.config = Object.assign(target, config, this.customConfig); - - // 将语言配置,生成正则表达式 - var langConfig = this.config.lang || {}; - var langArgs = []; - objForEach(langConfig, function (key, val) { - // key 即需要生成正则表达式的规则,如“插入链接” - // val 即需要被替换成的语言,如“insert link” - langArgs.push({ - reg: new RegExp(key, 'img'), - val: val - - }); - }); - this.config.langArgs = langArgs; - }, - - // 初始化 DOM - _initDom: function _initDom() { - var _this = this; - - var toolbarSelector = this.toolbarSelector; - var $toolbarSelector = $(toolbarSelector); - var textSelector = this.textSelector; - - var config$$1 = this.config; - var zIndex = config$$1.zIndex; - - // 定义变量 - var $toolbarElem = void 0, - $textContainerElem = void 0, - $textElem = void 0, - $children = void 0; - - if (textSelector == null) { - // 只传入一个参数,即是容器的选择器或元素,toolbar 和 text 的元素自行创建 - $toolbarElem = $('
        '); - $textContainerElem = $('
        '); - - // 将编辑器区域原有的内容,暂存起来 - $children = $toolbarSelector.children(); - - // 添加到 DOM 结构中 - $toolbarSelector.append($toolbarElem).append($textContainerElem); - - // 自行创建的,需要配置默认的样式 - $toolbarElem.css('background-color', '#f1f1f1').css('border', '1px solid #ccc'); - $textContainerElem.css('border', '1px solid #ccc').css('border-top', 'none').css('height', '300px'); - } else { - // toolbar 和 text 的选择器都有值,记录属性 - $toolbarElem = $toolbarSelector; - $textContainerElem = $(textSelector); - // 将编辑器区域原有的内容,暂存起来 - $children = $textContainerElem.children(); - } - - // 编辑区域 - $textElem = $('
        '); - $textElem.attr('contenteditable', 'true').css('width', '100%').css('height', '100%'); - - // 初始化编辑区域内容 - if ($children && $children.length) { - $textElem.append($children); - } else { - $textElem.append($('


        ')); - } - - // 编辑区域加入DOM - $textContainerElem.append($textElem); - - // 设置通用的 class - $toolbarElem.addClass('w-e-toolbar'); - $textContainerElem.addClass('w-e-text-container'); - $textContainerElem.css('z-index', zIndex); - $textElem.addClass('w-e-text'); - - // 添加 ID - var toolbarElemId = getRandom('toolbar-elem'); - $toolbarElem.attr('id', toolbarElemId); - var textElemId = getRandom('text-elem'); - $textElem.attr('id', textElemId); - - // 记录属性 - this.$toolbarElem = $toolbarElem; - this.$textContainerElem = $textContainerElem; - this.$textElem = $textElem; - this.toolbarElemId = toolbarElemId; - this.textElemId = textElemId; - - // 记录输入法的开始和结束 - var compositionEnd = true; - $textContainerElem.on('compositionstart', function () { - // 输入法开始输入 - compositionEnd = false; - }); - $textContainerElem.on('compositionend', function () { - // 输入法结束输入 - compositionEnd = true; - }); - - // 绑定 onchange - $textContainerElem.on('click keyup', function () { - // 输入法结束才出发 onchange - compositionEnd && _this.change && _this.change(); - }); - $toolbarElem.on('click', function () { - this.change && this.change(); - }); - - //绑定 onfocus 与 onblur 事件 - if (config$$1.onfocus || config$$1.onblur) { - // 当前编辑器是否是焦点状态 - this.isFocus = false; - - $(document).on('click', function (e) { - //判断当前点击元素是否在编辑器内 - var isChild = $textElem.isContain($(e.target)); - - //判断当前点击元素是否为工具栏 - var isToolbar = $toolbarElem.isContain($(e.target)); - var isMenu = $toolbarElem[0] == e.target ? true : false; - - if (!isChild) { - //若为选择工具栏中的功能,则不视为成blur操作 - if (isToolbar && !isMenu) { - return; - } - - if (_this.isFocus) { - _this.onblur && _this.onblur(); - } - _this.isFocus = false; - } else { - if (!_this.isFocus) { - _this.onfocus && _this.onfocus(); - } - _this.isFocus = true; - } - }); - } - }, - - // 封装 command - _initCommand: function _initCommand() { - this.cmd = new Command(this); - }, - - // 封装 selection range API - _initSelectionAPI: function _initSelectionAPI() { - this.selection = new API(this); - }, - - // 添加图片上传 - _initUploadImg: function _initUploadImg() { - this.uploadImg = new UploadImg(this); - }, - - // 初始化菜单 - _initMenus: function _initMenus() { - this.menus = new Menus(this); - this.menus.init(); - }, - - // 添加 text 区域 - _initText: function _initText() { - this.txt = new Text(this); - this.txt.init(); - }, - - // 初始化选区,将光标定位到内容尾部 - initSelection: function initSelection(newLine) { - var $textElem = this.$textElem; - var $children = $textElem.children(); - if (!$children.length) { - // 如果编辑器区域无内容,添加一个空行,重新设置选区 - $textElem.append($('


        ')); - this.initSelection(); - return; - } - - var $last = $children.last(); - - if (newLine) { - // 新增一个空行 - var html = $last.html().toLowerCase(); - var nodeName = $last.getNodeName(); - if (html !== '
        ' && html !== '' || nodeName !== 'P') { - // 最后一个元素不是


        ,添加一个空行,重新设置选区 - $textElem.append($('


        ')); - this.initSelection(); - return; - } - } - - this.selection.createRangeByElem($last, false, true); - this.selection.restoreSelection(); - }, - - // 绑定事件 - _bindEvent: function _bindEvent() { - // -------- 绑定 onchange 事件 -------- - var onChangeTimeoutId = 0; - var beforeChangeHtml = this.txt.html(); - var config$$1 = this.config; - - // onchange 触发延迟时间 - var onchangeTimeout = config$$1.onchangeTimeout; - onchangeTimeout = parseInt(onchangeTimeout, 10); - if (!onchangeTimeout || onchangeTimeout <= 0) { - onchangeTimeout = 200; - } - - var onchange = config$$1.onchange; - if (onchange && typeof onchange === 'function') { - // 触发 change 的有三个场景: - // 1. $textContainerElem.on('click keyup') - // 2. $toolbarElem.on('click') - // 3. editor.cmd.do() - this.change = function () { - // 判断是否有变化 - var currentHtml = this.txt.html(); - - if (currentHtml.length === beforeChangeHtml.length) { - // 需要比较每一个字符 - if (currentHtml === beforeChangeHtml) { - return; - } - } - - // 执行,使用节流 - if (onChangeTimeoutId) { - clearTimeout(onChangeTimeoutId); - } - onChangeTimeoutId = setTimeout(function () { - // 触发配置的 onchange 函数 - onchange(currentHtml); - beforeChangeHtml = currentHtml; - }, onchangeTimeout); - }; - } - - // -------- 绑定 onblur 事件 -------- - var onblur = config$$1.onblur; - if (onblur && typeof onblur === 'function') { - this.onblur = function () { - var currentHtml = this.txt.html(); - onblur(currentHtml); - }; - } - - // -------- 绑定 onfocus 事件 -------- - var onfocus = config$$1.onfocus; - if (onfocus && typeof onfocus === 'function') { - this.onfocus = function () { - onfocus(); - }; - } - }, - - // 创建编辑器 - create: function create() { - // 初始化配置信息 - this._initConfig(); - - // 初始化 DOM - this._initDom(); - - // 封装 command API - this._initCommand(); - - // 封装 selection range API - this._initSelectionAPI(); - - // 添加 text - this._initText(); - - // 初始化菜单 - this._initMenus(); - - // 添加 图片上传 - this._initUploadImg(); - - // 初始化选区,将光标定位到内容尾部 - this.initSelection(true); - - // 绑定事件 - this._bindEvent(); - }, - - // 解绑所有事件(暂时不对外开放) - _offAllEvent: function _offAllEvent() { - $.offAll(); - } -}; - -// 检验是否浏览器环境 -try { - document; -} catch (ex) { - throw new Error('请在浏览器环境下运行'); -} - -// polyfill -polyfill(); - -// 这里的 `inlinecss` 将被替换成 css 代码的内容,详情可去 ./gulpfile.js 中搜索 `inlinecss` 关键字 -var inlinecss = '.w-e-toolbar,.w-e-text-container,.w-e-menu-panel { padding: 0; margin: 0; box-sizing: border-box;}.w-e-toolbar *,.w-e-text-container *,.w-e-menu-panel * { padding: 0; margin: 0; box-sizing: border-box;}.w-e-clear-fix:after { content: ""; display: table; clear: both;}.w-e-toolbar .w-e-droplist { position: absolute; left: 0; top: 0; background-color: #fff; border: 1px solid #f1f1f1; border-right-color: #ccc; border-bottom-color: #ccc;}.w-e-toolbar .w-e-droplist .w-e-dp-title { text-align: center; color: #999; line-height: 2; border-bottom: 1px solid #f1f1f1; font-size: 13px;}.w-e-toolbar .w-e-droplist ul.w-e-list { list-style: none; line-height: 1;}.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item { color: #333; padding: 5px 0;}.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item:hover { background-color: #f1f1f1;}.w-e-toolbar .w-e-droplist ul.w-e-block { list-style: none; text-align: left; padding: 5px;}.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item { display: inline-block; *display: inline; *zoom: 1; padding: 3px 5px;}.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item:hover { background-color: #f1f1f1;}@font-face { font-family: \'w-e-icon\'; src: url(data:application/x-font-woff;charset=utf-8;base64,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) format(\'truetype\'); font-weight: normal; font-style: normal;}[class^="w-e-icon-"],[class*=" w-e-icon-"] { /* use !important to prevent issues with browser extensions that change fonts */ font-family: \'w-e-icon\' !important; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; /* Better Font Rendering =========== */ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;}.w-e-icon-close:before { content: "\\f00d";}.w-e-icon-upload2:before { content: "\\e9c6";}.w-e-icon-trash-o:before { content: "\\f014";}.w-e-icon-header:before { content: "\\f1dc";}.w-e-icon-pencil2:before { content: "\\e906";}.w-e-icon-paint-brush:before { content: "\\f1fc";}.w-e-icon-image:before { content: "\\e90d";}.w-e-icon-play:before { content: "\\e912";}.w-e-icon-location:before { content: "\\e947";}.w-e-icon-undo:before { content: "\\e965";}.w-e-icon-redo:before { content: "\\e966";}.w-e-icon-quotes-left:before { content: "\\e977";}.w-e-icon-list-numbered:before { content: "\\e9b9";}.w-e-icon-list2:before { content: "\\e9bb";}.w-e-icon-link:before { content: "\\e9cb";}.w-e-icon-happy:before { content: "\\e9df";}.w-e-icon-bold:before { content: "\\ea62";}.w-e-icon-underline:before { content: "\\ea63";}.w-e-icon-italic:before { content: "\\ea64";}.w-e-icon-strikethrough:before { content: "\\ea65";}.w-e-icon-table2:before { content: "\\ea71";}.w-e-icon-paragraph-left:before { content: "\\ea77";}.w-e-icon-paragraph-center:before { content: "\\ea78";}.w-e-icon-paragraph-right:before { content: "\\ea79";}.w-e-icon-terminal:before { content: "\\f120";}.w-e-icon-page-break:before { content: "\\ea68";}.w-e-icon-cancel-circle:before { content: "\\ea0d";}.w-e-toolbar { display: -webkit-box; display: -ms-flexbox; display: flex; padding: 0 5px; /* flex-wrap: wrap; */ /* 单个菜单 */}.w-e-toolbar .w-e-menu { position: relative; text-align: center; padding: 5px 10px; cursor: pointer;}.w-e-toolbar .w-e-menu i { color: #999;}.w-e-toolbar .w-e-menu:hover i { color: #333;}.w-e-toolbar .w-e-active i { color: #1e88e5;}.w-e-toolbar .w-e-active:hover i { color: #1e88e5;}.w-e-text-container .w-e-panel-container { position: absolute; top: 0; left: 50%; border: 1px solid #ccc; border-top: 0; box-shadow: 1px 1px 2px #ccc; color: #333; background-color: #fff; /* 为 emotion panel 定制的样式 */ /* 上传图片的 panel 定制样式 */}.w-e-text-container .w-e-panel-container .w-e-panel-close { position: absolute; right: 0; top: 0; padding: 5px; margin: 2px 5px 0 0; cursor: pointer; color: #999;}.w-e-text-container .w-e-panel-container .w-e-panel-close:hover { color: #333;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title { list-style: none; display: -webkit-box; display: -ms-flexbox; display: flex; font-size: 14px; margin: 2px 10px 0 10px; border-bottom: 1px solid #f1f1f1;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-item { padding: 3px 5px; color: #999; cursor: pointer; margin: 0 3px; position: relative; top: 1px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-active { color: #333; border-bottom: 1px solid #333; cursor: default; font-weight: 700;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content { padding: 10px 15px 10px 15px; font-size: 16px; /* 输入框的样式 */ /* 按钮的样式 */}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input:focus,.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus,.w-e-text-container .w-e-panel-container .w-e-panel-tab-content button:focus { outline: none;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea { width: 100%; border: 1px solid #ccc; padding: 5px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus { border-color: #1e88e5;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text] { border: none; border-bottom: 1px solid #ccc; font-size: 14px; height: 20px; color: #333; text-align: left;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].small { width: 30px; text-align: center;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].block { display: block; width: 100%; margin: 10px 0;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text]:focus { border-bottom: 2px solid #1e88e5;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button { font-size: 14px; color: #1e88e5; border: none; padding: 5px 10px; background-color: #fff; cursor: pointer; border-radius: 3px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.left { float: left; margin-right: 10px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.right { float: right; margin-left: 10px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.gray { color: #999;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.red { color: #c24f4a;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button:hover { background-color: #f1f1f1;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container:after { content: ""; display: table; clear: both;}.w-e-text-container .w-e-panel-container .w-e-emoticon-container .w-e-item { cursor: pointer; font-size: 18px; padding: 0 3px; display: inline-block; *display: inline; *zoom: 1;}.w-e-text-container .w-e-panel-container .w-e-up-img-container { text-align: center;}.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn { display: inline-block; *display: inline; *zoom: 1; color: #999; cursor: pointer; font-size: 60px; line-height: 1;}.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn:hover { color: #333;}.w-e-text-container { position: relative;}.w-e-text-container .w-e-progress { position: absolute; background-color: #1e88e5; bottom: 0; left: 0; height: 1px;}.w-e-text { padding: 0 10px; overflow-y: scroll;}.w-e-text p,.w-e-text h1,.w-e-text h2,.w-e-text h3,.w-e-text h4,.w-e-text h5,.w-e-text table,.w-e-text pre { margin: 10px 0; line-height: 1.5;}.w-e-text ul,.w-e-text ol { margin: 10px 0 10px 20px;}.w-e-text blockquote { display: block; border-left: 8px solid #d0e5f2; padding: 5px 10px; margin: 10px 0; line-height: 1.4; font-size: 100%; background-color: #f1f1f1;}.w-e-text code { display: inline-block; *display: inline; *zoom: 1; background-color: #f1f1f1; border-radius: 3px; padding: 3px 5px; margin: 0 3px;}.w-e-text pre code { display: block;}.w-e-text table { border-top: 1px solid #ccc; border-left: 1px solid #ccc;}.w-e-text table td,.w-e-text table th { border-bottom: 1px solid #ccc; border-right: 1px solid #ccc; padding: 3px 5px;}.w-e-text table th { border-bottom: 2px solid #ccc; text-align: center;}.w-e-text:focus { outline: none;}.w-e-text img { cursor: pointer;}.w-e-text img:hover { box-shadow: 0 0 5px #333;}'; - -// 将 css 代码添加到