Skip to content

Implement MDY standard - #122

Open
ggodlewski wants to merge 7 commits into
mieweb:mainfrom
ggodlewski:feat/mdy
Open

Implement MDY standard#122
ggodlewski wants to merge 7 commits into
mieweb:mainfrom
ggodlewski:feat/mdy

Conversation

@ggodlewski

@ggodlewski ggodlewski commented Jul 28, 2026

Copy link
Copy Markdown

Implement MDY standard from:

mieweb/kerebron#115

Sample file:

https://github.com/mieweb/templit/blob/main/samples/simple.mdy

  1. Run branch with: npx nx serve app-demo
  2. Go to preview
  3. In the editor type: Name: (#q1)
image
  1. Copy editor content, paste to editor
---
q1:
  value: John
q2:
  value: email@example.com
---
Name: [John](#q1)

Email: [email@example.com](#q2)

@ggodlewski

ggodlewski commented Jul 28, 2026

Copy link
Copy Markdown
Author

@horner can you have a look a this implementation?
@lattln can you add @horner as reviewer? I don't have access to this repo. Do you have access to rocket to notify him?

@lattln
lattln requested review from horner and lattln July 28, 2026 17:28
@lattln

lattln commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

@horner can you have a look a this implementation? @lattln can you add @horner as reviewer? I don't have access to this repo. Do you have access to rocket to notify him?

done. will notify him. @ggodlewski

@lattln lattln left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, will do QA

@lattln
lattln self-requested a review July 28, 2026 17:33
@horner

horner commented Jul 28, 2026

Copy link
Copy Markdown
Member

@ggodlewski We should only do this in a rich-text-mdy field and not rich-text. I think its an interesting idea to add it into the input of an eSheet, but I think this is like a snake eating itself. I think adding a rich-text-mdy type would be cool but we should differentiate it from a ordinary rich-text input.

I want there to be a mdy output of esheet that is consumable by a kerebron editor independent of the original esheet.

@lattln lattln left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Support existing eSheet field IDs, including hyphenated IDs such as what-is-your-email, in both typed and loaded MDY references.
q1:  
 value: q1
whatemail:
  value: 
---
q1: [q1](#q1)

q2: [email](#whatemail)

q3: (\\\\\\#what-color)
image
  • Prevent richtext responses from being included as whole MDY documents in another rich-text field’s generated front matter.

Dirty Submission

---\nq1:\n  value: q1\nwhatemail:\n  value: \n---\nq1: [q1](#q1)\n\nq2: [w](#whatemail)\n\nq3: (\\\\\\#what-color)\n
  • Return rich-text answers as structured data instead of an opaque Markdown string:
{
  answer: {
    frontmatter: {
      q1: { value: 'John' },
    },
    body: 'Name: [John](#q1)\n',
  },
}
  • Reconstruct the complete MDY document only when supplying content to Kerebron.
  • Define front-matter ownership and merge precedence: generated from eSheet responses, authored document data, or a documented hybrid.
  • Update MDY references in rich-text content when a referenced eSheet field ID is renamed.
  • Add focused tests for hyphenated IDs, MDY load/save behavior, structured response output, multiple rich-text fields, and field-ID renames.

@ggodlewski

Copy link
Copy Markdown
Author

Nesting richtext won't work because MDY does not support multiline text.

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

Successfully merging this pull request may close these issues.

3 participants