MBS FileMaker Plugin Example Databases

WebViewer MarkDown

All examples are included with download of MBS FileMaker Plugin.

WebViewer MarkDown.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts2
Value Lists0
Custom Functions0
Custom Menus33
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenScript: Initialize
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
WebViewer MarkDown
2 fields defined, 2 records
WebViewer MarkDown

Fields

Table Name: WebViewer MarkDown - 2 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
InputNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      OutputNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German

          Layout Objects: WebViewer MarkDown

          Regular Fields

          Field Name: WebViewer MarkDown::Input
          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
          • Top: 24 pt
          • Left: 138 pt
          • Bottom: 206 pt
          • Right: 391 pt
          • Anchoring: Left, Top
          Field Format:
          • Edit Box
          Field Behavior:
          • Allow field to be entered: In Find mode, In Browse mode
          • Touch keyboard type: System Default
          • Go to next field using: Tab key
          Yes

          Field Name: WebViewer MarkDown::Output
          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
          • Top: 210 pt
          • Left: 138 pt
          • Bottom: 398 pt
          • Right: 391 pt
          • Anchoring: Left, Top
          Field Format:
          • Edit Box
          Field Behavior:
          • Allow field to be entered: In Find mode, In Browse mode
          • Touch keyboard type: System Default
          • Go to next field using: Tab key
          Yes

          Group Buttons

          Button PropertiesCoordinatesScript/Script Step
            Type:
          • Text: Convert
            Additional Properties:
          • Change to hand cursor over button
          • Rectangular
          • Top: 48 pt
          • Left: 18 pt
          • Bottom: 79 pt
          • Right: 127 pt
          • Anchoring: Left, Top
          Perform Script [ “Convert” ]

          Scripts:


          Web Viewer Controls

          Web Viewer Control PropertiesCoordinatesWeb Address
            Object Name:
          • MarkDownWebViewer
            Additional Properties:
          • Automatically encode URL
          • Top: 258 pt
          • Left: 24 pt
          • Bottom: 373 pt
          • Right: 115 pt
          • Anchoring: Left, Top
          "about:_blank"

          Web Viewer Control PropertiesCoordinatesWeb Address
            Object Name:
          • PreviewWebviewer
            Additional Properties:
          • Allow interaction with web viewer content
          • Display progress bar
          • Display status messages
          • Automatically encode URL
          • Top: 24 pt
          • Left: 396 pt
          • Bottom: 397 pt
          • Right: 769 pt
          • Anchoring: Left, Top
          "about:_blank"

          Script Hierarchy

          Convert
          Initialize

          Next Script: [Initialize]
          Script NameConvert
          Run script with full access privilegesOff
          Include In MenuYes
          Layouts that use this script
          Scripts that use this script
            Script Definition
            Script Steps
            • Set Variable [ $r; Value:MBS( "WebView.SetFormTextAreaValue" ; "MarkDownWebViewer"; "formtest"; "input"; WebViewer MarkDown::Input; 1 ) ]
            • Set Variable [ $r; Value:MBS( "WebView.RunJavaScript" ; "HTMLEditor"; "try { Convert(); } catch (e) { alert(e); }" ) ]
            • Set Field [ WebViewer MarkDown::Output; MBS( "WebView.GetFormTextAreaValue" ; "MarkDownWebViewer"; "formtest"; "output"; 1 ) ]
            • Set Web Viewer [ Object Name: "PreviewWebviewer"; URL: "data:text/html," & WebViewer MarkDown::Output ]
            Fields used in this script
            Scripts used in this script
              Layouts used in this script
                Tables used in this script
                Table occurrences used by this script
                Custom Functions used by this script
                  Custom menu set used by this script

                    Previous Script: [Convert]
                    Script NameInitialize
                    Run script with full access privilegesOff
                    Include In MenuYes
                    Layouts that use this script
                      Scripts that use this script
                        Script Definition
                        Script Steps
                        • #enable debug
                        • Set Variable [ $result; Value:MBS("Trace") ]
                        • #init webviewer extension
                        • If [ 0 // Hole ( HostAnwendungVersion ) = "" /* on server? */ ]
                        • #find HTML code
                        • Set Variable [ $databasePath; Value:Get(FilePath) ]
                        • Set Variable [ $databasePath; Value:MBS("Path.FilemakerPathToNativePath"; $databasePath) ]
                        • Set Variable [ $databasePath; Value:Substitute ( $databasePath ; ".fp7" ; ".fmp12") ]
                        • Set Variable [ $databaseName; Value:Get(FileName) & ".fmp12" ]
                        • Set Variable [ $path; Value:Substitute ( $databasePath ; $databaseName ; "markdown.html" ) ]
                        • Set Variable [ $URL; Value:MBS( "Path.FilePathToFileURL"; $path ) ]
                        • Set Web Viewer [ Object Name: "MarkDownWebViewer"; URL: $path ]
                        • Else
                        • Set Web Viewer [ Object Name: "MarkDownWebViewer"; URL: "http://www.monkeybreadsoftware.de/filemaker/markdown/markdown.html" ]
                        • End If
                        Fields used in this script
                          Scripts used in this script
                            Layouts used in this script
                              Tables used in this script
                                Table occurrences used by this script
                                  Custom Functions used by this script
                                    Custom menu set used by this script

                                      Download example: WebViewer MarkDown

                                      Used functions:




                                      Links
                                      MBS Xojo blog