Add script support

Open
#98 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript

Research direction

No files, tests, or entry points are named in the issue. Start by turning the preview and domain allow-list requirements into an implementation plan; done means Markdown renders as an HTML page, inline document scripts are allowed, and later script loads are blocked unless their domains are explicitly allowed.

Written by the indexing model from the issue text.

Description

enhancement

we don't want to load scripts in the editor itself, so we need a preview mechanism that "fully loads" the markdown by rendering it to HTML and then loading it as an HTML page. Note that this will also require domain allow-list because lol the web.

  • by default that list is empty
  • scripts that are in the document itself should always be allowed
  • subsequent script loads are subject to the allow-list: if they're not explicitly cleared by domain, the network request shouldn't even happen.
Dominant language
JavaScript
Stars
1
Forks
1
Avg merge
9h 8m
Merged PRs (30d)
16

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Pomax/markdown-editor

All issues in Pomax/markdown-editor

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.