Browse Source

Allow for the title of a block to be passed as an attribute

pull/3992/head
Koen Deschacht 5 years ago
parent
commit
2cdb0b45df
  1. 2
      src/block_manager/view/BlockView.js

2
src/block_manager/view/BlockView.js

@ -128,7 +128,7 @@ export default Backbone.View.extend({
${media ? `<div class="${className}__media">${media}</div>` : ''}
<div class="${className}-label">${label}</div>
`;
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;

Loading…
Cancel
Save