Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plain-text: Return button & raw markdown #7

Closed
elrido opened this issue Jul 9, 2016 · 3 comments
Closed

Plain-text: Return button & raw markdown #7

elrido opened this issue Jul 9, 2016 · 3 comments
Assignees

Comments

@elrido
Copy link
Contributor

elrido commented Jul 9, 2016

@rugk:

It would be nice to have a return button in plain-text view, so that you can get the "normal" view back after you clicked on "plain-text".
Alternatively you may also make it possible to use the back button of the browser - this would even be more intuitive.


@nitmir:

But if you add a button, it is no more plain-text. The plain-text view is handy because you can select all (ctrl-a) to get the content of the paste.
Using the back button of the browser would be nice though.


@rugk:

But if you add a button, it is no more plain-text. The plain-text view is handy because you can select all (ctrl-a) to get the content of the paste.

Mhh that's true. But IMO it is not a "real" plain-text view anyway as it still renders markdown e.g. A real, plain-text view would be to show the raw markdown file.


@nitmir:

Ah I never noticed. I agree that plain-text should show the source markdown and not the rendered part.


@rugk:

So what about this issue?

Essentially it seems to be two issue now:

  1. Do not render markdown when showing markdown source.
  2. Allow browser back button (or a custom button) for switching back
@rugk
Copy link
Member

rugk commented Aug 10, 2016

As for this the History API can be used:

Alternatively you may also make it possible to use the back button of the browser - this would even be more intuitive.

Basically history.pushState can be used. If older browsers need to be supported you may want to use this JS lib.

@rugk
Copy link
Member

rugk commented Aug 10, 2016

I split the rendering issue into a new issue (#63), so that this issue really only is about the back button now.

@elrido elrido self-assigned this Aug 16, 2016
@elrido elrido closed this as completed in f957a18 Aug 16, 2016
@elrido
Copy link
Contributor Author

elrido commented Aug 16, 2016

I noticed that history.pushState was already in use for the clone button to work. And I inserted a comment on why text/html is used instead of text/plain without <pre> tags. I had tried to change it and encountered the bug while testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants