feat: implement Google Form plugin and enhance TinyMCE editor with advanced configuration attributes
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html><body>
|
||||
<div id="wrapper">
|
||||
<textarea id="mytext"></textarea>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/tinymce@6/tinymce.min.js"></script>
|
||||
<script>
|
||||
document.getElementById('wrapper').addEventListener('mousedown', function(e) {
|
||||
console.log('wrapper mousedown received!', e.isTrusted, e.clientX, e.clientY);
|
||||
});
|
||||
tinymce.init({
|
||||
selector: '#mytext',
|
||||
setup: function(editor) {
|
||||
editor.on('focusin mousedown click keyup', function(e) {
|
||||
console.log('tinymce event:', e.type);
|
||||
const target = document.getElementById('wrapper');
|
||||
target.dispatchEvent(new MouseEvent('mousedown', {
|
||||
bubbles: true, cancelable: true, view: window, clientX: 10, clientY: 10
|
||||
}));
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body></html>
|
||||
Reference in New Issue
Block a user