Rich Text section, Template Builder

I am adding the Rich Text section to the Body of my template, Home > Reports > Template Builder > Edit Template.

When I type something out on multiple lines and hit submit, everything moves to a single line.
Likewise, I build a table and it disappears.
v23.0.02

@rossdotparker
@ross

Hi Tieku, sorry, I got half way through replying to this at the start of July, and then got distracted. Can you please test this in v24.0.00? I believe you are seeing the results of a bug that was fixed with the following MySQL change:

UPDATE gibbonSetting SET value=‘br[style|class],strong[style|class],b[style|class],em[style|class],span[style|class],p[style|class],address[style|class],pre[style|class],h1[style|class],h2[style|class],h3[style|class],h4[style|class],h5[style|class],h6[style|class],table[style|class],thead[style|class],tbody[style|class],tfoot[style|class],tr[style|class],td[style|class|colspan|rowspan],ol[style|class],ul[style|class],li[style|class],blockquote[style|class],a[style|class|target|href],img[style|class|src|width|height],video[style|class],source[style|class],hr[style|class],iframe[style|class|width|height|src|frameborder|allowfullscreen],embed[style|class],div[style|class],sup[style|class],sub[style|class],code[style|class],details[style|class],summary[style|class],pagebreak,columnbreak’ WHERE name=‘allowableHTML’ AND scope=‘System’;

You could always try and run this command on your v23.0.02 database to see if that solves the issue.

Cheers,

Ross

Hello Ross,

Home > Reports > Template Builder > Edit Template > Edit Section

I both upgraded to v24.0.00 and ran the SQL command but that didn’t fix it:
From the screenshots, you’ll see the HTML changes after I save/submit.


And after submitting:

Hi Tieku, thanks for these screenshots, which make it very easy to follow. I’ve verified that this is indeed happening in the Rich Text block in reports as you describe. However, it seems to be unique to this part in Gibbon, as it is not happening in, say, Messenger.

We’ll need input from @ross here, although that might take a couple of weeks. In the meantime, if your need is urgent, you could always create the HTML content you need and inject it direct into the database entry for this block (the table is gibbonReportTemplateSection), and then not edit it via the interface.

Cheers,

Ross

In the example I showed you

A B

in the editor shows up as

{“text”:“A\r
B”}
in the config column of gibbonReportTemplateSection table.

That does not look like HTML.

Hi Tieku, ah, that is interesting, it looks like it is being converted to use escape sequences, rather than HTML. For this one we’ll need to ask the reporting guru @ross. Cheers, Ross

@ross any help with this?

Hello @ross :slight_smile:

Hi Tieku, thanks for the reminder that this was an outstanding issue, it’s been a busy start of the school year! I’ve pushed a fix for this for v25, which is backwards compatible for v24: https://github.com/GibbonEdu/core/commit/396a5e8f85c071e6eacb50a628f92747813bcd07

Hi Sandra,

It’s working now.

However, I noticed that when I insert a special character from the rich text editor, it shows up as a question mark on the pdf report

I inserted an arrow ⇒

Special characters are usually UTF-8, and depend on the UTF-8 support of the font you’re using. Many of the default fonts only have basic UTF-8 support. Check the DroidSansFallback.ttf font that is included in resources/assets/fonts by default, it has pretty good character support.