2020-01-14 16:47:42 +03:00
import QtQuick 2.2
2018-12-11 15:34:17 +03:00
import Sailfish . Silica 1.0
Page {
id: page
2018-12-13 01:10:45 +03:00
SilicaFlickable {
id: mainFlickable
anchors.fill: parent
contentHeight: column . height + Theme . paddingLarge
2018-12-11 19:44:00 +03:00
2018-12-13 01:10:45 +03:00
PullDownMenu {
MenuItem {
text: qsTr ( "View more on the web" )
onClicked: Qt . openUrlExternally ( "https://github.com/showdownjs/showdown/wiki/Showdown's-Markdown-syntax" )
2018-12-11 19:44:00 +03:00
}
2018-12-13 01:10:45 +03:00
MenuItem {
id: resetMenuItem
property bool allOpened: false
text: allOpened ? qsTr ( "Close previews" ) :
qsTr ( "Open previews" )
onClicked: allOpened = ! allOpened
2018-12-11 19:44:00 +03:00
}
}
2018-12-11 15:34:17 +03:00
Column {
id: column
width: parent . width
PageHeader {
title: qsTr ( "Markdown Syntax" )
}
2018-12-13 01:10:45 +03:00
Loader {
sourceComponent: syntaxDrawer
property string title: qsTr ( "Paragraphs" )
property string description: qsTr ( "Paragraphs in Showdown are just one or more lines of consecutive text followed by one or more blank lines." )
property string rawText:
" On July 2 , an alien mothership entered Earth ' s orbit and deployed several dozen
saucer - shaped \ "destroyer\" spacecraft , each 15 miles ( 24 km ) wide .
On July 3 , the Black Knights , a squadron of Marine Corps F / A - 18 Hornets ,
participated in an assault on a destroyer near the city of Los Angeles . "
property string convertedText:
" < p > On July 2 , an alien mothership entered Earth ' s orbit and deployed several dozen < br / >
saucer - shaped \ "destroyer\" spacecraft , each 15 miles ( 24 km ) wide . < / p >
< p > On July 3 , the Black Knights , a squadron of Marine Corps F / A - 18 Hornets , < br / >
participated in an assault on a destroyer near the city of Los Angeles . < / p > "
}
Loader {
sourceComponent: syntaxDrawer
property string title: qsTr ( "Headings" )
property string description: qsTr ( "You can create a heading by adding one or more # symbols before your heading text. The number of # you use will determine the size of the heading." )
property string rawText:
" # The largest heading ( an < h1 > tag )
# # The second largest heading ( an < h2 > tag )
# # # The third largest heading ( an < h3 > tag )
# # # # The 4 th largest heading ( an < h4 > tag )
# # # # # The 5 th largest heading ( an < h5 > tag )
# # # # # # The 6 th largest heading ( an < h6 > tag ) "
property string convertedText:
"<h1 id=\"thelargestheadinganh1tag\" > The largest heading ( an \ & lt ; h1 > tag ) < / h 1 >
< h2 id = \ "thesecondlargestheadinganh2tag\" > The second largest heading ( an \ & lt ; h2 > tag ) < / h 2 >
< h3 id = \ "thethirdlargestheadinganh3tag\" > The third largest heading ( an \ & lt ; h3 > tag ) < / h 3 >
< h4 id = \ "the4thlargestheadinganh4tag\" > The 4 th largest heading ( an \ & lt ; h4 > tag ) < / h 4 >
< h5 id = \ "the5thlargestheadinganh5tag\" > The 5 th largest heading ( an \ & lt ; h5 > tag ) < / h 5 >
< h6 id = \ "the6thlargestheadinganh6tag\">The 6th largest heading (an \<h6> tag)</h6>"
2018-12-11 15:34:17 +03:00
}
2018-12-11 19:44:00 +03:00
Loader {
sourceComponent: syntaxDrawer
2018-12-13 01:10:45 +03:00
property string description: qsTr ( "If, for some reason, you need to keep a leading or trailing #, you can either add a space or escape it:" )
property string rawText:
" # # My header # #
# \ \ # My Header \ \ # # "
property string convertedText:
"<h1 id=\"myheader\" > # My header # < / h 1 >
< h1 id = \ "myheader-1\"># My Header #</h1>"
2018-12-11 19:44:00 +03:00
}
2018-12-13 01:10:45 +03:00
Loader {
sourceComponent: syntaxDrawer
property string title: qsTr ( "Blockquotes" )
property string description: qsTr ( "You can indicate blockquotes with a >." )
property string rawText:
" In the words of Abraham Lincoln:
> Pardon my french "
property string convertedText:
" < p > In the words of Abraham Lincoln: < / p >
< blockquote >
< p > Pardon my french < / p >
< / b l o c k q u o t e > "
}
Loader {
sourceComponent: syntaxDrawer
property string title: qsTr ( "Bold and Italic" )
property string description: qsTr ( "You can make text bold or italic." )
property string rawText:
" * This text will be italic *
* * This text will be bold * * "
property string convertedText:
" < p > < em > This text will be italic < /em><br / >
< strong > This text will be bold < / s t r o n g > < / p > "
}
Loader {
sourceComponent: syntaxDrawer
property string description: qsTr ( "Both bold and italic can use either a * or an _ around the text for styling. This allows you to combine both bold and italic if needed." )
property string rawText:
"**Everyone _must_ attend the meeting at 5 o'clock today.**"
property string convertedText:
"<p><strong>Everyone <em>must</em> attend the meeting at 5 o'clock today.</strong></p>"
}
Loader {
sourceComponent: syntaxDrawer
property string title: qsTr ( "Strikethrough" )
property string description: qsTr ( "The syntax is the same as GFM, that is, by adding two tilde (~~) characters around a word or groups of words." )
property string rawText:
"a ~~strikethrough~~ element"
property string convertedText:
"<p>a <del>strikethrough</del> element</p>"
2018-12-11 19:44:00 +03:00
}
2018-12-13 01:10:45 +03:00
Loader {
sourceComponent: syntaxDrawer
property string title: qsTr ( "Emojis" )
property string description: qsTr ( "Since version 1.8.0, showdown supports github's emojis. A complete list of available emojis can be found here: https://github.com/showdownjs/showdown/wiki/emojis." )
property string rawText:
"this is a :smile: smile emoji"
property string convertedText:
"<p>this is a 🙂 smile emoji</p>"
}
Loader {
sourceComponent: syntaxDrawer
property string title: qsTr ( "Code formatting" )
property string description: qsTr ( "Use single backticks (`) to format text in a special monospace format. Everything within the backticks appear as-is, with no other special formatting." )
property string rawText:
"Here's an idea: why don't we take `SuperiorProject` and turn it into `**Reasonable**Project`."
property string convertedText:
"<p>Here's an idea: why don't we take <code>SuperiorProject</code> and turn it into <code>**Reasonable**Project</code>.</p>"
}
Loader {
sourceComponent: syntaxDrawer
property string description: qsTr ( "To create blocks of code you should indent it by four spaces." )
property string rawText:
" this is a piece
of
code "
property string convertedText:
" < pre > < code > this is a piece
of
code
< / c o d e > < / p r e > "
}
2018-12-11 19:44:00 +03:00
Loader {
sourceComponent: syntaxDrawer
2018-12-13 01:10:45 +03:00
property string title: qsTr ( "Lists" )
property string description: qsTr ( "You can make an unordered list by preceding list items with either a *, a - or a +. Markers are interchangeable too." )
property string rawText:
" * Item
+ Item
- Item "
property string convertedText:
" < ul >
< li > Item < / l i >
< li > Item < / l i >
< li > Item < / l i >
< / u l > "
}
Loader {
sourceComponent: syntaxDrawer
property string description: qsTr ( "You can make an ordered list by preceding list items with a number." )
property string rawText:
" 1 . Item 1
2 . Item 2
3 . Item 3 "
property string convertedText:
" < ol >
< li > Item 1 < / l i >
< li > Item 2 < / l i >
< li > Item 3 < / l i >
< / o l > "
}
Loader {
sourceComponent: syntaxDrawer
property string description: qsTr ( "TaskLists" )
property string rawText:
" - [ x ] checked list item
- [ ] unchecked list item "
property string convertedText:
" < ul >
< li class = \ "tasklist\"><a class=\"checkbox\" href=\"tasklist:uncheckbox_0\" > ☐ checked list item < / a > < / l i >
< li class = \ "tasklist\"><a class=\"checkbox\" href=\"tasklist:checkbox_0\" > ☑ unchecked list item < / l i >
< / u l > "
}
Loader {
sourceComponent: syntaxDrawer
property string title: qsTr ( "Links" )
property string description: qsTr ( "Showdown will automagically turn every valid URL it finds in the text body to links for you. In the case of email addreses, Showdown will also perform a bit of randomized decimal and hex entity-encoding to help obscure your address from address-harvesting spambots." )
property string rawText:
" https: //jolla.com
2018-12-11 19:44:00 +03:00
info @ jolla . com
[ Homepage - Jolla ] ( https: //jolla.com)
[ Link to Jolla ] [ 1 ]
[ jolla ] [ ]
[ 1 ] : https: //jolla.com
[ jolla ] : https: //jolla.com"
2018-12-13 01:10:45 +03:00
property string convertedText:
"<p><a href=\"https://jolla.com\" > https: //jolla.com</a><br />
< a href = \ "mailto:info@jolla.com\" > & # 105 ; & # 110 ; & # 102 ; & # 111 ; & # x40 ; & # x6a ; & # x6f ; & # x6c ; & # x6c ; & # x61 ; & # 46 ; & # x63 ; & # 111 ; & # x6d ; < /a><br / >
< a href = \ "https://jolla.com\" > Homepage - Jolla < /a><br / >
< a href = \ "https://jolla.com\" > Link to Jolla < /a><br / >
< a href = \ "https://jolla.com\">jolla</a></p>"
2018-12-11 19:44:00 +03:00
}
2018-12-13 01:10:45 +03:00
Loader {
sourceComponent: syntaxDrawer
property string title: qsTr ( "Images" )
property string description: qsTr ( "Markdown uses an image syntax that is intended to resemble the syntax for links, also allowing for two styles: inline and reference." )
property string rawText:
"![Alt text](https://cloud.scharel.name/s/harbour-nextcloudnotes/download?path=/&files=nextcloud-logo-transparent.png \"Optional title\" )
! [ Alt text ] [ img ]
[ img ] :
data: image / png ; base64 , iVBORw0KGgoAAAANSUhEUgAAAFYAAABWCAYAAABVVmH3AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAWfUlEQVR4nOWdeXQbx33Hv7OLxX2QBMELBCkeoiiRFHVaimVdvi07TmMnTZPYytH4JU1eXpvXlyZu + 9 o4TXM4sZs4R1 / cxHlJ49px0tSX4luyI8mSLMkSJUoiKV4gQRAESRzEjQVm + gcACgSBBUiCZNz + / l r s z O + Y D w e z s 7 + Z A Q n + h I Q x J v N 4 P B Y A 9 R z H 1 T L G D I Q Q N S F E D U A D Q J a p w 3 F c 1 m t C S E E + c + l L 1 c t z 3 w n g i c K 8 L 5 N 4 v V 5 j L B b b T g j Z B m A z A D M h h E + V F w o q v S z 9 u p j 6 U j Y y 7 3 M c 9 9 s V B z s 5 O V n D c d w B x t j N h J C m b I E t F 5 y V g s t x 3 J v z v l r L I d 3 d 3 f L K y s o D A O 7 i O K 4 z M x D G W M 7 P l N L Z x m X W S 5 f 0 s u X S l 7 K R e X 9 Z w Q 4 N D S m 1 W u 2 9 A O 4 j h J Q v J L D 3 O t x l A c s Y 4 y c m J j 7 K 8 / x B x l h p y m m + x i 0 H X O d M Q P D 4 w / w 6 c 3 l 4 p e A C Q N H H W L v d v p X j u K 8 Q Q h q A r A P 7 7 H W h D 4 O F j J n R G C X v X L V p z w + O a 3 v t 0 + p g N M p / + + C t Q 5 U G r V i o / 8 y y h Y 6 5 h J D i j b F 9 f X 1 6 g 8 H w Z c b Y 7 e n 3 M / + y h f S 8 h f b c Q C T K n e 6 3 a 0 / 1 2 f T d 1 g l t N B Y n A M D z H P u H D + + 1 V u g 1 4 k L 8 Z 5 Y t p u c W B a z D 4 e g A 8 E 3 G W F W + w D K D W w r c / v F p 5 a G z V 0 t P 9 9 s N s X h 8 n p F P 7 N v k a L d U h H L p S / m X a k M h c J c M 1 m 6 3 3 0 8 p / T z H c f N s L Q d c B u D o Z a v + t Q t D p Y M O l z p X X B 1 r q v y 3 b m r y r N Y D b d F g G W O 8 w + H 4 G o D b p Y I r F l z G G I 7 1 j O h + d O h 0 n S s Q F i o M q k j q E a G S C 3 R n S 6 3 3 6 J W R k l g 8 T g Q Z z z 5 z 0 x Z H N r 8 r B X d R Y E d G R l T j 4 + M P M 8 Z 2 L n Q a s h i 4 v W N T y l 8 c 6 a o + 0 2 8 3 i H H K A U A g E u M b K k p D N 2 9 s c N 2 0 s d F 7 5 O L Q 7 H B w 1 9 a W q a p S r Z h u Y 6 X h L h i s y + U y B I P B x x h j G 6 Q M F x q Y V O O m f U H Z r 9 7 s q j x 5 d d w w N R N Q x C k j A G D S K 6 N / e c v W s d s 3 N b s 5 Q k A Z w 4 t n + 8 o T Z Z r o v e 9 r m 1 4 s n G L A p Z Q u D O z I y I g q G A w + B m D D U i f Q + e C e H X R o / u P 1 s 2 a X P y y 4 f E F 5 n I L I Z R z d 2 7 b G 9 e A 9 N 4 z y H G E p 3 X O D D o 0 n E J Y B w I 0 b G 9 w y / l r Z Y u A U A 2 7 B Y B l j / N j Y 2 M M A N m R z U i y 4 l B H y 9 P H u 8 l f O D 5 R H x D g 3 7 Q v K C S E o 1 S q i 9 + 5 o n f j 4 n o 5 J j p v 7 Q D t 2 x W o A E t O r G z s a v M W A s 1 T 9 g s H a b L a v E U J 2 S j l Z K t w p X 0 j 2 o 5 d O m w c n 3 O p 4 H G T a F 5 S r 5 E L c o F H G P r 6 7 f f z O r W v d m T p x S s n 5 o Q k d A K y t N g Z 1 S n k 8 n / 9 C 4 S x F v y C w o 6 O j 9 w G 4 v R B Q i 4 X b O + 5 S / e D Q K U s g L P I M D N 5 Q S C j V K E W l X B b / y K 4 N E y m o m f r D E 1 5 F J B b j A G B j X Y W / m H A W q w 8 A u T O 7 S R k Z G e l g j H 0 h 3 V g u J y m h l O Y s y 3 b / s m 1 S 9 c h z J + s C Y Z E H A D n P M 4 N a J S r l s v h 1 a 8 3 e O 7 c 0 u 3 L p 9 4 5 P q V K f O x s q A 9 l i y O U / s y x X G x a j L w m 2 r 6 9 P D + C b y B g y i g m 3 x z a t e v S F U / W p X t d Y V R q k F O A 5 w i o M 2 u h f 3 b Z 1 n O O 4 n P q D E 2 4 l k B h f L U Z D t J h w l q I v C V a h U H w Z Q F U 2 w 8 W A O + 0 L y n 7 0 8 u l a M U 4 J A G y q r / R p 5 U I 8 z h K f P 7 a 7 z c G T a 0 / 4 b D 7 t L r 8 C A C o M 6 m h q p r D a c C m l u c F a r d Z t j L H b p Q w v B a 5 I K f m 3 Q + 9 Y f O G o D A C 2 N V V 7 P 7 a n Y + L C i F M H A J 3 1 l b 4 t D V W B f I 0 L R h L D R 6 V B G y k k h p W C m x U s Y 4 y n l P 5 d I Y Y X C / d 3 J 3 r K b d M + J Q D U l O r C n 7 1 5 y / j x H q s + V e e O z Y 1 z J v m 5 Y g h G o z z A E I n G u G / + / p j l O / 9 z r D b 1 I r G a c L O C H R w c / C i A h k I N L x S u d d K r e P X 8 Q D k A K G Q y + v n b t 4 4 J M o 6 d G X D o A a B c p 4 6 2 m s t D m X Y z Y 2 A A 3 P 6 w 4 P S G F C f 7 b K W X R p z a C 1 a n 7 r v P H j e L l B Y V r i 8 U 4 Q + d 6 S 1 5 7 X y / I Z 9 + 1 j e v o a E h J Y C D 6 Y Y L m Y Y s Z C r 2 n 0 e 7 q 1 J h f f S G N k d t m S 7 q 9 A S E M V e i B 2 9 r r p 6 R e o m I U 0 Y O d w 8 b X j 4 / a H R 6 g w o A U M p l s / P X i y N O 3 d e f + W P d V z + 4 a 1 S j E O h i p 1 J i j J J T V 8 e 0 R 6 8 M G 7 p H n N p 4 n J I y r U q 8 c W O j l 0 8 + U H P p z w N L C L m X J Z d T l g N u 3 7 h L O e B w q w G g z W L y 7 d 1 g 8 Q L A g N O j T N V f W 1 U a y j Z H Z I z h a M + o / r f H L 1 d 6 Q x E Z A J j L t C G T X h O 9 e W O j a 1 N D V e D 7 h 0 7 W O t x + x a D D p f 6 n p 4 + s + f y t W + 1 N 1 c Z w o W 3 w B i P 8 m X 6 7 9 u z A m P b S i F M b i c X n f K u j M c o 5 P D 7 B X G Y Q p d o 8 B 2 x 3 d 7 c c w H 3 z a h U R 7 k v n B o y p 6 3 u u a 5 1 M l T k 8 P n m q b r l O P S 9 o h 8 c n / P z w h e r e s S l N q l 6 Z V i 3 e u 7 P V u b u t f o Z P 1 v v 6 X + w b f u T 5 k 7 W 9 Y 1 M a h 9 u v + O f f v N W w r d n s v b W z 0 b 2 + t j y U i j v V B k 8 g z H e P O N X 9 4 y 5 V z 9 i k e m T S q 6 I Z X 3 O l I N B N D V W + P e 0 N 3 q 1 N 1 Q G O k L w 9 f w 5 Y h U J x g F J a X s i b x m L g e o M R v m s 4 M Y 6 u N x v 9 j Z W G 2 S d 5 W K S z P c N k U M + m / B h j O N 0 / r n 3 i S J c 5 F B U 5 I J F / v X P r 2 s k D m 5 v c c k E 2 O 8 U i h E A t F + i D 9 + w a / f V b F 0 2 H L w 4 a K Q N O 9 4 8 Z T v e P G T R K I V 5 V o o t o F U I 8 F I 3 x r k B I N j U T l C O L 8 B z B e k u F / 4 b W O u / O d b V + t U J O M + t I M Z g D l u f 5 u 6 T A L B X u B e u E h i Y 7 w 8 6 1 N d 5 0 / V Q u l S O A S p D R l I 2 n j l 0 y v X p h q D x l o 6 P O 5 P v c b d v H d U o h n i s G G c e x T + 7 v d O 5 v r / c + f e y S 6 d K o U 0 c Z E A i L / I D E q g M A N F S U h q 5 v t X j 3 t D X M l G g U W f M O h T C Y B W u 1 W m t i s V h n r o d G M e D 2 2 h O N 4 g n H r l t r 9 q X r 6 5 X y G A B Q B g S j M U 6 t E O j P D n d V H e 8 Z L U 0 A J + y e n a 3 O u 7 Y 0 u z L j y h V D v a k k 8 p U P 7 r J 5 A h H + Z 6 + d r T 5 v T S R r M q X C o I 3 u a D F 7 9 7 U 3 z J j L d N F i 5 B Z m w U a j 0 Q N c x p O u 2 H D 7 k w 8 t S 7 k u L K T l U y m l K N W q Y q n P A w 6 X 8 u 2 + M c P J v r E S A C j T q s T P 3 b L Z 1 l J j D C 8 k W S 7 G K H n r 8 r D + l a 4 B 4 3 j y D S 0 l e r U i t q 2 p Z m b P h j X e t d W l Y U L I 8 u R j C S E 3 5 1 N e K l x P M C o A Q J 1 R P 2 / l t K 3 W G E z V f / b M V d N g 8 o 9 g 0 m u i f / / B 6 6 2 l W m U s X 2 y p G C i A w 1 0 D h m f f 6 a 3 w B i P X 2 g i g c 0 2 l 7 6 a N T e 7 N j V W B l O a y 5 W M v X 7 5 s Z I w 1 M Z Z 9 t 0 o x 4 E b E O I k m E y 0 l G k U s U 7 9 E o 4 y Z S 7 X h 4 U m v + u 2 e 0 T K T X h M p 0 y j F r 6 Z B z d c w x h j e 7 h 3 V / f e J K 6 Y J b 0 C R g i b j O X b D + j r 3 X V v X u q p K E m t h J I e 9 Y s D l e T 4 B l u O 4 7 S m F X I a X C t c T D M 3 2 H G 1 a M j q 9 3 k 0 d D a 7 H 3 z i n B o B A K C r 7 8 t 0 7 h s v S / g h S D b N 7 A v L H X z 1 b M + T 0 z K Y R t S p 5 f H / b G t e d 2 1 r c u h w + F 9 K G f D G k 6 8 s A g B C y r R D D S 4 E r x u i s o i C T z X s f Z I z h h l b z z B / O D Y T l P M / i D L P j r t T c G A B e u z B c 8 s y J y 1 V i c g e M U p D R D 1 z X 6 r x 9 U 6 N H k P E F r X 8 V 0 o Z 8 N t K v O Q A g h G x O D z R l O L M B m d e 5 G p p N 3 6 C + N n V x + 4 N Z V y 4 4 Q t j 9 e 9 v H C Q G T c W C P P H + q z u 1 P 9 P R s f t 3 + s O y 7 z 5 2 w P H n 0 Y n U K 6 q a G q p l v f f z G g T u 3 N L n T F x w L y W f k a 0 M u y c a H O 3 L k i A y A e S G G F w N X J f B x t S I x 9 7 S 5 / I p c N t r M x u D 7 t 6 5 1 A o A 7 E B K + 9 8 I p S y i a G J v T d X r t L t U / / u b N x k u 2 K S 0 A l G i U 4 h f v 2 D 7 6 p T u v G z P q r s 0 w C o F T b L i U U n D V 1 d U W A L x U p W z 3 F w q X 4 z g 0 V 5 Q E A a B 3 f F o r x i j J Z e M D 2 5 q n d 7 a Y P Q A w 5 v I p H 3 7 u R J 0 / F O V T t i + N T q q / 9 8 K 1 p Z z r W y 3 u b 3 1 s 3 + C 2 p m p / t t h W A y 7 H 8 3 x 9 v k r F g r t z X Q J W I C z y r 1 4 Y L M 2 s l x J C C D 6 9 b 6 N j v d n o B 4 A h p 0 f 1 j
property string convertedText:
"<p><img src=\"https://cloud.scharel.name/s/harbour-nextcloudnotes/download?path=/&files=nextcloud-logo-transparent.png\" alt=\"Alt text\" title=\"Optional title\" / > < br / >
< img src = \ " data: image / png ; base64 , iVBORw0KGgoAAAANSUhEUgAAAFYAAABWCAYAAABVVmH3AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAWfUlEQVR4nOWdeXQbx33Hv7OLxX2QBMELBCkeoiiRFHVaimVdvi07TmMnTZPYytH4JU1eXpvXlyZu + 9 o4TXM4sZs4R1 / cxHlJ49px0tSX4luyI8mSLMkSJUoiKV4gQRAESRzEjQVm + gcACgSBBUiCZNz + / l r s z O + Y D w e z s 7 + Z A Q n + h I Q x J v N 4 P B Y A 9 R z H 1 T L G D I Q Q N S F E D U A D Q J a p w 3 F c 1 m t C S E E + c + l L 1 c t z 3 w n g i c K 8 L 5 N 4 v V 5 j L B b b T g j Z B m A z A D M h h E + V F w o q v S z 9 u p j 6 U j Y y 7 3 M c 9 9 s V B z s 5 O V n D c d w B x t j N h J C m b I E t F 5 y V g s t x 3 J v z v l r L I d 3 d 3 f L K y s o D A O 7 i O K 4 z M x D G W M 7 P l N L Z x m X W S 5 f 0 s u X S l 7 K R e X 9 Z w Q 4 N D S m 1 W u 2 9 A O 4 j h J Q v J L D 3 O t x l A c s Y 4 y c m J j 7 K 8 / x B x l h p y m m + x i 0 H X O d M Q P D 4 w / w 6 c 3 l 4 p e A C Q N H H W L v d v p X j u K 8 Q Q h q A r A P 7 7 H W h D 4 O F j J n R G C X v X L V p z w + O a 3 v t 0 + p g N M p / + + C t Q 5 U G r V i o / 8 y y h Y 6 5 h J D i j b F 9 f X 1 6 g 8 H w Z c b Y 7 e n 3 M / + y h f S 8 h f b c Q C T K n e 6 3 a 0 / 1 2 f T d 1 g l t N B Y n A M D z H P u H D + + 1 V u g 1 4 k L 8 Z 5 Y t p u c W B a z D 4 e g A 8 E 3 G W F W + w D K D W w r c / v F p 5 a G z V 0 t P 9 9 s N s X h 8 n p F P 7 N v k a L d U h H L p S / m X a k M h c J c M 1 m 6 3 3 0 8 p / T z H c f N s L Q d c B u D o Z a v + t Q t D p Y M O l z p X X B 1 r q v y 3 b m r y r N Y D b d F g G W O 8 w + H 4 G o D b p Y I r F l z G G I 7 1 j O h + d O h 0 n S s Q F i o M q k j q E a G S C 3 R n S 6 3 3 6 J W R k l g 8 T g Q Z z z 5 z 0 x Z H N r 8 r B X d R Y E d G R l T j 4 + M P M 8 Z 2 L n Q a s h i 4 v W N T y l 8 c 6 a o + 0 2 8 3 i H H K A U A g E u M b K k p D N 2 9 s c N 2 0 s d F 7 5 O L Q 7 H B w 1 9 a W q a p S r Z h u Y 6 X h L h i s y + U y B I P B x x h j G 6 Q M F x q Y V O O m f U H Z r 9 7 s q j x 5 d d w w N R N Q x C k j A G D S K 6 N / e c v W s d s 3 N b s 5 Q k A Z w 4 t n + 8 o T Z Z r o v e 9 r m 1 4 s n G L A p Z Q u D O z I y I g q G A w + B m D D U i f Q + e C e H X R o / u P 1 s 2 a X P y y 4 f E F 5 n I L I Z R z d 2 7 b G 9 e A 9 N 4 z y H G E p 3 X O D D o 0 n E J Y B w I 0 b G 9 w y / l r Z Y u A U A 2 7 B Y B l j / N j Y 2 M M A N m R z U i y 4 l B H y 9 P H u 8 l f O D 5 R H x D g 3 7 Q v K C S E o 1 S q i 9 + 5 o n f j 4 n o 5 J j p v 7 Q D t 2 x W o A E t O r G z s a v M W A s 1 T 9 g s H a b L a v E U J 2 S j l Z K t w p X 0 j 2 o 5 d O m w c n 3 O p 4 H G T a F 5 S r 5 E L c o F H G P r 6 7 f f z O r W v d m T p x S s n 5 o Q k d A K y t N g Z 1 S n k 8 n / 9 C 4 S x F v y C w o 6 O j 9 w G 4 v R B Q i 4 X b O + 5 S / e D Q K U s g L P I M D N 5 Q S C j V K E W l X B b / y K 4 N E y m o m f r D E 1 5 F J B b j A G B j X Y W / m H A W q w 8 A u T O 7 S R k Z G e l g j H 0 h 3 V g u J y m h l O Y s y 3 b / s m 1 S 9 c h z J + s C Y Z E H A D n P M 4 N a J S r l s v h 1 a 8 3 e O 7 c 0 u 3 L p 9 4 5 P q V K f O x s q A 9 l i y O U / s y x X G x a j L w m 2 r 6 9 P D + C b y B g y i g m 3 x z a t e v S F U / W p X t d Y V R q k F O A 5 w i o M 2 u h f 3 b Z 1 n O O 4 n P q D E 2 4 l k B h f L U Z D t J h w l q I v C V a h U H w Z Q F U 2 w 8 W A O + 0 L y n 7 0 8 u l a M U 4 J A G y q r / R p 5 U I 8 z h K f P 7 a 7 z c G T a 0 / 4 b D 7 t L r 8 C A C o M 6 m h q p r D a c C m l u c F a r d Z t j L H b p Q w v B a 5 I K f m 3 Q + 9 Y f O G o D A C 2 N V V 7 P 7 a n Y + L C i F M H A J 3 1 l b 4 t D V W B f I 0 L R h L D R 6 V B G y k k h p W C m x U s Y 4 y n l P 5 d I Y Y X C / d 3 J 3 r K b d M + J Q D U l O r C n 7 1 5 y / j x H q s + V e e O z Y 1 z J v m 5 Y g h G o z z A E I n G u G / + / p j l O / 9 z r D b 1 I r G a c L O C H R w c / C i A h k I N L x S u d d K r e P X 8 Q D k A K G Q y + v n b t 4 4 J M o 6 d G X D o A a B c p 4 6 2 m s t D m X Y z Y 2 A A 3 P 6 w 4 P S G F C f 7 b K W X R p z a C 1 a n 7 r v P H j e L l B Y V r i 8 U 4 Q + d 6 S 1 5 7 X y / I Z 9 + 1 j e v o a E h J Y C D 6 Y Y L m Y Y s Z C r 2 n 0 e 7 q 1 J h f f S G N k d t m S 7 q 9 A S E M V e i B 2 9 r r p 6 R e o m I U 0 Y O d w 8 b X j 4 / a H R 6 g w o A U M p l s / P X i y N O 3 d e f + W P d V z + 4 a 1 S j E O h i p 1 J i j J J T V 8 e 0 R 6 8 M G 7 p H n N p 4 n J I y r U q 8 c W O j l 0 8 + U H P p z w N L C L m X J Z d T l g N u 3 7 h L O e B w q w G g z W L y 7 d 1 g 8 Q L A g N O j T N V f W 1 U a y j Z H Z I z h a M + o / r f H L 1 d 6 Q x E Z A J j L t C G T X h O 9 e W O j a 1 N D V e D 7 h 0 7 W O t x + x a D D p f 6 n p 4 + s + f y t W + 1 N 1 c Z w o W 3 w B i P 8 m X 6 7 9 u z A m P b S i F M b i c X n f K u j M c o 5 P D 7 B X G Y Q p d o 8 B 2 x 3 d 7 c c w H 3 z a h U R 7 k v n B o y p 6 3 u u a 5 1 M l T k 8 P n m q b r l O P S 9 o h 8 c n / P z w h e r e s S l N q l 6 Z V i 3 e u 7 P V u b u t f o Z P 1 v v 6 X + w b f u T 5 k 7 W 9 Y 1 M a h 9 u v + O f f v N W w r d n s v b W z 0 b 2 + t j y U i j v V B k 8 g z H e P O N X 9 4 y 5 V z 9 i k e m T S q 6 I Z X 3 O l I N B N D V W + P e 0 N 3 q 1 N 1 Q G O k L w 9 f w 5 Y h U J x g F J a X s i b x m L g e o M R v m s 4 M Y 6 u N x v 9 j Z W G 2 S d 5 W K S z P c N k U M + m / B h j O N 0 / r n 3 i S J c 5 F B U 5 I J F / v X P r 2 s k D m 5 v c c k E 2 O 8 U i h E A t F + i D 9 + w a / f V b F 0 2 H L w 4 a K Q N O 9 4 8 Z T v e P G T R K I V 5 V o o t o F U I 8 F I 3 x r k B I N j U T l C O L 8 B z B e k u F / 4 b W O u / O d b V + t U J O M + t I M Z g D l u f 5 u 6 T A L B X u B e u E h i Y 7 w 8 6 1 N d 5 0 / V Q u l S O A S p D R l I 2 n j l 0 y v X p h q D x l o 6 P O 5 P v c b d v H d U o h n i s G G c e x T + 7 v d O 5 v r / c + f e y S 6 d K o U 0 c Z E A i L / I D E q g M A N F S U h q 5 v t X j 3 t D X M l G g U W f M O h T C Y B W u 1 W m t i s V h n r o d G M e D 2 2 h O N 4 g n H r l t r 9 q X r 6 5 X y G A B Q B g S j M U 6 t E O j P D n d V H e 8 Z L U 0 A J + y e n a 3 O u 7 Y 0 u z L j y h V D v a k k 8 p U P 7 r J 5 A h H + Z 6 + d r T 5 v T S R r M q X C o I 3 u a D F 7 9 7 U 3 z J j L d N F i 5 B Z m w U a j 0 Q N c x p O u 2 H D 7 k w 8 t S 7 k u L K T l U y m l K N W q Y q n P A w 6 X 8 u 2 + M c P J v r E S A C j T q s T P 3 b L Z 1 l J j D C 8 k W S 7 G K H n r 8 r D + l a 4 B 4 3 j y D S 0 l e r U i t q 2 p Z m b P h j X e t d W l Y U L I 8 u R j C S E 3 5 1 N e K l x P M C o A Q J 1 R P 2 / l t K 3 W G E z V f / b M V d N g 8 o 9 g 0 m u i f / / B 6 6 2 l W m U s X 2 y p G C i A w 1 0 D h m f f 6 a 3 w B i P X 2 g i g c 0 2 l 7 6 a N T e 7 N j V W B l O a y 5 W M v X 7 5 s Z I w 1 M Z Z 9 t 0 o x 4 E b E O I k m E y 0 l G k U s U 7 9 E o 4 y Z S 7 X h 4 U m v + u 2 e 0 T K T X h M p 0 y j F r 6 Z B z d c w x h j e 7 h 3 V / f e J K 6 Y J b 0 C R g i b j O X b D + j r 3 X V v X u q p K E m t h J I e 9 Y s D l e T 4 B l u O 4 7 S m F X I a X C t c T D M 3 2 H G 1 a M j q 9 3 k 0 d D a 7 H 3 z i n B o B A K C r 7 8 t 0 7 h s v S / g h S D b N 7 A v L H X z 1 b M + T 0 z K Y R t S p 5 f H / b G t e d 2 1 r c u h w + F 9 K G f D G k 6 8 s A g B C y r R D D S 4 E r x u i s o i C T z X s f Z I z h h l b z z B / O D Y T l P M / i D L P j r t T c G A B e u z B c 8 s y J y 1 V i c g e M U p D R D 1 z X 6 r x 9 U 6 N H k P E F r X 8 V 0 o Z 8 N t K v O Q A g h G x O D z R l O L M B m d e 5 G p p N 3 6 C + N n V x + 4 N Z V y 4 4 Q t j 9 e 9 v H C Q G T c W C P P H + q z u 1 P 9 P R s f t 3 + s O y 7 z 5 2 w P H n 0 Y n U K 6 q a G q p l v f f z G g T u 3 N L n T F x w L y W f k a 0 M u y c a H O 3 L k i A y A e S G G F w N X J f B x t S I x 9 7 S 5 / I p c N t r M x u D 7 t 6 5 1 A o A 7 E B K + 9 8 I p S y i a G J v T d X r t L t U / / u b N x k u 2 K S 0 A l G i U 4 h f v 2 D 7 6 p T u v G z P q r s 0 w C o F T b L i U U n D V 1 d U W A L x U p W z 3 F w q X 4 z g 0 V 5 Q E A a B 3 f F o r x i j J Z e M D 2 5 q n d 7 a Y P Q A w 5 v I p H 3 7 u R J 0 / F O V T t i + N T q q / 9 8 K 1 p Z z r W y 3 u b 3 1 s 3 + C 2 p m p / t t h W A y 7 H 8 3 x 9 v k r F g r t z X Q J W I C z y r 1 4 Y L M 2 s l x J C C D 6 9 b 6 N j v d
2018-12-11 19:44:00 +03:00
}
2018-12-13 01:10:45 +03:00
2018-12-11 19:44:00 +03:00
Loader {
sourceComponent: syntaxDrawer
2018-12-13 01:10:45 +03:00
property string title: qsTr ( "Tables" )
property string description: qsTr ( " Tables aren ' t part of the core Markdown spec , but they are part of GFM and Showdown supports them by turning on the option tables .
Colons can be used to align columns .
In the new version , the outer pipes ( | ) are optional , matching GFM spec .
You also don ' t need to make the raw Markdown line up prettily .
You can also use other markdown syntax inside them . " )
property string rawText:
" | Tables | Are | Cool |
| -- -- -- -- -- -- - | : -- -- -- -- -- -- - : | -- -- - : |
| * * col 3 is * * | right - aligned | $1600 |
| col 2 is | * centered * | $12 |
| zebra stripes | ~ ~ are neat ~ ~ | $1 | "
property string convertedText:
" < table border = '1' cellpadding = '20' >
2018-12-11 19:44:00 +03:00
< thead >
2018-12-13 01:10:45 +03:00
< tr >
< th > Tables < / t h >
< th style = \ "text-align:center;\" > Are < / t h >
< th style = \ "text-align:right;\" > Cool < / t h >
< / t r >
2018-12-11 19:44:00 +03:00
< / t h e a d >
< tbody >
2018-12-13 01:10:45 +03:00
< tr >
< td > < strong > col 3 is < / s t r o n g > < / t d >
< td style = \ "text-align:center;\" > right - aligned < / t d >
< td style = \ "text-align:right;\" > $1600 < / t d >
< / t r >
< tr >
< td > col 2 is < / t d >
< td style = \ "text-align:center;\" > < em > centered < / e m > < / t d >
< td style = \ "text-align:right;\" > $12 < / t d >
< / t r >
< tr >
< td > zebra stripes < / t d >
< td style = \ "text-align:center;\" > < del > are neat < / d e l > < / t d >
< td style = \ "text-align:right;\" > $1 < / t d >
< / t r >
2018-12-11 19:44:00 +03:00
< / t b o d y >
< / t a b l e > "
2018-12-11 15:34:17 +03:00
}
2018-12-13 01:10:45 +03:00
Loader {
sourceComponent: syntaxDrawer
property string title: qsTr ( "HTML" )
property string description: qsTr ( "In most cases, HTML tags are leaved untouched in the output document." )
property string rawText:
" some markdown * * here * *
< div > this is * not * * * parsed * * < / d i v >
Use < b > HTML < /b> <i>Tags</i > to format your text . "
property string convertedText:
" < p > some markdown < strong > here < / s t r o n g > < / p >
< div > this is * not * * * parsed * * < / d i v >
< p > Use < b > HTML < /b> <i>Tags</i > to format your text . < / p > "
}
2018-12-11 15:34:17 +03:00
}
2018-12-13 01:10:45 +03:00
VerticalScrollDecorator { flickable: mainFlickable }
}
Component {
id: syntaxDrawer
Column {
width: page . width
SectionHeader {
text: title
}
Label {
x: Theme . horizontalPageMargin
width: parent . width - 2 * x
bottomPadding: Theme . paddingLarge
wrapMode: Text . Wrap
color: Theme . secondaryColor
text: description
}
Separator {
width: parent . width
color: Theme . primaryColor
horizontalAlignment: Qt . AlignLeft
}
Drawer {
id: drawer
width: parent . width
height: rawTextLabel . height + 2 * Theme . paddingLarge > 2 * Theme . itemSizeHuge ? 2 * Theme.itemSizeHuge : rawTextLabel . height + 2 * Theme . paddingLarge
backgroundSize: height
hideOnMinimize: true
dock: Dock . Bottom
Connections {
target: resetMenuItem
onAllOpenedChanged: resetMenuItem . allOpened ? drawer . show ( ) : drawer . hide ( )
}
foreground: SilicaFlickable {
id: rawTextFlickable
anchors.fill: parent
contentWidth: parent . width > rawTextLabel . contentWidth ? parent.width : rawTextLabel . contentWidth + 2 * Theme . horizontalPageMargin
contentHeight: parent . height > rawTextLabel . height ? parent.height : rawTextLabel . height
BackgroundItem {
anchors.fill: parent
onClicked: drawer . show ( )
Label {
id: rawTextLabel
x: Theme . horizontalPageMargin
y: Theme . paddingLarge
color: parent . highlighted ? Theme.highlightColor : Theme . primaryColor
font.family: appSettings . useMonoFont ? "DejaVu Sans Mono" : Theme . fontFamily
textFormat: Text . PlainText
text: rawText
}
}
ScrollDecorator { /*flickable: rawTextFlickable*/ }
}
background: SilicaFlickable {
id: convertedTextFlickable
anchors.fill: parent
contentWidth: parent . width > convertedTextLabel . contentWidth ? parent.width : convertedTextLabel . contentWidth + 2 * Theme . horizontalPageMargin
contentHeight: parent . height > convertedTextLabel . height ? parent.height : convertedTextLabel . height + 2 * Theme . paddingLarge
BackgroundItem {
anchors.fill: parent
onClicked: drawer . hide ( )
LinkedLabel {
id: convertedTextLabel
x: Theme . horizontalPageMargin
y: Theme . paddingLarge
textFormat: Text . RichText
linkColor: Theme . primaryColor
defaultLinkActions: false
onLinkActivated: drawer . hide ( )
text: "<style>\n" +
"ul,ol,table,img { margin: " + Theme . paddingLarge + "px 0px; }\n" +
"a:link { color: " + Theme . primaryColor + "; }\n" +
"a.checkbox { text-decoration: none; padding: " + Theme . paddingSmall + "px; display: inline-block; }\n" +
"li.tasklist { font-size:large; margin: " + Theme . paddingMedium + "px 0px; }\n" +
"del { text-decoration: line-through; }\n" +
"table { border-color: " + Theme . secondaryColor + "; }\n" +
"</style>\n" + convertedText
}
}
ScrollDecorator { /*flickable: convertedTextFlickable*/ }
}
}
Separator {
width: parent . width
color: Theme . primaryColor
horizontalAlignment: Qt . AlignRight
}
}
2018-12-11 15:34:17 +03:00
}
2021-04-12 19:58:39 +03:00
allowedOrientations: appWindow . allowedOrientations
2018-12-11 15:34:17 +03:00
}