Questions tagged [paragraph]

The paragraph concept in any UI renderer.

The paragraph concept in any UI rendering application.

Can also refer specifically to the HTML <p>.

809 questions
6
votes
4 answers

Highlighting long sentences using jQuery

I'd like to highlight long sentences (say, 50 words or greater) contained in an array of paragraph objects on a page, ie $("#content p"). I'm not sure how to tackle this. I originally tried to highlight all sentences, but ran in trouble when they…
6
votes
5 answers

Formatting sentences in a string using C#

I have a string with multiple sentences. How do I Capitalize the first letter of first word in every sentence. Something like paragraph formatting in word. eg ."this is some code. the code is in C#. " The ouput must be "This is some code. The code…
AlwaysAProgrammer
  • 2,927
  • 2
  • 31
  • 40
6
votes
5 answers

How to compare two paragraphs of text?

I need to remove duplicated paragraphs in a text with many paragraphs. I use functions from the class java.security.MessageDigest to calculate each paragraph's MD5 hash value, and then add these hash value into a Set. If add()'ed successfully, it…
mojiayi
  • 187
  • 1
  • 2
  • 11
6
votes
6 answers

Make a space between paragraph (X)HTML and CSS

I want space between my

content

tags. Not before and not after

tags. For example, my code is:

A headline

Some text

Some text

Something I don't want space between h1 and p which is done with…
Lasse Espeholt
  • 17,622
  • 5
  • 63
  • 99
6
votes
4 answers

Regex for replacing

with

tag?

I need to replace all:

content

with

content

in a string of content. Basically i just want to replace the "p" with a "h2". This is what i have so…
qwerty
  • 5,166
  • 17
  • 56
  • 77

6
votes
2 answers

iText - Adding external image using Chunk

I am new to iText and faced with a real interesting case about adding external images to a paragraph. Here is the thing: Document document = new Document(); PdfWriter.getInstance(document, new FileOutputStream("out2.pdf")); document.open(); …
caca
  • 197
  • 2
  • 3
  • 8
5
votes
3 answers

Force paragraph to use the maximum height available

I have a series of divs which contain a small paragraph of text. I would like to make all the divs of the same height and vary the width as required to fit the paragraph. If I was to do this in the vertical direction I would just set the width of…
Jonathon L
  • 61
  • 1
  • 5
5
votes
2 answers

Using Smarty to strip P tags from my HTML

I'm using this code {$entry.entry|strip_tags} to strip tags, however I would just like to strip

tags and not all HTML tags. Can someone help? Thank you

michaelmcgurk
  • 6,367
  • 23
  • 94
  • 190
5
votes
2 answers

How do I surround all text pieces with paragraph tags?

I want to put paragraph tags around any text items. It should therefore avoid tables and other elements. How do I do that? I guess it somehow can be made with preg_replace?
Peter Westerlund
  • 741
  • 1
  • 10
  • 36
5
votes
0 answers

Paragraph and Bullets in Android

I'm working on a book app which is connected to a web admin. I have added information about an author using paragraph and bullets in the web admin and it displays well but on the app, the paragraphs and bullets do not display and the text is all…
CMS
  • 59
  • 1
  • 5
5
votes
5 answers

Setting font to paragraph in pdf using iText java

I was trying to create pdf using iText in java. And am failed when I tried to set font to paragraph. The exact problem is only the font size is not getting applied. I used the following code. StringReader strReader = new…
Nims
  • 101
  • 1
  • 2
  • 3
5
votes
4 answers

How do I suppress spacing between paragraphs of the same CSS class?

What I'd like to do is make something like ...

Line of class A

Line of class B

Line of class B

Line of class B

Line of class C

Line of class C

Tony
  • 1,221
  • 2
  • 12
  • 25
5
votes
1 answer

MigraDoc: How to apply vertical line spacing to a paragraph?

I am creating a PDF using MigraDoc. Everything works fine except the setting of line spacing of a paragraph. I want to have more vertical space between paragraph lines. What I tried so far without any change in the resulting PDF: string text =…
Thariama
  • 50,002
  • 13
  • 138
  • 166
5
votes
2 answers

arnold/book cipher with python

I'm trying to write a book cipher decoder, and the following is what i got so far. code = open("code.txt", "r").read() my_book = open("book.txt", "r").read() book = my_book.txt code_line = 0 while code_line < 6 : sl =…
user7451333
  • 145
  • 1
  • 2
  • 11
5
votes
3 answers

Grep whole paragraphs of a text containing a specific keyword

My goal is to extract the paragraphs of a text that contain a specific keyword. Not just the lines that contain the keyword, but the whole paragraph. The rule imposed on my text files is that every paragraph starts with a certain pattern (e.g. Pa0)…
Kyriakos P.
  • 51
  • 1
  • 1
  • 2