#Using Rich Text Editor to get UTF-8 text

1 messages · Page 1 of 1 (latest)

worthy mortar
#

Hi all,

I am trying to use the Rich Text Editor, as I need to have bullet points when users enter data, but afterwards I am only interested in the text - but it means that all my äöå characters are encoded as HTML entities. How can I convert these back to UTF-8? I have tried normal javascript approach with create a text element, but this doesn't work.

Is there any way to get just the text from the Rich Text Editor?

short lanceBOT
#

Hi There 👋
[https://assets.frontapp.com/emoji-data-13.1/img-apple-64/1f44b.png]

We've registered your query. Our team will get back to you soon.

If you are stuck with an issue/error, please help us with the following
information for faster debugging.

  1. Which version of Appsmith are you on?
  2. Provide screenshots/screen recordings of the original error/code snippet.
  3. Add details about your use case and provide steps to reproduce the issue, if
    possible.
short lanceBOT
#

Can you share the input/output combo with the JS you are using?

worthy mortar
#

of course, I am using a Rich Text Editor, and I am accessing its value through InstructionsInput.text

#

åäö comes out as: äåö

short lanceBOT
#

Hey, so this seems a little difficult to achieve at this point. Although, we've
got a custom JS libs feature coming up towards the end of the month that'll
let you import lib like this one - https://www.npmjs.com/package/html-entities
To solve this issue.

Preview -
https://discord.com/channels/725602949748752515/1006426744129069096/threads/1047738000483815484
[https://discord.com/channels/725602949748752515/1006426744129069096/threads/1047738000483815484]

Discord

Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.

Discord

Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.

worthy mortar
#

ah that is cool, looking forward to that feature! Will be helpful for a lot of stuff

#

could I also get your help with this issue? My storevalue isn't persisting across page refreshes, not sure if I am calling the appsmith.storein a wrong way, but it just returns undefined. even though I can see the data still stored in my browsers local storage

#

This is a snippet of my code: export default { getAccessToken: async () => { let respData = appsmith.store.tokenData;

#

respData returns undefined on page refresh, even thought tokenData exists in local storage.

short lanceBOT
#

Hi there! Sorry for the delay in response, we really appreciate your patience.
I'll make this known to our tech team and I'll give you a feedback soon.

In the meantime, can you try to await the call to the appsmith store and see if
it works?(i.e let respData = await appsmith.store.tokenData)