The new Editor

https://www.lesswrong.com/posts/BisQ5ZNxAS4mPjhcw/the-new-editor

Lookatthisglorioustable## **Celebrations! The new editor is finally here! ** Starting from today, all desktop users will by-default use the new visual editor that we’ve been testing for a while. While the primary goal of this is to have a better foundation on which to build future editor features, here are a number of things you can do starting from today:

Comment

https://www.lesswrong.com/posts/BisQ5ZNxAS4mPjhcw/the-new-editor?commentId=885eqmyRXPYhyz2bE

There’s a small bug I’ve noticed. Steps to reproduce:

  • Type.

  • Delete everything you’ve typed. The placeholder text will appear.

  • Type again. The new text will overlap with the placeholder text for a few seconds. Here’s what it looks like when the text overlaps the placeholder text: In the past I think I recall it taking longer than a few seconds for the overlap to go away.

Comment

https://www.lesswrong.com/posts/BisQ5ZNxAS4mPjhcw/the-new-editor?commentId=R6k3pbMspwwb8QG73

Yeah, I also noticed this. Should be easy to fix. The previous placeholder text implementation was a hack to deal with the old editor, but the new editor actually allows us to do this much more elegantly, so I will see when I get around to fixing this.

Comment

Awesome!

https://www.lesswrong.com/posts/BisQ5ZNxAS4mPjhcw/the-new-editor?commentId=8Rg3u34vNS7xMsW5q

I’m excited to see this, and have been enjoying using it.

I’m curious though; is it interoperable with other methods, or are there any projects on the horizon to convert this to Markdown if needed? I would like to have backups or possibly later post some of my LW content to other platforms.

I realize that probably couldn’t keep all the functionality (no fully isomorphic translation), but even some of it could be handy.

Comment

https://www.lesswrong.com/posts/BisQ5ZNxAS4mPjhcw/the-new-editor?commentId=Q8DNj7ap6fp7yavpg

Yep, we have markdown translation for all documents, and it should be basically fully interoperable (LaTeX is a bit janky, but I think everything else should work). You can get it either via the API, or you can activate the markdown editor in your user profile, and then edit any post that you edited in a non-markdown format. It will offer you to display the content in Markdown instead.

Comment

Good to know, thanks!

https://www.lesswrong.com/posts/BisQ5ZNxAS4mPjhcw/the-new-editor?commentId=YxES6GaiuEXL4nGCW

For a hackier approach, you can also feed html (which you can get from the graphQL API) to a utility like pandoc in order to obtain the markdown.

Comment

We do directly expose a markdown export via the graphQL API, so that sure would be a sad roundtrip :P

Comment

A markdown version of the body doesn’t to be in any of the possible fields of the Post type. Am I looking in the wrong place? I’m using this: https://​​www.lesswrong.com/​​graphiql

Comment

Should be part of the contents field: { post(input: {selector: {slug: "the-new-editor"}}) { result { contents { markdown } } } }

Comment

Ah, thanks!

https://www.lesswrong.com/posts/BisQ5ZNxAS4mPjhcw/the-new-editor?commentId=NQTh3ELxTXJgHPXnb

Love it. Never tried the old editor, but had tried writing posts a couple times in the past, on other sites. I’d always get stuck screwing with the editor settings and trying to figure it out, or losing my work, or whatever. This current LW editor makes it so easy that I finally finished a post (and then two more)! The editor isn’t the whole reason for that, but it’s definitely a factor.

https://www.lesswrong.com/posts/BisQ5ZNxAS4mPjhcw/the-new-editor?commentId=pfosinu49WETZ8sPd

Is it possible to insert tables via the Markdown editor?

Comment

https://www.lesswrong.com/posts/BisQ5ZNxAS4mPjhcw/the-new-editor?commentId=ovTc6vq8SNp84mmQJ

! Yes !

it certainly is

Syntax guide here. Alternatively, click on ‘FAQ’ in the left panel and CTRL+F for ‘Markdown’; that’s how I found it.

https://www.lesswrong.com/posts/BisQ5ZNxAS4mPjhcw/the-new-editor?commentId=ZninvKCphSDyusSLx

Awesome! Would it be possible to put an easy link to https://​​www.markdownguide.org/​​cheat-sheet/​​ or some other reminder of syntax somewhere easy-to-find while actually entering/​​editing comments?

Comment

https://www.lesswrong.com/posts/BisQ5ZNxAS4mPjhcw/the-new-editor?commentId=ftzC46nZQ7SDnLLCJ

Yeah, I agree we should add that somewhere. But don’t want to clutter up the new-comment form. But I think we can make something work (currently the bottom left corner is basically completely empty, so seems like a cheap option).

https://www.lesswrong.com/posts/BisQ5ZNxAS4mPjhcw/the-new-editor?commentId=ZhWKGZ2rqrFm23qwZ

Embedding screenshots would be really cool as a future feature IMO.

Comment

https://www.lesswrong.com/posts/BisQ5ZNxAS4mPjhcw/the-new-editor?commentId=cnozySAqGeAbuPxHC

Could you go into more of what you mean by this? (You can copy-paste images directly into the editor, and I’m not sure what else you would mean by screenshots)

Comment

I didn’t realize that you can copy-paste images. Whoops! In this comment I initially got a link for the image because I didn’t know you could copy-paste.

I just tried doing this in a post, and while the images look fine in the editor, they come out huge once the post is published. Any ideas on what I can do to fix this? (I don’t see any option in the editor to resize the images, and I’m scared of converting the post to markdown.)

Comment

I just fixed some of them (left a couple more for you to fiddle around with). This is pretty silly and we should fix it at some point, but the issue is that until you’ve manually fiddled with the size of the images slightly, they default to max-size. You can resize them by click the corner of the image and dragging.

Comment

Thanks, that worked and I was able to fix the rest of the images.

LessWrong will host our images now? How do we add images using markdown? It didn’t work when I tried drag and drop or pasting.

Comment

Yeah, sorry, the image uploader is currently connected to the WYSIWYG editor, so for markdown you still have to host them somewhere else. The markdown editor is currently really a very minimal HTML textfield with nothing fancy happening, so it’s not super obvious how to make image-upload work without a bunch of additional work.