-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
36 lines (35 loc) · 1.63 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!doctype html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Kontent.ai "Replace text"</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="https://app.kontent.ai/js-api/custom-element/v1/custom-element.min.js"></script>
<script type="text/javascript" src="process.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="overlay">Getting data</div>
<div class="top-bar">
<!-- Environment ID: --><input size="40" hidden type="text" name="environment" id="environment" class="input" />
<!-- Management API key: --><input size="50" hidden type="text" name="mapi" id="mapi" class="input" />
Replace what: <input size="40" type="text" name="source" id="source" class="input" /><br />
Replace with: <input size="40" type="text" name="target" id="target" class="input" /><br />
Replace also in published items: <input type="checkbox" id="publishreplace" name="publishreplace" class="chbx" value="Publish replace"><br />
Publish published items after replacement: <input type="checkbox" id="publish" name="publish" class="chbx" value="Publish">
<input id="submit" type="submit" value="Submit" class="submit" />
</div>
<div id="output"></div>
<div id="msg"></div>
<script>
$(document).ready(function () {
CustomElement.setHeight(300);
CustomElement.init((element, _context) => {
config = element.config || {};
$('[name="environment"]').val(config.envId);
$('[name="mapi"]').val(config.mapiId);
});
});
</script>
</body>
</html>