|
@@ -5,7 +5,6 @@ const BlockEmbed = Quill.import('blots/block/embed')
|
|
|
export class Audio extends BlockEmbed {
|
|
|
static create(value) {
|
|
|
const node = super.create(value);
|
|
|
- console.log(node);
|
|
|
node.setAttribute('src', value.src);
|
|
|
node.setAttribute('controls', true);
|
|
|
node.setAttribute('name', value.name.replace(' ', ''));
|
|
@@ -40,13 +39,11 @@ export class View extends BlockEmbed {
|
|
|
const node = super.create(value)
|
|
|
node.setAttribute('controls', true);
|
|
|
node.setAttribute('src', value);
|
|
|
+ node.setAttribute('style', 'width: 100%; display: block')
|
|
|
return node;
|
|
|
}
|
|
|
static value(domNode) {
|
|
|
- const value = {
|
|
|
- src: ''
|
|
|
- }
|
|
|
- value.src = domNode.getAttribute('src')
|
|
|
+ const value = domNode.getAttribute('src')
|
|
|
return value
|
|
|
}
|
|
|
}
|