typora-issues icon indicating copy to clipboard operation
typora-issues copied to clipboard

Extending Typora functionality with plugins

Open anandgraves opened this issue 9 years ago • 48 comments

Letting the community develop plugins to create a variety of functionality.

anandgraves avatar May 18 '16 08:05 anandgraves

+1 good idea

like sublime txt , atom etc

2016年5月18日 +0800 16:51 Anand [email protected],写道:

Letting the community develop plugins to create a variety of functionality.

— You are receiving this because you are subscribed to this thread. Reply to this email directly orview it on GitHub(https://github.com/typora/typora-issues/issues/162)

leewi9 avatar May 18 '16 10:05 leewi9

like sublime txt , atom etc

Those are editing platforms for writing code, IDEs. Typora, I believe, is more like iA Writer, Byword, Plain Text, or Marked. But better as it doesn't have separate writing and preview modes!

If anything, it should be the other way around: It would be nice if Typora could be used as a plugin within editing platforms, e.g. allowing one to edit Markdown files WYSIWYG fashion within Atom. My dream would be Typora integrated into Editorial.

My other dream would be Typora available as a Javascript library so that websites could support WYSIWYG markdown editing. I want to build a collaborative writing website for non-technical people. Asking them to know markdown syntax isn't desirable. @abnerlee, I believe you once said that was possible given how you designed/implemented Typora. True?

vassudanagunta avatar May 18 '16 10:05 vassudanagunta

I would +1 that also as another enhancement. But for people who would mainly use Typora, extending it with plugins would be preferable.

anandgraves avatar May 18 '16 10:05 anandgraves

Plugins are nice but also need spend time on things like maintaining APIs and docs, maybe future.

2016年5月18日 +0800 18:33 Vas [email protected],写道:

like sublime txt , atom etc

Those are editing platforms for writing code, IDEs. Typora, I believe, is more like iA Writer, Byword, Plain Text, or Marked. But better as it doesn't have separate writing and preview modes!

If anything, it should be the other way around: It would be nice if Typora could be used as a plugin within editing platforms, e.g. allowing one to edit Markdown files WYSIWYG fashion within Atom.

— You are receiving this because you commented. Reply to this email directly orview it on GitHub(https://github.com/typora/typora-issues/issues/162#issuecomment-219988137)

leewi9 avatar May 18 '16 10:05 leewi9

But for people who would mainly use Typora, extending it with plugins would be preferable.

@anandgraves , can you give an example of a plugin for Typora that would be in keeping with it's stated mission, "A Truly Minimal Markdown Editor"? To "read and write" (as opposed to code), "Distractions Free" and WYSIWYG.

The only kind I can think of are ones that allow it to save/publish directly to a website (e.g. GitHub). Perhaps I am not imaginative enough.

vassudanagunta avatar May 18 '16 11:05 vassudanagunta

I think we can close this now.

2016年5月18日 +0800 19:11 Vas [email protected],写道:

But for people who would mainly use Typora, extending it with plugins would be preferable.

@anandgraves(https://github.com/anandgraves), can you give an example of a plugin for Typora that would be in keeping withit's stated missions(http://www.typora.io)? "A Truly Minimal Markdown Editor", to "read and write" (as opposed to code), "Distractions Free" and WYSIWYG.

The only kind I can think of are ones that allow it to save/publish directly to a website (e.g. GitHub). Perhaps I am not imaginative enough.

— You are receiving this because you commented. Reply to this email directly orview it on GitHub(https://github.com/typora/typora-issues/issues/162#issuecomment-219995606)

leewi9 avatar May 18 '16 11:05 leewi9

Plugins extend functionality only incrementally, but introduce a lot of maintenance and issues due to interactions. I would rather the team concentrate on core functionality for now, and leave the minimaps to Atom (which frequently records exceptions from misbehaving plugins).

AlexPasternak avatar May 18 '16 14:05 AlexPasternak

This is a great idea! I do not understand why people are against it — don't install plugins if you don't want to. Obviously there's currently more pressing issues to fix, but in the long run, why not. (Related to #16)

Hint: One can already do all kinds of useful gimmicks by inserting javascript into Typora's html-file.

waahto avatar May 20 '16 14:05 waahto

@waahto I guess different people want different things. I hope Abner stays true to his stated goal for Typora ("A Truly Minimal Markdown Editor") and sticks with the KISS principle.

vassudanagunta avatar May 20 '16 20:05 vassudanagunta

The only kind I can think of are ones that allow it to save/publish directly to a website (e.g. GitHub). Perhaps I am not imaginative enough.

@vassudanagunta that'd be it for me, e.g. share a draft for review (to me gist.github.com would be a convenient way, but anything else would do just as well).

Actually, I've figured that it's time to get desktop pastebin app, and I found SourceDrop.

errordeveloper avatar Dec 16 '16 10:12 errordeveloper

@anandgraves , can you give an example of a plugin for Typora that would be in keeping with it's stated mission, "A Truly Minimal Markdown Editor"? To "read and write" (as opposed to code), "Distractions Free" and WYSIWYG.

An editor that doesn't support VI keybindings is basically unusable for me. I originally learned them for editing a book and it's so much more efficient. I find going against my muscle memory very distracting.

mbarkhau avatar Dec 22 '17 07:12 mbarkhau

that would be really great

42sol-eu avatar Jan 27 '18 12:01 42sol-eu

An example of one small plugin I'd love to write is the following:

I create a new notes file each day, where I record thoughts & todo items, everything I'm keeping on top of. I'd love to have a simple plugin which, along side the file tree displays in brackets the number of unchecked boxes in each file, like so:

Notes (Daily)
 * 2018-02-05.md 
 * 2018-02-06.md **(1)**
 * 2018-02-07.md 
 * 2018-02-08.md **(5)**

It's not a big enough feature that it would make sense to roll in to the product itself, as it may not be useful to everyone, but the ability to have custom sidebars to extend the "Outline", "Articles" and "File Tree" would be really cool. I'm sure there are plenty of other uses as well.

tektrip-biggles avatar Feb 09 '18 11:02 tektrip-biggles

Hi,

I'm not sure if this is the right place but I wanted to ask: is there any way (or will there be) to integrate Typora into either your own app or managing versioning through GitHub? I'm involved in developing a course based application and the content is based on markdown in a git repo. However, some users are not as tech savvy and it would be useful to have a way for them to use a WYSIWYG editor so they can avoid learning the markdown syntax. Is/Will there be any way to do that with Typora? A few of us are using Typoria for creating the content locally, but it would be nice if we could hook it up somehow so it is a seamless/integrated process.

Thanks!

Corrie

HermitStudio avatar Apr 10 '18 12:04 HermitStudio

It'd be nice if developers could extend Typora by extensions. I had an idea that we can use Typora for website content editing, and even publishing, for static site generators. It would be ridiculous to have every site generator syntax included to the application core. Also, the publishing means might be varied.

It is ideal if developer can develop different "syntax extension" and "publishing options" to Typora according to their needs.

yookoala avatar May 30 '18 02:05 yookoala

maybe it would be better to integrate Typora into Atom instead of markdown-preview plugin?! What do you think?

Eskander88 avatar Jun 28 '18 12:06 Eskander88

Typora is only free for beta. I dont understand why people asking to intergate Typora into Atom etc..

But If we had plugin support, that would very useful although I know it is a lot of work! I really want to have a vim editing bindings..

Piping avatar Jun 30 '18 18:06 Piping

@Piping, it is simple. Because, Atom have more functional for editing text. Atom have project tree. Atom have multy tab and pane system. And other, other, other... Text editor must have some function, which there is gold standard. I don't like some moments in Atom. And, I know, there is extra functionality. I will be happy see some function in Typora without Atom. But made plugin and upgrade code is very diffucult, this will take some time

Eskander88 avatar Jun 30 '18 19:06 Eskander88

@Eskander88 Rich Text Editing is really not an easy thing to do. It is all about proper display in GUI. That's why you would not see such a thing a plain text editor like Atom. Typora is a minimalist, simple text editor in front, but behind the scene is tons of work, same as MS Word.

Piping avatar Jun 30 '18 19:06 Piping

IMHO. Typora have advantage in that combine editable html(MD) with customizable source. Momental rendering. And all that is ready and elastic for creation. It`s give and open wide opportunity for production of all kinds of documentation. But I say: html(MD) with customizable source. HTML is output (result). Source is plain text. Text is that require special function for editing, which the usual form contains in editors is bound tp coding.

Eskander88 avatar Jun 30 '18 20:06 Eskander88

I would like a plugin, which could sort tables. So you can sort them befor publishing your file, and if you add something new, you don't have to think, where to put it.

YorikHansen avatar Feb 02 '19 20:02 YorikHansen

Typora's nonstandard features (mermaid charts, etc) should be exposed directly to the user. Users should be able to write or import their own plugins and renderers that are too specific to their needs to justify inclusion in the global product.

User plugins should operate under the same principles as Typora's other renderers, and need not add additional functionality. However, they should be able to implement the same HTML rendering techniques.

Use cases for exposing features:

  • Manually rendering complex documents, like math documents and mermaid charts, without depending entirely on the Typora client
  • Preventing Typora from becoming yet another flavor of markdown, by explicitly exposing feature sets

Use cases for extensibility:

  • Portable Game Notation (PGN) for chess
  • BBCode
  • Extended diagram support (https://github.com/typora/typora-issues/issues/1138)
  • Compatability with uncommon markdown syntax styles, allowing typora to bridge gaps created by too many flavors of markdown (https://github.com/typora/typora-issues/issues/1405)
  • Catalog (https://github.com/typora/typora-issues/issues/1927)

This is currently Typora's largest fatal flaw. Combined with the fact that Typora is closed source, having Typora-specific markdown syntax with no plugin framework is a death sentence, which is tragic for a program as well-made and useful as Typora.

GiovanH avatar Feb 22 '19 19:02 GiovanH

I'd like to have Link Preview like Notion does but it is too niche for entire Typora users, so I have to keep it as a plugin. It would be so nice if we have a chance to extend Typora to match personal use cases.

uetchy avatar Jun 28 '19 04:06 uetchy

It should be something like a middleware between markdown AST and HTML renderer. And then we can extend editor and syntax by modifying AST or resulting state.

uetchy avatar Jun 28 '19 04:06 uetchy

To expand on uetchy's suggestion: the plugin api could resemble something like pandoc's filter API, where plugins are passed the AST. Since you're able to have basically arbitrary HTML in the markdown code (and thus the AST), you'd be able to render diagrams quite easily -- pass the contents of the code block to the generator and replace it with an image in the AST. If you have the AST as a JavaScript DOM tree processing would be easy, both for the plugin system/Typora as well as plugins.

One possible concern with this is the frequency of updates, especially if the plugin is passed the entire AST every time. One way to fix this is to only supply a part of the document when rerendering sections. You might be able to pretend that this section is the entire document (possibly along with the preamble) to simplify the API.

ralismark avatar Aug 18 '19 14:08 ralismark

I think babel did an excellent job on their plugin system; babel's plugins only watch a small portion of AST which they concern. For instance, babel-plugin-transform-remove-console adds an event listener on CallExpression that is invoked only if AST walker reaches CallExpression including console.log. That means babel-plugin-transform-remove-console would never be called if there are no CallExpression in AST. pub/sub mechanism is a promising way to reduce the cost of plugin invocations and to maximize its performance.

uetchy avatar Aug 19 '19 04:08 uetchy

Yes! I need this plugin too.

I'll make some changes for markdown: #1: H1 #2: H2 #3: H3 ... #100: H100

html only support H1-h6, but I need more Headers, like H7, H11,,,, H100, I'll using it for text outline.

vagra avatar Nov 02 '19 17:11 vagra

I would love to use typora for all my scientific work, but that requires the ability to import and render bibliographic references, using bibtex. I'm using a homebrewed wysiwym editor for this purpose, but would gladly switch to typora if I could have this, and I would gladly write the plugin to do it, if there was a way to extend typora.

Plugins are cool :-)

bloff avatar Feb 11 '20 15:02 bloff

A bit off topic but read through

I switched from markdown to Asciidoctor It supports plugins, macros and variables. Never looked back.

42sol-eu avatar Feb 11 '20 19:02 42sol-eu

like sublime txt , atom etc

Those are editing platforms for writing code, IDEs. Typora, I believe, is more like iA Writer, Byword, Plain Text, or Marked. But better as it doesn't have separate writing and preview modes!

If anything, it should be the other way around: It would be nice if Typora could be used as a plugin within editing platforms, e.g. allowing one to edit Markdown files WYSIWYG fashion within Atom. My dream would be Typora integrated into Editorial.

My other dream would be Typora available as a Javascript library so that websites could support WYSIWYG markdown editing. I want to build a collaborative writing website for non-technical people. Asking them to know markdown syntax isn't desirable. @abnerlee, I believe you once said that was possible given how you designed/implemented Typora. True?

@vassudanagunta Your idea is good too, but I don't see why it might be conflicting with the ability to have plugins. For people who are more purist or want to stick to the original factory setting, there would be no issue, just don't install any plugins. I suggest you open a new Issue and advertise for it ;)

rezanid avatar Feb 04 '21 16:02 rezanid