-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmail_Editor_StandAlone.html
More file actions
54 lines (40 loc) · 1.24 KB
/
Email_Editor_StandAlone.html
File metadata and controls
54 lines (40 loc) · 1.24 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script>
var baseUrl = 'https://eu.xmcircle.com/';
var apiUrlLogin = 'CloudAPI/v1/system/login';
var apiEditor = '/email/editor/singleSignOnUrl';
var user = '';
var password = '';
var sub = ""; //Subscription ID
var proj = ""; //Project ID
var docID = ""; //Document ID
var apiUrl = baseUrl + 'cloudAPI/v1/' + sub + '/projects/' + proj + apiEditor;
$.ajax({
type: "POST",
url: baseUrl + apiUrlLogin,
data: {
"UserName":user,
"UserPassword":password
},
success: function(data){
var token = data.Value;
apiUrl += '?securityToken=' + token;
$.ajax({
type: "POST",
url: apiUrl,
data: { "DocumentID": docID},
success: function(data2){
document.getElementById('standalone').src = data2.Url;
}
});
}
});
</script>
<head>
</head><body>
<h2>Email Editor in iframe:</h2>
<iframe id="standalone" src="about:blank" height="2000" width="1200" title="Iframe Example"></iframe>
</body>
</html>