Liyuan Li 5 years ago
parent
commit
e3539ea7e2

+ 1 - 1
.github/ISSUE_TEMPLATE/bug_report.md

@@ -3,7 +3,7 @@ name: 报告缺陷
 about: 报告缺陷以帮助我们改进
 ---
 
-**请先看[《提问的智慧》](https://hacpai.com/article/1536377163156)**,并尝试到[黑客派](https://hacpai.com)搜寻资料解决问题。
+**请先看[《提问的智慧》](https://ld246.com/article/1536377163156)**,并尝试到[链滴](https://ld246.com)搜寻资料解决问题。
 
 ----
 

+ 1 - 0
CHANGELOG.md

@@ -81,6 +81,7 @@
 
 ### v3.5.3 / 2020-09-xx
 
+* [753](https://github.com/Vanessa219/vditor/issues/753) 更新社区地址为 ld246.com `文档相关`
 * [752](https://github.com/Vanessa219/vditor/issues/752) 图表和脑图 undo bug `修复缺陷`
 * [749](https://github.com/Vanessa219/vditor/issues/749) 即时渲染模式转义符 \ 改进 `改进功能`
 

File diff suppressed because it is too large
+ 4 - 4
README.md


File diff suppressed because it is too large
+ 3 - 3
README_en_US.md


+ 4 - 4
__test__/methods/index.spec.ts

@@ -8,7 +8,7 @@ describe("use puppeteer to test methods", () => {
     const defaultValue = `下一代的 Markdown 编辑器,为未来而构建
 [Vditor](https://github.com/Vanessa219/vditor) 是一款浏览器端的 Markdown 编辑器,使用 TypeScript 实现。`;
     const insertValue = "于是,Vditor 就这样诞生了。";
-    const updateValue = "* [Vditor 使用指南](https://hacpai.com/article/1549638745630?r=Vanessa)";
+    const updateValue = "* [Vditor 使用指南](https://ld246.com/article/1549638745630?r=Vanessa)";
 
     beforeAll(async () => {
         browser = await puppeteer.launch();
@@ -111,7 +111,7 @@ describe("use puppeteer to test methods", () => {
         const result = await page.evaluate(() => {
             vditorTest.enableCache();
             vditorTest.setSelection(0, 14);
-            vditorTest.updateValue("* [Vditor 使用指南](https://hacpai.com/article/1549638745630?r=Vanessa)");
+            vditorTest.updateValue("* [Vditor 使用指南](https://ld246.com/article/1549638745630?r=Vanessa)");
             return {
                 value: vditorTest.getValue(),
                 cache: localStorage.getItem("vditorvditorTest"),
@@ -131,9 +131,9 @@ describe("use puppeteer to test methods", () => {
 
     it("method: html2md", async () => {
         const result = await page.evaluate(() => {
-            return vditorTest.html2md('<a href="https://hacpai.com/tag/vditor">讨论区</a>');
+            return vditorTest.html2md('<a href="https://ld246.com/tag/vditor">讨论区</a>');
         });
-        expect(result).toBe("[讨论区](https://hacpai.com/tag/vditor)");
+        expect(result).toBe("[讨论区](https://ld246.com/tag/vditor)");
     });
 
     it("method: isUploading false", async () => {

+ 2 - 2
__test__/util/Options.test.ts

@@ -70,7 +70,7 @@ describe("Options", () => {
             cache,
             preview: {
                 mode: "both",
-                url: "https://hacpai.com/md",
+                url: "https://ld246.com/md",
             },
         });
         expect(options.merge()).toMatchObject({
@@ -78,7 +78,7 @@ describe("Options", () => {
             preview: {
                 delay: 1000,
                 mode: "both",
-                url: "https://hacpai.com/md",
+                url: "https://ld246.com/md",
             },
         });
     });

+ 1 - 1
bower.json

@@ -11,5 +11,5 @@
     "markdown",
     "b3log"
   ],
-  "homepage": "https://hacpai.com/tag/vditor"
+  "homepage": "https://ld246.com/tag/vditor"
 }

+ 1 - 1
demo/index.js

@@ -74,7 +74,7 @@ window.vditor = new Vditor('vditor', {
   },
   hint: {
     emojiPath: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/images/emoji',
-    emojiTail: '<a href="https://hacpai.com/settings/function" target="_blank">设置常用表情</a>',
+    emojiTail: '<a href="https://ld246.com/settings/function" target="_blank">设置常用表情</a>',
     emoji: {
       'sd': '💔',
       'j': 'https://unpkg.com/[email protected]/dist/images/emoji/j.png',

+ 3 - 3
demo/jest-puppeteer.js

@@ -28,7 +28,7 @@ window.vditorTest = new Vditor('vditorTest', {
   },
   hint: {
     emojiPath: 'https://cdn.jsdelivr.net/npm/vditor/dist/images/emoji',
-    emojiTail: '<a href="https://hacpai.com/settings/function" target="_blank">设置常用表情</a>',
+    emojiTail: '<a href="https://ld246.com/settings/function" target="_blank">设置常用表情</a>',
     emoji: {
       '+1': '👍',
       '-1': '👎',
@@ -40,11 +40,11 @@ window.vditorTest = new Vditor('vditorTest', {
       return [
         {
           value: '@88250',
-          html: '<img src="https://img.hacpai.com/avatar/1353745196354_1535379434567.png?imageView2/1/w/52/h/52/interlace/0/q"> 88250',
+          html: '<img src="https://img.ld246.com/avatar/1353745196354_1535379434567.png?imageView2/1/w/52/h/52/interlace/0/q"> 88250',
         },
         {
           value: '@Vanessa',
-          html: '<img src="https://img.hacpai.com/avatar/1353745196354_1535379434567.png?imageView2/1/w/52/h/52/interlace/0/q"> Vanessa',
+          html: '<img src="https://img.ld246.com/avatar/1353745196354_1535379434567.png?imageView2/1/w/52/h/52/interlace/0/q"> Vanessa',
         }]
     },
   },

+ 1 - 1
demo/markdown/ko_KR.md

@@ -384,4 +384,4 @@ https://www.youtube.com/watch?v=S4xoOW4DVKE
 
 ## 바로 가기
 
-우리 편집기는 많은 단축키를 지원합니다. 자세한 내용은 [키보드 단축키](https://hacpai.com/article/1582778815353)를 참조하십시오 (또는 툴바의 "`?`" 누르세요 ?).
+우리 편집기는 많은 단축키를 지원합니다. 자세한 내용은 [키보드 단축키](https://ld246.com/article/1582778815353)를 참조하십시오 (또는 툴바의 "`?`" 누르세요 ?).

+ 3 - 3
demo/markdown/zh_CN.md

@@ -14,7 +14,7 @@
 - *倾斜* - `*倾斜*`
 - ~~删除线~~ - `~~删除线~~`
 - `Code 标记` - `` `Code 标记` ``
-- [超级链接](https://hacpai.com) - `[超级链接](https://hacpai.com)`
+- [超级链接](https://ld246.com) - `[超级链接](https://ld246.com)`
 - [[email protected]](mailto:[email protected]) - `[[email protected]](mailto:[email protected])`
 
 ### 提及用户
@@ -28,7 +28,7 @@
 
 ### 表情符号 Emoji
 
-支持大部分标准的表情符号,可使用输入法直接输入,也可手动输入字符格式。通过输入 `:` 触发自动完成,可在个人设置中[设置常用表情](https://hacpai.com/settings/function)。
+支持大部分标准的表情符号,可使用输入法直接输入,也可手动输入字符格式。通过输入 `:` 触发自动完成,可在个人设置中[设置常用表情](https://ld246.com/settings/function)。
 
 #### 一些表情例子
 
@@ -372,4 +372,4 @@ https://v.qq.com/x/cover/zf2z0xpqcculhcz/y0016tj0qvh.html
 
 ## 快捷键
 
-我们的编辑器支持很多快捷键,具体请参考 [键盘快捷键](https://hacpai.com/article/1582778815353)
+我们的编辑器支持很多快捷键,具体请参考 [键盘快捷键](https://ld246.com/article/1582778815353)

+ 1 - 1
package.json

@@ -6,7 +6,7 @@
   "homepage": "https://b3log.org/vditor",
   "jsdelivr": "dist/index.min.js",
   "main": "dist/index.min.js",
-  "funding": "https://hacpai.com/sponsor",
+  "funding": "https://ld246.com/sponsor",
   "files": [
     "dist/*",
     "src/index.ts",

+ 2 - 2
src/index.ts

@@ -67,7 +67,7 @@ class Vditor extends VditorMethod {
         const mergedOptions = getOptions.merge();
 
         if (!["en_US", "ja_JP", "ko_KR", "zh_CN"].includes(mergedOptions.lang)) {
-            throw new Error("options.lang error, see https://hacpai.com/article/1549638745630#options");
+            throw new Error("options.lang error, see https://ld246.com/article/1549638745630#options");
         }
 
         this.vditor = {
@@ -233,7 +233,7 @@ class Vditor extends VditorMethod {
     /** 启用缓存 */
     public enableCache() {
         if (!this.vditor.options.cache.id) {
-            throw new Error("need options.cache.id, see https://hacpai.com/article/1549638745630#options");
+            throw new Error("need options.cache.id, see https://ld246.com/article/1549638745630#options");
             return;
         }
         this.vditor.options.cache.enable = true;

File diff suppressed because it is too large
+ 0 - 0
src/js/lute/lute.min.js


+ 1 - 1
src/method.ts

@@ -39,7 +39,7 @@ class Vditor {
     public static speechRender = speechRender;
     /** 对图片进行懒加载 */
     public static lazyLoadImageRender = lazyLoadImageRender;
-    /** Markdown 文本转换为 HTML,该方法需使用[异步编程](https://hacpai.com/article/1546828434083?r=Vaness) */
+    /** Markdown 文本转换为 HTML,该方法需使用[异步编程](https://ld246.com/article/1546828434083?r=Vaness) */
     public static md2html = md2html;
     /** 页面 Markdown 文章渲染 */
     public static preview = previewRender;

+ 7 - 7
src/ts/toolbar/Help.ts

@@ -10,19 +10,19 @@ export class Help extends MenuItem {
 <div style="margin-top: 14px;flex: 1">
     <div>Markdown 使用指南</div>
     <ul style="list-style: none">
-        <li><a href="https://hacpai.com/article/1583308420519" target="_blank">语法速查手册</a></li>
-        <li><a href="https://hacpai.com/article/1583129520165" target="_blank">基础语法</a></li>
-        <li><a href="https://hacpai.com/article/1583305480675" target="_blank">扩展语法</a></li>
-        <li><a href="https://hacpai.com/article/1582778815353" target="_blank">键盘快捷键</a></li>
+        <li><a href="https://ld246.com/article/1583308420519" target="_blank">语法速查手册</a></li>
+        <li><a href="https://ld246.com/article/1583129520165" target="_blank">基础语法</a></li>
+        <li><a href="https://ld246.com/article/1583305480675" target="_blank">扩展语法</a></li>
+        <li><a href="https://ld246.com/article/1582778815353" target="_blank">键盘快捷键</a></li>
     </ul>
 </div>
 <div style="margin-top: 14px;flex: 1">
     <div>Vditor 支持</div>
     <ul style="list-style: none">
         <li><a href="https://github.com/Vanessa219/vditor/issues" target="_blank">Issues</a></li>
-        <li><a href="https://hacpai.com/tag/vditor" target="_blank">官方讨论区</a></li>
-        <li><a href="https://hacpai.com/article/1549638745630" target="_blank">开发手册</a></li>
-        <li><a href="https://hacpai.com/guide/markdown" target="_blank">演示地址</a></li>
+        <li><a href="https://ld246.com/tag/vditor" target="_blank">官方讨论区</a></li>
+        <li><a href="https://ld246.com/article/1549638745630" target="_blank">开发手册</a></li>
+        <li><a href="https://ld246.com/guide/markdown" target="_blank">演示地址</a></li>
     </ul>
 </div></div>`, 0);
         });

+ 1 - 1
src/ts/toolbar/Info.ts

@@ -33,7 +33,7 @@ export class Info extends MenuItem {
         组件版本:Vditor v${VDITOR_VERSION} / Lute v${Lute.Version}
         </li>
         <li>
-        赞助捐赠:<a href="https://hacpai.com/sponsor" target="_blank">https://hacpai.com/sponsor</a>
+        赞助捐赠:<a href="https://ld246.com/sponsor" target="_blank">https://ld246.com/sponsor</a>
         </li>
     </ul>
 </div>

+ 1 - 1
src/ts/util/Options.ts

@@ -138,7 +138,7 @@ export class Options {
         const mergedOptions = merge(this.defaultOptions, this.options);
 
         if (mergedOptions.cache.enable && !mergedOptions.cache.id) {
-            throw new Error("need options.cache.id, see https://hacpai.com/article/1549638745630#options");
+            throw new Error("need options.cache.id, see https://ld246.com/article/1549638745630#options");
         }
 
         return mergedOptions;

+ 23 - 23
types/index.d.ts

@@ -18,7 +18,7 @@ interface ILuteNode {
 
 type ILuteRenderCallback = (node: ILuteNode, entering: boolean) => [string, number];
 
-/** @link https://hacpai.com/article/1588412297062 */
+/** @link https://ld246.com/article/1588412297062 */
 interface ILuteRender {
     renderDocument?: ILuteRenderCallback;
     renderParagraph?: ILuteRenderCallback;
@@ -228,7 +228,7 @@ interface IPreviewTheme {
     path?: string;
 }
 
-/** @link https://hacpai.com/article/1549638745630#options-upload */
+/** @link https://ld246.com/article/1549638745630#options-upload */
 interface IUpload {
     /** 上传 url */
     url?: string;
@@ -279,7 +279,7 @@ interface IUpload {
     linkToImgCallback?(responseText: string): void;
 }
 
-/** @link https://hacpai.com/article/1549638745630#options-toolbar */
+/** @link https://ld246.com/article/1549638745630#options-toolbar */
 interface IMenuItem {
     /** 唯一标示 */
     name: string;
@@ -306,7 +306,7 @@ interface IMenuItem {
     click?(status?: boolean): void;
 }
 
-/** @link https://hacpai.com/article/1549638745630#options-preview-hljs */
+/** @link https://ld246.com/article/1549638745630#options-preview-hljs */
 interface IHljs {
     /** 是否启用行号。默认值: false */
     lineNumber?: boolean;
@@ -316,7 +316,7 @@ interface IHljs {
     enable?: boolean;
 }
 
-/** @link https://hacpai.com/article/1549638745630#options-preview-math */
+/** @link https://ld246.com/article/1549638745630#options-preview-math */
 interface IMath {
     /** 内联数学公式起始 $ 后是否允许数字。默认值: false */
     inlineDigit?: boolean;
@@ -326,7 +326,7 @@ interface IMath {
     engine?: "KaTeX" | "MathJax";
 }
 
-/** @link https://hacpai.com/article/1549638745630#options-preview-markdown */
+/** @link https://ld246.com/article/1549638745630#options-preview-markdown */
 interface IMarkdownConfig {
     /** 自动空格。默认值: false */
     autoSpace?: boolean;
@@ -352,7 +352,7 @@ interface IMarkdownConfig {
     mark?: boolean;
 }
 
-/** @link https://hacpai.com/article/1549638745630#options-preview */
+/** @link https://ld246.com/article/1549638745630#options-preview */
 interface IPreview {
     /** 预览 debounce 毫秒间隔。默认值: 1000 */
     delay?: number;
@@ -362,15 +362,15 @@ interface IPreview {
     mode?: "both" | "editor";
     /** md 解析请求 */
     url?: string;
-    /** @link https://hacpai.com/article/1549638745630#options-preview-hljs */
+    /** @link https://ld246.com/article/1549638745630#options-preview-hljs */
     hljs?: IHljs;
-    /** @link https://hacpai.com/article/1549638745630#options-preview-math */
+    /** @link https://ld246.com/article/1549638745630#options-preview-math */
     math?: IMath;
-    /** @link https://hacpai.com/article/1549638745630#options-preview-markdown */
+    /** @link https://ld246.com/article/1549638745630#options-preview-markdown */
     markdown?: IMarkdownConfig;
-    /** @link https://hacpai.com/article/1549638745630#options-preview-theme */
+    /** @link https://ld246.com/article/1549638745630#options-preview-theme */
     theme?: IPreviewTheme;
-    /** @link https://hacpai.com/article/1549638745630#options-preview-actions  */
+    /** @link https://ld246.com/article/1549638745630#options-preview-actions  */
     actions?: Array<IPreviewAction | IPreviewActionCustom>;
 
     /** 预览回调 */
@@ -426,7 +426,7 @@ interface IHintExtend {
     hint?(value: string): IHintData[];
 }
 
-/** @link https://hacpai.com/article/1549638745630#options-hint */
+/** @link https://ld246.com/article/1549638745630#options-hint */
 interface IHint {
     /** 常用表情提示 HTML */
     emojiTail?: string;
@@ -446,7 +446,7 @@ interface IResize {
     after?(height: number): void;
 }
 
-/** @link https://hacpai.com/article/1549638745630#options */
+/** @link https://ld246.com/article/1549638745630#options */
 interface IOptions {
     /** 内部调试时使用 */
     _lutePath?: string;
@@ -466,17 +466,17 @@ interface IOptions {
     placeholder?: string;
     /** 多语言。默认值: 'zh_CN' */
     lang?: (keyof II18n);
-    /** @link https://hacpai.com/article/1549638745630#options-toolbar */
+    /** @link https://ld246.com/article/1549638745630#options-toolbar */
     toolbar?: Array<string | IMenuItem>;
-    /** @link https://hacpai.com/article/1549638745630#options-resize */
+    /** @link https://ld246.com/article/1549638745630#options-resize */
     resize?: IResize;
-    /** @link https://hacpai.com/article/1549638745630#options-counter */
+    /** @link https://ld246.com/article/1549638745630#options-counter */
     counter?: {
         enable: boolean;
         max?: number;
         type?: "markdown" | "text";
     };
-    /** @link https://hacpai.com/article/1549638745630#options-cache */
+    /** @link https://ld246.com/article/1549638745630#options-cache */
     cache?: {
         id?: string;
         enable?: boolean;
@@ -484,11 +484,11 @@ interface IOptions {
     };
     /** 编辑模式。默认值: 'wysiwyg' */
     mode?: "wysiwyg" | "sv" | "ir";
-    /** @link https://hacpai.com/article/1549638745630#options-preview */
+    /** @link https://ld246.com/article/1549638745630#options-preview */
     preview?: IPreview;
-    /** @link https://hacpai.com/article/1549638745630#options-hint */
+    /** @link https://ld246.com/article/1549638745630#options-hint */
     hint?: IHint;
-    /** @link https://hacpai.com/article/1549638745630#options-toolbarConfig */
+    /** @link https://ld246.com/article/1549638745630#options-toolbarConfig */
     toolbarConfig?: {
         hide?: boolean,
         pin?: boolean,
@@ -497,9 +497,9 @@ interface IOptions {
     theme?: "classic" | "dark";
     /** 图标。默认值: 'material' */
     icon?: "ant" | "material";
-    /** @link https://hacpai.com/article/1549638745630#options-upload */
+    /** @link https://ld246.com/article/1549638745630#options-upload */
     upload?: IUpload;
-    /** @link https://hacpai.com/article/1549638745630#options-classes */
+    /** @link https://ld246.com/article/1549638745630#options-classes */
     classes?: IClasses;
     /** 配置自建 CDN 地址。默认值: 'https://cdn.jsdelivr.net/npm/vditor@${VDITOR_VERSION}' */
     cdn?: string;

+ 3 - 3
webpack.start.js

@@ -141,9 +141,9 @@ module.exports = {
         target: 'http://localhost:8080',
         pathRewrite: {'^/api': ''},
       },
-      '/hacpai': {
-        target: 'https://hacpai.com',
-        pathRewrite: {'^/hacpai': ''},
+      '/ld246': {
+        target: 'https://ld246.com',
+        pathRewrite: {'^/ld246': ''},
       },
     },
   },

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