annotate src/test/tiny.html @ 28:d9d7aa2a79db

more video types
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 21 Jul 2022 23:44:49 -0600
parents 6871eec2cf4c
children 8ff35379cc89
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
1 <!doctype html>
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2 <html>
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
3 <head>
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
4 <meta name="viewport" content="width=device-width, initial-scale=1">
24
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
5 <script src="http://tinymce.luan.software/tinymce.min.js" xreferrerpolicy="origin"></script>
22
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
6 <style>
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7 </style>
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8 <script>
28
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
9 function videoIframe(url) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
10 return '<iframe data-video="'+url+'" width="560" height="315" frameborder="0" allowfullscreen src="'+url+'"></iframe>';
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
11 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
12
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
13 var videoHandlers = {};
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
14 {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
15 let ptn1 = new RegExp('https://youtu.be/([a-zA-Z0-9_-]+)(?:\\?t=([0-9]+))?');
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
16 let ptn2 = new RegExp('https://www.youtube.com/watch\\?v=([a-zA-Z0-9_-]+)(?:\\?t=([0-9]+)s)?');
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
17 videoHandlers.youtube = function(url) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
18 let result = url.match(ptn1) || url.match(ptn2);
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
19 if( result ) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
20 url = 'https://www.youtube.com/embed/' + result[1];
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
21 if( result[2] )
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
22 url += '?start=' + result[2];
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
23 return videoIframe(url);
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
24 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
25 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
26 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
27 {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
28 let ptn = new RegExp('https://rumble.com/embed/[a-z0-9]+/\\?pub=[a-z0-9]+');
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
29 videoHandlers.rumble = function(url) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
30 if( url.match(ptn) ) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
31 return videoIframe(url);
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
32 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
33 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
34 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
35 {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
36 let ptn = new RegExp('https://www.bitchute.com/video/([a-zA-Z0-9]+)/');
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
37 videoHandlers.bitchute = function(url) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
38 let result = url.match(ptn);
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
39 if( result ) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
40 url = 'https://www.bitchute.com/embed/' + result[1];
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
41 return videoIframe(url);
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
42 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
43 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
44 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
45 {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
46 let ptn = new RegExp('https://vimeo.com/([0-9]+)');
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
47 videoHandlers.vimeo = function(url) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
48 let result = url.match(ptn);
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
49 if( result ) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
50 url = 'https://player.vimeo.com/video/' + result[1];
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
51 return videoIframe(url);
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
52 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
53 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
54 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
55 {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
56 let ptn = new RegExp('https://dai.ly/([a-z0-9]+)');
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
57 videoHandlers.dailymotion = function(url) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
58 let result = url.match(ptn);
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
59 if( result ) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
60 url = 'https://www.dailymotion.com/embed/video/' + result[1];
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
61 return videoIframe(url);
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
62 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
63 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
64 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
65 {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
66 let ptn = new RegExp('https://www.tiktok.com/[^/]+/video/([0-9]+)');
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
67 videoHandlers.tiktok = function(url) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
68 let result = url.match(ptn);
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
69 if( result ) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
70 let html = '<blockquote class="tiktok-embed" data-video-id="'+result[1]+'" style="max-width: 560px; margin-left: 0;"><section></section></blockquote>';
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
71 //html += '<script async src="https://www.tiktok.com/embed.js"></'+'script>';
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
72 return html;
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
73 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
74 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
75 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
76 {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
77 let ptn = new RegExp('\\.[a-zA-Z0-9]+$');
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
78 videoHandlers.file = function(url) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
79 if( url.match(ptn) ) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
80 return '<video controls width="560" height><source src="'+url+'"></video>';
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
81 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
82 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
83 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
84
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
85 function videoUrlToHtml(url) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
86 for (let key in videoHandlers) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
87 let handle = videoHandlers[key];
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
88 let html = handle(url);
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
89 if(html) return html;
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
90 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
91 return '<a data-video="'+url+'" href="'+url+'">'+url+'</a>';
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
92 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
93 console.log(videoUrlToHtml('https://www.tiktok.com/@chantelleef/video/7112118342181276933?is_from_webapp=1&sender_device=pc&web_id=7073254106622838318'));
22
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
94
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
95 function media_url_resolver(data,resolve,reject) {
28
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
96 let html = videoUrlToHtml(data.url);
22
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
97 resolve({ html: html });
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
98 }
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
99
24
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
100
23
cdcd1b70c15e tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 22
diff changeset
101 function tinymceSetup(editor) {
24
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
102
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
103 editor.ui.registry.addToggleButton('styleCode', {
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
104 icon: 'sourcecode',
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
105 tooltip: 'Code',
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
106 onAction: function(api) {
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
107 editor.execCommand('mceToggleFormat', false, 'code')
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
108 },
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
109 onSetup: function(api) {
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
110 api.setActive(editor.formatter.match('code'));
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
111 let changed = editor.formatter.formatChanged('code', api.setActive);
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
112 return function() { changed.unbind(); };
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
113 }
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
114 });
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
115
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
116 editor.ui.registry.addMenuButton('styleText', {
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
117 icon: 'format',
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
118 tooltip: 'Text',
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
119 fetch: function(callback) {
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
120 callback([
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
121 'fontsize',
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
122 'forecolor',
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
123 ])
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
124 }
23
cdcd1b70c15e tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 22
diff changeset
125 });
26
0837820b97fb tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
126
0837820b97fb tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
127 editor.on( 'init', function(e) {editor.focus()} );
23
cdcd1b70c15e tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 22
diff changeset
128 }
cdcd1b70c15e tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 22
diff changeset
129
22
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
130 tinymce.init({
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
131 selector: 'textarea',
23
cdcd1b70c15e tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 22
diff changeset
132 setup: tinymceSetup,
27
6871eec2cf4c add rumble
Franklin Schmidt <fschmidt@gmail.com>
parents: 26
diff changeset
133 //menubar: false,
26
0837820b97fb tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
134 statusbar: false,
24
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
135 toolbar: 'link image media | styleCode bold italic underline strikethrough superscript styleText | blockquote numlist bullist',
26
0837820b97fb tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
136 plugins: ['link', 'image', 'media', 'lists', 'code', 'autoresize'],
0837820b97fb tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
137 autoresize_bottom_margin: 0,
22
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
138 link_target_list: false,
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
139 link_title: false,
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
140 image_description: false,
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
141 image_dimensions: false,
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
142 object_resizing: false,
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
143 contextmenu: false,
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
144 media_alt_source: false,
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
145 media_dimensions: false,
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
146 media_poster: false,
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
147 media_url_resolver: media_url_resolver,
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
148 text_patterns: false,
26
0837820b97fb tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
149 content_style: 'img {max-width: 500px;} p {margin: 0}',
23
cdcd1b70c15e tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 22
diff changeset
150 //newline_behavior: 'linebreak',
22
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
151 extended_valid_elements: 'b,i',
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
152 formats: {
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
153 bold: { inline: 'b' },
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
154 italic: {inline: 'i'},
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
155 underline: {inline: 'u'},
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
156 },
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
157 });
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
158
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
159 function log() {
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
160 console.log(tinymce.activeEditor.getContent());
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
161 }
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
162 </script>
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
163 </head>
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
164 <body>
23
cdcd1b70c15e tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 22
diff changeset
165 <p><a href="https://www.tiny.cloud/">TinyMCE</a></p>
22
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
166 <textarea></textarea>
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
167 <p><button onclick="log()">log</button></p>
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
168 </body>
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
169 </html>