Is there an option, plugin, planned featured, or any hope for being able to paste HTML/RTF into Discourse?
I’m asking – because my community has asked me repeatedly – for the ability to paste content from Google Docs, emails, Word documents, and the like into Discourse’s editor while preserving basic formatting, especially links.
I’m not asking for a WYSIWYG editor. Most of my folks would be perfectly happy with an on-the-fly conversion into Markdown. Or whatever magic accomplishes this most basic of tasks.
Can i haz please?
A specific scenario (with some friendly ranting )
The other admin at my community (the director of the organisation) wanted to comment on our forum about an email he received from a mailing list.
He tried copying and pasting the email into Discourse’s editor, but that didn’t preserve the links.
He forwarded the email into Discourse, but that staged a user based on the sender of the original email (who is unrelated to our community). This isn’t what he was trying to do. He deleted this user, which then also deleted the post.
At this point, I noticed what was happening and asked him what he was trying to do. He wrote:
i wanted to share and comment on that but decided it wasn’t worth further time spent on it
I asked him to forward the email to me. I copied and pasted it in Sublime Text. I spaced out the paragraphs and added URLs for the links. I escaped a # which made a hashtag into a heading. I added a space in front of one URL, because that’s the only way to prevent a onebox from unfurling there, which was very confusing in that context. For good measure I made the whole thing a blockquote, by adding > in the beginning of every line, making short work of all this with Sublime Text’s multiple cursors. I then sent him the prepared Markdown, ready for posting.
However, it should take fewer than two people to copy and paste an email into Discourse.
The composer does a pretty great job letting you do things like paste or drag and drop images and have the Right Thing happen, but formatted text, not so much.
I thought @sam meant detecting whether the clipboard holds RTF content. Alternatively, if it’s not too onerous, run everything through the conversion function when pasting.
Edit: I tried the converter with the actual email I mentioned in the OP. It’s pretty good. It doesn’t distinguish between paragraphs and line breaks, so it spaces some things too widely, but that might be fixable and is not the end of the world. Pasting the result into Discourse resulted in a onebox was still confusing in context. But overall
If something along these lines was implemented it would be useful if there was (hidden behind the cog) a “paste as a quote” option. Making content into a blockquote in Markdown is onerous for those without text editor habits.
I’d like to add another use case to my original one.
I’ve been slowly working to centralize my organization’s communication to our Discourse forum. One of the results is that I’ve been seeing a lot of attached docx and pdf files recently.
It turns out that when our forum members want to post any extensive piece (i.e., more than a couple paragraphs) of text, they draft it first in an external program – generally Word or Google Docs. That seems reasonable. I do the same, except I use a text editor, because I’m a dork.
When the time comes to post their text on the forum, my members discover that there’s no obvious way to copy-paste the text to the site, while preserving formatting. So what they do is post a brief message, such as “Here is my informal report from my attendance to XYZ event” and attach a relevant Word Document or PDF.
As you can imagine, this makes it unlikely that anyone will read what they post.
I can’t be the only person that has to deal with this problem. How do other people deal with it?
Yes! It’s better than clipboard2markdown which doesn’t handle lists at all well.
I haven’t done enough research to know whether the issue is with clipboard2markdown’s implementation (which is over a year old) or with [domchristie/to-markdown), the JS Markdown converter which does the converting.
I don’t mind collaborative authorship on Google Docs. I actually encourage it over sending messages back-and-forth (in whatever medium). If you’re trying to work on a document with another human, there are only two games in town: Google Docs and Quip. I like Quip, but we can’t afford it. We’re a non-profit organization which works with dozens of volunteers and their $$$/user/month model prices us out. (I’ve told them that, and their response was ¯\_(ツ)_/¯)
So we use Google Docs a lot, but its discussion features are very limited. I encourage discussions about documents in Discourse or email. This works reasonably well.
My original point was how to help people who draft documents in Google Docs (or MS Word or Evernote or whatever) out of a well-founded fear of typing for a long time in a text box. There’s no easy step between that kind of HTML/RTF document and Discourse. This is for single-author texts, not for collaborative editing. But a solution would help out both cases.
D’oh! So it is! That was not the most important part of the rant in my OP, but the advice is well taken. I’ve been telling people to use [quote]…[/quote] for quoting chunks, but it’s better to suggest the built-in solution (which also happens to be correct Markdown).
Redis — We use Redis as a cache and for transient data.
Plus lots of Ruby Gems, a complete list of which is at /master/Gemfile.
Contributing
Discourse is 100% free and open source. We encourage and support an active, healthy community that accepts contributions from the public – including you!
Before contributing to Discourse:
Please read the complete mission statements on discourse.org. Yes we actually believe this stuff; you should too.
Not sure what to work on? We’ve got some ideas.
We look forward to seeing your pull requests!
Security
We take security very seriously at Discourse; all our code is 100% open source and peer reviewed. Please read our security guide for an overview of security measures in Discourse, or if you wish to report a security issue.
Copyright 2014 - 2017 Civilized Discourse Construction Kit, Inc.
Licensed under the GNU General Public License Version 2.0 (or later); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Discourse logo and “Discourse Forum” ®, Civilized Discourse Construction Kit, Inc.
And it’s more fucking perfect than the last guy’s.
Seriously, it takes minimal fucking effort to improve this shit.
7 fucking declarations.
That’s how much CSS it took to turn that grotesque pile of shit into this easy-to-read masterpiece. It’s so fucking simple and it still has all the glory of the original perfect-ass website:
Shit’s still lightweight and loads fast
Still fits on all your shitty screens
Still looks the same in all your shitty browsers
The motherfucker’s still accessible to every asshole that visits your site
Shit’s still legible and gets your fucking point across
And guess what, motherfucker:
You never knew it, but it’s easy to improve readability on your site. Here’s how.
Let it breathe
Look at lines 1 and 2 of some shitty website you’re building. Assuming they’re not married they probably shouldn’t be humping. The defaults are trash – pick a minimum line-height: 1.4 for body copy. Headings should be tighter. If you can’t see that…piss off.
If your text hits the side of the browser, fuck off forever. You ever see a book like that? Yes? What a shitty book.
A little less contrast
Black on white? How often do you see that kind of contrast in real life? Tone it down a bit, asshole. I would’ve even made this site’s background a nice #EEEEEE if I wasn’t so focused on keeping declarations to a lean 7 fucking lines.
Size Matters
I know your partner says otherwise, but it’s true. Bump that body copy to render close to 16px or more. Smaller type works well for print, not the screen.
Line-width, motherfucker
Looking at an LCD screen is strainful enough. Don’t make me read a line of text that’s 200 fucking characters long. Keep it to a nice 60-80 and users might actually read more than one sentence of your worthless dribble.
Yes, this is also fucking satire, you fuck
I love what the creator of this site’s inspiration did. What I’m saying is that it’s so, so simple to make sites easier to read. Websites are broken by default, they are functional, high-performing, and accessible, but they’re also fucking ugly. You and all the other web designers out there need to make them not total shit.
“You’re a fucking moron if you use default browser styles.”