From d2827d5b0a8d9220687dc6625cb21252e66e07f9 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Sat, 27 May 2017 11:14:46 -0700 Subject: update docs closes #72 --- views/docs/editor.php | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) (limited to 'views/docs/editor.php') diff --git a/views/docs/editor.php b/views/docs/editor.php index 23d2058..9cac51a 100644 --- a/views/docs/editor.php +++ b/views/docs/editor.php @@ -13,32 +13,46 @@

If your Micropub server supports a Media Endpoint, then at the time you add the image to the interface, Quill uploads the file to your Media Endpoint and embeds it in the editor as an <img> tag pointing to the file on your server. When you publish the post, the HTML will contain this img tag.

-
-    '); ?>
-  
+
'); ?>

If your Micropub server does not support a Media Endpoint, then when you add an image in the editor, the image is converted to a data URI, and will be sent to your Micropub endpoint when you publish the post. You don't need to do anything special to handle the image, since if you render this HTML directly, your viewers will see the image! Of course this means your HTML file will increase by the size of the image, so you may wish to implement a Media Endpoint in order to handle images in your posts separately.

-
-    
-  
+

Post Properties

-

The following properties will be sent in the Micropub request. This request will be sent as a standard form-encoded request.

+

The following properties will be sent in the Micropub request. This request will be sent as a JSON request.

The access token is sent in the Authorization HTTP header:

Authorization: Bearer XXXXXXXXX
+

This will be sent as a JSON request, so the request will look something like the following.

+ +
POST /micropub HTTP/1.1
+Content-type: application/json
+Authorization: Bearer XXXXXXXXXXX
+
+{
+  "type": "h-entry",
+  "properties": {
+    "name": ["Post Title"],
+    "content": [
+      "html": "<p>The HTML contents of your post from the editor</p>"
+    ],
+    "mp-slug": ["slug"],
+    "category": ["foo","bar"]
+  }
+}
+  
+

Back to Creating Posts

-- cgit v1.2.3