Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Lexical weird characters in response

default discord avatar
thegatesdev7 months ago
8

The lexical response seems to have trouble with some characters, copy pasting the string

vóór

to the editor results in

vóór

in the result. Is there a solution to this?



Lexical weird characters in response



In the editor:



Raw result from Local API (excerpt):


{
   "root":{
      "children":[
         {
            "children":[
               {
                  "detail":0,
                  "format":0,
                  "mode":"normal",
                  "style":"",
                  "text":"vóór één",
                  "type":"text",
                  "version":1
               }
            ]
         }
      ]
   }
}
  • default discord avatar
    rilrom7 months ago

    Can you check whether this also happens in the lexical playground?



    https://playground.lexical.dev
  • default discord avatar
    thegatesdev7 months ago

    Doesn't look like it


    I get:


     root
      └ (1) heading 
    >   └ (47) text "vóór één"
  • default discord avatar
    rilrom7 months ago

    Cool, we can rule out it being a lexical bug.

  • default discord avatar
    thegatesdev7 months ago

    Maybe a Local API issue only?



    I'm using a normal

    find

    with pagination disabled



    Field is this


    {
      name: "content",
      type: "richText",
      required: true,
      label: "Tekst",
    },


    I'm using the SQLite adapter



    Maybe SQLite is not handling UTF-8 correctly

  • default discord avatar
    rilrom7 months ago

    Could you please add the

    TreeViewFeature

    to your lexical editor config, this is a debug box that will show us what is in the lexical data immediately after pasting.

  • default discord avatar
    thegatesdev7 months ago


    Seems to show up normally



    Result is:

    Monteer die tot één geheel en stuur je filmpje vóór woensdag...

    Well, give me a minute, it may be on my HTML display side



    It seems Astro is not serving my HTML

    raw

    even though the docs state so.


    Everything is fine in the console logs, so I'll ask them further about it.



    Thank you for looking at it anyways

  • default discord avatar
    rilrom7 months ago

    No worries! Good luck

  • default discord avatar
    thegatesdev7 months ago

    Love the active help here!

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.