- aliagha.huseynli
- Posts: 44
- Joined:
noesis RichText [img] doen't work
Hi,
I read the documentation you prepared
https://www.noesisengine.com/docs/App.A ... hText.html
everything works unless still raises the error invalid URL, but I tried many possibilities such as:
It doesn't work
Blend error:
Unity error(this happens when I add link inside img /img. not in local image file):
If I write weburl between img link shown in Blend side but it raises error in Unity side
I read the documentation you prepared
https://www.noesisengine.com/docs/App.A ... hText.html
everything works unless
Code: Select all
[img][/img]
Code: Select all
[img]Myimage.png[/img]
[img]Assets/Images/Myimage.png[/img]
[img]Images/Myimage.png[/img]
[img]MenuView/Myimage.png[/img]
Blend error:
Code: Select all
Error XDG0010 Invalid URI: The format of the URI could not be determined
Code: Select all
[NOESIS/E] Image not found '/cdn-cgi/image/w=1000,fit=contain,q=90,f=auto/library/content/images/size/w600/2023/10/free-images.jpg'
Last edited by aliagha.huseynli on 19 Dec 2023, 13:59, edited 2 times in total.
- aliagha.huseynli
- Posts: 44
- Joined:
Re: noesis RichText [img] doen't work
Where should I add this line? Could you please be more specific about what I should do to fix this issue?
Re: noesis RichText [img] doen't work
I use the native sdk, It may not be quite the same as yours.
Look at bottom of this topic viewtopic.php?t=3145
Look at bottom of this topic viewtopic.php?t=3145
- aliagha.huseynli
- Posts: 44
- Joined:
Re: noesis RichText [img] doen't work
No, unfortunately, it is not what I am facing. I said RichText works. I can see bold italic style changing color. Even weblink url text works. But I am unable to add local image file.
I follow the documentation. It says url invalid for img /img.
I follow the documentation. It says url invalid for img /img.
Re: noesis RichText [img] doen't work
I've tried, you just initialize noesis as required, you can display the local image in bbcode.
Code: Select all
Ptr<XamlProvider> xamlProvider = ...;
Ptr<LocalFontProvider> myFontProvider = ...;
Ptr<LocalTextureProvider> myTextureProvider = MakePtr<LocalTextureProvider>(".");
NoesisApp::SetThemeProviders(xamlProvider, myFontProvider, myTextureProvider);
Re: noesis RichText [img] doen't work
It seems the problem is that in Unity, rich text is not adding dependencies to the images it uses. For now, the workaround is manually registering these dependencies, as explained in the Unity tutorial.
- aliagha.huseynli
- Posts: 44
- Joined:
Re: noesis RichText [img] doen't work
I read this https://www.noesisengine.com/docs/App.A ... hText.html
The problem is not Unity for my first example.
As I said in this code everything works except img:
I know I should add myLocalImage.png. When I delete it works fine. I can see bold italic red so on.
I even tried many paths for my .png file. It doesn't work. Error code I shared in the first post.
(I see this error in Blend not in Unity, my Unity error is different check the first post please)
Anyway, I fixed my issue, I used only textblock's Run and InlineUIContainer. But it would be better I could use noesis richtext
The problem is not Unity for my first example.
As I said in this code everything works except img:
Code: Select all
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:noesis="clr-namespace:NoesisGUIExtensions;assembly=Noesis.GUI.Extensions">
<TextBlock noesis:RichText.Text="Plain. [b]Bold, [i]bold italic, [/i]
[size=60]Size 60 text.[/size] [color=Red]Red text.[/color] [img height=80]disk.png[/img]
[br/] [url='https://www.noesisengine.com/']NoesisEngine.com[/url]" />
</Grid>
Code: Select all
[img height=80]ANYIMAGEFILE.png[/img]
I even tried many paths for my .png file. It doesn't work. Error code I shared in the first post.
(I see this error in Blend not in Unity, my Unity error is different check the first post please)
Anyway, I fixed my issue, I used only textblock's Run and InlineUIContainer. But it would be better I could use noesis richtext
Re: noesis RichText [img] doen't work
There is a limitation (not well documented) with RichText. The tag [img] requires absolute URIs (eg: Assets/Samples/NoesisGUI/3.2.2/Localization/Flag-en.png). With this and manually registering the dependencies in the XAML, this should work.
Please, create a ticket to see if we can improve the implementation to be more flexible.
Please, create a ticket to see if we can improve the implementation to be more flexible.
Who is online
Users browsing this forum: No registered users and 4 guests