Inline Styling Decorator for Rich Text Block

Hey cool people,

When I upgraded my project to 4.20 I realized that the experimental RichTextBlock in the engine (that I was using via this discontinued plugin) no longer functioned as it did previously.

Developers used to be able to add <span> tags inline around sections of text changing their font, size, color, and emphasis.

As of 4.20, the new RichTextBlock functions differently by default in that developers must statically pre-define all of their styles in a data table, then use inline tags to determine which style should apply to different sections of text. This is great for defining reusable styles which can be used across a project, but not so great when the styling needs to be generated dynamically.

It didn’t take me too long to figure out how to re-purpose the old decorator logic and make it compatible with the new RichTextBlock in 4.20, but I did notice a few others also missing the old logic and wondering what happened to it.

So here’s a free plugin that takes Epic’s original decorator from before 4.20 and exposes it to be usable with the new 4.20 RichTextBlock. Simply install the plugin and add the decorator class to any RichTextBlock widgets that you wish to use it with.

This allows the RichTextBlock to process tags as it previously did, and any Projects using the old RichTextBlock that are upgrading to 4.20 can use this to re-enable the same styling behavior.

Get it right here:
Marketplace
GitHub

Enjoy!

2 Likes

Holy ****. You’re a god. Thanks man, I really appreciate that.

The new system frankly sucks ■■■, excuse my french.

Awesome! Thanks!!!

You’re welcome! Not too much effort to wrap up what I already had in a plugin.

I think there are good parts. Generally the style table seems useful to avoid repeating the same markup all over the place, and being able to add on extra decorators makes the whole thing very extensible and allows me to make this plugin, as well as opening up many other possibilities for more functionality.

The only question I have is why the old decorator wasn’t kept around as optional like how it is in this plugin, in addition to the new stuff - I know it was experimental so developers were using it at their own risk, but it can still do things that the style table cannot.

Now available on the marketplace as a free plugin:

any chance you can build the ios and android plugin, so I can use this extension on mobile?

This is super awesome. Been away from UE for a while and after updating I found out that URichTextBlock has been changed so I got the dreaded Unable to find Slate Widget Style ‘span’ :stuck_out_tongue:

My question though is whether there’s a license for this or not?

Hi,

Is there some sample code for hooking up to the ‘RichTextBlock’ 4.20 code?

Thanks.

texture from the table we can make a wavy line, a dotted line, and even a background for the text - system filled="(texture id from table) (color = 0 to not texture update color) (fill or left or center or rinht) (fill or up or center or down) (0=before text or 1=behind text)"
<span color="#ffffffff" size=“20” filled=“texture #ffffffff fill fill 0” hower=“color=”#ffffffff" size=“20” filled=“texture #ffffffff fill fill 1"” >fill fill texture0=before text.</>
<span color="#ffffffff" size=“20” filled=“texture #ffffffff fill up 0”>fill up texture 0=before text.</>
<span color="#ffffffff" size=“20” filled=“texture #ffffffff fill center 1”>fill center texture 1 =behind text.</>
<span color="#ffffffff" size=“20” filled=“texture #ffffffff fill down 1”>fill down texture 1 =behind text.</>
<span color="#ffffffff" size=“80” filled=“texture #ffffffff cencer fill 0”>center fill texture0=before text.</>

I update plugin 4.22 add Alligned Wrap Box
Update Corrected file SAlignedWrapBox.h:
//#include “Widgets/SPanel.h”
//#include “Layout/Children.h”
#include “SlateBasics.h”](https://drive.google.com/open?id=1RcVBXSvQkRBrpBChLDRWSHXUwQdhTgSM)

Hi!

The link you provided gets me a 404, could you update it please?

I still can’t access. Maybe it’s not shared inside google drive?

https://drive.google.com/open?id=1LGpLBkpHFAFE7FgHir172f73VhWnq_yA


Plugin + this content

A bunch of times re-create
Dreia#7828 Diskord

Thanks, now the link works.

The only thing is that, when I try to open anything that was using the old plugin version crashes.

The log says this:


[2019.06.09-03.18.15:349] 14]LogWindows: Error: [Callstack] 0x00007ffe1c666a81 UE4Editor-RichTextBlockInlineDecorator.dll!FDefaultRichTextDecorator::ExplodeRunInfo() [d:	est_4.22\plugins\richtextblockinlinedecorator\source\richtextblockinlinedecorator\private\richtextblockinlinedecorator.cpp:239]
[2019.06.09-03.18.15:349] 14]LogWindows: Error: [Callstack] 0x00007ffe1c66601b UE4Editor-RichTextBlockInlineDecorator.dll!FDefaultRichTextDecorator::CreateTextBlockStyle() [d:	est_4.22\plugins\richtextblockinlinedecorator\source\richtextblockinlinedecorator\private\richtextblockinlinedecorator.cpp:117]
[2019.06.09-03.18.15:349] 14]LogWindows: Error: [Callstack] 0x00007ffe1c665b83 UE4Editor-RichTextBlockInlineDecorator.dll!FDefaultRichTextDecorator::Create() [d:	est_4.22\plugins\richtextblockinlinedecorator\source\richtextblockinlinedecorator\private\richtextblockinlinedecorator.cpp:101]
[2019.06.09-03.18.15:349] 14]LogWindows: Error: [Callstack] 0x00007ffe3640aa4b UE4Editor-Slate.dll!FRichTextLayoutMarshaller::AppendRunsForText() [e:\ue4-22 source\unrealengine-4.22\engine\source\runtime\slate\private\framework	ext\richtextlayoutmarshaller.cpp:146]
[2019.06.09-03.18.15:349] 14]LogWindows: Error: [Callstack] 0x00007ffe3647ab23 UE4Editor-Slate.dll!FRichTextLayoutMarshaller::SetText() [e:\ue4-22 source\unrealengine-4.22\engine\source\runtime\slate\private\framework	ext\richtextlayoutmarshaller.cpp:51]
[2019.06.09-03.18.15:349] 14]LogWindows: Error: [Callstack] 0x00007ffe365c3b90 UE4Editor-Slate.dll!FSlateTextBlockLayout::UpdateTextLayout() [e:\ue4-22 source\unrealengine-4.22\engine\source\runtime\slate\private\widgets	ext\slatetextblocklayout.cpp:201]
[2019.06.09-03.18.15:349] 14]LogWindows: Error: [Callstack] 0x00007ffe365a9d06 UE4Editor-Slate.dll!FSlateTextBlockLayout::ComputeDesiredSize() [e:\ue4-22 source\unrealengine-4.22\engine\source\runtime\slate\private\widgets	ext\slatetextblocklayout.cpp:72]
[2019.06.09-03.18.15:349] 14]LogWindows: Error: [Callstack] 0x00007ffe365aa0f0 UE4Editor-Slate.dll!SRichTextBlock::ComputeDesiredSize() [e:\ue4-22 source\unrealengine-4.22\engine\source\runtime\slate\private\widgets	ext\srichtextblock.cpp:79]
[2019.06.09-03.18.15:349] 14]LogWindows: Error: [Callstack] 0x00007ffe3606d278 UE4Editor-SlateCore.dll!SWidget::CacheDesiredSize() [e:\ue4-22 source\unrealengine-4.22\engine\source\runtime\slatecore\private\widgets\swidget.cpp:621]
[2019.06.09-03.18.15:349] 14]LogWindows: Error: [Callstack] 0x00007ffe36102f4d UE4Editor-SlateCore.dll!SWidget::SlatePrepass() [e:\ue4-22 source\unrealengine-4.22\engine\source\runtime\slatecore\private\widgets\swidget.cpp:520]
[2019.06.09-03.18.15:349] 14]LogWindows: Error: [Callstack] 0x00007ffe36102efd UE4Editor-SlateCore.dll!SWidget::SlatePrepass() [e:\ue4-22 source\unrealengine-4.22\engine\source\runtime\slatecore\private\widgets\swidget.cpp:512]


As you can see I’m using source version of the engine. Thank you for updating the plugin, it’s just my bad luck with these things.

Create an empty c ++ project, drop the plugin into it and delete the Intermediate folder in the plugin and Binaries delete the sln file in the project root. right-click on uproject to select the new sln generation in the menu. Just run uproject should crash everything.

Oh sorry, I did not immediately understand that you are trying to old content. In general, the plugin is recompiled in the above way. I created an alternative to Bp which is easier to understand than with ++. My alternative allows you to solve all the problems of the original. My system is adaptable for updates! That is, they won’t fix the text, we can implement our own underline and strikethrough, and so on.

I would share the alteration of a paid plug-in static variables. They completely take on the role of an instance from me. Variables System in Code Plugins - UE Marketplace

ProjectStyleTextExample.7z - Google Drive current

Doing this I looked into the pulgin’s uproject file, changed engine version 4.21 to 4.22 and now works perfectly, thank you.

That would be interesting, for my project purpose I only need it to change color in the same text but my designer is looking for alternatives with more text formats, he makes text in photoshop with a lot of detail but in Unreal it’s so basic, maybe I’m missing something.

Here is a link for the plugin just compiled for 4.22, no extras:
https://mega.nz/#!owFjHIbb!YSw_m7LfA…Qjak85D5ft2ASY