Questions tagged [plaintext]

Plain text refers to any string or sequence of characters that consists entirely of ASCII printable characters.

Plain text refers to any string or sequence of characters that consists entirely of ASCII printable characters (human-readable characters). The key attributes of a plain text are that the text that is not computationally tagged, specially formatted, or written in code.

496 questions
9
votes
1 answer

Paste html content as plain text in contenteditable div using AngularJs

I want to paste text selected from a certain document(pdf, docx, html), into a div of contenteditable type. Now I want to remove all the formatting of the clipboard text before it is rendered. So, the final content pasted should be a plain text. An…
jsbisht
  • 9,079
  • 7
  • 50
  • 55
9
votes
2 answers

Ruby on Rails: How to render file as plain text (without any HTML)

How do you render file as a plain/text in rails (without rendering any HTML)? I've tried: render file: "path/to/file", layout: false and render file: "path/to/file", content_type: 'text/plain' also both render file: "path/to/file", layout: false,…
wrystr
  • 101
  • 1
  • 1
  • 6
9
votes
2 answers

Best way to convert HTML to plaintext using Python

I'm working on a project that involves converting a large amount of HTML content to plain/text. I have a custom-written module that does the job OK, but I'm wondering if there's some standard tools to help get the job done.
Brian Tol
  • 4,149
  • 6
  • 24
  • 27
9
votes
2 answers

How to control line breaks in plain text email views (.text.erb)

Unlike most plain text email related questions, my problem is that there are too many line breaks in the plain text emails Rails is sending out. For simplicity while starting up, I ditched HTML emails altogether and just use plain text emails (using…
Felix
  • 674
  • 5
  • 16
9
votes
1 answer

Syntax Highlighting for plain text (Sublime Text)

I am a great fan of syntax highlighting in any form. But i am missing something similar for plain text files. Imagine different colors for indented lines or lines preceded by special chars. Does anything like that already exist? I'd especially…
Alp
  • 29,274
  • 27
  • 120
  • 198
8
votes
2 answers

Detecting a file's content-type when using JavaScript's FileReader interface

I've been setting up an import script for plain-text files in a web application. My script is as follows: function dataImport(files) { confirm("Are you sure you want to import the selected file? This will overwrite any data that is currently…
木川 炎星
  • 3,893
  • 13
  • 42
  • 51
8
votes
2 answers

Generating textual representation of directory contents

I'm looking for a script to generate the graphical-ish textual representations of directory structures that you see around. Something that I can run like this: james@computer:/.../basedir$ listdir . basedir |-firstsubdir | |-file | `-subsubdir | …
jameshfisher
  • 34,029
  • 31
  • 121
  • 167
8
votes
1 answer

plain text in Accept-Encoding HTTP Header

I'm writing a HTTP client which doesn't have any encoding algorithms built into it yet. Therefore, I was wondering if there is a value for Accept-Encoding header to indicate this? like: "none" for example, or "text/plain" or similar ?
astralmaster
  • 2,344
  • 11
  • 50
  • 84
8
votes
1 answer

Sending ONLY plain text e-mail, Rails mime part included in body

I have a rails app that sends out many notification e-mails. We have a desire to let the user choose plain text vs html. Initially our desire was always multipart so we didn't set a content type and simplyhad both the email.html.erb & email.text.erb…
JonathanSimmons
  • 1,528
  • 1
  • 16
  • 28
7
votes
2 answers

Huge amount of plaintext data for parsing experiment

I am developing a parser in ruby which parses some nonuniform text data. Can anybody tell me, where I can get a good number of plaintext data for that?
user724707
7
votes
0 answers

Is there any plain text colorizer for VS Code?

I´m looking for a way to colorize plain text files on Visual Studio Code. There is a plugin that does it for Vim, called "txt.vim". txt.vim : Universal syntax script for all txt docs, logs and other types "This is an universal syntax script for…
7
votes
4 answers

Retrieving AlternateView's of email

I can't seem to retrieve the AlternateView from System.Net.Mail.AlternateView. I have an application that is pulling email via POP3. I understand how to create an alternate view for sending, but how does one select the alternate view when looking…
Douglas Anderson
  • 4,652
  • 10
  • 40
  • 49
7
votes
1 answer

HTML output is being interpreted as plain text instead of being received as html

I'm sure this is just something dumb I'm doing, but I'm new to Go, so not sure what's going on here. I have the following basic setup. requestHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { t := template.New("test") …
meesterguyperson
  • 1,726
  • 1
  • 20
  • 31
6
votes
2 answers

send plain/text email and getting =0D=0A in email response from server

When i send a email from my site to Uniform http://co.za registrar and cc myself in the mail i get an email returned from them that they received the email, but cannot find some of the information as it has those funny characters added to it. I saw…
Louwki
  • 696
  • 1
  • 9
  • 21
6
votes
1 answer

Securely storing a password locally that is used for web service

I have an application that authenticates against a third party web service by sending a username and password. At the moment I'm typing the password on a winform each time I start the application - but I need it to login automatically. I'd like to…
Flash
  • 15,945
  • 13
  • 70
  • 98
1 2
3
33 34