# Preview - 修改MDX CSS的神器，支持CSSJS实时预览

**URL:** <https://forum.freemdict.com/t/topic/1251>\
**Category:** 技术交流与词典编修\
**Created:** [2020 年3 月 28 日 14:28 UTC](https://forum.freemdict.com/t/topic/1251 "2020-03-28T14:28:21Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

作者： ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
发布日期： [2020 年4 月 28 日 16:11 UTC](https://forum.freemdict.com/t/topic/1251/65 "2020-04-28T16:11:30Z")

</div>

新格式会提供开放的制作工具，会提供各语言的开发库，特别是 PYTHON，防止大家自造轮子出现兼容性的问题。其实 MDXBuilder 都做了一版，给部份朋友试过了，只是 MDX 里还有些是黑盒，比如StripKey ，做出来兼容性并不好，就放弃了。

---

<div class="post-metadata">

作者： ![HDtiger](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/h/47e85d/32.png) [@HDtiger](https://forum.freemdict.com/u/HDtiger)\
发布日期： [2020 年4 月 28 日 16:56 UTC](https://forum.freemdict.com/t/topic/1251/66 "2020-04-28T16:56:54Z")

</div>

新词典考不考虑兼容现有的其他词典格式？其实这问题白问，按常理应该考虑到，只是心中仍有疑问。第二是能否实现在词典内对词典文件的实时编辑保存，比如查某个词发现错误我可以随时修改保存，而不必依赖独立的编辑器。这一功能如果实现 即使收费，使用的人也会很多，因为实用。

---

<div class="post-metadata">

作者： ![Word](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/word/32/696_2.png) [@Word](https://forum.freemdict.com/u/Word)\
发布日期： [2020 年4 月 29 日 01:15 UTC](https://forum.freemdict.com/t/topic/1251/67 "2020-04-29T01:15:41Z")

</div>

同意以上的讨论，目前国内开源环境弊端较多，要谨慎，尤其是新软件  
对于词典使用者来说，开放词库的格式和相关工具才是最重要的，如果在此基础上还能在技术层面上有创新、有亮点，就能很好的推动新软件的发展

---

<div class="post-metadata">

作者： ![kapas](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/k/f475e1/32.png) [@kapas](https://forum.freemdict.com/u/kapas)\
发布日期： [2020 年4 月 29 日 02:01 UTC](https://forum.freemdict.com/t/topic/1251/68 "2020-04-29T02:01:55Z")

</div>

报告一下  
这个帖子里面的：牛津搭配

肉测用这个查询flower  
正文没问题  
但是最后没有Flower  
gd没问题  
[https://forum.freemdict.com/t/topic/1464/32](https://forum.freemdict.com/t/topic/1464/32)

![](https://forumcdn.freemdict.com/uploads/default/original/2X/2/2828a483f0229f705af669e0ea0f952c6f8e4a82.png)

---

<div class="post-metadata">

作者： ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
发布日期： [2020 年4 月 29 日 07:00 UTC](https://forum.freemdict.com/t/topic/1251/69 "2020-04-29T07:00:32Z")

</div>

词典软件会支持 MDX，XDXF和 EPWING，灵格斯的 LD2 解密还有点问题，别的格式没了解。

> [@HDtiger](#):
>
> 能否实现在词典内对词典文件的实时编辑保存

笔记或生词本这种需要经常编辑保存的更适合数据库实现。词典文件一般自带文本压缩，本体内的索引在生成的时候就写死了，默认就没想让你改，改动任何地方都需要重新压缩重建索引，韦氏官网那个 MDX 文件200M，如果放 SQLITE 数据库里，估计会超过1G。换个角度想，如果词典需要改动的地方多，说明质量不是很好，可以考虑换一本了，或者论坛反馈给作者改。

---

<div class="post-metadata">

作者： ![First\_Last](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/first_last/32/5_2.png) [@First\_Last](https://forum.freemdict.com/u/First_Last)\
发布日期： [2020 年4 月 29 日 16:42 UTC](https://forum.freemdict.com/t/topic/1251/70 "2020-04-29T16:42:06Z")

</div>

可否做成类似 patch ，显示时实时修正。等累积一定笔数后，再自行手动导入 mdx 档。

---

<div class="post-metadata">

作者： ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
发布日期： [2020 年4 月 29 日 19:37 UTC](https://forum.freemdict.com/t/topic/1251/71 "2020-04-29T19:37:01Z")

</div>

用patch替换词条正文，可以类似外置css那样替换，但如何编辑网页文本是个大问题。

---

<div class="post-metadata">

作者： ![HDtiger](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/h/47e85d/32.png) [@HDtiger](https://forum.freemdict.com/u/HDtiger)\
发布日期： [2020 年4 月 29 日 21:11 UTC](https://forum.freemdict.com/t/topic/1251/72 "2020-04-29T21:11:25Z")

</div>

词典格式能不能直接支持html，这个应该能实时修改。

---

<div class="post-metadata">

作者： ![HDtiger](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/h/47e85d/32.png) [@HDtiger](https://forum.freemdict.com/u/HDtiger)\
发布日期： [2020 年4 月 29 日 21:15 UTC](https://forum.freemdict.com/t/topic/1251/74 "2020-04-29T21:15:02Z")

</div>

也就是词典内加一个网页编辑器。

---

<div class="post-metadata">

作者： ![W2K](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/w2k/32/5_2.png) [@W2K](https://forum.freemdict.com/u/W2K)\
发布日期： [2020 年5 月 5 日 04:56 UTC](https://forum.freemdict.com/t/topic/1251/75 "2020-05-05T04:56:46Z")

</div>

能增加个选择浏览器的选项么？误点了默认打开不咨询后总是用系统默认的浏览器打开了。不想用默认的浏览器打开词典，浏览网页和查词混在一块看不方便。

---

<div class="post-metadata">

作者： ![御宅暴君](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/%E5%BE%A1%E5%AE%85%E6%9A%B4%E5%90%9B/32/3985_2.png) [@御宅暴君](https://forum.freemdict.com/u/%E5%BE%A1%E5%AE%85%E6%9A%B4%E5%90%9B)\
发布日期： [2020 年6 月 14 日 01:24 UTC](https://forum.freemdict.com/t/topic/1251/76 "2020-06-14T01:24:28Z")

</div>

似乎不支持 Linux，告辞！

---

<div class="post-metadata">

作者： ![hahaya](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/h/77aa72/32.png) [@hahaya](https://forum.freemdict.com/u/hahaya)\
发布日期： [2020 年8 月 14 日 03:26 UTC](https://forum.freemdict.com/t/topic/1251/77 "2020-08-14T03:26:43Z")

</div>

请问这个工具有没有详细的使用教程？能否多列举一些css和JS的修改指令和范例。

---

<div class="post-metadata">

作者： ![atauzki](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/atauzki/32/1365_2.png) [@atauzki](https://forum.freemdict.com/u/atauzki)\
发布日期： [2020 年8 月 14 日 07:12 UTC](https://forum.freemdict.com/t/topic/1251/78 "2020-08-14T07:12:28Z")

</div>

chrome开发者工具怎么用你就怎么用。  
preview只负责加载mdx，修改工作全是浏览器和文本编辑器做的

---

<div class="post-metadata">

作者： ![bwjhr](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/b/ce7236/32.png) [@bwjhr](https://forum.freemdict.com/u/bwjhr)\
发布日期： [2020 年8 月 17 日 10:49 UTC](https://forum.freemdict.com/t/topic/1251/79 "2020-08-17T10:49:37Z")

</div>

小白请教A大，在GD中，点击一个词，右键审查元素，就能直接看到CSS的相应部分。用这个利器，怎样才能从词典的某个词直接定位到相应的CSS的那一行呢？

---

<div class="post-metadata">

作者： ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
发布日期： [2020 年8 月 17 日 11:08 UTC](https://forum.freemdict.com/t/topic/1251/80 "2020-08-17T11:08:06Z")

</div>

用 chrome 浏览器打开网页，右键检查。

---

<div class="post-metadata">

作者： ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
发布日期： [2020 年8 月 17 日 11:44 UTC](https://forum.freemdict.com/t/topic/1251/82 "2020-08-17T11:44:19Z")

</div>

你注意第一张图，右边红色k\_iframe(69145)这行，下拉框选择top。

---

<div class="post-metadata">

作者： ![Arlin](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/a/82dd89/32.png) [@Arlin](https://forum.freemdict.com/u/Arlin)\
发布日期： [2020 年10 月 8 日 05:27 UTC](https://forum.freemdict.com/t/topic/1251/85 "2020-10-08T05:27:08Z")

</div>

上上周开始，打开任何一个mdx,都是这样：

```auto
FILE_NOT_FOUND
---
Keyboard shortcuts
ALT + F - Open the "find" bar to search headword.
ESCAPE - Close the "find" bar.
---
EncodingName=
Count=0
---

```

请问会是什么原因呢 🧐

---

<div class="post-metadata">

作者： ![cmm](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/cmm/32/7035_2.png) [@cmm](https://forum.freemdict.com/u/cmm)\
发布日期： [2020 年10 月 8 日 08:19 UTC](https://forum.freemdict.com/t/topic/1251/86 "2020-10-08T08:19:32Z")

</div>

> [@漢語大詞典 修正（2020.10.05补链）](https://forum.freemdict.com/t/topic/2509):
>
> 对 [【阿彌陀佛】漢語大詞典(合)2020.5.1更新](https://forum.freemdict.com/t/topic/1698) 做修改 原词典中有这些错误： 补证条目在上（这个我不知道怎么弄joy） 第二个图就是把相应的字改下 第三个图中“▲ 來源：漢語大詞典2.0光盤版”位置错误，而且把“粽”条目也混进去了，这样的问题有好几处，都已改正。 已修正，不排除还有其它错误，欢迎大家反馈。 \*之前在Linux操作时，导致部分文…

这本即是有这个问题，不知道是不是编码问题 ˉ\_(ツ)\_/ˉ

---

<div class="post-metadata">

作者： ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
发布日期： [2020 年10 月 8 日 09:38 UTC](https://forum.freemdict.com/t/topic/1251/87 "2020-10-08T09:38:56Z")

</div>

感谢反馈！阿弥陀佛的这个汉语大词典，用的 lzo 压缩算法打包的 mdx。这个 lzo 解压算法的源码是 gpl 协议的项目，暂时无解，目前只支持 zip 压缩算法，等有时间重写这块。

---

<div class="post-metadata">

作者： ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
发布日期： [2020 年10 月 8 日 09:51 UTC](https://forum.freemdict.com/t/topic/1251/88 "2020-10-08T09:51:18Z")

</div>

```auto
FILE_NOT_FOUND

```

说明词典没有加载成功。加载阿弥陀佛的汉语大词典，会有这个情况。测试英汉大，韦高是正常的。如果任一本词典都不成功，就很奇怪了。现在这项目底层，改动很大，后面会发一版桌面词典，会支持 preview 实时编辑的功能。

[上一页](https://forum.freemdict.com/t/topic/1251.md?page=3)

[下一页](https://forum.freemdict.com/t/topic/1251.md?page=5)
