annotate src/test/tiny.html @ 30:8ff35379cc89

regex cleanup
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 25 Jul 2022 22:10:28 -0600
parents d9d7aa2a79db
children 6d265f5e18e2
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
30
8ff35379cc89 regex cleanup
Franklin Schmidt <fschmidt@gmail.com>
parents: 28
diff changeset
13 // fucking moronic javascript doesn't have \Q \E in regex
28
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
14 var videoHandlers = {};
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
15 {
30
8ff35379cc89 regex cleanup
Franklin Schmidt <fschmidt@gmail.com>
parents: 28
diff changeset
16 let ptn1 = /^https:\/\/youtu\.be\/([a-zA-Z0-9_-]+)(?:\?t=([0-9]+))?/;
8ff35379cc89 regex cleanup
Franklin Schmidt <fschmidt@gmail.com>
parents: 28
diff changeset
17 let ptn2 = /^https:\/\/www\.youtube\.com\/watch\?v=([a-zA-Z0-9_-]+)(?:&t=([0-9]+)s)?/;
28
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
18 videoHandlers.youtube = function(url) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
19 let result = url.match(ptn1) || url.match(ptn2);
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
20 if( result ) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
21 url = 'https://www.youtube.com/embed/' + result[1];
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
22 if( result[2] )
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
23 url += '?start=' + result[2];
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
24 return videoIframe(url);
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 {
30
8ff35379cc89 regex cleanup
Franklin Schmidt <fschmidt@gmail.com>
parents: 28
diff changeset
29 let ptn = /^https:\/\/rumble\.com\/embed\/[a-z0-9]+\/\?pub=[a-z0-9]+/;
28
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
30 videoHandlers.rumble = function(url) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
31 if( url.match(ptn) ) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
32 return videoIframe(url);
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 {
30
8ff35379cc89 regex cleanup
Franklin Schmidt <fschmidt@gmail.com>
parents: 28
diff changeset
37 let ptn = /^https:\/\/www\.bitchute\.com\/video\/([a-zA-Z0-9]+)\//;
28
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
38 videoHandlers.bitchute = function(url) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
39 let result = url.match(ptn);
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
40 if( result ) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
41 url = 'https://www.bitchute.com/embed/' + result[1];
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
42 return videoIframe(url);
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 {
30
8ff35379cc89 regex cleanup
Franklin Schmidt <fschmidt@gmail.com>
parents: 28
diff changeset
47 let ptn = /^https:\/\/vimeo\.com\/([0-9]+)/;
28
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
48 videoHandlers.vimeo = function(url) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
49 let result = url.match(ptn);
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
50 if( result ) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
51 url = 'https://player.vimeo.com/video/' + result[1];
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
52 return videoIframe(url);
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 {
30
8ff35379cc89 regex cleanup
Franklin Schmidt <fschmidt@gmail.com>
parents: 28
diff changeset
57 let ptn = /^https:\/\/dai\.ly\/([a-z0-9]+)/;
28
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
58 videoHandlers.dailymotion = function(url) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
59 let result = url.match(ptn);
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
60 if( result ) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
61 url = 'https://www.dailymotion.com/embed/video/' + result[1];
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
62 return videoIframe(url);
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 {
30
8ff35379cc89 regex cleanup
Franklin Schmidt <fschmidt@gmail.com>
parents: 28
diff changeset
67 let ptn = /^https:\/\/www\.tiktok\.com\/[^/]+\/video\/([0-9]+)/;
28
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
68 videoHandlers.tiktok = function(url) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
69 let result = url.match(ptn);
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
70 if( result ) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
71 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
72 //html += '<script async src="https://www.tiktok.com/embed.js"></'+'script>';
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
73 return html;
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 {
30
8ff35379cc89 regex cleanup
Franklin Schmidt <fschmidt@gmail.com>
parents: 28
diff changeset
78 let ptn = /\.[a-zA-Z0-9]+$/;
28
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
79 videoHandlers.file = function(url) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
80 if( url.match(ptn) ) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
81 return '<video controls width="560" height><source src="'+url+'"></video>';
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
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
86 function videoUrlToHtml(url) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
87 for (let key in videoHandlers) {
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
88 let handle = videoHandlers[key];
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
89 let html = handle(url);
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
90 if(html) return html;
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
91 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
92 return '<a data-video="'+url+'" href="'+url+'">'+url+'</a>';
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
93 }
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
94 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
95
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
96 function media_url_resolver(data,resolve,reject) {
28
d9d7aa2a79db more video types
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
97 let html = videoUrlToHtml(data.url);
22
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
98 resolve({ html: html });
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
99 }
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
100
24
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
101
23
cdcd1b70c15e tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 22
diff changeset
102 function tinymceSetup(editor) {
24
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
103
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
104 editor.ui.registry.addToggleButton('styleCode', {
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
105 icon: 'sourcecode',
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
106 tooltip: 'Code',
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
107 onAction: function(api) {
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
108 editor.execCommand('mceToggleFormat', false, 'code')
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
109 },
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
110 onSetup: function(api) {
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
111 api.setActive(editor.formatter.match('code'));
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
112 let changed = editor.formatter.formatChanged('code', api.setActive);
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
113 return function() { changed.unbind(); };
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
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
117 editor.ui.registry.addMenuButton('styleText', {
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
118 icon: 'format',
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
119 tooltip: 'Text',
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
120 fetch: function(callback) {
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
121 callback([
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
122 'fontsize',
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
123 'forecolor',
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
124 ])
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
125 }
23
cdcd1b70c15e tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 22
diff changeset
126 });
26
0837820b97fb tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
127
0837820b97fb tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
128 editor.on( 'init', function(e) {editor.focus()} );
23
cdcd1b70c15e tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 22
diff changeset
129 }
cdcd1b70c15e tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 22
diff changeset
130
22
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
131 tinymce.init({
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
132 selector: 'textarea',
23
cdcd1b70c15e tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 22
diff changeset
133 setup: tinymceSetup,
27
6871eec2cf4c add rumble
Franklin Schmidt <fschmidt@gmail.com>
parents: 26
diff changeset
134 //menubar: false,
26
0837820b97fb tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
135 statusbar: false,
24
fccbe5554fcc tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
136 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
137 plugins: ['link', 'image', 'media', 'lists', 'code', 'autoresize'],
0837820b97fb tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
138 autoresize_bottom_margin: 0,
22
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
139 link_target_list: false,
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
140 link_title: false,
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
141 image_description: false,
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
142 image_dimensions: false,
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
143 object_resizing: false,
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
144 contextmenu: false,
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
145 media_alt_source: false,
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
146 media_dimensions: false,
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
147 media_poster: false,
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
148 media_url_resolver: media_url_resolver,
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
149 text_patterns: false,
26
0837820b97fb tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
150 content_style: 'img {max-width: 500px;} p {margin: 0}',
23
cdcd1b70c15e tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 22
diff changeset
151 //newline_behavior: 'linebreak',
22
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
152 extended_valid_elements: 'b,i',
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
153 formats: {
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
154 bold: { inline: 'b' },
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
155 italic: {inline: 'i'},
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
156 underline: {inline: 'u'},
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
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
160 function log() {
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
161 console.log(tinymce.activeEditor.getContent());
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
162 }
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
163 </script>
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
164 </head>
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
165 <body>
23
cdcd1b70c15e tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents: 22
diff changeset
166 <p><a href="https://www.tiny.cloud/">TinyMCE</a></p>
22
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
167 <textarea></textarea>
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
168 <p><button onclick="log()">log</button></p>
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
169 </body>
d87a8f9f43d7 tinymce work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
170 </html>