我想嵌入一个音频文件使用textAngular工具栏。这是我用来做这个用途的代码。
userapp.config(function($provide){
$provide.decorator('taOptions', ['testFactory', 'taRegisterTool', '$delegate', function(tFact, taRegisterTool, taOptions){
console.log(taOptions);
taRegisterTool('insertaudio', {
iconclass: "fa fa-file-audio-o",
buttontitle: 'Insert Image From Local Mechine or URL',
action: function($deferred){
this.$editor().wrapSelection('inserthtml','<audio controls="controls" SRC="http://olremix.org/mp3/Brunzolaitis_-_A_Link_To_OLR(Legend_of_Zelda_A_Link_to_the_Past).mp3"></audio>');
$deferred.resolve();
}
});
taOptions.toolbar[1].push('insertaudio');
return taOptions;
}]);});
但问题是,每当我试图保存音频标签时,它都会忽略它。我试过taApplyCustomRenderers。但即便如此,它也没有正确地渲染它。它是插入时,我按工具栏按钮。但是当我试图保存文件时,它只是省略了音频标记和它的所有属性。请帮帮我
发布于 2014-12-18 04:15:57
我在角消毒液中添加了音频标签,它解决了我的问题。
https://stackoverflow.com/questions/27484612
复制相似问题