Skip to content

Allow online version to read from URL params/hash to set various options + markdown text #59

Closed as not planned
@0xdevalias

Description

@0xdevalias

I tend to use the online hosted version of this tool a lot:

And I was thinking it would be cool if we were able to pass through various options + the markdown text through URL parameters and/or hash. That way I could configure a local shortcut to open the URL with the markdown text pre-filled/etc.

I think there might be limits to the amount of text that can be included in a GET param, so for the markdown text itself, it might make sense to use the hash for that instead maybe?

As an example, something like:

https://derlin.github.io/bitdowntoc/?preset=github&identSpaces=2#markdown=%23%20This%20is%20a%20title%0A%0A%23%23%20Table%20of%20Contents%0A%0A%5BTOC%5D%0A%0A%23%23%20Some%20other%20heading%0A%0ABlah%20blah%20blah.

Which would set the specified options and prefill the following markdown:

# This is a title

## Table of Contents

[TOC]

## Some other heading

Blah blah blah.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions