I am running a production version, but I have to modified markdown editor to fit my personal needs.
I know we are expected to use local/dev version, but my blog is running and you guys will NOT merge my PR.
This is the file I may need to modify:
It should be in /var/www/ghost/versions/1.24.8/core/clients, but there is no such folder in production.
Would you please tell me the correct path?
Thank you
I have modified markdown-converter.js in ghost-core to add markdown-it-container.
@andy1247008998 production versions only include the built version of the admin. If you want to modify it you will need to set up your local development version of Ghost, make the changes you want and then build a new release.
We won’t be adding any other markdown-it plugins to core.
The new Koenig editor will eventually have the ability to add custom cards and to override core cards so you could create your own markdown card that has all the markdown-it plugins you want in it. Or you could create your own “container” cards that mimic the functionality you want from markdown-it-container without having to do all of your editing inside of a markdown card.
I don’t think Koeing editor is a good idea for expert markdown writers.
We need two panels, one for writing, the other for preview, so I don’t believe changing an editor would do anything for good. Your company should have a meeting talking about abandon Koeing editor, seriously.
Since we are talking about extending core functions, and I don’t want to pollute your ghost-core either, let’s look at what your staff has done: add markdown-it-footnote, markdown-it-lazy-headers, and markdown-it-mark into your core. There is even a workaround for your legacy Showdown parser. You may think more about what is pollution and what is the privilege.
The best way to solve this problem is simple and stupid => a robust plugin system with plenty of hooks.
Then users will be able to use ALL npm packages in www.npmjs.com
When I search markdown-it-container, and click install, it will appear in my plugin list.
That’s similar to how for example NodeBB’s successful Node.js’ npm plugin system works, however with currently 899 NodeBB-specific—rather than general—packages (741 plugins, 131 themes…), all available on npm, mostly developed by the user community.
I installed markdown-it-container to make my custom block.
It replaces :::: flexbox box to <div style="width:100%;display:flex;flex-flow:row wrap" id="box"></div>
This line of code removes flex-flow:row wrap so I can’t see the expected result in preview.
Since the editor is able to use arbitrary HTML code, I believe this line is not necessary.
html_sanitize is there to prevent easy privilege escalation attacks by other authors and to protect against JS/CSS breaking the admin panel and making posts un-openable.
Of course you’re free to remove it at your own risk if you’re creating your own custom build.