Add Table

AnkiWeb addon 1237621971

1 other version of this addon exists. Compare versions ↓

Inserts customizable HTML tables through a dialog or keyboard shortcut, or converts selected pipe-delimited markdown-like text into a table; it does not edit existing tables.
AI-generated summary; may contain mistakes.

formattingshortcutsfork-or-reupload

Open on AnkiWeb GitHub Forum topic Find alternatives

AnkiWeb

Votes
144 (πŸ‘ 140 Β· πŸ‘Ž 4)
Updated
2023-06-18
Anki versions
2.1.65~
License
Not found (this does not mean that the addon has no license)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JSON
Description language
en

Maintenance

abandoned

  • Last update or commit: 2023-06-18 (1232 days before the snapshot).
  • Commits in the last year: 0.
  • Issues: 4 open, 11 closed.
  • Pull requests: 0 open, 2 merged.
  • Median first response: 20 hours (9 answered issues and pull requests).
  • Outside pull requests: 100% of 1 merged.
  • Forks that may still be maintained: "add tables with less ugly tables" (1467671504).

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.02.1.232021-12-05
2.1.242.1.442021-12-05
2.1.452.1.492022-12-21
2.1.502.1.65+2023-06-18
History across monthly snapshots

Loading…

Compare versions

The original addon and its forks. The best value in each column is in bold.

VersionWorks on Anki 26.09.3MaintenanceLast activity VotesApprovalGitHub starsNotes
Add Table this addon original likely abandoned 18 Jun 2023 πŸ‘ 140 Β· πŸ‘Ž 4 93% 7
↳ add tables with less ugly tables (AI-detected; may be wrong) unknown abandoned 17 Nov 2018 πŸ‘ 2 Β· πŸ‘Ž 1 21% –

Forks can add features or work in a different way. Read the description before you change to another version. Fork detection is incomplete, so other versions can exist.

Similar addons

Add Hyperlink

Adds a dialog and context menu entries for inserting, editing, and unlinking hyperlinks in note fields, with configurable keyboard shortcuts.

formattingshortcutsfork-or-reupload

86 votes 90% approval πŸ‘ 83 Β· πŸ‘Ž 3 ⭐ 5 Anki 2.1.65~ Updated 2023-06-18

Description

This add-on is only about inserting a table. It is not designed for editing an existing table. You need a different tool for this. My add-on extended editor for field (for tables, search&replace, ...) should be useful for editing an existing table. Actually you can also use the "extended editor" add-on to insert tables if you don't like the dialog of this add-on and prefer setting the number of columns and rows you want by highlighting them with your mouse (as you would do it in WORD etc).

The add-on extended editor for field (for tables, search&replace, ...) is also useful to add tables into your field, i.e. it's an alternative to this add-on.

# Config The shortcut (default is "Ctrl+0") to insert a table and some styling defaults can be changed using the add-on configuration dialog of 2.1: Tools>Add-ons, select the add-on "Add Table" and click on "Config".

# Use You can insert a table in two ways:

  1. If you do not select any text, upon clicking the "Create a table button" (or pressing the shortcut) you will be presented with a dialog window asking you to specify some table properties (like number of rows, number of columns, alignment, styling). The dialog to insert tables looks like this:

  2. If you have text selected you can usually convert a table (in a markdown-like format) into a full html table. header1 | header2 -|- elem1 | elem2 These will create a list with two columns and two rows. The -|- part is optional, but can be used to align the column to the left (:-), right (-:) or to the center (:-:). You can skip this line completely, but do make sure you add a pipe character | between elements to designate a border. Limitations:

  • This method is intended for one time use only. The original md-table is not saved so it can't be undone later. If you care about undoing use one of the markdown add-ons.
  • The code in my add-on for transforming markdown tables is simple so that it doesn't convert all valid markdown tables. So it will fail sometimes. A fix for this is already on my todo list but it will take some time until this add-on is updated. If you need this look for another add-on.

# Versions

  • 2023-06-18 2.1.50+: fix table sometimes inserted at the top
  • 2022-12-21 remember dialog size, increase default dialog size. These changes are relevant for the bigger UI elements from Anki 2.1.55), remove unused code
  • 2022-04-12 better text alignment detection in markdown (thanks @madmaximux)
  • 2021-12-06 make it work on Anki 2.1.50+ with pyqt6 only
  • 2021-11-21 no more startup message for new install (after 16 months)
  • 2021-07-10 test version for 2.1.45
  • 2020-07-25 better night mode compatibility
  • 2020-04-27 classes for all defaults, better naming
  • 2020-04-23 config.schema.json, function gc is more robust
  • 2019-11-06 option to center table, fix for one line selection
  • 2019-20-20 interoperability
  • 2019-10-08 2.1 only, gui option for vertical alignment, set alignment in style, code cleanup
  • 2019-02-24 Fix for UnicodeEncodeError in Anki 2.0 by khonkhortisan
  • 2019-01-24 handle leading/trailing pipes and escaped pipes, fix shortcut for 2.0
  • 2018-11-19 additional options in table creation dialog
  • 2018-11-03 initial release

# Credits This add-on and parts of this description are a partial fork of the great add-on Power Format Pack (Copyright 2014-2017 Stefan van den Akker) because it won't be ported to 2.1 (as of 2018-11). I extracted the table function into a standalone version for 2.1 and made additions so that you can better customize the table inserted.

# limitations, known bugs Short selections of text, mostly if the last line doesn't contain real content but just empty fields (like '|| |') usually gives unexpected/wrong results. Since early 2020 Anki removes most table properties when you copy a table from one field into another. a workaround is to copy the html source code from the source code window from the old field into the source code window of the other field. Or you could have a look at editor: paste raw unfiltered full html.

# bugs, errors, feedback Please do not use reviews for bug reports or support requests. I don't get notified of your reviews, and properly troubleshooting an issue through them is nearly impossible (formatting is limited and I can't reply multiple times). If you find a bug let me know in the official anki support forum, on github.

README

for a description see https://ankiweb.net/shared/info/1237621971