Forum Activity for @ultrajam

SteveX
@ultrajam
06/18/16 12:23:12PM
2,589 posts

TinyMCE inserting line breaks into some list items


Jamroom Developers

I don't think so, but I'll double check that next week.
SteveX
@ultrajam
06/16/16 05:02:49PM
2,589 posts

Embed Local Media in TinyMCE not working in Chrome on iOS


Using Jamroom

What is this iPad perversion you speak of? I cannot imagine the horrors to be defended against. Where should we iWatch next?
SteveX
@ultrajam
06/16/16 04:58:37PM
2,589 posts

{if} statement - works in some templates not in others


Jamroom Developers

Luckily it's not possible that it is being ignored :)

Either $group_intro_video is not set, or it is not = null, or both.

What happens if you try one or the other?
SteveX
@ultrajam
06/16/16 05:15:09AM
2,589 posts

TinyMCE inserting line breaks into some list items


Jamroom Developers

Ok, that looks right - to get that to display right here I needed to replace the single quotes with double quotes around the br tags and added a space after $_tmp = explode(
SteveX
@ultrajam
06/16/16 05:08:35AM
2,589 posts

TinyMCE inserting line breaks into some list items


Jamroom Developers

function jrCore_remove_unwanted_breaks($string)
{ if (strpos(' ' . $string, "<br>")) { // fix ul if (strpos(' ' . $string, "<ul")) { $_tmp = explode( "\n", $string); if ($_tmp && is_array($_tmp)) { foreach ($_tmp as $k => $line) { if (strpos(' ' . $line, "><br>")) { $_tmp[$k] = str_replace("><br>", '>', $line); } } $string = implode("\n", $_tmp); } }

updated by @ultrajam: 06/16/16 05:11:53AM
SteveX
@ultrajam
06/16/16 05:05:50AM
2,589 posts

TinyMCE inserting line breaks into some list items


Jamroom Developers

Quote: function jrCore_remove_unwanted_breaks($string)
{
// fix ul
if (strpos(' ' . $string, '')) {
if (strpos(' ' . $string, ' $line) {
if (strpos(' ' . $line, '>')) {
$_tmp[$k] = str_replace('>', '>', $line);
}
}
$string = implode("\n", $_tmp);
}
}

NOTE: not right either
updated by @ultrajam: 06/16/16 05:06:59AM
SteveX
@ultrajam
06/16/16 04:47:12AM
2,589 posts

TinyMCE inserting line breaks into some list items


Jamroom Developers

I'm adding this in which gets rid of the br between ul and li
function jrCore_remove_unwanted_breaks($string)
{ // fix ul if (strpos(' ' . $string, '')) { if (strpos(' ' . $string, ' $line) { if (strpos(' ' . $line, '>')) { $_tmp[$k] = str_replace('>', '>', $line); } } $string = implode("\n", $_tmp); } }

NOTE: that doesn't look right - the forum is removing my br tags from the code! What is it with these pesky br tags!!!
updated by @ultrajam: 06/16/16 05:03:45AM
SteveX
@ultrajam
06/16/16 04:31:26AM
2,589 posts

TinyMCE inserting line breaks into some list items


Jamroom Developers

Would it be possible to have a trigger in jrCore_remove_unwanted_breaks?

I'd be able to control that for our validation and get rid of a lot of css that I've written to hide all the line breaks after heading elements, inside divs etc.

Thanks
SteveX
@ultrajam
06/16/16 03:42:25AM
2,589 posts

TinyMCE inserting line breaks into some list items


Jamroom Developers

Hi Brian,

It doesn't fix new entries either, a br tag is still inserted between the ul and the first list item.

It isn't there in the database, no \n or \r either, but there is an actual line break in the field.
  74