Now inserting mediaId in the link picker and setting the isMedia flag so that you can get mediaId's from the linkPicker dialogservice
This commit is contained in:
@@ -181,6 +181,7 @@ tinymce.PluginManager.add('umbracolink', function(editor) {
|
||||
currentTarget: currentTarget,
|
||||
callback: function (data) {
|
||||
if (data) {
|
||||
console.log(data);
|
||||
var href = data.url;
|
||||
|
||||
function insertLink() {
|
||||
@@ -208,8 +209,8 @@ tinymce.PluginManager.add('umbracolink', function(editor) {
|
||||
return;
|
||||
}
|
||||
|
||||
//if we have an id, it must be a locallink:id
|
||||
if(data.id){
|
||||
//if we have an id, it must be a locallink:id, aslong as the isMedia flag is not set
|
||||
if(data.id && (angular.isUndefined(data.isMedia) || !data.isMedia)){
|
||||
href = "/{localLink:" + data.id + "}";
|
||||
insertLink();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user