Mercurial Hosting > sceditor
comparison src/plugins/autoyoutube.js @ 29:ea32a44b5a6e
remove more oo
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 11 Aug 2022 19:54:03 -0600 |
parents | b7725dab7482 |
children |
comparison
equal
deleted
inserted
replaced
28:f227fdfebded | 29:ea32a44b5a6e |
---|---|
82 node = node.nextSibling; | 82 node = node.nextSibling; |
83 } | 83 } |
84 }; | 84 }; |
85 | 85 |
86 sceditor.plugins.autoyoutube = function () { | 86 sceditor.plugins.autoyoutube = function () { |
87 this.signalPasteRaw = function (data) { | 87 let base = {} |
88 base.signalPasteRaw = function (editor, data) { | |
88 // TODO: Make this tag configurable. | 89 // TODO: Make this tag configurable. |
89 // Skip code tags | 90 // Skip code tags |
90 if (dom.closest(this.currentNode(), 'code')) { | 91 if (dom.closest(editor.currentNode(), 'code')) { |
91 return; | 92 return; |
92 } | 93 } |
93 | 94 |
94 if (data.html || data.text) { | 95 if (data.html || data.text) { |
95 var node = document.createElement('div'); | 96 var node = document.createElement('div'); |
100 convertYoutubeLinks(node, true); | 101 convertYoutubeLinks(node, true); |
101 | 102 |
102 data.html = node.innerHTML; | 103 data.html = node.innerHTML; |
103 } | 104 } |
104 }; | 105 }; |
106 return base; | |
105 }; | 107 }; |
106 })(document, sceditor); | 108 })(document, sceditor); |