CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Set CiviCRM to be entirely plain text
Pages: [1]

Author Topic: Set CiviCRM to be entirely plain text  (Read 758 times)

Stuart Parker

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 2
  • CiviCRM version: 4.5.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.63
  • PHP version: 5.2.14
Set CiviCRM to be entirely plain text
March 30, 2011, 03:39:10 am
I'm having various problems with rich text formatting and have decided that i'd like all my content in CiviCRM to be plain text. One reason for this is that I want certain users to be able to encrypt sensitive data with a javascript plugin, but this doesn't work in a rich text editor, presumably due to javascript conflicts. :(

However, whenever text is displayed in CiviCRM, it assumes that it is rich text. This means that all plain text newlines are ignored when a text box is displayed (for example, in the Details of an activity) and therefore all the separate lines are concatenated into a single hard-to-read line. >:(

I don't want my users to have to know html formatting when entering plain text. ???

Is there a way of configuring all the viewing screens so that they will display text boxes as plain text rather than rich text?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Set CiviCRM to be entirely plain text
March 30, 2011, 10:12:34 am
Not sure where it's best to do it, when you read/display of when you save it.

I don't know if there is a single code where you could add that for every textarea content:
1) check if the text is text only (strip_tags (text) == text is probably the safest)
2) run a nl2br to add the html new lines

Or you could add it on the javascript side.
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Set CiviCRM to be entirely plain text

This forum was archived on 2017-11-26.