Simple HTML to Markdown/Markdown Extra Guide?

Hi All,

Have recently joined OzBargain and being a long time user of simple HTML tags eg. br, b, i etc I am finding this markdown/extra rather confusing. Was thinking of putting together a simple guide in the format of HTML Tag = Markdown eg.

br = two spaces and enter
i = a * on either side of the word or phrase
b =
Table eg. such as scotty did here http://www.ozbargain.com.au/node/5693 =
etc.

Don't know if this is a helpful idea or not, maybe I have just not grasped something properly? Would be happy to host the completed guide. Maybe it could even be linked as a small popup beside the Markdown/Markdown Extra links if in fact it is thought useful.

Comments

  • The "table" I did there was actually a pre-formatted text (similar to [pre] in HTML — sorry all HTML will be tripped out so I am using square brackets here.)

    There should be a link at the bottom of the text editing box to the Markdown and Markdown Extra documentation. I guess I can create a separate page for the most commonly used syntax.

    Thanks for the suggestion.

  • Something simple for the most commonly used syntax would be a great idea scotty. Would simplify things a lot and encourage non-technical users to format their posts appropriately.

    Looked at both the Markdown links and while the information certainly is comprehensive, I find it easy to get lost in technical irrelevancies while missing the simple syntax needed to make something eg. bold.

    Happy to assist in any way I can. Let me know if there is anything I can do.

  • Word Macro to Convert Hyperlinks to Markdown

    Here's a Word Macro that should make it easier to convert a Word doc with hyperlinks to OzBargain Markdown with similarly embedded hyperlinks. I modified the macro from a Microsoft answers post and left the original attribution in to give credit where is due

    Sub HyperLinkConvertToOzBargainMarkdown()
        ' Charles Kenyon 2020-07-19
        ' From https://answers.microsoft.com/en-us/msoffice/forum/all/macro…
        ' Change hyperlink to html format <a href="https://www.nejm.org/doi/full/10.1056/nejmoa1112010">as reported in NEJM</a>
        '
        '
        ' Modified by Rygle 2022-12-02 to convert to Ozbargain Markdown format [Text Description](URL)
        '
        ' This is intended for a Word document where you have embedded hyperlinks in text
        ' and want to make it look similar in the Markdown syntax used by the https://ozbargain.com.au website
        '
        ' How to setup in Word
        ' Have your document setup with text and embedded hyperlinks
        ' Press Alt+F11 to activate the Visual Basic Editor
        ' Select Insert | Module to create a new module
        ' Copy / paste this code in its entirety (from Sub to End Sub) into the module
        ' With the insertion point anywhere in the macro (between Sub and End Sub), press F5 to run the macro
        ' If you have multiple hyperlinks per line, you may need to run this macro several times until all are coverted
        ' It only seems to convert one hyperlink per line, per run. So a line with five hyperlinks will need five runs
        ' Extra runs should not damage already converted text
        ' Finally, switch back to Word.
    
        Dim oLink As Hyperlink
        Dim strText As String
        Dim strLink As String
        For Each oLink In ActiveDocument.Hyperlinks
            Let strText = oLink.Range.Text
            Let strLink = oLink.Range.Hyperlinks(1).Address
            Let oLink.Range.Text = "[" & strText & "](" & strLink & ")"
            Next oLink
        Set oLink = Nothing
    End Sub
    
  • Some great tools for bringing tables from HTML, Excel, or from Word (convert table to text/CSV with Tabs as separator, or commas but must have quotes around each entire cell)

    https://tableconvert.com/html-to-markdown

    https://tableconvert.com/excel-to-markdown

    https://tableconvert.com/csv-to-markdown

Login or Join to leave a comment