import QtQuick 2.0 import Sailfish.Silica 1.0 Page { id: page Component { id: syntaxDrawer Drawer { id: drawer width: page.width height: rawTextLabel.height > convertedTextLabel.height ? rawTextLabel.height : convertedTextLabel.height backgroundSize: height foreground: BackgroundItem { width: parent.width height: parent.height onClicked: drawer.show() Label { id: rawTextLabel x: Theme.horizontalPageMargin width: parent.width - 2*x wrapMode: Text.Wrap font.family: appSettings.useMonoFont ? "DejaVu Sans Mono" : Theme.fontFamily text: rawText } } background: BackgroundItem { width: parent.width height: parent.height onClicked: drawer.hide() LinkedLabel { id: convertedTextLabel x: Theme.horizontalPageMargin width: parent.width - 2*x textFormat: Text.RichText linkColor: Theme.primaryColor defaultLinkActions: false onLinkActivated: drawer.hide() text: "\n" + convertedText } } } } SilicaFlickable { id: flickable anchors.fill: parent contentHeight: column.height Column { id: column width: parent.width PageHeader { title: qsTr("Markdown Syntax") } SectionHeader { text: qsTr("Header") } Loader { sourceComponent: syntaxDrawer property string rawText: " # Header 1 ## Header 2 ### Header 3 #### Header 4 ##### Header 5 ###### Header 6"; property string convertedText: "
Header 1 | Header 2 | Header 3 |
Content 1.1 | Content 2.1 | Content 3.1 |
Content 1.2 | Content 2.2 | Content 3.2 |
Content 1.3 | Content 2.3 | Content 3.3 |