-
AuthorPosts
-
December 6, 2018 at 11:00 pm #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);
}
});
});December 8, 2018 at 4:26 am #1042303Hey 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,
RikardDecember 8, 2018 at 12:27 pm #1042431Hallo 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,
ChristophDecember 11, 2018 at 5:32 pm #1043881Hi 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,
VictoriaDecember 11, 2018 at 5:32 pm #1043882Hi 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,
VictoriaDecember 12, 2018 at 8:45 am #1044176This reply has been marked as private.December 16, 2018 at 6:16 pm #1045997Hi 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 -
AuthorPosts
- You must be logged in to reply to this topic.