lbovet / docson

Documentation for your JSON types
Apache License 2.0
491 stars 97 forks source link

Links open In the same iFrame #67

Open odscjames opened 6 years ago

odscjames commented 6 years ago

Create an example HTML file:

<!DOCTYPE html>
<html>
<head>
    <title>Docson Example</title>
    <meta charset="utf-8">
    <link rel="stylesheet" href="../css/docson.css">
<body>
<p>START</p>
<script src="/widget.js" data-schema="/examples/schemaTest.json">
</script>
<p>END</p>
</body>
</html>

With an example Schema:


{
"id": "Invoice",
"description": "Represents the _document_ sent to the customer for payment.",
"properties": {
    "customer": {
        "description": "---\nWho will pay?\nNot me!\n - Run away to http://example.com/",
        "type": "string",
        "maxLength": 25
    },
    "props": {
        "properties": {
            "key": {
                "type": "string",
                "pattern": "[a-z][0-9]_"
            },
            "value" : {
                "type": "string"
            }
        }

    },
    "dimension": {
        "description": "Total dimension of the order - Lets go to [Index](/index.html) ",
        "$ref": "Dimension"
    }
}
}

(You may have to adjust relative paths for your setup.)

Open the page and you'll see:

docsonbefore

Click one of the links and you'll see:

docsonafter