Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1041857

    Hello Support-Team,

    I have a problem with the linebreaks (</br>) in an avia_textblock (At the item: “Biographie”)

    We get the data for the textbox with an ajax-request (see below) from another application. The Request and the input works, but not the including linebreaks in the text. They are just shown, for example </br>. Can you please tell me what special character I have to put in the text, so that the linebreaks works and not shown as </br>? Thanks a lot.

    $(document).ready(function () {
    $.ajax({
    url: “xxx”,
    type: “GET”,
    dataType: “json”,
    data: {id: personId },
    success: function (result) {
    setData(result);
    }
    });
    });

    #1042303

    Hey ZobelChristoph,

    Thanks for the link, though I’m not sure I understand what you are referring to. It looks like you have put the data into tables and it looks fine on my end?

    Best regards,
    Rikard

    #1042431

    Hallo Rikard,

    thank you for try to help me.

    So in my Backend (not WordPress, its an own mvc-Application written in php) I export some data from a database. What you have seen, was the result with no <br> because I replaced them in my mvc application with this follwing command, before I send it back to the before adressed ajax-request from the code block-Element of WordPress, where we use the ajax command vom JQuery to get the data.

    This line is now comment out:
    $result[0][‘detailed_bio_text’] = str_replace(‘<br>’, ‘ ‘, $result[0][‘detailed_bio_text’]);

    So now I comment out this line above and you see in the biograhie text the <br>. The problem is, that they should work there as a linebreak of course. To the question is, what I have to do, that they work?

    The text is:

    Adolf Bach wurde am 6. Oktober 1874 in Acholshausen geboren. Er war der Sohn von Jakob Bach und Karolina, geb. Hecht. Später zog die Familie nach Gaukönigshofen. Adolf Bach heiratete schließlich Lina Flamm aus ebendiesem Ort. Er war als Kaufmann tätig. Ob das Ehepaar Kinder hatte, ist nicht bekannt.
    <br>
    <br>Adolf und Lina Bach lebten auch 1939 noch in Gaukönigshofen, konkret im Haus Nr. 123. Damals sahen sie sich aber bereits gezwungen, ihr Anwesen zu verkaufen – eine Folge des Novemberpogroms 1938. Deshalb lebten beide später noch im Sammelquartier Dürerstraße 20 in Würzburg, das dazu da war, die Jüdinnen und Juden für die Deportation zu konzentrieren. Dort lebte auch Adolfs älterer Bruder Isaak Bach. Am 23. September 1942 wurden alle drei nach Theresienstadt verschleppt. Adolf Bach starb am 10. Januar 1943, wohingegen Lina Bach noch so lange durchhielt, dass sie 1944 nach Auschwitz deportiert und ermordet wurde.
    <br>

    If you need access to the wordpress-system, just let me know.

    It would be really great, if we could get this working.
    Nice Greets,
    Christoph

    #1043881

    Hi Christoph,

    The data type that you’re specifying is json and the text and the tags are not json. You might want to improve your setData function. Can you show it to us?

    Best regards,
    Victoria

    #1043882

    Hi Christoph,

    The data type that you’re specifying is json and the text and the tags are not json. You might want to improve your setData function. Can you show it to us?

    Best regards,
    Victoria

    #1044176
    This reply has been marked as private.
    #1045997

    Hi ZobelChristoph,

    Well, looks like you need to do more text processing for the bio text, but it is out of the scope of our support to do such customizations.

    https://cl.ly/dfa26332f17b You need to adjust this part here.

    Best regards,
    Victoria

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.