froala-audio
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -187,4 +187,4 @@ 'use strict'; | ||
var addNewAudio = function addNewAudio(src, data) { | ||
if (!data) data = {}; | ||
var addNewAudio = function addNewAudio(src, response) { | ||
var data = parseResponse(response) || {}; | ||
var $audio = $('<span contenteditable="false" draggable="true" class="fr-audio fr-uploading">' + '<audio controls="controls" controlsList="nodownload"></audio>' + '</span>'); | ||
@@ -250,3 +250,3 @@ $audio.toggleClass('fr-draggable', editor.opts.audioMove); | ||
var insertHtmlAudio = function insertHtmlAudio(link, data) { | ||
var insertHtmlAudio = function insertHtmlAudio(link, response) { | ||
editor.edit.on(); | ||
@@ -257,6 +257,6 @@ showProgressMessage('Loading audio'); | ||
var replace = !!currentAudio; | ||
var $audio = replace ? replaceAudio(currentAudio, link) : addNewAudio(link, data); | ||
var $audio = replace ? replaceAudio(currentAudio, link) : addNewAudio(link, response); | ||
editor.undo.saveStep(); | ||
editor.events.trigger(replace ? 'audio.replaced' : 'audio.inserted', [$audio]); | ||
editor.events.trigger(replace ? 'audio.replaced' : 'audio.inserted', [$audio, response]); | ||
}; | ||
@@ -526,4 +526,3 @@ | ||
try { | ||
var resp = parseResponse(responseText); | ||
if (resp) insertHtmlAudio(resp.link, resp); | ||
if (resp) insertHtmlAudio(resp.link, responseText); | ||
} catch (ex) { | ||
@@ -530,0 +529,0 @@ // Bad response. |
{ | ||
"name": "froala-audio", | ||
"description": "Plugin for inserting and modifying audio players with Froala WYSIWYG Editor.", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"main": "./froala-audio.js", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/ecoach-lms/froala-audio", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34382
664