1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-29 18:47:54 +01:00

Merge pull request #3383 from SimSync/fix_mm_doubletag

Prevent media manager to insert an empty img tag
This commit is contained in:
Cameron 2018-08-16 17:08:09 -07:00 committed by GitHub
commit 4de78b893d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -212,6 +212,9 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
$htmlHolder.val($img.prop('outerHTML'));
}
// prevent empty tags
if (path == '') return;
// Only Do width/height styling on bbcodes --
if(width != '' && width !== undefined)
{
@ -240,7 +243,7 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
bb = bb + ']';
bb = bb + path;
bb = bb + '[/img]';
/*
if(target && target.charAt(0) != "#" && target.charAt(0) != ".")
{
target = "#" + target;
@ -268,6 +271,13 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
}
}
}
*/
// above code did directly write the tag to the target, without having clicked on "Save"
if($bbcodeHolder.length > 0)
{
$bbcodeHolder.val(bb); // Set the BBcode Value.
}
}
};