Adding paragraphs to strings in JSON - json

I'm trying to add a paragraph to a long text. Already tried using tags like "\n", "\\n" and "\\r", but it's useless. Here's my string:
{
"text": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book."
}
Can't believe I've not been able to add a simple linebreak yet. Anyone, please?

Related

Is there any way to open link in anew tab from inner html (angular 6)

I have a span tag with inner html like this
In my html :
<span [innerHTML]="description"></span>
and in my ts:
description = "some random text https://stackoverflow.com/ Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s"
It displays the link but when I click on that link it is opening in the same tab but I want it be opened in a new tab.
Is there any way to do this?
In this case that you are using innerHtml property binding you can place a html link in your description text with target="_blank" to open the link in a new tab:
description =
'some random text https://stackoverflow.com/ Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s';

ReactJS: get mediumtext from MySQL and view formatted text

I have a very specific problem, so:
I have a medium text in My MySQL database. for example (with breakline):
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
I would like to get this text now using the get HTTP method and on my site display, all Lorem Ipsum in bold.
Is something possible to get?
I use ReactJS with Redux + Redux-Saga
or Maybe IN databases, I can insert the medium text in html but how to display it on the frontend then?
Store html and use dangerouslySetInnerHTML to render it. You can have a deeper look into it reading this post.
const text = '<strong>Lorem ipsum</strong> dolor sit';
const App = ({html}) => (
<div dangerouslySetInnerHTML={{ __html: html }} />
)
ReactDOM.render(<App html={text} />, document.getElementById('root'));
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>
<div id="root"></div>

Having issues adding a photo to XML file

Hello and thanks for looking into my issue, I am currently working with an XML file that is being pulled to create a directory list. What I am trying to achieve here is to display an image next to the person's name but it seems like no matter how I link it the image it doesn't display on the browser.
I have tried to add the image as ,
<profile>
<lastname>Sample Last name</lastname>
<firstname>Sample First name</firstname>
<middlename></middlename>
<lastfirstname>First_Last</lastfirstname>
<indextitle><![CDATA[Dean]]></indextitle>
<photo>photo.jpg</photo>
<bio>
<![CDATA[<p>Lorem Ipsum is simply dummied text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>]]>
</bio>
</profile>

Css word wrap with style [duplicate]

This question already has answers here:
Indent starting from the second line of a paragraph with CSS
(6 answers)
Closed 4 years ago.
i want to show second line of wrap text with space .
OUTPUT:
Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text
ever since the 1500s, when an unknown printer took
EXPECTED OUTPUT:
Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text ever
since the 1500s, when an unknown printer took
my code:
<style>p{
overflow:word-wrap;
}</style>
<p> Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text
ever since the 1500s, when an unknown printer took</p>
Thanks in advance.
This is pretty easy to handle. The trick is to add a little padding, and then actually "indent" the first line with a negative value. Sort of thinking outside the box.
p {
padding-left: 2em;
text-indent:-2em;
}
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text
ever since the 1500s, when an unknown printer took
</p>

How to select multiple blockquotes with sublime text and remove unecessary tags inside?

I have a huge XML file with multiple blockquotes code sections like this:
<blockquote>lorem Lorem Ipsum<i> is simply dummy text</i> of the printing and typesetting industry. "Lorem Ipsum has been the industry's standard dummy text" ever since the <b>1500s</b>, when an unknown printer <i>took a galley</i> of type and scrambled it to make a type specimen booki>
I need to select all the blockquote and content inside blockquote tags in order to remove and clean unnecessary tags like:
<i>, <em>, </em>, </p>, </i>, <b>, </b>, <strong>, </strong> and " inside the text.
End results:
<blockquote>lorem Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book</blockquote>