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

Previewing question/answer on browser while writing it #303

Open
nephewtom opened this issue Sep 12, 2015 · 4 comments
Open

Previewing question/answer on browser while writing it #303

nephewtom opened this issue Sep 12, 2015 · 4 comments

Comments

@nephewtom
Copy link

Hi Sean.
Is it possible to refresh the browser (visit) while writing a question or answer?
Thanks!

@vermiculus
Copy link
Owner

Which browser? The question list buffer or the question buffer? (I think we also run into the problem of 'which list is which', but I'm not certain.)

@nephewtom
Copy link
Author

Sorry if my question was not clear.
When reading a question on sx-question buffer, I press 'a' to answer it.
A new buffer sx draft answer emacs XXXXX is opened, and I can edit my answer.
I can see two shortcuts C-c C-c: to finish and Send and C-c C-k to discard draft.
I would like to be able to see how the answer looks like on the StackExchange site before posting it.
And I wonder if it is possible to "visit" it on the browser.

Currently, I'm using "Edit with Emacs" on Chrome.
When I click on the browser, a new Emacs buffer is created (I chosed markdown-mode to edit it).
There, I can press C-x C-s, I see how the browser updates the changes.
To post the answer I have to do it through the button in Chrome.

Hope this clarifies my question.

@Malabarba Malabarba changed the title Visiting question/answer on browser while writing it Previewing question/answer on browser while writing it Sep 12, 2015
@Malabarba
Copy link
Collaborator

I see now. What you want is called "previewing".

The stack exchange API has a render method that gives us the html that's generated by a given markdown. We could save that to a temp file and open it in a browser.

@vermiculus
Copy link
Owner

Neat idea. There are also API calls for a given site's styling; we might be able to mock-up some 'okay' CSS.

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

3 participants