Re: [Module] MarkDown Gadget (all OS)
Posted: Wed Apr 08, 2020 2:33 pm
Update: Context sensitive help for help window, when using the module 'NamedPipeModule.pbi'.
http://www.purebasic.com
http://forums.purebasic.com/english/
By the way since not everybody uses EnableExplicit in their code, can you add DisableExplicit at the end of the Module definition please.Mesa wrote:For information, I use pb5.72 x86 and i had 2 little bugs in "Markdowngadget-module.pb".
Line 599 Structure Document_Structure
I had to change Type.i into Type.q
and line 734 Structure MarkDown_Items_Structure
idem.
M.
The current version of MarkDownModule.pbi no longer uses flags for '...\Type', so there should be no more problems with X86.StarBootics wrote:Apparently to put the MarkDown Gadget to work on x86 machines you have to change to little things as reported by Mesa ....
I use 'EnableExplicit' only inside the module and so it should have no effect outside the module.StarBootics wrote:By the way since not everybody uses EnableExplicit in their code, can you add DisableExplicit at the end of the Module definition please.
If so why did you not remove these fields in the corresponding structures ?Thorsten1867 wrote:The current version of MarkDownModule.pbi no longer uses flags for '...\Type', so there should be no more problems with X86.StarBootics wrote:Apparently to put the MarkDown Gadget to work on x86 machines you have to change to little things as reported by Mesa ....
Sorry my bad !Thorsten1867 wrote:I use 'EnableExplicit' only inside the module and so it should have no effect outside the module.StarBootics wrote:By the way since not everybody uses EnableExplicit in their code, can you add DisableExplicit at the end of the Module definition please.
Code: Select all
#Enable_Gadget = #True
#Enable_Requester = #False
#Enable_HelpWindow = #False
#Enable_CreateHelp = #False
#Enable_Emoji = #True
#Enable_ExportHTML = #False
Best regardsLine 8029: ConvertHTML_() is not a function, array, list, map or macro.
Code: Select all
CompilerIf #PB_Compiler_OS = #PB_OS_Linux
StickyWindow(0, #True)
CompilerEndIf
Code: Select all
Markdown::AddRequesterButton(Label.s, Text.s="", Result.i=#PB_Default, Width.i=#PB_Default)
Markdown::AddRequesterImage(Label.s, Image.i)
Markdown::RequesterButtons(TextOK.s, TextYes.s="", TextNo.s="", TextCancel.s="", ButtonWidth.i=#PB_Default)
Markdown::RequesterPadding(Padding.i)
Markdown::Requester(Title.s, Text.s, Flags.i=#False, Parent.i=#PB_Default, Image.s="", Buttons.s="")
Yes, but no luck at allThorsten1867 wrote:Have you tried UsePNGImageDecoder() ?
Code: Select all
OpenWindow(2,0,0,DesktopScaledX(500),DesktopScaledY(240),"Title",#PB_Window_ScreenCentered,WindowID(0));
UsePNGImageDecoder()
Define gadgetMarkDown=MarkDown::Gadget(#PB_Any, DesktopScaledX(20), DesktopScaledY(20),DesktopScaledX(460), DesktopScaledY(180), MarkDown::#AutoResize)
MarkDown::SetText(gadgetMarkDown, ":warning:")
MarkDown::SetFont(gadgetMarkDown, "Arial", 9)
MarkDown::SetAttribute(gadgetMarkDown, MarkDown::#ScrollBar, MarkDown::#ScrollBar_Default)
...
...
...
Code: Select all
# Heading 1 #
# Heading 1 #
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Diam maecenas sed enim ut sem viverra aliquet. Vel pharetra vel turpis nunc eget. Laoreet non curabitur gravida arcu ac.
Code: Select all
# Heading 1 #
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Diam maecenas sed enim ut sem viverra aliquet. Vel pharetra vel turpis nunc eget. Laoreet non curabitur gravida arcu ac.
---
## Heading 2 ##
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Diam maecenas sed enim ut sem viverra aliquet. Vel pharetra vel turpis nunc eget. Laoreet non curabitur gravida arcu ac.
---
### Heading 3 ###
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Diam maecenas sed enim ut sem viverra aliquet. Vel pharetra vel turpis nunc eget. Laoreet non curabitur gravida arcu ac.
Code: Select all
1. Numbered item 1
2. Numbered item 2
3. Numbered item 3
- Unnumbered A
- Unnumbered B
- Unnumbered C
4. Numbered item 4
5. Numbered item 5
6. Numbered item 6