HTML component: Difference between revisions

From SuperMemo Help
Jump to navigation Jump to search
Line 43: Line 43:
* [[Using text components|Text components]]
* [[Using text components|Text components]]
* [ FAQ: Text components]
* [ FAQ: Text components]
* [ Formatting bullets]

Latest revision as of 17:09, 16 October 2020

HTML is the default text component in SuperMemo. It is based on editing and rendering engines of Internet Explorer. As such it carries all the rendering power and compatibility range of this powerful Microsoft product. This also means that all bugs and shortcomings should also be familiar. The good news is that, in Windows 10, most of the old HTLM problems are gone.

As all necessary Internet Explorer components are part of Windows, you do not need to worry about installing Internet Explorer. You can use any web browser while using SuperMemo.

There are 4 ways in which you are most likely to add HTML text to your collection (Middle or higher level):

  1. Notes: if you would like to type in some notes that will later be processed with incremental reading, use Edit : Add a note (Alt+N). For example, after hearing a piece of science news on the radio, you may want to quickly type in a note to SuperMemo. Press Alt+N and type in the message.
  2. Articles: if you find an interesting article on the net, select it in your web browser and copy it to the clipboard (e.g. with Ctrl+C). You can then paste the article stored in the clipboard to SuperMemo with Ctrl+N (Edit : Add a new article). Article is similar to Note. The difference is that Article will paste the text from the clipboard to your newly created element, whereas Note will create a blank new element.
  3. Multiple articles: if you have a couple of articles opened in Internet Explorer, use Edit : Web import : All (Shift+Ctrl+A). Unless you fear the article may disappear from the net, import links rather than whole articles. If you overload incremental reading with thousands of articles, you may wait for months or years before an article comes to your attention. Using links keeps the size of your collection in check. Huge collections are processed more slowly, are more difficult to back up, and produce more garbage in search results. For more details, see Web import.
  4. Wikipedia: if you want to import articles from Wikipedia, use Edit : Web import : Wikipedia (Shift+Ctrl+W). If there are any Wikipedia pages open in Internet Explorer, you will be able to select them from a dialog. Otherwise, enter the desired page's title and Wikipedia will be opened in a new page in Internet Explorer; SuperMemo will then open the Web import dialog to allow you to import the desired page. (Note that if Internet Explorer is not your default web browser (e.g. if you use Firefox), you must manually navigate to the page in Internet Explorer before you can add it to your collection using Shift+Ctrl+W)

SuperMemo: A topic about henipavirus in the HTML component on the left and 4 images taken from it with Download images (Ctrl+F8) in their individual image components on the right

Figure: A topic with an article about henipavirus in the HTML component on the left and 4 images taken from the article with Download images (Ctrl+F8) (available on the component context menu), which downloaded, localized, and tiled them in their individual image components on the right. These 4 images will propagate to all extracts and cloze deletions ultimately produced from this article.

If you want to import an HTML file to an existing HTML component, right-click the HTML component, and choose File : Import file. Pick the file in the dialog box and choose OK. Your HTML file will be displayed in the HTML component. Import file does not import files linked to by the imported file. However, you can import an entire website located on your hard disk or local network if you use Links : External file on the HTML component menu. In such a case, the HTML file will remain in its original location and retain all relative links.

If you would like to edit an HTML text in your favorite HTML editor, press Ctrl+F9 (or choose File : Edit file from the HTML component menu) and your HTML code will open in the HTML editor registered for editing HTML files in Windows. To preview an article in your web browser, Ctrl+click the HTML component or press F9 (or choose File : View file from the HTML component menu).

Inserting hyperlinks

The most useful hyperlink will connect keywords with other elements in SuperMemo. To create inter-element hyperlink in HTML:

  1. display target element in SuperMemo
  2. copy its number to the clipboard (e.g. by using Ctrl+G)
  3. select the linking keyword in the linking element
  4. paste the element number

To insert hyperlinks that would point to other elements, registry texts, HTML files, URL addresses on the Internet, registry images, etc., read about the option Insert HTML link (HTML component menu).

The HTML component can interpret JavaScript. If you know some JavaScript commands, you can enhance your SuperMemo presentation with scripted HTML components.

See also