1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

TinyMCE - new line issue temporary fix, image floats implemented (image

browser)
This commit is contained in:
SecretR
2013-02-20 17:44:33 +02:00
parent 2c82a08cd2
commit 8358817952
2 changed files with 13 additions and 1 deletions

View File

@@ -17,7 +17,9 @@ if($_POST['mode'] == 'tohtml')
{
$content = $tp->toDB($_POST['content']);
e107::getBB()->setClass($_SESSION['media_category']);
echo $tp->toHtml(str_replace("\n","",$content), true);
// XXX @Cam this breaks new lines, currently we use \n instead [br]
//echo $tp->toHtml(str_replace("\n","",$content), true);
echo $tp->toHtml($content, true);
e107::getBB()->clearClass();
}

View File

@@ -36,6 +36,10 @@ $(document).ready(function()
eMediaAttribute();
});
$("#float").change(function () {
eMediaAttribute();
});
function eMediaAttribute(e)
{
@@ -57,6 +61,7 @@ $(document).ready(function()
var margin_bottom = $('#margin-bottom').val();
var margin_right = $('#margin-right').val();
var margin_left = $('#margin-left').val();
var _float = $('#float').val();
if(width !='')
{
@@ -87,6 +92,11 @@ $(document).ready(function()
{
style = style + 'margin-bottom:' + margin_bottom + 'px;';
}
if(_float =='left' || _float =='right')
{
style = style + 'float:' + _float + ';';
}
bb = '[img';