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

Transclusion #1

Open
3 of 8 tasks
jmatsushita opened this issue Mar 20, 2016 · 0 comments
Open
3 of 8 tasks

Transclusion #1

jmatsushita opened this issue Mar 20, 2016 · 0 comments

Comments

@jmatsushita
Copy link
Member

  • Load index.md with prose
  • Display transclusion with a special highlighting.
  • Enable new toolbar icon ("Insert Content") when selected
    • When toolbar button is clicked, display list of local snippets (reuse media approach)
    • In addition to Insert, also have an "Edit" button that opens the transcluded file.
  • Clicking preview runs hercule.
    • If there is an index.md file then preview uses it - to show local snippets in context.)
    • If the index.md file is a "redirect" then load that instead and run hercule.

Assembly test case

Use https://github.com/contentascode/fixture-assembly which contains:

  index.md    # with :[](snippet1) :[](snippet2)
  snippet1.md 
  snippet2.md

Next

Preview - ProseMirror

  • Load index.md with prose
  • Load index.md in ProseMirror
    • Use extension to display transclusion with a special symbol.
    • Allow to click symbol to edit transcluded file.

In Place

  • Load index.md with Prose.
  • Pre-process with hercule.
    • For each transcluded content, spin up a ProseMirror instance linked to the original md file. (Can children PM instances exist in a parent instance?)
  • Modification in ProseMirror (not collaborative first) would be saved only on Prose commit (maybe adding a separate metadata file, hidden from Prose).

How about showing snippet1.md in its possible contexts? I guess the transclusion graph would need to be calculated and cached, to allow going up to the potential parents.

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

No branches or pull requests

1 participant