| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/HostingSpaces/admin/chatme24.com/wwwroot/_frameworks/main/edge/quill/ |
Upload File : |
function initBlockImageCustomBlot(){
var quillBlockEmbed = Quill.import('blots/block/embed');
class blockImageCustomBlot extends quillBlockEmbed {
/*static blotName = 'image_custom';
static className = 'blog_image_post';
static tagName = 'div';*/
static create(data){
var img, id=0;
if (typeof data == 'object') {
img = data.img;
id = data.id;
} else {
img = data;
}
const node = super.create();
node.setAttribute('contenteditable', false);
const nodeImg = document.createElement('img');
nodeImg.setAttribute('src', img);
if(id){
nodeImg.dataset.id = id;
}
node.appendChild(nodeImg);
node.addEventListener('click', (e) => {
e.preventDefault()
})
node.addEventListener('dblclick', (e) => {
e.preventDefault()
})
return node;
}
static value(node) {
return node.querySelector('img').getAttribute('src');
}
}
blockImageCustomBlot.blotName = 'image_custom';
blockImageCustomBlot.className = 'blog_image_post';
blockImageCustomBlot.tagName = 'div';
Quill.register(blockImageCustomBlot);
}