Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
misc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
misc
Commits
b52d3192
Commit
b52d3192
authored
Aug 30, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
9c2085d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
lte/jlte.html
lte/jlte.html
+58
-0
No files found.
lte/jlte.html
0 → 100644
View file @
b52d3192
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
/>
<title>
JSON-Editor ORS-Amarisoft demo/test
</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/@json-editor/json-editor@latest/dist/jsoneditor.min.js"
></script>
</head>
<body>
<div
class=
"container"
>
<textarea
class=
"value form-control"
rows=
"10"
></textarea>
<button
class=
'get-value'
>
Get Value
</button>
<button
class=
'set-value'
>
Set Value
</button>
<div
class=
'json-editor-container'
></div>
</div>
<script>
var
jsonEditorContainer
=
document
.
querySelector
(
'
.json-editor-container
'
);
var
value
=
document
.
querySelector
(
'
.value
'
);
var
schema
=
{
"
$ref
"
:
"
https://lab.nexedi.com/kirr/slapos/raw/00afe1ada/software/ors-amarisoft/cell/input-schema.json
"
}
var
editor
=
new
JSONEditor
(
jsonEditorContainer
,
{
schema
:
schema
,
ajax
:
true
,
theme
:
'
bootstrap4
'
,
show_errors
:
'
always
'
,
iconlib
:
'
fontawesome5
'
,
object_layout
:
'
normal
'
,
disable_collapse
:
true
,
disable_edit_json
:
true
,
disable_properties
:
true
,
use_default_values
:
false
,
// important
disable_array_reorder
:
true
,
disable_array_delete_all_rows
:
true
,
disable_array_delete_last_row
:
true
,
no_additional_properties
:
true
,
// important
keep_oneof_values
:
false
// important
});
document
.
querySelector
(
'
.get-value
'
).
addEventListener
(
'
click
'
,
function
()
{
value
.
value
=
JSON
.
stringify
(
editor
.
getValue
());
console
.
log
(
editor
.
getValue
());
});
document
.
querySelector
(
'
.set-value
'
).
addEventListener
(
'
click
'
,
function
()
{
editor
.
setValue
({
number_range
:
2
})
});
</script>
</body>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment