使用角度引导模式在textAngular编辑器中插入链接 [英] use angular bootstrap modal for insert link in textAngular Editor
本文介绍了使用角度引导模式在textAngular编辑器中插入链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从angularjs引导模式用于插入链接,所以在textAngularSetup.js文件包括$模式的依赖,并在行动插入链接功能,使用它:
i want use from angularjs bootstrap modal for insert link , so in textAngularSetup.js file include $modal as dependency, and use it in insertLink action function:
taRegisterTool('insertLink',{
tooltiptext: taTranslations.insertLink.tooltip,
iconclass: 'icon-link',
action: function(){
var that=this;
var result={
texttodisplay:'ahmad',
webaddress:'',
isOk:''
}
var insertLinkmodalScope=$rootScope.$new();
insertLinkmodalScope.modalInstance=$modal.open({
templateUrl: 'editor/views/insertlink.client.view.html',
controller: 'EditorController',
size: 'sm',
scope:insertLinkmodalScope,
resolve:{
//pass result to modal
link:function(){
return result;
}
}
});
//define result modal , when user complete result information
insertLinkmodalScope.modalInstance.result.then(function(result){
if (result.isOk) {
return that.$editor().wrapSelection('createLink', result.webaddress, true);
}
});
},
activeState: ....,
onElementSelect: ....
});
当我在调试铬code,找出执行的命令,但在HTML编辑器没有影响。
是没有办法从引导模式用于插入链接?
when i debug code in chrome, find out the command executed but didn't affect in HTML editor. is any way to use from bootstrap modal for inset link ?
推荐答案
由于这个被要求在两个地方,我链接到这里GitHub的问题的答案:的 https://github.com/fraywing/textAngular/issues/419
As this was asked in two places, I'm linking to the answer in the github issues here: https://github.com/fraywing/textAngular/issues/419
这篇关于使用角度引导模式在textAngular编辑器中插入链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文