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

Extend HTML code view #101

Open
MichaelCurrin opened this issue Apr 14, 2021 · 11 comments
Open

Extend HTML code view #101

MichaelCurrin opened this issue Apr 14, 2021 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@MichaelCurrin
Copy link
Owner

This is useful for toggling from markdown to HTML for where markdown is not valid, like a centered div on a Jekyll site or Docsify.

This is not so often needed, so it can be a toggle rather than cluttering the screen with this and standard.

@MichaelCurrin MichaelCurrin added the enhancement New feature or request label Apr 14, 2021
@irenejoeunpark
Copy link

Hi @MichaelCurrin Can I work on this issue?
And if you could, can you please provide more details?

@MichaelCurrin
Copy link
Owner Author

MichaelCurrin commented Nov 19, 2021

Hi thanks for the interest.

I actually added this already with limited functionality, across views.

Screen Shot 2021-11-19 at 12 07 09 pm

Screen Shot 2021-11-19 at 12 07 12 pm

@MichaelCurrin
Copy link
Owner Author

But something useful would be to store that value in the store in store.ts

i.e. you could tick or untick that checkbox and it will be remembered when navigating across views. and also on the catalogue page, you would tick or untick one item and all the others on the same page would update too.

e.g.

Screen Shot 2021-11-19 at 12 09 48 pm Screen Shot 2021-11-19 at 12 10 00 pm

@MichaelCurrin
Copy link
Owner Author

MichaelCurrin commented Nov 19, 2021

And then a small change on the HTML functionality would be to trim the newline from the end of every HTML block when the MD to HTML happens.

Compare these two with my selection to highlight the issue:

Screen Shot 2021-11-19 at 12 14 07 pm

Screen Shot 2021-11-19 at 12 14 00 pm

Such as in here

export function mdToHTML(value: string): string {
return md.render(value);
}

If you add .trim() in there to wrap that render.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim

@irenejoeunpark
Copy link

And then a small change on the HTML functionality would be to trim the newline from the end of every HTML block when the MD to HTML happens.

Compare these two with my selection to highlight the issue:

Screen Shot 2021-11-19 at 12 14 07 pm Screen Shot 2021-11-19 at 12 14 00 pm

Such in here

export function mdToHTML(value: string): string {
return md.render(value);
}

If you add .trim() to wrap that

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim

Okay, I will work on that update! Thanks for the details

@irenejoeunpark
Copy link

Hi @MichaelCurrin, I keep getting errors running the application. Or I might not be using the correct way to run vue app.
Could you tell me what environment setup is needed and which command to use to run the application?

@MichaelCurrin
Copy link
Owner Author

Can you add a screen shot and what commands you are running?

Node 16
Any OS

yarn install
yarn start

@MichaelCurrin
Copy link
Owner Author

Test the app on the main branch with no changes.

Then test again with your changes

@irenejoeunpark
Copy link

Can you add a screen shot and what commands you are running?

Node 16 Any OS

yarn install
yarn start

I was using the wrong command. It is working now thanks! I will create PR as soon as I finish with my change and tests

@irenejoeunpark
Copy link

Hi @MichaelCurrin, PR #135 is created for those two changes.

@MichaelCurrin MichaelCurrin changed the title Allow HTML code view Extend HTML code view Nov 26, 2021
@MichaelCurrin
Copy link
Owner Author

can you have a look at the PR for my requested changes?

In particular the view on the Catalogue page is confusing and I could not figure out myself how to sync the checkbox value across all items on the page.

Another solution I'd accept is to refactor the Catalogue page to have a single HTML checkbox option, maybe in a footer of the page that is always visible, or a in the navbar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants