-
Notifications
You must be signed in to change notification settings - Fork 638
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1368 from germanbisurgi/feature/fix-issue-1367
Feature/fix issue 1367
- Loading branch information
Showing
6 changed files
with
91 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* global Feature Scenario */ | ||
const assert = require('assert') | ||
|
||
Feature('GitHub issue 1367') | ||
|
||
Scenario('GitHub issue 1367 should remain fixed @issue-1367', async ({ I }) => { | ||
I.amOnPage('issues/issue-gh-1367.html') | ||
I.waitForElement('.je-ready') | ||
I.click('canvas') | ||
assert.match(await I.grabValueFrom('#value'), /base64/) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>GitHub Issue 1367</title> | ||
<link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"> | ||
<link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css"> | ||
<script src="https://cdn.jsdelivr.net/npm/signature_pad@2.3.2/dist/signature_pad.js"></script> | ||
<script src="../../../dist/jsoneditor.js"></script> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<a href="https://github.com/json-editor/json-editor/issues/1158">GitHub Issue 1367</a> | ||
<label for="value">Value</label> | ||
<textarea class="form-control" id="value" rows="6" style="font-size: 12px; font-family: monospace;"></textarea> | ||
<div id='editor_holder'></div> | ||
</div> | ||
|
||
<script> | ||
var defaultSchema = { | ||
'type': 'object', | ||
'title': 'Document', | ||
'properties': { | ||
'signature': { | ||
'type': 'string', | ||
'format': 'signature', | ||
'title': 'Signature', | ||
'options': { | ||
'canvas_height': 500 | ||
} | ||
} | ||
} | ||
} | ||
|
||
var value = document.querySelector('#value') | ||
var editor = new JSONEditor(document.getElementById('editor_holder'),{ | ||
iconlib: 'fontawesome5', | ||
object_layout: 'normal', | ||
schema: defaultSchema, | ||
show_errors: 'always', | ||
theme: 'bootstrap4' | ||
}); | ||
|
||
editor.on('change', function () { | ||
value.value = JSON.stringify(editor.getValue()) | ||
}) | ||
</script> | ||
</body> | ||
</html> |