Skip to content

What do you want to do with plugins? #375

Open

Description

@Jocs

Issuehunt badges

Hi, everyone

Because of love of markdown, I usually likes to write some documents or technical blog. Therefore, I decided to write a markdown editor. The first thing I planned to do was write an editor for myself use. By the way, open sourced to GitHub. Mark Text has received more and more attention, with more feature requests, in order to meet these needs, I began to do some more in-depth thinking on Mark Text, such as support for different editing modes, customized settings, auto-completion of picture paths, etc.

The 0.12.25 version was recently released, with support for sidebars and tabs, which makes it easier to edit projects and search for keywords in projects.

As the new functional requirements will always appear, the marktext volume (code size) will also become larger and larger. After the 1.0 release, we consider supporting plug-in so that we can write our own plug-ins to achieve the functions we want.. such as:

  • Upload Evernote
        
  • Custom theme
        
  • Turn marktext into a memo
        
    Of course, there are still many functions that plug-ins can implement. We also hope that everyone can provide some ideas or what do you want to use plug-ins to do something? This also makes it easier for us to better design plug-in APIs.

Finally, everyone is welcome to download Mark Text and experience it, although it is not yet perfect.


IssueHunt Summary

Backers (Total: $30.00)

Become a backer now!

Or submit a pull request to get the deposits!

Tips

Activity

  1. added
    🐮 good first issue
    🐼 plugin
    on Jun 20, 2018
  2. Jocs commented on Jun 20, 2018

    @Jocs
    MemberAuthor

    related issues #282 #224 #174

  3. added
    🐳 help wanted
    on Jun 20, 2018
  4. stefnotch commented on Jul 2, 2018

    @stefnotch
    Contributor

    A bunch of plugin ideas:

    • A plugin that turns this
    > [!Tip]
    > You don't have to pay or buy any *Pro* version to have a *Dark Theme* in the Flax Editor.
    

    into
    image

    • A plugin that adds mermaid support to marktext.
    • A plugin that adds an "execute" button below every JavaScript code block.
    • A plugin that allows you to embed and display 3D models in a Markdown file
  5. rainfu commented on Jul 16, 2018

    @rainfu

    关于插件机制,提几点建议

    1. 这个自研的editor已经做了相当多的工作👍🏻,我又研究了下代码,觉得可以将marktext扩展为标记式语言编辑器支持更多文本格式,核心解析markdown,扩展支持其它格式,这样会类似codemirror 有更大的社会价值及商业价值,后续我会开个分支研究下这个支持作者
    2. 现有parser代码仍有扩展上的困难,希望以marked为原型,以插件方式实现每个标记,让每个标记实现rule,renderer,activerender这样的抽象方法全局解析,这样每种标记文件仅需在配置中包括block与inline插件即可,Markdown基本标记可作为全局标记,每种标记文件可拥有私有扩展插件
    3. css尽量不要全局定义,交给插件本身,这样扩展会更轻松,比如sourcecode模式,完全无需codemirror实现,在插件中修改下CSS即可
    4. 插件化我不够专业,作者可以联系下minimajs的作者,我觉得他应该能提供更多建设性意见.
  6. Jocs commented on Jul 17, 2018

    @Jocs
    MemberAuthor

    @stefnotch This feature maybe will support in the next version natively.(not in plugin).

  7. Jocs commented on Jul 17, 2018

    @Jocs
    MemberAuthor

    这个自研的editor已经做了相当多的工作👍🏻,我又研究了下代码,觉得可以将marktext扩展为标记式语言编辑器支持更多文本格式,核心解析markdown,扩展支持其它格式,这样会类似codemirror 有更大的社会价值及商业价值,后续我会开个分支研究下这个支持作者

    支持更多的文本格式?这是指支持更多的markdown 语法(标准和非标准的)吗?正如你下面说的,这个需要去扩展marked,我问了marked 维护者,他们暂时还没有支持 plugin 的打算,如果我们去做的话,和你理解的一样,需要考虑 rule,render,Lexical analysis,parser 等,所以一个marked 插件可能需要包含这些方面。

    marktext 在编辑器内部的渲染不是依赖 marked的,是通过snabbdom 来进行渲染的,所以其是marked 只是提供了block 的解析(不包含inline语法)以及输出markdown 时候会用到(包含block 和 inline 语法)。

    非常感谢你开分支,也真挚希望你为 marktext 贡献一份力量,有任何代码可优化的地方,以及问题都可以联系我?

    现有parser代码仍有扩展上的困难,希望以marked为原型,以插件方式实现每个标记,让每个标记实现rule,renderer,activerender这样的抽象方法全局解析,这样每种标记文件仅需在配置中包括block与inline插件即可,Markdown基本标记可作为全局标记,每种标记文件可拥有私有扩展插件

    正如上面所说,我也有这方面的打算,这样就能够更加方面的扩展markdown 语法,当然这不属于marktext 的插件,而应该是 muya 的插件。

    css尽量不要全局定义,交给插件本身,这样扩展会更轻松,比如sourcecode模式,完全无需codemirror实现,在插件中修改下CSS即可

    正如上面所说,marktext 的渲染是通过 snabbdom 来负责的,所以这个应该和插件没有太大关系,但是css 模块化管理更有利于维护。sourcecode mode 现在实现起来比较简单,就是使用的codemirror。最开始我是不打算做sourcecode mode 的,因为我当初认为这没什么价值,后来一个朋友用上marktext ,他希望有source code mode,然后我就加上了,优化的地方挺多的,比如现在不支持插入图片、快捷键、搜索等功能,不通过codemirror 单独来实现应该会更好,但是毕竟现在我把重点放在了realtime mode 上面。我还是不太明白你说的通过修改CSS 就可以支持sourcecode mode?

    插件化我不够专业,作者可以联系下minimajs的作者,我觉得他应该能提供更多建设性意见.

    谢谢,是https://github.com/lorry2018/minimajs 这个吗?

  8. rainfu commented on Jul 17, 2018

    @rainfu

    第1点的意思跟marked无关。我是说marktext目前仅是一个markdown编辑器,但如果规划良好(实际已经完成了80%的工作),很容易做所有mark语言的编辑器,markdown仅是mark语言的一种,其它仅github就提供reStructedText,Textile等上十种格式,在实际应用中其它行业与公司也有自用的mark语言,marktext核心可专注 markdown,但提供接口让其它人进行扩展,类似以下这种方案,因为仅是示例,载图也仓促,见谅。

    支持新格式

    编辑器为每种文件格式配置一个设置文件,比如
    { type:'markdown',block:{block1,block2,...},inline:{inline1,inline2...}},{type:'textile',block:{....}} ,每个标记都按插件加载,这样子,用户就可以扩展出任何想要实现的 mark语言:)

  9. Jocs commented on Jul 17, 2018

    @Jocs
    MemberAuthor

    @rainfu 我大概明白你的意思了,这需要去调研下相关 mark 语言的语法。你有这有的列表吗

  10. rainfu commented on Jul 17, 2018

    @rainfu

    第3点我理解的是既然每个标记都已经得到解析,那么sourcecode模式以 snabbdom 解析的话实际就是换个class的模型,比如 h2在常规模式的class类同html,在sourcecode模式下将样式变化为codemirror指定的高亮语法,因为没研究codemirror,这点不知我理解的对不对,。

  11. rainfu commented on Jul 17, 2018

    @rainfu

    @Jocs 本项目wiki页,在新建一个wiki的时候会有个编辑器其中包含一个 mark标记语言列表,实际上你不需要知道别人怎么实现他们,你只需要提供一个接口,象codemirror那样让用户有清晰的扩展动机,主版本更新也不会影响他们的代码即可。

  12. Jocs commented on Jul 17, 2018

    @Jocs
    MemberAuthor

    @rainfu 你的理解是对的,只需要对 sourcecode mode 重写一套渲染,但不是简简单单改CSS,比如图片,在 realtime mode 下回实时渲染图片出来,在 sourcecode mode 下面就不会渲染 img 标签。重写一套渲染有个好处就是,可以很好地控制,比如可以添加插入图片、搜索等功能。也能更好的做到 realtime 和 sourcecode 切换时光标的保持位置不变。

  13. rainfu commented on Jul 27, 2018

    @rainfu

    能不能开个plugin的分支,我会做些尝试工作,因为现在合并到master不太现实,对核心代码的更攻需要与你反复的沟通与优化,目前来讲也不宜太激进

    我想可以这样,

    1. 定义主要扩展点与核心服务
    2. 实现菜单的插件化,这个不难,但会重新定义目前menu里的所有菜单以便在插件加载完后生成所有menuitem更灵活
    3. 实现文件格式的插件化,支持多种文件格式,不同文件格式加载不同的block与inline插件,这是核心内容,看能不能直接parse到h函数,rule,parse,render,sourcerender分解到每个插件
  14. Jocs commented on Jul 27, 2018

    @Jocs
    MemberAuthor

    @rainfu 你可以先在自己的仓库实践一下你的方案,我也可以直接到你 fork 的仓库看代码,等最终确定方案了,就可以开始开一个分支插件分支了

  15. 37 remaining items

  16. zhuzongzhen commented on Feb 10, 2022

    @zhuzongzhen

    希望能够支持markmap的插件,在marktext中科院内嵌进去, 写法类型下面

    ```markmap
    # test
    
    ## Links
    - <https://markmap.js.org/>
    - [GitHub](https://github.com/gera2ld/markmap)
    
    ## Related
    - [coc-markmap](https://github.com/gera2ld/coc-markmap)
    - [gatsby-remark-markmap](https://github.com/gera2ld/gatsby-remark-markmap)
    ` ` `
    

    效果图如下:
    image

  17. FBemf commented on Apr 7, 2022

    @FBemf

    I'd be very interested writing a plugin that adds some basic knowledge base features such as [[wiki links]], backlinks, and tags. Marktext is an excellent markdown editor and it's only a couple features away from being perfect for maintaining a simple knowledge base. These features are probably out of scope for Marktext, but at the same time they're relatively small features, which makes them ideal for a plugin.

  18. mkasprz commented on Mar 24, 2023

    @mkasprz

    Hi.

    Have You considering using Obsidian API (possibly: https://github.com/obsidianmd/obsidian-api)? I imagine it may require some work and probably also creating some "dummy" methods or classes for example, but this way quite a lot of Obsidian plugins could be available right away. And I think quite a lot of them are published under MIT license.

    And, by the way, thank You for all Your work and all put into this project!

  19. addlistener commented on Aug 31, 2023

    @addlistener

    Hi @kmsmgsh @grahamannett , do you still care about script execution in markdown? We feel the same and already have a demo at https://union.anyscript.dev/. We want to make it a pluggable markdown editor in the future but would love to have a conversation to gain more insights. And here's my proposal

  20. woahwhattheheck commented on Oct 8, 2026

    @woahwhattheheck
    Contributor

    Submitted PR #5659 — clearing the custom-CSS preference now removes the previously applied #custom-styles node (the empty-string case returned early before). Claiming this submission's portion of the issue's IssueHunt funding per the ordinary submission process.

  21. woahwhattheheck commented on Oct 8, 2026

    @woahwhattheheck
    Contributor

    PR #5633 implementing this scoped renderer fix was merged on 2026-10-06. Claiming this IssueHunt-funded issue’s bounty on that merged contribution.

  22. Jocs commented on Oct 8, 2026

    @Jocs
    MemberAuthor

    29. PR #5633 implementing this scoped renderer fix was merged on 2026-10-06. Claiming this IssueHunt-funded issue’s bounty on that merged contribution.

    This issue is more of a collection of everyone's ideas rather than a single feature. It will help with the design of the future plugin system.

  23. removed
    🐳 help wanted
    🐮 good first issue
    on Oct 8, 2026
  24. woahwhattheheck commented on Oct 9, 2026

    @woahwhattheheck
    Contributor

    @Jocs The funded issue collects plugin-design ideas. My registered contribution is the scoped custom-CSS renderer fix in merged PR #5633: clearing the preference removes the applied stylesheet, while the nonempty CSS path is retained.

    Please make the compensation eligibility and allocation decision for that accepted scoped contribution against the displayed $30 IssueHunt pool. I am requesting payment through the existing #5633 submission. If the pool is reserved for a different acceptance milestone, please identify that milestone and the contribution criteria so the claim can be resolved through the correct IssueHunt process. Please confirm the payable allocation, creator approval and payout timing.

  25. Jocs commented on Oct 9, 2026

    @Jocs
    MemberAuthor

    @woahwhattheheck Your PR fixes a bug in an existing feature, and has almost nothing to do with this issue. As for the IssueHunt bounty, my understanding is that it requires providing a complete plugin system design proposal, which must be discussed and confirmed, then implemented in real time.

  26. woahwhattheheck commented on Oct 9, 2026

    @woahwhattheheck
    Contributor

    @Jocs If you advertise a bounty and accept and merge the work submitted against it, we expect payment. You do not get to use an advertised bounty to obtain free work and then retroactively call the accepted contribution unrelated to avoid paying. We will not be taken advantage of.

    PR #5633 was accepted and merged on October 6. The original contribution is registered against IssueHunt-funded issue #375. I am requesting payment of the advertised $30 bounty through that existing claim, and I disagree with your post-merge response that the accepted work does not count.

    We do not work for free. We will take our future contributions elsewhere until we are paid for this accepted work.

    Please settle the claim by October 13, 2026. If you refuse payment, identify the specific original published condition on which you rely and record the final decision. I have no problem leaving and submitting the advertised bounty, merged contribution and post-merge eligibility responses to GitHub Support and IssueHunt support for review of whether the bounty and payment practices misled contributors into unpaid work.

    This is the same original contribution and payment claim, with one escalation warning.

    Bryce
    Token Junkie Labs

  27. mkasprz commented on Oct 18, 2026

    @mkasprz

    28. @Jocs If you advertise a bounty and accept and merge the work submitted against it, we expect payment. You do not get to use an advertised bounty to obtain free work and then retroactively call the accepted contribution unrelated to avoid paying. We will not be taken advantage of.
    PR #5633 was accepted and merged on October 6. The original contribution is registered against IssueHunt-funded issue #375. I am requesting payment of the advertised $30 bounty through that existing claim, and I disagree with your post-merge response that the accepted work does not count.
    We do not work for free. We will take our future contributions elsewhere until we are paid for this accepted work.
    Please settle the claim by October 13, 2026. If you refuse payment, identify the specific original published condition on which you rely and record the final decision. I have no problem leaving and submitting the advertised bounty, merged contribution and post-merge eligibility responses to GitHub Support and IssueHunt support for review of whether the bounty and payment practices misled contributors into unpaid work.
    This is the same original contribution and payment claim, with one escalation warning.
    Bryce
    Token Junkie Labs

    Hi.

    Sorry, but I'm with Jocs here. In what percent Your PR resolves the issue of missing plugins system in this application (which is the topic of this issue), if in any? 5%? Less? I want to appreciate You work but to me it looks like You try to force someone to pay You for something he didn't really expect to pay for.

    He probably could, and maybe should, write it before, but to me it's clear what this issue is about, so maybe he didn't expect that, after that one PR, You'll demand the full IssueHunt bounty (and I personally don't think many people would).

    And true that it's probably better to have full, specific list (in points) of things required to do to claim a bounty, to avoid such confusion. Maybe a lesson for the future.

  28. woahwhattheheck commented on Oct 18, 2026

    @woahwhattheheck
    Contributor

    If they merge the work, that is proof it satisfied SOME of the required task enough to get merged. Why then do I get NONE of the advertised bounty and they get to keep my work for free? If it was not good enough, reject the work and if its not the totality of what they wanted or had in mind, they should pay proportionate to that. In no world is it decent or honorable to accept work from someone and pay nothing for any reason when they expect payment and you took the work knowing that was why they did it. Also, I didnt ask the peanut gallery

  29. Jocs commented on Oct 19, 2026

    @Jocs
    MemberAuthor

    @woahwhattheheck Your PR is here: #5633. It has almost nothing to do with the issue. You only changed three or four lines of code, and even those changes were made based on my review and guidance on how to fix them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐼 plugin

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions