Block editor not recognizing markdown

I'm under the impression that I should be able to paste Markdown text into the block editor and that it should pick that up and convert it as per: https://github.com/WordPress/gutenberg/tree/trunk/packages/blocks/src/api/raw-handling But that does not work. In my example I have some text that's like this: > bq1 > bq2 I would expect that copy pasting that into the editor would result in two quote blocks being created. At the moment the markdown syntax is not interpreted at all. This is …
Category: Web

Stop removing whitespace when I hit "Update"?

I want to store my posts in plaintext markdown instead of HTML. I have started by following Store post in raw markdown format, no html?, and as a result I do get what seems like a plain text box as my editor. However, when I hit update, the spaces that I indent code blocks with are being removed (as described here). (UPD. This actually happens on blur from the text box; it just normally coincides with a click on the …
Category: Web

Migrating Markdown (from Drupal)

I'm in the process of migrating my blog from Drupal to Wordpress. I have made liberal use of Markdown in the original posts (and Geshi syntax highlighting). In see that the WP-Markdown plugin converts to (and from HTML) on save (and edit), so I now have a bunch of posts which appear with the Markdown 'on show'. Is there an API call which I can use to effectively do an 'edit and save' operation on each post to force the …
Category: Web

Markdown everywhere?

I just read this blog post which explains that Markdown support has been added to all Wordpress.com blogs as a feature. I administer my own WordPress installation and am currently running (as far as I know) the latest version of WordPress, 3.8.X, I believe. Is Markdown support built into WordPress standalone? I'm in the midst of migration so it's not so easy to check. Will I be able to write, edit, and allow my users to comment using Markdown fairly …
Category: Web

Wordpress 4.1 support Markdown syntax or I've to install a Plugin?

I read at: https://en.support.wordpress.com/markdown/ Wordpress supports Markdown. But i not find at wy wordpress 4.1 the option to active Wordpress. Maybe the docs are obsolete? Moreover I find a lot of Markdown related plugins for Wordpress and that makes me thing Markdown support is not available in wordpress by default. Maybe someone could help me. Thanks.
Category: Web

Markdown in WordPress 3.2?

I found the question Create posts using markdown? about using Markdown on WordPress, however the plugins referred to haven't all been upgraded to WordPress 3.0 or higher. Since I happen to be a bit pedantic about using updated plugin, what options are available to integrate Markdown for both editing and displaying on a WordPress 3.0 or higher setup?
Category: Web

GitHub .md files to WordPress pages

I saw some websites that manage their information/documentation in a GitHub repository. This allows everyone to create issues if something is wrong or outdated, propose changes by forking/request push etc. Is it possible to link WordPress to a GitHub repository? Expected behavior: every .md-file in the repository becomes a page (or post) in WordPress (ideally keeping the markdown layout). When a change is made in the GitHub repository, the changes should immediately reflect in WordPress.
Category: Web

Woocommerce get cart total price in a number format

Is it possible to get the cart total price without any markup. So without the € symbol? Right now I'm getting the amount with: $totalamount = $woocommerce->cart->get_cart_total(); this will give €16.50 I tried this also: $totalamount = number_format($woocommerce->cart->get_cart_total(), 2, '.', ''); But this always gives 0.00 Is there a woocommerce get function that will give a number format of the total cart price? Thanks!
Category: Web

Generate pages from markdown files in github automatically

I have a lot of markdown documents stored in GitHub. The .md documents change often so it is difficult to track changes. What I am currently doing is create a template and read content from the URL and insert into my template to get in the proper format. What I want to do now is - Github MD files should be converted as a page in my Wordpress site automatically. It should get updated when GitHub is updated. it would …
Category: Web

Where does Jetpack store markdown?

I use the Jetpack markdown feature. If I open a previously markdown written post, it will open as a markdown written post. However if I export my site to XML with the official export plugin, it will be exported as HTML. So my question is does Jetpack store the posts markdown anywhere? Or does it actually convert the post back from HTML to Markdown every time I open a post to edit it?
Category: Web

How to activate Markdown in a local installation of WordPress 4.3?

As of version 4.3. it should be possible to activate markdown for my posts and comments (http://news.softpedia.com/news/say-hello-to-wordpress-4-3-489688.shtml). I found a description on https://en.support.wordpress.com/markdown/ , but the settings mentioned are not visible in settings -> writing and settings -> discussion. My role is Administrator The installed version is Version 4.3
Category: Web

Publishing Markdown posts from bitbucket to WordPress

I have a lot of markdown documents stored in a BitBucket repository. The md documents change often so I use it to track changes. I was now playing with the idea to 'publish' these MarkDown documents to a WordPress site. Is it possible to setup a continuous deployment of MarkDown documents to a WorPress site. And if so, any pointers on how to get this started? Thx,
Category: Web

Empty paragraphs around figure and figcaption tags when using markdown

I'm using WP 3.8 and Markdown on Save Improved plugin and have following code for outputing HTML5 tags when inserting images via Media Uploader: function html5_insert_image($html, $id, $caption, $title, $align, $url, $size, $alt) { $src = wp_get_attachment_image_src( $id, $size, false ); $html5 = "<figure>"; $html5 .= "<img src='$src[0]' alt='$alt' />"; if ($caption) { $html5 .= "<figcaption>$caption</figcaption>"; } $html5 .= "</figure>"; return $html5; } add_filter( 'image_send_to_editor', 'html5_insert_image', 10, 9 ); And in editor output is fine, but on publish my code …
Category: Web

Wordpress editor removes all the linefeed characters with WP-Markdown and Syntax Highlighter evolved

I have WP-Markdown and SyntaxHighlighter Evolved wordpress plugins installed. The issue is that when I write the code, and click the "Update" button, I have the code reformatted. [ruby] class Foo < Bar def hello puts "Hello World!" end end [/ruby] This is the modified code. [ruby] class Foo < Bar def hello puts "Hello World!" end end [/ruby] There is no change without the [ruby] tag. class Foo < Bar def hello puts "Hello World!" end end How can …
Category: Web

How to deal with the confliction between PHP-Markdown and MathJax?

I use PHP-Markdown plugin in WordPress. In order to show the formula beautifully, I add some code to use MathJax. Like this: <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ extensions: ["tex2jax.js"], jax: ["input/TeX", "output/HTML-CSS"], tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], processEscapes: true }, "HTML-CSS": { availableFonts: ["TeX"] } }); </script> But something wrong happens. Once my formula contains at least two underlines, the MathJax doesn't work. Such as $$P_1, P_2$$, and the words between the …
Category: Web

Numbering sections and block-level elements in wpautop(); Wordpress as CMS for long-form writing;

I am starting to learn how to write plugins for Wordpress. I'm interested in using WP as a CMS for long essays (6000-9000 words or more). My problem is what I call the Kindle problem, which is how do you reliably address the different parts of an unpaginated document which can be read on a variety of screens/devices, and will reflow differently in each case. If I'm citing an ebook on my e-reader or in a browser, it's hard to …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.