# Able

Welcome to Able's documentation. This is where you can find information about various aspects and features of the Able website.


# Editor

How to use the various features of the Able Editor.

## Options sidebar

Most options can generally be found in the options sidebar which can be opened by clicking the ••• button at the top right of the editor. This can also be opened using the shortcut Ctrl/⌘ + O.

## Shortcuts

The following shortcuts can be used with the Able editor.

| Action                 | Shortcut                                          |
| ---------------------- | ------------------------------------------------- |
| Save                   | Ctrl/⌘ + S                                        |
| Toggle Options sidebar | Ctrl/⌘ + O                                        |
| Toggle Markdown        | Ctrl/⌘ + M                                        |
| H1                     | *#* followed by a space on a new line             |
| H2                     | *##* followed by a space on a new line            |
| H3                     | *###* followed by a space on a new line           |
| Bold text              | Ctrl/⌘ + B                                        |
| Italic text            | Ctrl/⌘ + I                                        |
| Link text              | Ctrl/⌘ + K                                        |
| Inline code            | Enclose text in backticks **\`**                  |
| Code block             | **\`\`\`** on a new line                          |
| Inline math formula    | Enclose text in single $ then tap space           |
| Math formula block     | Enclose text in double **$$**                     |
| Ordered list           | **1.** followed by a space on a new line          |
| Unordered list         | **-** or **\*** followed by a space on a new line |
| Blockquote             | **>** followed by a space on a new line           |
| Horizontal rule        | === on a new line (we’re working on ---)          |

## Markdown mode

You can switch the editor to Markdown mode using Ctrl/⌘ + M  or by enabling markdown mode from the options sidebar. This will allow you to edit your posts in more granular detail or paste pre-existing markdown into the editor.&#x20;

The editor will remember your preference, so if you prefer to use markdown mode it will stay in this state until you change back.

## Math Equations

You can write inline math equations or math equation blocks in your posts. We use [KaTeX](https://katex.org/) to render them. To write an inline equation just enclose your text within single dollar signs followed by a space. So typing something like `$-b \pm \sqrt{b^2 - 4ac} \over 2a$` into the editor followed by a space will render an inline equation.

For block equations, just enclose your text in double dollar signs, so typing `$$-b \pm \sqrt{b^2 - 4ac} \over 2a$$` will give you a block-width equation like the one below.

$$
-b \pm \sqrt{b^2 - 4ac} \over 2a
$$


# Webhook

Call a URL whenever you create, update or delete a post on Able.

Able provides a webhook that lets you call any URL whenever you create, update or delete a post on Able. This is a convenient way to use the Able editor as a writing interface for other services.

## Setting up a webhook

Your webhook can be created and managed under the [Posts settings](https://able.bio/settings/posts/webhook) page of your account. You can also find a shortcut to your webhook settings from the editor’s options sidebar (click ••• in the editor).

### Settings

A webhook on Able has the following settings that can be configured.

| Setting            | Explanation                                                                                                                                                                                                                                                                                  |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Enabled**        | This is a global flag to enable webhook calls whenever you save, update or delete posts. When disabled, no webhook calls will be made. Be aware that there are some additional settings lower down that can limit the webhook from being called. For example: **Events** and **Conditions**. |
| **Production URL** | This is the URL that you can use to point to your production webhook handler.                                                                                                                                                                                                                |
| **Test URL**       | You might want to make changes to your handler and test these while still keeping your Production URL set. So you can use the Test URL for this instead.                                                                                                                                     |
| **Test mode**      | When enabled, the webhook will call the Test URL instead of the Production URL.                                                                                                                                                                                                              |
| **Format**         | Choose whether you want the webhook call to contain your post content as HTML or Markdown.                                                                                                                                                                                                   |
| **Events**         | You can specify which events should fire the webhook call. For example when posts are `created`, `updated` and `deleted`                                                                                                                                                                     |
| **Conditions**     | These are extra conditions that can limit when the webhook makes a request. For example, if you only want to make requests when your post is `set to published`.                                                                                                                             |

## ‌Request example

When a webhook is enabled and you create or update a post on Able then a `POST` request is made to the specified Production or Test URL whenever you create, update or delete a post.&#x20;

The request will include `Authorization: Bearer <token>`  in the header which you can use to verify that the request has come from Able. Here's an example of a typical request body:

```
‌{
  "event": "post_update",
  "metadata": {
    "slug_id": "421c5845",
    "created_at": "2020-05-16T19:40:40.771527Z",
    "updated_at": "2020-05-16T19:41:19.721800Z",
    "body_type": "markdown",
  },
  "content": {
    "body": "Some **body** text goes here…",
    "title": "Example post",
    "topics": [
      "Able"
    ],
    "published": false
  }
}
```

When deleting a post on Able, a `DELETE` request will be sent.

```
{
  "event": "post_delete",
  "metadata": {
    "created_at": "2020-05-16T22:52:56.989000Z",
    "deleted_at": "2020-05-18T06:54:26.534549Z",
    "slug_id": "421c5845",
  }
}
```

Requests will only be made if the appropriate event is enabled in your webhook settings. Additionally, if you have enabled the **condition** setting to only make requests when your post is `set to published` then requests will not be made if your post set to draft status.

## Testing a webhook

If you want to get familiar with what a webhook request looks like then we’d recommend using a simple service like [Webhook.site](https://webhook.site/) to quickly create an endpoint and point your Able webhook at it.

When the webhook url gets called from the editor your will see a toast notification pop out that shows the HTTP status code and response from the server. This can be handy for debugging integrations.

![](/files/-MAA6lZG55jqBMpXdIJx)

## Using extensions

We also have a [Push to GitHub](https://github.com/able-bio/push-to-github) extension which you can use to push webhook requests into a GitHub repository that you specify.

‌


# Exporting your data

How to export your posts from Able

Currently, it is only possible to export your post data from Able. To export your posts from Able you can do the following:

### Downloading your data

While logged in to your Able account:

1. from the Able homepage, click on your profile picture at the the top right.
2. select **Settings**
3. select **Account** from the settings side menu
4. under Account settings, click **Download your data**. You will only see this button if you have posts in your Able account
5. you will receive an email within 10 minutes with a link to download your data as a .zip file

### Export contents

Once you've downloaded your **able\_export\_username.zip** file and unzipped it, it should look like this:

```
posts
├── images
│   ├── 0188uit
│   │   └── image_name_a.jpg
│   │   └── image_name_b.jpg
│   ├── 061m54b
│   │   └── image_name_c.jpg
│   ├── 08vkfwu
│   │   └── image_name_d.jpg
│   │   └── image_name_e.jpg
│   ├── 09bj4ox
│   │   └── image_name_f.jpg
└── posts.json
```

#### Images

There is an `/images` directory which contains all images, referenced in your posts. Each folder in `/images` has a name that corresponds to a post `id` and that folder contains all of the images that belong to that post `id`

#### Posts

`posts.json` contains the data for all of your posts. This is what that looks like:

```
[
  {
    "views": 174,
    "html": "<p>This is where the post body goes</p>",
    "tags": ["Test"],
    "updated": "2020-05-29 07:13:04.258680+00:00",
    "title": "An example post",
    "id": "0188uit",
    "header_image": null,
    "slug": "an-example-post",
    "markdown": "This is where the post body goes",
    "pub_date": 2020-05-29 07:13:04.258680+00:00,
    "created": "2020-05-29 07:13:04.258707+00:00",
    "subtitle": null,
    "published": true,
    "canonical_url": null
  },
  {...},
  {...},
  {...},
  {...}
]
```

Note that all image URLs inside posts.json are updated to point to the local image reference in the zip file. For example, any images in the post.json folder above will look like this:

```
<img src="/images/0188uit/image_name_a.jpg" />
```

### Reporting issues

If you experience any issues with your data exports, please email <hello@able.bio> or raise an issue in our [suggestion box](https://github.com/able-bio/suggestion-box/issues) on GitHub.


# Deleting your account

How to delete your Able account and what happens when you do

We've gone through a lot of care to make sure that when you delete your Able account, all of your data is properly deleted.

{% hint style="info" %}
Before deleting your account you might want to [download your data](https://docs.able.bio/exporting-your-data).
{% endhint %}

### How to delete your account

While logged in to your Able account:

1. from the Able homepage, click on your profile picture at the the top right.
2. select **Settings**
3. select **Account** from the settings side menu
4. under Account settings, click **Delete account**
5. you will be prompted to confirm that you want to delete your account.

### What happens when you delete your account

Once you have confirmed that you would like to delete your account, the following happens:

1. you are immediately logged out
2. your account is deactivated and marked for deletion
3. a background job will shortly proceed to delete all of your data from our production database
4. if any people have replied to comments you have posted on Able, then your comments with replies will have your user removed as the author and the comment text is replaced with a message that says 'Deleted'. This makes sure that the comment thread remains intact.
5. all images you've ever uploaded to Able are deleted
6. all images and posts are purged from our edge cache
7. you will be sent an email to confirm that your account has been deleted
8. within a few days your any database backups that contain your data will expire and be deleted

### Reporting issues

If you experience any issues with deleting your accounts, please email <hello@able.bio> or raise an issue in our [suggestion box](https://github.com/able-bio/suggestion-box/issues) on GitHub.


# Feedback

Submit ideas, suggestions, bugs and other issues about Able.

If you have suggestions about how you think we can improve Able, feel free to create an issue in our [Suggestion Box](https://github.com/able-bio/suggestion-box/issues) in GitHub. This is where we publically discuss progress on various features, bugs, issues and so on.

If you would like to submit some private feedback or need help with anything else. You can contact us at <hello@able.bio>


