186 17
Sign in to rate

Power Format Pack: Markdown, code blocks, lists, tables, syntax highlight & more

0.86MB. Updated 2018-07-17. Only supports Anki 2.0.


Power Format Pack IMPORTANT: This add-on only works with Anki 2.0.*. There is no support for Anki 2.1, and most likely, there never will be. Please read this issue on GitLab for more information. Thanks everyone for using this add-on over the years and rating it so highly. It has been my pleasure. Check out the Mini Format Pack created by Glutanimate, who ported some of the functionality of this add-on to Anki 2.1. MARKDOWN You can use Markdown to style your notes. Markdown is a text-to-HTML conversion tool, that lets you quickly style your notes. If you don't know Markdown yet, have a look at this tutorial. Enable Markdown Markdown is disabled by default, to keep this add-on as modularized as possible. To enable it, go to the add-on settings (Power Format Pack add-on (options) > Options... > Markdown) and tick the checkbox next to "Markdown". Restart Anki to complete the process. Using Markdown When you click the Markdown button, your Markdown syntax will be translated into HTML and displayed. You are now in Markdown mode. Markdown mode is indicated by the changed background color and the warning message under the field you are editing. In Markdown mode, you cannot use any of the formatting buttons you would normally have access to. This is done to prevent any accidental editing of the displayed result. If you want to make changes to the card, first toggle the Markdown button again and go back to normal mode. However, if you absolutely need to edit the card in Markdown mode, you can choose to keep the buttons enabled from the options menu, by ticking the checkbox Allow editing of rendered Markdown. When you do add text to your card or alter the HTML directly in Markdown mode, a dialog box will appear asking whether you want to revert to your previous Markdown syntax, or try to incorporate the changes in your card. Be advised, however, that the result may lose some of your original Markdown syntax, especially if the original syntax was complex (footnotes, tables, code blocks). To make sure you always return to your original syntax when exiting Markdown mode, you can check the Always automatically revert back to saved Markdown checkbox in the options. Doing this will never show you the warning dialog box and will always discard any changes made in Markdown mode. Don't use Markdown in combination with other formatting I recommend you use either Markdown or the rich formatting buttons, but not both at the same time. Markdown was designed to be a fast and simple way to quickly write relatively simple formatted text. As such, it won't know what to do with complex cards that use formatting unknown to the Markdown specification. So when clicking the Markdown button, it _will_ "erase" formatting that it does not know how to handle. You were warned. Extra Markdown syntax This add-on supports some Markdown syntax not found in John Gruber's original Markdown: CODE BLOCKS Code blocks can be created by indenting four spaces with a white line before and after the code block. The syntax can be specified either by: :::java public class Test { } or by using: ```python def print_me(this): print "Printing: ", this ``` Code blocks can be styled by choosing a predefined styling in the settings, or by creating your own stylesheet. More (technical) details on code blocks (e.g. highlighting of lines) can be found on the Python Markdown project. DEFINITION LISTS A definition list can be created as follows: Apple : Pomaceous fruit of plants of the genus Malus in the family Rosaceae. Orange : The fruit of an evergreen tree of the genus Citrus. Make sure there is a white line between the different definitions. FOOTNOTES Footnotes[^1] have a label[^@#$%] and the footnote's content. [^1]: This is a footnote content. [^@#$%]: A footnote on the label: "@#$%". A footnote label must start with a caret ^ and may contain any inline text (including spaces) between a set of square brackets []. Only the first caret has any special meaning. A footnote content must start with the label followed by a colon and at least one space. The label used to define the content must exactly match the label used in the body (including capitalization and white space). The content would then follow the label either on the same line or on the next line. The content may contain multiple lines, paragraphs, code blocks, block quotes and most any other markdown syntax. The additional lines must be indented one level (four spaces or one tab). More (technical) details on footnotes (e.g. multiple blocks of content) can be found on the Python Markdown project. ABBREVIATIONS The Markdown syntax: The HTML specification is maintained by the W3C. *[HTML]: Hyper Text Markup Language *[W3C]: World Wide Web Consortium will be rendered as: <p>The <abbr title="Hyper Text Markup Language">HTML</abbr> specification is maintained by the <abbr title="World Wide Web Consortium">W3C</abbr>.</p> TABLES Tables have the same syntax as described below for the table button. Tables can be styled with CSS in your stylesheet. ATTRIBUTES An example attribute list might look like this: {: #someid .someclass somekey='some value' } A word which starts with a hash (#) will set the id of an element. A word which starts with a dot (.) will be added to the list of classes assigned to an element. A key/value pair (somekey='some value') will assign that pair to the element. Be aware that while the dot syntax will add to a class, using key/value pairs will always override the previously defined attribute. Consider the following: {: #id1 .class1 id=id2 class="class2 class3" .class4 } The above example would result in the following attributes being defined: id="id2" class="class2 class3 class4" Say you have a CSS class: .large { font-size: 32px; } You can add this class to a paragraph like this: A person often meets his destiny on the road he took to avoid it. {: .large} More (technical) details on attributes (e.g. block-level and inline attributes) can be found on the Python Markdown project. FORMATTING BUTTONS Besides Markdown, this add-on adds the following supplementary formatting buttons to Anki: CUSTOM USER-DEFINED KEYBINDINGS You can change the default keybindings to your liking by going to Tools > Power Format Pack add-on (options) > Keybindings... You will be presented with a table view of all available functionality on the left and the associated keyboard shortcuts on the right. To change a particular keybinding, double click on the shortcut and press the desired keyboard combination. Be aware that all keyboard combinations will be accepted, although some of them won't actually work in practice. If you assign the keyboard shortcut 'A' to a certain functionality, for example, the shortcut won't actually do anything. Also keep in mind that there is no check for duplicate keybindings. This means that when a keybinding is already taken by either your OS, Anki, this add-on, or some other running program, the result is undefined. You can sort either on functionality ('Action') or keybindings by clicking on the appropriate header columns. If you want to revert to the default keybindings provided by Power Format Pack, click the 'Restore Defaults' button. You can undo any changes you made and keep the dialog window open by pressing the 'Reset' button. 'Cancel' will do the same but will also close the window. Lastly, when you click 'Save', the dialog window will close and your changes will be applied. DISABLING UNUSED BUTTONS The buttons can be enabled or disabled individually in Tools > Power Format Pack (options), so feel free to disable the buttons you don't use. SOURCE CODE The source code is available on GitLab. If you have any issues, please report them there! CHANGELOG -------------------------------------------------- 28-08-2014 v0.1.0: initial release 29-08-2014 v0.1.1: bug fix and outdent button added 30-08-2014 v0.1.2: <code> element bug fixed 03-09-2014 v0.1.3: added definition lists and tables 06-09-2014 v0.1.4: bug fixes 24-09-2014 v0.2.0: definition list greatly improved and tables redesigned with light look 25-09-2014 v0.2.1: added proper icons 28-09-2014 v0.2.2: bug fixed with empty definition list 11-10-2014 v0.2.3: bug fix for code tag and improved pre tags to also include a CSS class 19-10-2014 v0.2.4: changed shortcuts for indent and outdent buttons, because they interfered with core Anki shortcuts in Browser 24-10-2014 v0.3.0: improved tables: selected text can now be converted to a table; added hyperlink and keyboard key buttons; improved options menu 25-10-2014 v0.3.1: bug fix with hyperlinks where it would in some cases incorrectly prepend a second http:// 27-10-2014 v0.3.2: bug fix where empty lists would be duplicated to complete field when using <code> format 28-10-2014 v0.3.3: added Unicode support to stop tables and other stuff from breaking when non-English is entered (sorry about that :), added optional alignment to tables 16-11-2014 v0.4.0: added text background color 25-11-2014 v0.4.1: add-on now remembers last used color 25-11-2014 v0.4.2: bug fixes 17-02-2015 v0.5.0: highlight colors on all platforms! (yes, it took it while) added text alignment, headings, and block quotes 24-02-2015 v0.5.1: fixed preference handling, it will now revert to the default settings upon encountering an error; bug fix for tables where HTML (or anything in brackets) wouldn't be escaped; changed shortcut for text align center to Ctrl+Shift+Alt+B to prevent conflict with cloze deletions 24-02-2015 v0.5.2: fixed bug in path location of preference file (was hard-coded) 22-05-2015 v0.6.0: enhanced types of ordered list, added <abbr> tag, added About dialog, cleaned up preferences, refactored code 26-05-2015 v0.6.1: re-enabled text highlighting on Mac OS X and Windows 29-09-2015 v0.7.0: added user-defined keybindings; added author to block quote 29-11-2015 v0.8.0: added Markdown 10-12-2015 v0.8.1: fix for assertion error when keybinding is not Unicode 21-12-2015 v0.8.2: made hyperlink functionality more liberal (will now not force http:// prefix) 06-01-2016 v0.8.3: fixed assertion-related errors 10-01-2016 v0.8.3.1- minor bug fixes 02-02-2016 v0.8.6.2: added way to change position of button bar; fixed Markdown issues 05-02-2016 v0.8.6.3: fix for error in Windows where username is not ASCII 09-02-2016 v0.8.6.4: fix for backwards compatibility with older versions of Anki 12-08-2016 v0.8.6.5: fix for fixed ordered list error 13-10-2016 v0.8.8.0: made Markdown optional, allow editing of rendered Markdown, added option for tables with optional styling 22-10-2016 v0.8.8.1: workaround for deletion of font-weight attribute in first span by Anki 26-01-2017 v0.8.8.3: added option to use user CSS for styling code blocks; miscellaneous bug fixes and improvements 13-05-2017 v0.8.8.4: performance and stability improvements for Markdown 21-08-2017 v0.8.9.0: edit keyboard shortcuts from within Anki 16-07-2018 v0.9.1: some refactoring, nothing should have changed except that the code should smell a little less


The add-on author has not uploaded a version of this add-on compatible with Anki 2.1. Old add-ons for Anki 2.0 can be downloaded from the archive.

All Anki 2.1.x Add-Ons


on 1658850403
exactly what I needed
on 1647150294
Thank you for your effort in creating this add-on.
on 1645114506
on 1634673335
on 1632078703
Outdated for a while now.
on 1612697793
PLEAS we need the update! :) :)
on 1604907904
Very useful, thank you !
on 1604243346
Please update for Anki 2.1. Thanks!
on 1599828292
Ctrl + Shift + ] doesnt work
on 1599340705
on 1588661546
Awesome. Pls notify when compatible with Anki 2.1
on 1587400410
on 1578818611
on 1575060271
Absolutely great, I wouldn't have passed the bar exam without this!! I wihs there was an update for ANKI 2.1 since starting from 2020 on, ANKI 2.0 will no longer be supported :/
on 1574201342
Works perfectly for my needs. Thank you.
on 1573948964
on 1568511456
good for me
on 1565464444
Thanks for all your hard work on this Stefan, it's a shame to see it go.

If you need Markdown for Anki, you could use Pandoc. It's a command-line tool, but there's an online version here: https://pandoc.org/try/

— I use it for my Anki theme, which helps you learn to code: https://github.com/badlydrawnrob/anki

It's amazing Power Format Pack has lasted so long, they're maintained in the creator's spare time for free. Not an easy task!

Pandoc allows you to:

- Convert from Markdown to HTML
- Copy and paste into Anki

Enjoy :)
on 1565032562
No está para la nueva versión de Anki
on 1561485071
cool tool and easy to install... but I was hoping it would help me style cards. It seems like it just helps you format the content of your notes, instead of being able to make one change to a card type and see that reflected throughout your deck. I wanted to put some of my fields into a table in the Card, but with this add-on, I can only add a table to the field on the Note. So I would have to change every note individually. Maybe helpful if you're making a new deck from scratch? But otherwise I don't think I'll have any use for this add-on.
on 1559220372
get it on Anki 2.1 Please. Do we have a beta?
on 1557780435
on 1552919455
thanks !!!!
on 1551018790
I want to say thank you very much for improving this powerful add-on to version 2.1.
But could you add a function of "a definition list button" in the original one? I'm desperate to need this.
Many thanks to you !!!
on 1550799629
so great!
on 1545847901
very good
on 1541462150
Lets me put code blocks in my cards.
on 1541378899
How do I reset all of the formatting I added?
on 1540176412
on 1539418674
great extension
on 1538729908
on 1537403250
on 1536828769
very useful
on 1535705708
It's THE max useful addon i found in anki.

on 1535543307
Sorry, but it didn't work to me

Download failed: Traceback (most recent call last):
File "aqt/downloader.pyc", line 67, in run
File "httplib2/__init__.pyc", line 1597, in request
File "httplib2/__init__.pyc", line 1395, in _request
File "httplib2/__init__.pyc", line 1597, in request
File "httplib2/__init__.pyc", line 1345, in _request
File "aqt/sync.pyc", line 467, in _conn_request
File "httplib2/__init__.pyc", line 1013, in connect
File "httplib2/__init__.pyc", line 80, in _ssl_wrap_socket
File "ssl.pyc", line 943, in wrap_socket
File "ssl.pyc", line 611, in __init__
File "ssl.pyc", line 840, in do_handshake
SSLEOFError: EOF occurred in violation of protocol (_ssl.c:661)

Anki Version 2.0.52 macOS Sierra 10.12.6

UPD: Sorry, but I had problems with the Internet, when I connected via VPN, the plug-in was installed
on 1535195044
on 1534516990

For 2.1 support, feel free to check out Mini Format Pack (https://ankiweb.net/shared/info/295889520). It's a highly cut-down version of PFP, but I hope it will serve as a workable temporary solution until someone finds the time to port PFP in its entirety.

Thanks again for all the time and work you've put into this over the years, Stefan. I really couldn't imagine using Anki without it.


Original review:

Across all of the dozens of add-ons I have installed this is the one I probably use the most. Having the ability to create lists, tables, and any other type of formatting you can think of with a simple button-press is an incredible time-saver.

The add-on is documented very well, but I know that some people prefer video tutorials. For that reason I've recorded a quick instructional video that goes over the most important aspects of the add-on. I hope it's OK if I share it here:

on 1533734526
This add-on makes it easier for me to insert code snippets into Anki
on 1531784951
Essential add. Nice!
on 1531484016
The plugin is complicated. I can't see how it is working. Markdown button hotkey is not working.
on 1531049319
very good
on 1530638240
on 1530445094
on 1529178014
on 1527033600
Excellent pack. Exactly what I was looking for.
on 1526774400
A powerful tool for anki, expecially for who has the expericen using markdown.
on 1526601600
Waiting for a version for 2.1~~
on 1525305600
on 1524182400
Amazing! Very useful for folks that also use Anki to memorize programming/command line facts. Thanks.
on 1523232000
This + image occlusion are absolutely essential for students making flashcards.
on 1521849600
Great addon! I'm using this now for almost every flashcard I make!
I recently updated to the newest version and now I get this message when Anki starts:

Traceback (most recent call last):
File "aqt\addons.py", line 41, in loadAddons
File "C:\Users\User\AppData\Roaming\Anki2\addons\Supplementary Buttons Anki.py", line 2, in <module>
import extra_buttons.extra_buttons
ImportError: No module named extra_buttons

Could anybody please tell me what's the problem and how to solve it?
on 1520380800
Really excellent addon! I appreciate the time you took to make this.
on 1520035200
Thank you very much.
on 1519948800
At least half of these buttons should be in standard Anki editor (lists, simple table creation). Impatiently waiting port for Anki 2.1
on 1517702400
Invalid code !!!
on 1516147200
Loved this format pack!!
I can't use it anymore :(

would be cool if you could update it for Anki 2.1??

thanks for the hard work!
on 1515974400
love the control man ! <3
on 1515888000
I like that footnotes are supported but they leave behind broken links. Fortunately I found a nice workaround to clean them up. Just put this code into your card's stylesheet. It disables the superscript link and hides the return arrow.

.footnote-backref {
display: none;

.footnote-ref {
pointer-events: none;
cursor: default;
on 1515283200
Best Anki addon - eagerly awaiting its availability for 2.1
on 1512432000
i'd like to try it
on 1510358400
Great Add-on

on 1509235200
on 1508976000
on 1508544000
on 1508371200
on 1508284800
on 1507766400
on 1506729600
on 1506643200

Great on the computer for formatting, my only issue is that it becomes wonky-looking with the iOS app
on 1505606400
on 1503273600
on 1503100800
on 1502841600
"Code format text" destroys content

Anyone else have this problem with 8.8.4? I selected a small area of text, applied the Code format text option and found that the text below the selection was removed from the text area and added as a window label (in the same type of area where 'Front' and 'Back' are located - the remaining text was added as a gigantic label after the text entry area where I made the change). This label was of course uneditable, and in fact, the text was lost.
on 1502755200

I give this four stars because its the best option I've seen for bullet points, but the shortcut hint on Anki for indenting does not perform its function—it instead flips over to your decks. Please fix.
on 1501977600
on 1501027200
on 1500508800
on 1500422400
on 1500336000
on 1500163200
Broken by design

Might be cool but broken by design. This plugin converts your Markdown into HTML and stores it in the database. Then after, if you want to edit your card, plugin _parses_ HTML back to Markdown. What's more important, if later you'll want to export your cards and use them somewhere else, you'll get *surprise, surprise* ugliest HTML code.
on 1499731200
on 1499299200
A bit hard to start, but then awesome tool!

Took me a while to learn how to use it. However now, I can't imaging using Anki without it.
on 1499212800
on 1499040000
on 1498867200
on 1497484800
What a massive accomplishment! Infinitely useful, tons of tools.

The negative feedback below is just a handful of ignorant and spoiled. They have no idea of the time, effort and skill required to make such a wonderful piece of software like this.

Thank you very much for the wonderful job!
on 1497139200
Adding extra rows/columns

Was looking for something to create tables and this is pretty much perfect. Thanks so much!
One question: If I add a table and then regret the number of rows/columns, is it possible to delete or add extra rows/columns after having made the table? Maybe I'm missing something, but I have to delete the entire table and make it from new.
on 1497052800
on 1496534400
on 1496188800
on 1496102400
Amazing and Essential Add-on

I can't use Anki without this add-on. The only drawback I see is how the pygments used is ancient and hasn't been updated since forever.
on 1494979200
on 1494115200
on 1493769600
on 1493424000
Thank you!

It's very useful , thank you author.
on 1493337600
Absolutely Terrific.

Sometimes you come across a great piece of software, that solves a problem fast and dirty. This is just it - I got code inside my Anki cards in seconds. Thank you!
on 1493078400
Almost too many features.

I said "almost", because each has their use, it's just I don't require that use in every instance. Still a little overwhelming.

My only caveat is that bullet points can't be centered, so they have to left-aligned, and this is incredibly frustrating as they're my most-used feature. Any chance of changing this?
on 1492819200
on 1491955200
on 1491696000
on 1491004800
on 1490918400
Should be Standard

This should be built into Anki.
on 1490400000
on 1489881600
on 1489708800
Hackish Crap

All I want is a way to have cards with formatted C code. This is an inelegant and hackish pos that ended up corrupting some of my cards. Lame.
on 1489622400
on 1489622400
on 1489449600
on 1488672000
on 1487289600
on 1487203200
on 1486598400
on 1485648000
on 1484870400
on 1484092800
on 1482883200
on 1482883200
on 1482624000
on 1481673600
on 1481500800
on 1480377600
on 1480291200
on 1479600000
on 1478822400
on 1478131200
on 1478044800
on 1477872000
on 1477180800
on 1477180800
Best tables addon out there

I made a feature request on GitHub. A few hours later, the guy gave me a snippet of code to paste into cards -> style, and voila, my need to have automatically minimal-sized tables was solved!

table {
width: auto !important;


BTW: my cloze -> cards -> style looks like this:

.card {
font-family: arial;
color: black;
background-color: white;
text-align: left;
margin-left: 10%;
margin-right: 10%;

.cloze {color: blue;}

table {
width: auto !important;
margin: 0 auto;

th {width: auto !important;}

table tbody tr:nth-child(2n+1) {background-color:#f2fffd;}

Looks nice and doesn't take up the whole screen with white space. Doesn't delete data like the other table addons.
on 1475798400
on 1472947200
on 1470268800
on 1469318400
on 1468195200
on 1467158400
on 1466985600
on 1465948800
on 1465689600
on 1464480000
on 1464307200

Randomly deletes information.
on 1462924800
on 1461110400
on 1460592000
on 1459987200
on 1459900800
on 1457049600
Add-on tries to do too much.

Somewhat useful, but formatting ends up taking too much time, with a risk of corrupting the note, and loosing all the content.
on 1456704000
on 1456531200
on 1456358400
on 1455408000
on 1455235200
completely usefull add on

works as it promised
when i updated anki to latest version the problem resolved.
special thanks to programmer.
on 1454544000
on 1453766400
Works well, Slows down editing

Works as promised and adds extreme functionality to making high quality cards. but it really slow down opening/closing the editor. For ex when reviewing if i need to make a quick card edit, opening the editor takes just a second longer than normal and switching fields freezes anki for about a second. Nothing dramatic, but noticeable and got annoying enough for me to uninstall :/
on 1453593600
on 1453248000
on 1453075200

Thx man it's fabulous.
on 1452816000
on 1451779200
on 1451347200
on 1450051200
on 1449014400
on 1448064000
on 1445731200
on 1443830400
on 1443312000
on 1443052800
Markdown Support

It would be awesome to have markdown based formatting instead of buttons(/or keyboard shortcuts). Anyway, this is a must have add-on.
on 1442793600
on 1442361600
on 1441065600
end the code status

It's a pity.I can start up the code environment via the "ctrl+,""ctrl+.",but who can tell me how to end the code environment to write a normal text.
on 1440633600
on 1440374400
on 1439856000
on 1438905600
I Love This Add-On

This was already one of my favorite add-ons, but now that I can configure ordered list to format however I want; I wish I could put a sixth start. Only wish I have would be the ability to easily change table column widths or even to have an auto-width feature that shrinks columns with few characters to make room for those with many. Still this is definitely in the top 2 add-ons for me.
on 1437868800
on 1437696000

Thanks a lot for this add-on. I don't want work without it.
on 1437264000

So good, its almost not optional for anki users
on 1435881600
on 1432857600
on 1432425600
on 1432166400
on 1431820800
on 1427155200
on 1426809600
on 1426550400
on 1426291200
on 1425427200
on 1424390400
on 1422921600
on 1422576000
on 1421884800
on 1421452800
on 1421452800
on 1421193600
on 1420502400
Must have add-on

This add-on is a must have for me. I haven't figured out yet how to change the apeareance of the code bock style (I'm not that programming savy), but outherwise, it's brilliant. Especially the keyboard stroke and diagram features do the job for me.
on 1418774400
on 1418256000
on 1417996800
wow, best tool ever!
it was a pain entering lists and arranging texts before, but now it has become so convenient by having the buttons which we expect to be v. essential in any text editor software (no mater how simplistic it is).
i believe this tool will significantly decrease anki's barrier of entry, thus it should become a standard part of the software!
on 1417996800
on 1417824000
on 1416960000
on 1414713600
All of my favorite editing features in one convenient add-on

I especially like the pipe-delimited table feature -- very Wiki-esque.
on 1414195200
on 1411948800