=== MarkBlocks – Markdown for Elementor ===
Contributors: ilfarhanahmed
Tags: markdown, elementor, code blocks, syntax highlighting, page builder
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Write Markdown in Elementor and convert it into editable widgets with syntax-highlighted code blocks.

== Description ==

MarkBlocks lets you write and maintain technical articles in Markdown directly inside Elementor.

The plugin provides two Elementor widgets:

* **Markdown Article** renders headings, paragraphs, lists, task lists, links, images, tables, blockquotes, dividers, inline code, and fenced code blocks while preserving the original Markdown source.
* **Markdown Code Block** displays standalone code snippets with language-aware highlighting, light and dark themes, optional line wrapping, and an accessible copy button.

The Markdown Article widget can also convert Markdown into editable Elementor Heading, Text Editor, Divider, Image, and Markdown Code Block widgets.

=== Supported syntax ===

* ATX and Setext headings
* Paragraphs and inline formatting
* Ordered, unordered, and task lists
* Blockquotes
* Markdown tables with left, center, and right alignment
* Links and images
* Horizontal rules
* Inline and fenced code

=== Syntax highlighting ===

The bundled dependency-free highlighter recognizes FortiOS CLI, Bash, JSON, Python, PHP, JavaScript, TypeScript, SQL, YAML, PowerShell, HTML/XML, CSS, and INI-style configuration.

=== Security and privacy ===

* Raw HTML in Markdown is escaped.
* Rendered HTML is filtered with a strict WordPress KSES allowlist.
* Unsafe URL schemes and protocol-relative URLs are rejected.
* Converted text is protected from unintended shortcode execution.
* Input size, line count, nesting, conversion count, and highlighting limits reduce resource-exhaustion risk.
* The plugin does not add custom AJAX actions, REST routes, uploads, SQL queries, remote server requests, telemetry, or executable-code evaluation.
* If an author embeds an external image URL, a visitor's browser requests that image from its host as part of normal page rendering.

MarkBlocks is an independent add-on and is not affiliated with or endorsed by Elementor Ltd.

== Installation ==

1. Upload the `markblocks` folder to `/wp-content/plugins/`, or install the release ZIP through **Plugins → Add New Plugin → Upload Plugin**.
2. Activate **MarkBlocks – Markdown for Elementor**. Elementor is declared as a required plugin dependency.
3. Edit a page or post with Elementor.
4. Add the **Markdown Article** widget from the **MarkBlocks** category.
5. Paste Markdown and render it directly or use **Convert / Update Elementor Blocks**.

== Frequently Asked Questions ==

= Does MarkBlocks keep the original Markdown? =

Yes. The Markdown Article widget stores the original source so it can be edited later.

= Are converted Elementor widgets synchronized back to Markdown? =

No. The Markdown source remains canonical. Changes made directly to generated Elementor widgets are not written back into the Markdown field.

= How are images handled? =

Standalone Markdown images become Elementor Image widgets during conversion. Live Markdown rendering uses the supplied URL. MarkBlocks does not download remote images into the WordPress Media Library.

= Can I use raw HTML inside Markdown? =

Raw HTML is escaped rather than executed for security.

= Does MarkBlocks send data to an external service? =

No. MarkBlocks has no telemetry and makes no server-side remote requests. External images included by an author are requested by the visitor's browser when the page is viewed.

== Screenshots ==

1. MarkBlocks Markdown editor showing Markdown source and live Elementor output.
2. Published technical article created with MarkBlocks.

== Changelog ==

= 1.0.2 =
* Removed global admin notices and kept dependency and compatibility checks silent.
* Aligned the package, main file, and translation domain with the requested `markblocks` WordPress.org slug.
* Added WordPress 7.0 and Elementor 4.2 compatibility metadata.
* Improved keyboard focus, status announcements, copy-button feedback, and right-to-left layout behavior.
* Strengthened Markdown line-limit handling for LF, CRLF, and CR line endings.
* Localized editor-converter messages and scoped conversion status to the active control.
* Tightened generated-container ownership checks while preserving existing widget identifiers.
* Cleaned the release archive of hidden operating-system and repository files.
* Confirmed compatibility testing with Elementor 4.2.1.
* Added the correctly framed MarkBlocks icon and bundled showcase images.

= 1.0.1 =
* Added WordPress.org metadata, GPL licensing files, direct-access guards, security hardening, and table-alignment corrections.

= 1.0.0 =
* Initial public release.

== Upgrade Notice ==

= 1.0.2 =
Review-readiness update with accessibility, internationalization, security, and packaging improvements.
