{"id":325702,"date":"2026-06-17T14:16:49","date_gmt":"2026-06-17T14:16:49","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/copy-as-markdown-button\/"},"modified":"2026-06-17T21:29:28","modified_gmt":"2026-06-17T21:29:28","slug":"copy-as-markdown-button","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/copy-as-markdown-button\/","author":15876460,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.2","stable_tag":"1.0.2","tested":"7.0","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"Copy as Markdown Button","header_author":"Jose Varghese","header_description":"Adds a button to copy post\/page content as Markdown. Supports shortcode, Gutenberg block, and auto-injection into selected content types.","assets_banners_color":"0e1728","last_updated":"2026-06-17 21:29:28","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":25,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"josevarghese","date":"2026-06-17 14:16:12"},"1.0.1":{"tag":"1.0.1","author":"josevarghese","date":"2026-06-17 14:16:12"},"1.0.2":{"tag":"1.0.2","author":"josevarghese","date":"2026-06-17 21:29:28"}},"upgrade_notice":{"1.0.2":"<p>Adds a download button, a plain-text Markdown URL endpoint, YouTube embed support, and per-post exclusion by ID. After upgrading and enabling the endpoint, visit Settings &gt; Permalinks once to flush rewrite rules.<\/p>","1.0.1":"<p>Bug fixes and plugin review improvements.<\/p>","1.0.0":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.gif":{"filename":"icon-128x128.gif","revision":3576337,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.gif":{"filename":"icon-256x256.gif","revision":3576337,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3576358,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3576358,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":{"copy-as-markdown-button\/copy-as-markdown":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"copy-as-markdown-button\/copy-as-markdown","version":"1.0.0","title":"Copy as Markdown","category":"widgets","icon":"clipboard","description":"Adds a button that copies the page content to the clipboard as Markdown.","keywords":["copy","markdown","clipboard","export"],"textdomain":"copy-as-markdown-button","supports":{"html":false,"align":["left","center","right"],"color":false,"typography":false},"attributes":{"buttonText":{"type":"string","default":""},"size":{"type":"string","default":"medium","enum":["small","medium","large"]},"selector":{"type":"string","default":""}},"editorScript":"file:.\/editor.js","editorStyle":"file:..\/..\/assets\/css\/frontend.css","style":"file:..\/..\/assets\/css\/frontend.css"}},"tagged_versions":["1.0.0","1.0.1","1.0.2"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3576347,"resolution":"1","location":"assets","locale":"","width":1570,"height":898},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3576347,"resolution":"2","location":"assets","locale":"","width":1570,"height":898},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3576347,"resolution":"3","location":"assets","locale":"","width":1570,"height":898},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3576347,"resolution":"4","location":"assets","locale":"","width":1570,"height":898},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3576347,"resolution":"5","location":"assets","locale":"","width":1570,"height":898}},"screenshots":{"1":"The Copy as Markdown button rendered on the frontend with copy, download, and view options.","2":"Display settings - configure which post types show the button and exclusion rules.","3":"Style settings - customise button size, colours, corner radius, and live preview.","4":"Content settings - control the content selector, title prepending, and element exclusions.","5":"Usage settings - shortcode reference, Gutenberg block, and .md.txt endpoint options."}},"plugin_section":[],"plugin_tags":[485,529,2738,1859,4608],"plugin_category":[59],"plugin_contributors":[237124],"plugin_business_model":[],"class_list":["post-325702","plugin","type-plugin","status-publish","hentry","plugin_tags-button","plugin_tags-content","plugin_tags-copy","plugin_tags-export","plugin_tags-markdown","plugin_category-utilities-and-tools","plugin_contributors-josevarghese","plugin_committers-josevarghese"],"banners":{"banner":"https:\/\/ps.w.org\/copy-as-markdown-button\/assets\/banner-772x250.png?rev=3576358","banner_2x":"https:\/\/ps.w.org\/copy-as-markdown-button\/assets\/banner-1544x500.png?rev=3576358","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/copy-as-markdown-button\/assets\/icon-128x128.gif?rev=3576337","icon_2x":"https:\/\/ps.w.org\/copy-as-markdown-button\/assets\/icon-256x256.gif?rev=3576337","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/copy-as-markdown-button\/assets\/screenshot-1.png?rev=3576347","caption":"The Copy as Markdown button rendered on the frontend with copy, download, and view options."},{"src":"https:\/\/ps.w.org\/copy-as-markdown-button\/assets\/screenshot-2.png?rev=3576347","caption":"Display settings - configure which post types show the button and exclusion rules."},{"src":"https:\/\/ps.w.org\/copy-as-markdown-button\/assets\/screenshot-3.png?rev=3576347","caption":"Style settings - customise button size, colours, corner radius, and live preview."},{"src":"https:\/\/ps.w.org\/copy-as-markdown-button\/assets\/screenshot-4.png?rev=3576347","caption":"Content settings - control the content selector, title prepending, and element exclusions."},{"src":"https:\/\/ps.w.org\/copy-as-markdown-button\/assets\/screenshot-5.png?rev=3576347","caption":"Usage settings - shortcode reference, Gutenberg block, and .md.txt endpoint options."}],"raw_content":"<!--section=description-->\n<p>Copy as Markdown Button lets your visitors copy any post or page content as clean, well-structured Markdown with a single click. It handles everything from headings and tables to code blocks and nested lists - no extra tools or dependencies required.<\/p>\n\n<p><strong>Placement &amp; Auto-injection<\/strong><\/p>\n\n<ul>\n<li>Automatically injects the button before or after the content on any combination of post types (posts, pages, and custom post types)<\/li>\n<li>Shortcode <code>[copy_as_markdown]<\/code> for manual placement in any post, page, or widget<\/li>\n<li>Gutenberg block available in the Widgets category - place it anywhere in the block editor with per-block overrides for button text, size, and content selector<\/li>\n<li>Exclude specific posts or pages from auto-injection by entering their IDs - shortcode and block placements are unaffected<\/li>\n<\/ul>\n\n<p><strong>Button Customisation<\/strong><\/p>\n\n<ul>\n<li>Choose button size: Small, Medium, or Large<\/li>\n<li>Set custom background, text, and hover colours via colour pickers<\/li>\n<li>Adjust corner radius from 0 px (square) to 50 px (pill)<\/li>\n<li>Show or hide the copy icon alongside the button label<\/li>\n<li>Customise the button label (default: \"Copy as Markdown\") and the success confirmation text (default: \"Copied!\")<\/li>\n<li>Live preview in the settings panel updates instantly as you change style options<\/li>\n<\/ul>\n\n<p><strong>Content Control<\/strong><\/p>\n\n<ul>\n<li>Optionally prepend the post title as a Markdown H1 heading<\/li>\n<li>Custom CSS selector to target a specific page element instead of the auto-detected content area<\/li>\n<li>Exclude any elements from the Markdown output using CSS selectors (one per line) - useful for stripping ads, share buttons, comment sections, and related posts<\/li>\n<li>Per-shortcode overrides for button text, size, content selector, and download button visibility<\/li>\n<\/ul>\n\n<p><strong>Download Button<\/strong><\/p>\n\n<ul>\n<li>Optional dropdown \"Download as .md\" button that saves the converted Markdown as a <code>.md<\/code> file directly from the browser, named after the post slug<\/li>\n<li>Appears alongside the copy button in a split-button dropdown<\/li>\n<li>Can be force-enabled or force-disabled per shortcode instance using the <code>download<\/code> attribute<\/li>\n<\/ul>\n\n<p><strong>Markdown URL Endpoint<\/strong><\/p>\n\n<ul>\n<li>Enable a <code>.md.txt<\/code> URL endpoint so any post or page can be viewed as plain-text Markdown by appending <code>.md.txt<\/code> to its URL (e.g. <code>yoursite.com\/your-post-slug.md.txt<\/code>)<\/li>\n<li>The server converts the post HTML to Markdown and serves it as <code>text\/plain<\/code> - useful for programmatic access, LLM ingestion, and content pipelines<\/li>\n<li>Works with Elementor pages by using Elementor's own renderer when available<\/li>\n<li>Optional \"View as Markdown\" link in the button dropdown opens the plain-text endpoint in a new tab<\/li>\n<li>Customisable link label for the \"View as Markdown\" item<\/li>\n<\/ul>\n\n<p><strong>HTML-to-Markdown Conversion<\/strong><\/p>\n\n<p>The converter handles a wide range of HTML elements cleanly:<\/p>\n\n<ul>\n<li>Headings (H1\u2013H6), paragraphs, line breaks, and horizontal rules<\/li>\n<li>Bold (<code>**<\/code>), italic (<code>*<\/code>), and strikethrough (<code>~~<\/code>) inline formatting<\/li>\n<li>Hyperlinks with optional title attributes; images with alt text and titles<\/li>\n<li>Fenced code blocks with language detection from the <code>language-*<\/code> CSS class<\/li>\n<li>Inline code with backtick escaping<\/li>\n<li>Blockquotes with proper <code>&gt;<\/code> prefixing on every line<\/li>\n<li>Ordered and unordered lists with full nested list support<\/li>\n<li>Tables converted to GitHub-Flavored Markdown pipe tables<\/li>\n<li>Figures with italicised captions<\/li>\n<li>YouTube iframe embeds converted to <code>[Video](url)<\/code> Markdown links<\/li>\n<li>Scripts, styles, navigation, and form elements are automatically stripped<\/li>\n<\/ul>\n\n<p><strong>Accessibility &amp; Performance<\/strong><\/p>\n\n<ul>\n<li>ARIA labels, <code>role=\"status\"<\/code> live region for screen-reader announcements after copy<\/li>\n<li>Keyboard-navigable dropdown with <code>aria-expanded<\/code> and <code>role=\"menu\"<\/code> semantics<\/li>\n<li>Frontend CSS and JavaScript are only loaded on pages where the button will actually appear<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin folder to the <code>\/wp-content\/plugins\/<\/code> directory, or install the plugin through the WordPress Plugins screen directly.<\/li>\n<li>Activate the plugin through the <strong>Plugins<\/strong> screen in WordPress.<\/li>\n<li>Go to <strong>Settings &gt; Copy as Markdown<\/strong> to configure where and how the button appears.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"how%20do%20i%20place%20the%20button%20manually%3F\"><h3>How do I place the button manually?<\/h3><\/dt>\n<dd><p>Use the shortcode <code>[copy_as_markdown]<\/code> in any post, page, or widget, or add the <strong>Copy as Markdown<\/strong> block in the Gutenberg block editor.<\/p><\/dd>\n<dt id=\"can%20i%20copy%20only%20part%20of%20the%20page%3F\"><h3>Can I copy only part of the page?<\/h3><\/dt>\n<dd><p>Yes. Use the <strong>Content Element Selector<\/strong> setting (or the <code>selector<\/code> shortcode attribute) to target a specific CSS element. Leave it blank to let the plugin auto-detect the content area.<\/p><\/dd>\n<dt id=\"can%20i%20override%20shortcode%20settings%20per%20instance%3F\"><h3>Can I override shortcode settings per instance?<\/h3><\/dt>\n<dd><p>Yes. The shortcode accepts <code>text<\/code>, <code>size<\/code>, <code>selector<\/code>, and <code>download<\/code> attributes. For example: <code>[copy_as_markdown text=\"Export\" size=\"large\" selector=\".post-body\" download=\"true\"]<\/code>.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20custom%20post%20types%3F\"><h3>Does it work with custom post types?<\/h3><\/dt>\n<dd><p>Yes. Any public post type is listed in the Display settings so you can enable auto-injection for it.<\/p><\/dd>\n<dt id=\"how%20do%20i%20hide%20the%20button%20on%20a%20specific%20post%20without%20disabling%20the%20whole%20post%20type%3F\"><h3>How do I hide the button on a specific post without disabling the whole post type?<\/h3><\/dt>\n<dd><p>Enter the post or page ID in the <strong>Exclude Specific Pages \/ Posts<\/strong> field under the Display tab. You can find the ID in the URL when editing the post: <code>?post=123<\/code>.<\/p><\/dd>\n<dt id=\"what%20is%20the%20.md.txt%20endpoint%3F\"><h3>What is the .md.txt endpoint?<\/h3><\/dt>\n<dd><p>When enabled, appending <code>.md.txt<\/code> to any post or page URL (e.g. <code>yoursite.com\/my-post.md.txt<\/code>) serves the full post content as plain-text Markdown. After enabling it, visit <strong>Settings &gt; Permalinks<\/strong> once to flush rewrite rules.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20elementor%3F\"><h3>Does it work with Elementor?<\/h3><\/dt>\n<dd><p>Yes. The Markdown URL endpoint detects Elementor and uses its own renderer to capture the full built page content rather than the raw <code>post_content<\/code>.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Added optional Download button that saves post content as a <code>.md<\/code> file directly from the browser.<\/li>\n<li>Added <code>.md.txt<\/code> URL endpoint - append <code>.md.txt<\/code> to any post\/page URL to view it as plain-text Markdown.<\/li>\n<li>Added \"View as Markdown\" dropdown link that opens the <code>.md.txt<\/code> endpoint in a new tab.<\/li>\n<li>Added YouTube iframe support - embeds are converted to <code>[Video](url)<\/code> Markdown links.<\/li>\n<li>Added Exclude by Post ID setting to suppress auto-injection on specific posts or pages.<\/li>\n<li>Improved split-button dropdown UI for copy, download, and view actions.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Fixed plugin review issues.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Adds a button to copy markdown, download, and view post as Markdown format. Supports shortcode, Gutenberg block and .md.txt endpoint.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/325702","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=325702"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/josevarghese"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=325702"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=325702"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=325702"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=325702"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=325702"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=325702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}