From 2cdb0b45dfc1124c0c765751bcfcaa14da6accf8 Mon Sep 17 00:00:00 2001 From: Koen Deschacht Date: Fri, 3 Dec 2021 11:24:35 +0100 Subject: [PATCH] Allow for the title of a block to be passed as an attribute --- src/block_manager/view/BlockView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/block_manager/view/BlockView.js b/src/block_manager/view/BlockView.js index 5a332f566..4adee76f7 100644 --- a/src/block_manager/view/BlockView.js +++ b/src/block_manager/view/BlockView.js @@ -128,7 +128,7 @@ export default Backbone.View.extend({ ${media ? `
${media}
` : ''}
${label}
`; - el.title = el.textContent.trim(); + el.title = attr.title || el.textContent.trim(); el.setAttribute('draggable', hasDnd(em) && !disable ? true : false); const result = render && render({ el, model, className, prefix: ppfx }); if (result) el.innerHTML = result;