It is currently Thu May 28, 2020 1:34 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 40 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: [Module] MarkDown Gadget (all OS)
PostPosted: Tue Dec 31, 2019 5:42 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1262
Location: Germany
MarkDown Gadget & Requester - Module (all OS / 64Bit / DPI)

Display or convert text in MarkDown syntax

  • Markdown - Gadget to display text in markdown syntax
  • Export the gadget content to HTML or PDF
  • Convert text in MarkDown to HTML or PDF
  • Message-Requester with support of the Markdown-Syntax
  • Help Windowto display help files based on Markdown syntax

Image _____ Image

The module supports:

  • Basic Syntax (Headings / Emphasis / Lists / Links / Images /...)
  • Tables
  • Task Lists/ Definition Lists
  • Emphasis/ Strikethroughs / Underlining
  • Keystrokes
  • Abbreviations (with explanation)
  • Footnotes
  • Superscript & Subscript
  • Emojis
  • Notes
  • Table of Contents/ Glossar
  • Keywords (for help window)

Code:
; MarkDown::UsedImages()         - determines all images used in the markdown text
; MarkDown::InsertAsPDF()        - Insert converted markdown text into PDF
; MarkDown::InsertAsHTML()       - Insert converted markdown text into HTML
; MarkDown::SetPath()            - set path for images without path name

; ----- Gadget (#Enable_Gadget)-----

; MarkDown::AttachPopupMenu()
; MarkDown::Clear()              - similar to 'ClearGadgetItems()'
; MarkDown::Convert()            - convert markdown to HTML or PDF (without gadget)
; MarkDown::EventValue()         - returns links
; MarkDown::Export()             - export to HTML or PDF
; MarkDown::Gadget()             - new MarkDown gadget
; MarkDown::GetData()            - similar to 'GetGadgetData()'
; MarkDown::GetText()            - similar to 'GetGadgetText()' [#MarkDown/#HTML]
; MarkDown::GetID()              - similar to 'GetGadgetData()', but string
; MarkDown::GotoHeading()        - goto heading with this ID
; MarkDown::Hide()               - similar to 'HideGadget()'
; MarkDown::SetAutoResizeFlags() - [#MoveX|#MoveY|#Width|#Height]
; MarkDown::SetAttribute()       - similar to 'SetGadgetAttribute()'
; MarkDown::SetColor()           - similar to 'SetGadgetColor()'
; MarkDown::SetData()            - similar to 'SetGadgetData()'
; MarkDown::SetFont()            - similar to 'SetGadgetFont()'
; MarkDown::SetID()              - similar to 'SetGadgetData()', but string
; MarkDown::SetMargins()         - defines the margins
; MarkDown::SetPath()            - Set the path to the Markdown file, for relative path names
; MarkDown::SetText()            - similar to 'SetGadgetText()'
; MarkDown::UseImage()           - uses an already loaded image

; ----- Requester (#Enable_Requester) -----

; MarkDown::Requester()

; ----- Help Window (#Enable_HelpWindow) -----

; MarkDown::Help()
; MarkDown::ChangeHelpTopic()
; MarkDown::EventLabel()

Download: MarkDownModule.pbi

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Last edited by Thorsten1867 on Mon Apr 13, 2020 11:25 am, edited 6 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] MarkDown Gadget (all OS)
PostPosted: Wed Jan 01, 2020 11:19 am 
Offline
Addict
Addict
User avatar

Joined: Sun Nov 05, 2006 11:42 pm
Posts: 4678
Location: Lyon - France
Works nice here :D
2004 and never heard talking about this language :shock:
Yesterday "*..ofx" a format for bank account, today "*.md" this light format....
Nearly all the day i can learn a "new" format od numerous years old :oops:
Thanks for sharing and to have taught me the existence of this old extension 8)

_________________
ImageThe happiness is a road...
Not a destination


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] MarkDown Gadget (all OS)
PostPosted: Wed Jan 01, 2020 11:34 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1262
Location: Germany
In reasonable note apps (such as Joplin) MarkDown is standard.
But only now I realized what MarkDown can do (extended syntax).

Gesendet von meinem Aquaris X2 mit Tapatalk

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] MarkDown Gadget (all OS)
PostPosted: Wed Jan 01, 2020 2:24 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1262
Location: Germany
Update:

  • Added: SuperScript & SubScript
  • Added: Emojis

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] MarkDown Gadget (all OS)
PostPosted: Wed Jan 01, 2020 3:34 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Apr 26, 2003 2:15 pm
Posts: 874
Location: Cuernavaca, Mexico
Happy New Years Thorsten :D

Found a small error.. Program does not return properly after pressing the 'HTML' (Button) button...

Code:
            Case #Button4
             CompilerIf Defined(PDF, #PB_Module) ; added
               MarkDown::Export(#MarkDown, MarkDown::#HTML, "Export.htm", "PDF")
               RunProgram("Export.htm")
             CompilerEndIf ; added
          EndSelect


Best wishes for the new decade.

_________________
- It was too lonely at the top.

Current Machine: Win 10 Pro 64-bit, Dual Xeon E5-2670, 64 gigs ram, Geforce GTX 1660 Ti w/6 gigs ram


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] MarkDown Gadget (all OS)
PostPosted: Wed Jan 01, 2020 5:57 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1262
Location: Germany
That doesn't really make sense. HTML does not need the PDF module.

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] MarkDown Gadget (all OS)
PostPosted: Thu Jan 02, 2020 2:47 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Apr 26, 2003 2:15 pm
Posts: 874
Location: Cuernavaca, Mexico
Thorsten1867 wrote:
That doesn't really make sense. HTML does not need the PDF module.


Ahhh...
I see what's going on now...

The example program does not re-gain focus after pressing one of the buttons, the program runs and hides behind the PureBasic IDE (which is still running)

If I only minimize the PDF or the WEB page (Chrome in my case), I cannot view the running EXE.

But...If I kill Chrome or the PDF program, everything displays correctly.


The confusing part... there is no icon on my taskbar that shows the running program, so I assumed the program did not exit properly.

_________________
- It was too lonely at the top.

Current Machine: Win 10 Pro 64-bit, Dual Xeon E5-2670, 64 gigs ram, Geforce GTX 1660 Ti w/6 gigs ram


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] MarkDown Gadget (all OS)
PostPosted: Thu Jan 02, 2020 3:31 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Sep 20, 2004 7:12 am
Posts: 565
Location: Hell
You need to get rid of the #PB_Window_Tool flag, then you will see it again in the task bar.

_________________
Link dead?
Change h3x0r.ath.cx into hex0rs.coderbu.de and all will be fine.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] MarkDown Gadget (all OS)
PostPosted: Thu Jan 02, 2020 10:14 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1262
Location: Germany
Update:
  • Added: Definition List
  • Added: Code Blocks / Fenced Code Blocks

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] MarkDown Gadget (all OS)
PostPosted: Tue Jan 07, 2020 6:34 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1262
Location: Germany
After I found a specification for MarkDown, I completely rewrote the parser to achieve the greatest possible compatibility.

  • Added: Reference link
  • Added: Highlight
  • Added: new emojis ( :bookMark: / :date: / :mail: / :memo: / :pencil: / :phone: )

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] MarkDown Gadget (all OS)
PostPosted: Mon Jan 20, 2020 2:27 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1262
Location: Germany
To realize all features, I had to change the internal structure of the parser completely.

  • Inline emphasis for lists, tables, footnotes, ...
  • Abbreviations "*[HTML]: Hypertext Markup Language"
  • Keystrokes "[[Ctrl]] [[C]]"

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] MarkDown Gadget (all OS)
PostPosted: Mon Jan 20, 2020 6:03 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1262
Location: Germany
Update:
  • Emphasis (bold/italic) for links, autolinks, strikethrough and highlight
  • PDF task list with images for checkboxes

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] MarkDown Gadget (all OS)
PostPosted: Thu Jan 23, 2020 2:58 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1262
Location: Germany
Markdown - Editor

As a supplement to the module and as an application example a Markdown - Editor.
(Most formatting is available as a pop-up menu.)

Image

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] MarkDown Gadget (all OS)
PostPosted: Thu Jan 30, 2020 9:47 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1262
Location: Germany
Update: Bugfixes & Improvements for tables

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] MarkDown Gadget (all OS)
PostPosted: Thu Jan 30, 2020 11:04 am 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14064
Location: France
This is a very nice module !


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 40 posts ]  Go to page 1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye