Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tables in forums editor?
#21
Person
Awesomeness
Steve
ULTIMATE!!!
Everyone Elsemeh...


There now.  That looks a little better.  Big Grin
Reply
#22
(05-31-2024, 01:59 AM)SMcNeill Wrote:
Person
Awesomeness
Steve
ULTIMATE!!!
Everyone Elsemeh...
There now.  That looks a little better.  Big Grin


Sweet! 

Now if only there were a way to paste in rich text & tables from Word & Excel... 

No, don't get up! 

You've done enough, thank you! LoL
Reply
#23
@SMcNeill
how did you enter that table?
trying to quote your post doesn't work for me, this forum works differently from every other forum that I visit, in those forums when you click on "reply with quote" it opens an edit box with the quoted message, on this forum when I click on quote nothing happens Angry
Reply
#24
(05-31-2024, 12:56 PM)Jack Wrote: @SMcNeill
how did you enter that table?
trying to quote your post doesn't work for me, this forum works differently from every other forum that I visit, in those forums when you click on "reply with quote" it opens an edit box with the quoted message, on this forum when I click on quote nothing happens Angry

Code: (Select All)
[table=80]
[tr][th] [style=background: #0000FF; color: #FFFFFF;] Person [/style] [/th][th] [style=background: #0000FF; color: #FFFFFF;] Awesomeness[/style][/th][/tr]
[tr][td] [style=background: Red; color: MidnightBlue; width: 70px;] Steve [/style][/td][td]ULTIMATE!!![/td][/tr]
[tr][td]Everyone Else[/td][td]meh...[/td][/tr]
[/table]
table <-- starts the table, with the =## representing the percent width of the screen you want it to use.
tr     <-- this makes a row in the table
td    <-- and this is a divider (so it makes columns)
th    <-- and this does those headers (which is basically just a column with some highlight and color built in.)

and slash (/) before those code commands is needed to show where each table/column/row/header ends.  Smile
Reply
#25
thanks a million Steve Big Grin
Reply
#26
(05-31-2024, 12:56 PM)Jack Wrote: @SMcNeill
how did you enter that table?
trying to quote your post doesn't work for me, this forum works differently from every other forum that I visit, in those forums when you click on "reply with quote" it opens an edit box with the quoted message, on this forum when I click on quote nothing happens Angry

(05-31-2024, 01:09 PM)Jack Wrote: thanks a million Steve Big Grin
As for quotes, click on one and then look down at the lower part of the box where you type at...  There should now be a message "You've selected quotes... Insert them now"

This lets you choose where in your post the quote may go, and also allows you to select multiple quotes and insert them all at once into your post.  The way we do it actually is supposed to make things MORE flexible for you, once you get used to how it works.  Wink

[Image: image.png]

See image above, right below the "POST REPLY" buttons.
Reply
#27
thanks Steve Smile
Reply
#28
(05-31-2024, 01:07 PM)SMcNeill Wrote:
(05-31-2024, 12:56 PM)Jack Wrote: @SMcNeill
how did you enter that table?
trying to quote your post doesn't work for me, this forum works differently from every other forum that I visit, in those forums when you click on "reply with quote" it opens an edit box with the quoted message, on this forum when I click on quote nothing happens Angry
Code: (Select All)
[table=80]
[tr][th] [style=background: #0000FF; color: #FFFFFF;] Person [/style] [/th][th] [style=background: #0000FF; color: #FFFFFF;] Awesomeness[/style][/th][/tr]
[tr][td] [style=background: Red; color: MidnightBlue; width: 70px;] Steve [/style][/td][td]ULTIMATE!!![/td][/tr]
[tr][td]Everyone Else[/td][td]meh...[/td][/tr]
[/table]
table <-- starts the table, with the =## representing the percent width of the screen you want it to use.
tr     <-- this makes a row in the table
td    <-- and this is a divider (so it makes columns)
th    <-- and this does those headers (which is basically just a column with some highlight and color built in.)

and slash (/) before those code commands is needed to show where each table/column/row/header ends.  Smile
I would love the ability to paste directly from rich text into the forums editor, but if not then maybe we can create a QB64PE tool that takes a rich text copy of a table in the clipboard and autogenerates markdown from it, including links & basic text formatting? 


For now I have Excel to avoid manually typing in everything, for example this table (from QB64.com > C Libraries


C++ Variable Types
C Name
Description
Size
QB64 Type
Character or small integer.
1 byte
Short Integer(Word)
2 byte
Integer(Dword)
4 byte
Int32, Long integer or Long
4 byte
Long long (Qword)
8 byte
Boolean value true or false.
1 byte
Floating point number
4 byte
Double precision floating.
8 byte
Long double precision float
10 byte
2 or 4
void pointer(void *)
ANY

Was generated with Excel using the below macros for the links and some formulas (see screenshot for how to set up the formulas). Paste the table into the sheet and the row markdown is calculated in cells M2-M(endrow)... 

Code: (Select All)
' /////////////////////////////////////////////////////////////////////////////
' FROM:

' vba - Extract URL From Excel Hyperlink Formula - Stack Overflow
' https://stackoverflow.com/questions/32230657/extract-url-from-excel-hyperlink-formula

' Excel VBA to extract Hyperlink from Hyperlink Formula - Super User
' https://superuser.com/questions/1313339/excel-vba-to-extract-hyperlink-from-hyperlink-formula

Public Function GetHyperLinkAddress(ByVal Target As Excel.Range) As String
    Dim RoutineName As String:: RoutineName = "GetHyperLinkAddress"
    Dim sFormula As String
    Dim sExpression As String
    Dim iStart As Long
    Dim iPos As Long
    Dim iEnd As Long
    Dim sURL As String
    Dim sSubAddress As String
    Dim sFind As String
   
    'Set Target = ActiveCell
    sURL = ""
    
    On Error Resume Next ' handle errors manually
   
    If Target.Hyperlinks.Count > 0 Then
        sURL = Target.Hyperlinks(1).Address
        sSubAddress = Target.Hyperlinks(1).SubAddress
        If Len(sSubAddress) > 0 Then
            sURL = sURL & "#" & sSubAddress
        End If
    ElseIf Target.HasFormula Then
        sFormula = Target.Formula
        sFind = "HYPERLINK("
        iPos = InStr(1, sFormula, sFind, vbTextCompare)
        If (iPos > 0) Then
            iEnd = InStr(iPos + 1, sFormula, ",", vbTextCompare)
            If (iEnd > 0) Then
                iStart = iPos + Len(sFind)
                sExpression = Mid(sFormula, iStart, iEnd - iStart)
                sURL = Evaluate(sExpression)
            End If
        End If
    End If
   
    If Err.Number <> 0 Then
        Debug.Print CStr(Now) & " " & RoutineName & " failed with error #" & CStr(Err.Number) & ": " & Err.Description
        Err.Clear
        sURL = ""
    End If
    
    On Error Goto 0 ' resume automatic error handling
    
    GetHyperLinkAddress = sURL
End Function ' GetHyperLinkAddress

' /////////////////////////////////////////////////////////////////////////////

Public Function GetURL(ByVal Target As Excel.Range) As String
    Application.Volatile
    GetURL = GetHyperLinkAddress(Target)
End Function ' GetURL

[Image: table-markdown-from-excel.png]
Reply
#29
The thing with the tables in HTML doesn't work. Or there is some kind of limitation.  Huh
Reply
#30
The thing with the tables in HTML doesn't work. Or there is some kind of limitation. I can't undo this mess? Huh

OK, now it's gone. 
[Image: icon-machinegun.gif]
Reply




Users browsing this thread: 7 Guest(s)