terrylinooo / githuber-md Goto Github PK
View Code? Open in Web Editor NEWMarkdown editor plugin for WordPress.
License: GNU General Public License v3.0
Markdown editor plugin for WordPress.
License: GNU General Public License v3.0
When write a code as below
<pre><code id="example">
for (let i = 0; i < 4; i++)
</code></pre>
The character "<" will parse as a "open tag" but not "less than", that will mess up next content.
I know that the markdown use "```" to parse <code>
element, but sometimes we need special format to express other language code.
Please help!
Sometimes we want to align an image to the right or left of the text. This can be achieved by adding an image like so:
<img align="right" src="src-of-img>
Right now in order to achieve this, we need to input the tag and attributes manually. It would be great if the plugin had an option for it.
WP Gitbuber MD suggests that Jetpack's Markdown support should be disabled:
While it is already disabled:
I can see Gitbuber's nag screen every time, I login to my Wordpress even though I have disabled Jetpack's Markdown support weeks ago (when installing WP Gitbuber MD for the first time). Using WP Gitbuber 1.9.1.
如同標題所述,有打開 Jetpack 外掛的 Markdown 功能的情況下,Markdown 轉譯會有問題!(等於先被 Jetpack 轉過後再被 Githuber MD 轉)
Recently I use the editor and mynote themes, it's awsome.
I have a question with build-in katex: the Code-Block Katex works fine, but how can I use it INLINE ?
Many Thanks.
Hi Terry,
Not sure if this is a plugin issue but when I type an ellipsis, i.e. three dots ..., they appear in the middle of the line, not on the bottom. On posts that I wrote without your plugin enabled, they disappear entirely after loading your plugin.
I opened an issue on the wpackagist github page before I realized your plugin had a github page. You can see it here:
outlandishideas/wpackagist#294
In summary, I tried installing your plugin using composer and WordPress Packagist
"wpackagist-plugin/wp-githuber-md":"1.7.3"
It downloaded and appeared to install, but the list of plugins in the admin area didn't show your plugin, therefore I couldn't activate it. Here's the output of running composer update
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing wpackagist-plugin/wp-githuber-md (1.7.3): Downloading (100%)
Writing lock file
Generating autoload files
Thanks.
We sometimes need a shortcode to embed something cool "Wordpressish" from other extensions inside the MD
So for example below the "ctabutton" shortcode from the "Shortcoder extension"
should help avoid placing that large HTML code you see later.
I love Githuber-MD but I have a large existing website.
I would like to get started writing and converting to MD,
but that will take weeks or months, so I need a way to keep the editor switchable
between the Githuber and the default visual/text editor
That'd be awesome.
thanks so much
Setup: LiteSpeed Web Server, PHP 7.2, WordPress 5.1.1, GithuberMD 1.7.2, theme "Underscores.me".
Hello there,
First, thanks for your contribution to WordPress community. Your plugin is rock solid and the best editor I have ever used.
On the website I'm working on, we use tons of < html > tags and on the live preview, it's fine:
http://i.imgur.com/hD2cBVE.png
However, on the post_content, it's being saved as plain "<" instead of "&alt;"
http://i.imgur.com/Dm4PP4U.png
I do see some Issues report mentioning < and >, but none seem to be related to how the content is displayed on the page or saved on the database.
In my case, the theme does not filter the content of post_content, so the code is embedded on the page as a real html code:
http://i.imgur.com/HP24Pdv.png
I'm not sure if this is expected or if the theme is suppose to filter the html tags inside < code >. If these are the cases, please apologize for reporting incorrectly.
I tried with and without code syntax highlight module enable, tried to update the articles after the changes and the result is the same.
Any feedback would be appreciate. Again, I'm sorry if this is not plugin related and thanks for your time.
Have a nice day.
Regards,
Northon
图片直接粘贴会报500错误,使用的是最新的1.9.0版本(直接从插件库装的也会出这个错误),不知道是不是我本地的问题。 开启了php错误日志发现是mime_content_type()这个函数没定义导致的错误。完整错误日志如下:
[23-Apr-2019 16:55:10 Asia/Shanghai] PHP Fatal error: Uncaught Error: Call to undefined function Githuber\Controller\mime_content_type() in /www/mywebsite.com/wp-content/plugins/githuber-md-1.9.0/src/Controllers/ImagePaste.php:81
Stack trace:
#0 /www/mywebsite.com/wp-includes/class-wp-hook.php(286): Githuber\Controller\ImagePaste->admin_githuber_image_paste('')
#1 /www/mywebsite.com/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
#2 /www/mywebsite.com/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
#3 /www/mywebsite.com/wp-admin/admin-ajax.php(167): do_action('wp_ajax_githube...')
#4 {main}
thrown in /www/mywebsite.com/wp-content/plugins/githuber-md-1.9.0/src/Controllers/ImagePaste.php on line 81
因为用qq截图,默认是png格式的,所以直接把:
//$file_mimetype = mime_content_type( $file['tmp_name'] );
替换成了:
$file_mimetype = 'image/png';
就可以正常工作了。麻烦作者查看下,是程序的bug还是跟其他插件的兼容问题?
I'm unable to insert images into pages with your plugin installed. If I add an image the traditional way, then activate your plugin and edit the page, the image won't display
Gitbuber underlines the same words, it finds in each text:
Which is pretty cool feature (though you could think about giving an option to disable it).
The problem is that when determining "whole words" it does not use spaces (and other white characters) only as words delimiter, but all non-Latin characters instead:
Which produces a bit weird results.
On the default Guttenberg editor, I am able to create hyperlinks that open in a new tab. On the markdown editor, this option doesn't exist.
When I create a hyperlink that opens in a new tab on the Guttenberg editor and preview it, it works as intended. When I switch to the Markdown editor and I preview the content, the links open in the same tab (they lose their open-in-a-new-tab property).
Thanks for this great plugin.
By default the Yoast SEO plugin's ( https://github.com/Yoast/wordpress-seo ) readability analysis and focus keyword analysis doesn't work with your markdown plugin. But Yoast does work with Jetpack's markdown plugin.
Here's a technique to make Yoast SEO's analysis work with your plugin. Just place the following in a must-use plugin to trick Yoast into thinking Jetpack Markdown is installed:
// Save the contents of the the following here: /wp-content/mu-plugins/fake-jetpack-markdown-existence.php
if (!class_exists('Jetpack')) { // Skip if Jetpack is really installed and activated.
// Create a dummy Jetpack class.
class Jetpack
{
public static function get_active_modules()
{
// Make the following happy:
// /plugins/wordpress-seo/admin/formatter/class-metabox-formatter.php, WPSEO_Metabox_Formatter::is_markdown_enabled()
return ['markdown'];
}
}
}
Of course, you can incorporate this into your own plugin so that it's compatible with Yoast.
You can probably go about this in a more surgical way, by checking if Jetpack is installed and if its markdown functionality is enabled. This'll allow your plugin, Yoast SEO, and Jetpack to coexist peacefully.
Thanks.
For some reason, for some blog posts WP Gitbuber MD is not displaying actual post's text or it is stripping parts of the text.
An example, how it should look and how it looks when WP Gitbuber MD is disabled:
And this is, how it looks when it is enabled:
The original post for reference. Using WP Gitbuber 1.9.1.
Please, consider this as high-priority. With missing text we cannot use your extension because we are not sure when it is going to delete parts of our blog posts from database, since it is not displaying the whole text when editing.
In the newest version (1.8.5) it is not possible to insert images in smaller dimensions and a link to original image. You can only insert image without any link.
This fails:
This works:
Please, verify and fix this, because without ability to insert images into blog post I must disable your plugin. Thank you.
可以貼上,圖片也儲存在預設的目錄中,但是並沒有同步到資料庫。也就是說,在使用媒體庫管理圖片時,不會看到這些用隨貼功能貼上的圖片。
Is there away to have markdown parser ignore a block of text?
I wanting to use https://github.com/Kotlin/kotlin-playground-wp-plugin. I can place a [kotlin][\kotlin] to have that chunk of text run as Kotlin code. It works great, except
tags get inserted into the code.
Possible solution: do a regex replace "[kotlin].*[\kotlin]" with some random GUID, and then reinsert after the markdown parsing completes. To make generic, maybe the start and end tags could be configured.
I'm a developer, but not a WP developer. I would be willing to write the code if you can help point me in the correct direction.
能不能加上右侧抽屉 title 导航 ?
Hi @terrylinooo ,
Great plugin! It's so easy to use! However, I was wondering if there is a feature to embed github gists? Or do you know of a plugin that work would simultaneously with this plugin? New to WordPress, so hope this makes sense.
Thanks, Kevin
表格转换后只剩下文字,没有表格了。错误版本是1.8.5
So far, I really like what I see here.
One feature that is missing is an ability to use this on CPTs. Ideally, an option in the settings to select any of the CPTs that are available or even a hook/filter.
I am posting this before I go through the code but this is a pretty important feature that I think would help drastically with this plugin.
如题
The classic editor's visual mode will not show (only the text mode) even if I disable the post type option on Markdown setting page.
The #44 was truly resolved (thank you!) and images are now correctly inserted into post's text -- both regular images and miniatures linked with actual image -- but they are inserted in the incorrect position in the editor.
Currently (1.9.1) when using Add image button, Markdown code for corresponding image is always inserted in the end of text (after last line) instead of being inserted at the current caret / cursor position.
This causes that you cannot insert images in desired place in the text. You always have to manually cut-and-paste them from the end to the required place.
你好,
在圖床的方面,希望加上對SM.MS 的支持,因爲不想登陸社交媒體,多謝
File: src\Controllers\Setting.php
Line: 703, 704
Original:
'_self' => 'Same window. (default)',
'_blank' => 'New window.',
Ideally:
'_self' => __( 'Same window. (default)', 'wp-githuber-md' ),
'_blank' => __( 'New window.', 'wp-githuber-md' ),
Line: 711
Original:
desc' => __( 'Allow using shortcode in Markdown text.') . '
' . __( 'Please understand that shortcode is processed to HTML by PHP, not JavaScript, therefore live-preview panel does not support it.', 'wp-githuber-md' ),
Ideally:
desc' => __( 'Allow using shortcode in Markdown text.', 'wp-githuber-md') . '
' . __( 'Please understand that shortcode is processed to HTML by PHP, not JavaScript, therefore live-preview panel does not support it.', 'wp-githuber-md' ),
能实现Markdown和WordPress经典编辑器共存吗?
Can Markdown and WordPress Classic Editor coexist?
Feature request from: https://wordpress.org/support/topic/parse-custom-syntax-block-support/
有時候我們會需要圖片帶燈箱(lightbox)效果,就需要用到 image 上其它的 attribute。那麼就需要自行去寫 html,這時候如果能透過插入媒體的介面來轉入代碼,就會方便許多。因此,希望在打開「Insert Media」後,能夠把東西也放入 Markdown 的 Editor 裡。
WordPress 5.0.2
Nginx 1.15.7
PHP 7.2.13
外掛列表
<code>$_SERVER['SERVER_PORT'] = 80;</code>
$_SERVER[\'SERVER_PORT\'] = 80;
<p><script src="https://gist.github.com/cras4202tw/80b2b53f9fa37d3223bde4fadcb873f7.js"></script></p>
<p><img class="alignnone size-full wp-image-737" src="https://www.4rbj4.com/wp-content/uploads/2018/07/1530844867-a77a37c09dfb4ee38a29a8fa2249936b.png" alt="" width="820" height="187" /></p>
![\"\"](\"https://www.4rbj4.com/wp-content/uploads/2018/07/1530844867-a77a37c09dfb4ee38a29a8fa2249936b.png\")
<p><img src="\"https://www.4rbj4.com/wp-content/uploads/2018/07/1530844867-a77a37c09dfb4ee38a29a8fa2249936b.png\"" alt="\"\"" scale="0"></p>
代码高亮,插入 #include <stdio.h> 有问题
你好,自动保存功能对我来说比较重要。当我把插件中的 Disable Auto-save 和 HTML-to-Markdown都关掉后,如果此时将 Sync Scrolling 关掉,我发现 Live Preview 好像有点问题还有此时的自动保存貌似失效了。
Would be really useful to get support for on page heading anchors (add an ID to the heading tags).
This is what I'm talking about
https://gist.github.com/asabaylus/3071099
The contents added when "Enable Markdown" is Enabled are lost after it is changed to Disable.
Steps to Reproduce
After step 4, the contents would be the one at step 1.
Hello there,
This is a suggestion, not an issue, but I don't see a better place to add. Currently I'm working with 1k articles imported via CSV and they were originally written with HTML tags, so I'm using the HTML -> MD converter in order to adjust the articles.
Would it be possible to add in the future a feature to allow converting older posts into MD format in bulk?
By the way, thanks for the help on #31, it's working as expected now.
Have a nice day!
Regards,
Northon
Hello,感谢你开发出这么棒的 MD 插件,功能完善而稳定,我在发现它之前都放弃在 Wordpress 直接用 MD 写了。不过,我在使用时发现,如果同一行的两个行间代码块中都有一个星号「*」,那么两个星号之间的文字会变成斜体。
例如:
一个 `*a` 另一个 `*b`
这样的一行的实际效果是「a` 另一个 」会以斜体显示。而不是
一个 *a
另一个 *b
请问可以修复这个问题吗?
另外,我发现在在启用了代码高亮之后,模组 - 代码高亮 - 布景主题 中设置的主题不会影响到行间代码块的显示情况。请问这是我使用的主题(Twenty Sixteen)的原因吗,我有什么办法让行间代码块同样使用在插件里设定的主题吗?
多谢~
Warning: Creating default object from empty value in /home/wojcieh1/public_html/domain.com/wp-content/plugins/wp-githuber-md/src/Controllers/Markdown.php on line 906
Warning: Cannot modify header information - headers already sent by (output started at /home/wojcieh1/public_html/domain.com/wp-content/plugins/wp-githuber-md/src/Controllers/Markdown.php:906) in /home/wojcieh1/public_html/domain.com/wp-includes/pluggable.php on line 1223
嗨!不好意思,冒昧請問一下。
因為目前在 Wordpress 的文章中,如果要呈現 HTML
等語法需要做字元轉換才能正常顯示 <
and >
,不知未來是否有可能在編輯器中新增自動轉換的功能。
謝謝
First of all, thanks for this wonderful plugin.
Second, when I use straight single quotes ('), the live preview shows an extra space after the quote.
So if I type "here's" in the editor it will show "here' s" in the live preview. When I publish the post the extra space disappears. It's a minor annoyance but it would be great if it could be fixed.
Test case:
Hi, I just used your great plugin on Wordpress. Thank you for developing it.
But I've found an issue on footnotes. I wrote the following:
Then, the published page gave me:
I don't know if it's just me.
And these are others. Supports for the following would be nice.
Can simplified Chinese be supported
能否支持下简体中文
Browser: Firefox
OS: Mac
What I want to happen:
When editing a post, I want to be able to use the "cmd + B" shortcut to make the selected text bold.
What actually happens:
Firefox's Bookmark Manager opens.
What needs to change:
The plugin should override Firefox's shortcut just like the Guttenberg editor does.
![image](https://user-images.githubusercontent.com/7582298/54011959-55700e00-41af-11e9-8b10-3da7be4a455b.png
content in log: [08-Mar-2019 06:32:55 UTC] PHP Fatal error: Call to undefined function mb_convert_encoding() in /var/www/wordpress/wp-content/plugins/wp-githuber-md/vendor/erusev/parsedown-extra/ParsedownExtra.php on line 468
It seems that mb_convert_encoding() is undefined, but the first time I tried it, nothing wrong with the plugin. What Can i do with this message?
Hi,
你好,我是阿竣。
謝謝你的分享,我將目前語言的 POT 檔案翻譯了一份 zh_TW 的版本。(看起來應該還有一些字串還沒有抽出來)
外掛真的很棒!也歡迎加入 WordPress Taiwan 的 Facebook 社團 或是 社群的 Slack
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.