- Update now reads the live editor text from NSTextStorage instead of relying on any stale editor state, sends it as markdown plus compatibility aliases, and refuses to overwrite the editor with stale Markdown if the server response doesn’t echo the new content.

I also updated [api.php](/Users/tyemeclifford/Documents/GH/blog/api.php) 
so content.save accepts markdown, content, or body for post/page 
content.
This commit is contained in:
Ty Clifford
2026-07-05 17:15:33 -04:00
parent ddaefbcc27
commit c391feb450
6 changed files with 497 additions and 80 deletions
+8 -1
View File
@@ -6,13 +6,20 @@ All notable changes to Ty Clifford's Content Management System are documented he
### Added
- Added `api.php` for `.env`-authenticated remote management of content, media uploads, and comments.
- Added `api.php` for `.env` username/password authenticated remote management of content, media uploads, and comments.
- Added a native AppKit macOS 12+ client under `macclient/` for editing posts/pages, uploading media, moderating comments, local autosave, and optional remote draft autosave.
- Added Mac client post/page list pagination with configurable per-page counts.
- Added Mac client editor spell-check and auto-correct options.
- Added a Mac client Update action for saving existing posts/pages without changing their current draft/published status.
- Added a declared shortcode parser with PHP-array/JSON configuration, including `[youtube=<id>]` and `[video poster=<poster> file=<file>]`.
- Added `lone-embed.php` as the generated HTML5 video player target for video shortcodes.
### Changed
- Simplified API and Mac client authentication to `.env` username/password only, removing token-based auth.
- Fixed Mac client resizing, maximized editor text reflow, startup layout refresh, guarded undo/redo behavior, keyboard focus traversal, and standard Command-key shortcuts including Settings and Update.
- Fixed Mac client Update so edited Markdown is read from the live text storage and stale save responses no longer overwrite the editor.
- Expanded the API content save endpoint to accept `markdown`, `content`, or `body` payload fields for editor content.
- Blocked direct web access to `.env` and the `macclient/` source folder through `.htaccess`, with matching `.env` protection in the local PHP router.
## 2026-07-04