You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
3.0 KiB

  1. <div class="narrow">
  2. <?= partial('partials/header') ?>
  3. <h2>Note</h2>
  4. <img src="/images/note-interface.png" style="max-width: 300px; float: right;">
  5. <p>The note interface is for creating simple text posts and optionally adding images.</p>
  6. <h3>Adding Photos</h3>
  7. <p>If your Micropub server supports a <a href="https://www.w3.org/TR/micropub/#media-endpoint">Media Endpoint</a>, then at the time you select a photo, Quill uploads the file to your Media Endpoint and shows a preview in the interface. The image URL will be sent as a string in the request.</p>
  8. <p>If your Micropub server does not support a Media Endpoint, then when you add an image, it is not uploaded until you click "post", and then is sent to your Micropub endpoint as a file.</p>
  9. <h3>Post Properties</h3>
  10. <p>The following properties will be sent in the Micropub request. This request will be sent as either a form-encoded or a multipart-encoded request, depending on whether there are photos and whether you have a Media Endpoint.</p>
  11. <p>If you have a Media Endpoint, then you'll always get a form-encoded request with the URL of any photos. If you do not have a Media Endpoint, and if there is a photo, you'll get a multipart request so that photos are uploaded directly to your Micropub endpoint.</p>
  12. <p>The access token is sent in the Authorization HTTP header:</p>
  13. <pre>Authorization: Bearer XXXXXXXXX</pre>
  14. <ul>
  15. <li><code>h=entry</code> - This indicates that this is a request to create a new <a href="https://indieweb.org/h-entry">h-entry</a> post.</li>
  16. <li><code>content</code> - The text of your post. Your endpoint is expected to treat this as plaintext, and handle all escaping as necessary.</li>
  17. <li><code>category[]</code> - This property will be repeated for each tag you've entered in the "tags" field.</li>
  18. <li><code>in-reply-to</code> - If you tap the Reply button and enter a URL, the URL will be sent in this property.</li>
  19. <li><code>location</code> - If you check the "location" box, then this property will be a Geo URI with the location the browser detected. You will see a preview of the value in the note interface along with a map.</li>
  20. <li><code>photo</code> or <code>photo[]</code> - If your server supports a Media Endpoint, this will be set to the URL that your endpoint returned when it uploaded the photo. Otherwise, this will be one of the parts in the multipart request with the image file itself.</li>
  21. <li><code>mp-slug</code> - If you enter a slug, this will be sent in the request. You can customize the name of this property in settings.</li>
  22. <li><code>mp-syndicate-to[]</code> - Each syndication destination selected will be sent in this property. The values will be the <code>uid</code> that your endpoint returns. See <a href="/docs/syndication">Syndication</a> for more details. (If you are using an older Micropub endpoint that expects <code>syndicate-to</code>, you can customize this property in the settings.)</li>
  23. </ul>
  24. <hr>
  25. <p>Back to <a href="/docs/creating-posts">Creating Posts</a></p>
  26. </div>