Hacker News new | past | comments | ask | show | jobs | submit login

I don't think I quite get this. Everything I paste here shows up in plain text. It doesn't automatically do any syntax highlighting; it only seems to work if you're already copying rich text to begin with.



Here's an example. Using Chrome on OSX I did a quick `select-all` then `copy`, switched to the ctxt.io tab, gave the text area focus then `paste`. I ended up with this - https://ctxt.io/2/AAAAYGAfEw

I think "only works if you're copying rich text to begin with" is the kinda the point.

(I'm not affiliated with ctxt.io at all, just trying to understand it like you are.)


I guess I have to do better on the value proposition. Yes, there are many other of pastebins that work on code or plaintext for syntax highlighting (which might be the use case you're thinking of), but there is virtually no solution that works on rich text. Pasting rich text into any of these solutions wouldn't work, and many times I would love to keep the styles and just make the content readable (e.g. tables, paragraphs, headers, stay the same etc.)


Does Sublime Text's syntax highlighting count as rich text for this?


Not by default.

But you can install a plugin: http://monkeyhacks.com/post/sublime-text-3-copy-as-rtf-and-h...


You can paste snapshots / screenshots. With mezer tools, I can do a quick Win S, two clicks, one paste, copy/paste the URL and you get https://ctxt.io/2/AAAA4MNyFw .


This. There's absolutely no formatting, and pictures don't get pulled if I simply copy & paste. E.g. https://ctxt.io/2/AAAAwO8FEw


Which page did you do this on? You might need to use the browser extension for some pages. Some styles do not transfer without it. I can show you what it looks like with my browser extension if you let me know the URL you tried this on?


Not the person you replied to, but it's this article:

http://www.pcgamer.com/why-the-creator-of-dwarf-fortress-is-...

I get similar results when copy&pasting.


This is how it looks with the extension used: https://ctxt.io/2/AAAA4BMMFw

Still needs fixing some image proxying bugs, will work on it, thanks!


Same for me, copying out of a variety of editors/IDEs and it doesn't retain the font/syntax highlighting at all.


Does your IDE/editor support copying out as rich text? The ones I tried did and it worked. Maybe there's a setting for copying out with styles. If not, this isn't a use case I've primarily worked on yet, but I can try to support it later.


I can't see any such option in Atom, Sublime, or Eclipse to copy as rich text.

To be fair I didn't really expect it to work with automagically copying the syntax highlighting from my IDE, but it made it sound like it could.

It's definitely a useful project, and surprising that nothing else like it exists, but may be worth making it clearer that it's designed for rich text, and may or may not work with formatting when pasting for various programs.



Fair, I think I extrapolated too eagerly. Will think of a solution, including dropping the code use case. Terminal and web based output works at least.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: