-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.html
114 lines (105 loc) · 4.63 KB
/
example.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> Flexnet TinyMCE 5 SOME plugin - example</title>
<!-- JQUERY -->
<script src="https://code.jquery.com/jquery-3.6.1.min.js" integrity="sha256-o88AwQnZB+VDvE9tvIXrMQaPlFFSUTR+nldQm1LuPXQ=" crossorigin="anonymous"></script>
<!-- BOOTSTRAP -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-u1OknCvxWvY5kfmNBILK2hRnQC3Pr17a+RTT6rIHI7NnikvbZlHgTPOOmMi466C8" crossorigin="anonymous"></script>
<!-- TINYMCE 5 -->
<script src="https://cdn.tiny.cloud/1/olr13oki3re0bev3riypqobq6cadc9ayupzdr62urfstwprb/tinymce/5/tinymce.min.js" referrerpolicy="origin"></script>
</head>
<body>
<div class="container mb-4 mt-4">
<div class="row">
<div class="col-12 col-md-8 offset-md-2">
<div class="text-center">
<a href="https://www.flexnet.dk"><img src="https://github.flexnet.dk/images/flexnet-512.png" class="img-fluid" alt="Flexnet Aps" /></a>
</div>
<div class="mt-5">
<h2>
Flexnet TinyMCE 5 SOME plugin
</h2>
<p class="fw-bold">
A plugin for adding media content to TinyMCE 5.<br />
Add Facebook, Twitter, YouTube, Vimeo, Soundcloud, Infogram
</p>
<p>
Requires jQuery and PHP7+.
</p>
<ul class="list-group mb-4">
<li class="list-group-item">
Place the cursor in the textarea where you want the media embedded.<br />
</li>
<li class="list-group-item">
Click on the plugin button <img src="./images/some-button.png" alt="button" />
</li>
<li class="list-group-item">
Insert the URL for the embed and press OK.<br />
E.g.:<br />
https://vimeo.com/8870338 or<br />
https://www.facebook.com/uniladmag/videos/2530516633638047/<br />
https://youtu.be/tUEJkwA1VI4
</li>
</ul>
You can find the full code on GitHub here:<br />
<a href="https://github.com/wegeberg/flexnet-tinymce5-some">
https://github.com/wegeberg/flexnet-tinymce5-some
</a>
</div>
</div>
</div>
</div>
<div class="container mb-4">
<div class="row">
<div class="col-12 col-md-6">
<textarea id="text"></textarea>
<div class="py-2">
<div class="form-check text-start">
<input
type="checkbox"
class="form-check-input non-trigger"
id="show-some-preview"
name="show-some-preview"
checked="checked"
/>
<label class="form-check-label">
Show SOME preview when inserting?
</label>
</div>
</div>
</div>
<!-- Preview the result -->
<div class="col-12 col-md-6">
<div class="card">
<div class="card-header">
<h5>
Preview
</h5>
</div>
<div class="card-body" id="some-preview"></div>
</div>
</div>
</div>
</div>
<!-- Include the plugin -->
<!-- You MUST set the id as shown below -->
<script
id="flexnet-tinymce5-some"
src="./dist/index.js?v=2"
></script>
<script>
tinymce.init({
selector: "#text",
plugins: "flexnet_some",
toolbar: [ "bold italic | bullist numlist | flexnet_some" ],
height: "400",
deprecation_warnings: false
});
</script>
</body>
</html>