NetTalk Central

Author Topic: Paragraph alignment in TinyMCE  (Read 2986 times)

johanco123

  • Full Member
  • ***
  • Posts: 245
    • View Profile
    • Email
Paragraph alignment in TinyMCE
« on: January 19, 2015, 03:30:18 AM »
Hi Bruce
I am importing rtf code into a string field using TinyMCE with 'Allow Unsafe xHTML' selected on.

The paragraph style is working now correctly. If one of the paragraphs have a text-align = right, it shows the paragraph as right aline but shrink the second line into the first line.. It does not show the another paragraphs then. Please find attached a screenshot.

This is the code with the text alignment:

<head><style type="text/css" xml:space="preserve">
p
{ margin: 10px;padding: 0px;line-height: 100%;color:black;font-family: Times New Roman;font-size:0pt; }
</style></head>
<p style="text-align: center;"><span style="color:#080000;"><span style="font-family:Times New Roman;"><span style="font-size:11.5pt;">With reference to your broker code 165 and the fact that there is no active policies under this agency with Landmark, we hereby give notice that it is cancelled with immediate effect.</span></span></span>
</p><p>
</p><p>We would like to thank you for your support in the past.
</p><p>
</p><p>Please contact us do you wish to discuss any future business opportunities.
</p><p>
</p><p>Kind regards,
</p><p></p>

Hope you can assist with this problem.

Kind regards
Johan



[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Paragraph alignment in TinyMCE
« Reply #1 on: January 20, 2015, 12:10:59 AM »
>>  'Allow Unsafe xHTML' selected on.

That's a really bad idea. Unsafe xHTML does not mean "uncompliment xHtml" it means HTML with potential security risks.

>> The paragraph style is working now correctly. If one of the paragraphs have a text-align = right, it shows the paragraph as right aline but shrink the second line into the first line.

Seems like a css issue, which I guess is an issue with your RTF to HTML converter.

(Overall I'm not sure that RTF to HTML is such a good idea, but I've not gone down this road myself so I can't really comment one way or the other.)

Cheers
Bruce