Bỏ qua đến nội dung

HTML Colored-Section-, Details-, and List-Buttons

Chờ xử lý #anki #addon #html #colored #section #details #and
https://forums.ankiweb.net/t/html-colored-section-and-details-buttons/17184
20/3/2022

Cách tải addon HTML Colored-Section-, Details-, and List-Buttons

Bạn có thể tải addon bằng một trong hai cách sau:

Click nút Copy bên dưới để copy code vào clipboard

211947030

Sau đó mở Anki → Tools → Add-ons → Get Add-ons → Dán code → OK

Mở trang addon trên AnkiWeb và tìm mã code ở cuối trang

Mở trên AnkiWeb

Cuộn xuống cuối trang AnkiWeb, tìm dòng có mã code 211947030 và copy

3

Mô tả chi tiết

Adds a few buttons to the editor.

Detail-Button [Shortcut: Ctrl + Alt + 1]: Wraps the selected text in an unfoldable detail-tag. If no text is selected, will create an empty detail-tag template. Known issues: Any other html-tags in the selection (bold, italic, colors, details…) will get deleted in the process.

Colored-Section-Buttons [Shortcut: Ctrl + Alt + 2~5]: Wraps the selected text in borders and changes the background color. If no text is selected, will create an empty border with colored background. Known issues: Any other html-tags in the selection (bold, italic, colors, details…) will get deleted in the process.

Using both details- and colored-section-tags at the same time: Since both buttons will delete any other html-tags in the selection (so they might delete each other), you will have to work from outside to inside. First color the main sections, than detail the main sections and continue doing so for the inner sections.

List-Buttons [Shortcut: Ctrl + Alt + 6~7]: Wraps the selected text in a ordered or unordered list. If no text is selected, will create an empty list. Known issues: Any other html-tags in the selection (bold, italic, colors, details…) will get deleted in the process.

Delete HTML-Button [Shortcut: Ctrl + Alt + 8] Deletes (nearly) all html from the selected text. If no text is selected, will first select all text. Clicking again will delete (nearly) all html form the field. Known issues: It cannot delete html-tags at the beginning of the field. If you have a field starting with “<details>…”, those will stay.

This has been written primarly for me and some friends. It has issues, but I it works fine for my purposes. Feel free to change whatever you dont like.


Liên kết hỗ trợ


Reviews (3)

👍 2023-03-10

Pretty nice. Would it be possible to add a config though? So I can disable the buttons that I don’t use.

Or even better, allow me to specify HTML code to insert in the config and so make it possible to add buttons for any formatting button I could ever need.

👍 2023-01-01

my LIFE SAVER! for inserting the “details” HTML code!

work in 2.1.54;

looks like diffcult to MOVE the whole branch after edit-ed.

but not problem of this addon.

👍 2022-07-21

good!!