The Able text editor now allows you to do the following when writing articles on Able.
You can now emphasize references to
functions and so on in your article text. Just highlight the desired word and click the code option from the formatting toolbar that appears.
Snippets are good for demonstrating simple blocks of code or how to run commands. Just highlight a line of text and click snippet from the toolbar to place it into a code block. When your post is previewed (once saved as a draft) or published, Highlight.js will try to automatically detect the language and provide further syntax highlighting. For example, including a $ will cause it to be recognised as a shell script.
$ python main.py
This is great for guiding readers through various CLI commands in tutorials. Pasting code into snippets is currently a bit temperamental and may not always produce the expected results, so it's advised to type your code in manually for now, this will be fixed soon. Press Shift + Return to jump to a new line within the code snippet or just Return to jump to a new line outside and below the code block to continue writing your article. Currently, only spaces are supported for indentation, Tab support will also be added as part of the same update. Alternatively, you could also use...
You can now import content from GitHub and YouTube. Just paste the URL into the editor, highlight it and select embed from the toolbar.
Support for embedding content from other services is intended in the near future.
You can now insert tables into articles by highlighting the word you would like to place in the top left cell, then clicking the table icon on the toolbar and selecting the amount of columns and rows you would like.
Top programming languages on GitHub (source)
To remove formatting from text just highlight it and click the eraser icon. Note that this only works on text and not block elements such as code snippets, you can remove those by simply deleting them. As Able is still in beta, some of these features may have a few small issues. In most cases, highlighting the text and clicking on the eraser icon or just pressing backspace or delete will help you to rectify any unwanted styling.
Hopefully, these new features will come in handy when writing posts.