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

specify markup format for 'doc' fields #36

Open
tetron opened this issue Jul 17, 2024 · 3 comments
Open

specify markup format for 'doc' fields #36

tetron opened this issue Jul 17, 2024 · 3 comments

Comments

@tetron
Copy link
Member

tetron commented Jul 17, 2024

Doc fields should support markup.

Possible approaches:

  • HTML only with a restricted tag set
  • markdown (commonmark) (converts to HTML, can embed HTML)
  • Something else?
  • multiple markup languages (???), with a field that indicates what markup is in use
@mr-c
Copy link
Member

mr-c commented Jul 17, 2024

cross-referencing via HTML anchors from the resolved schema-salad identifiers of this and all sub-documents?

see also common-workflow-language/common-workflow-language#293

@tetron
Copy link
Member Author

tetron commented Jul 17, 2024

From discussion: commonmark + HTML is the obvious choice. Should include advice about what HTML tags are safe:

const domPurifyConfig: TDomPurifyConfig = {
    ALLOWED_TAGS: [
        'a',
        'b',
        'blockquote',
        'br',
        'code',
        'del',
        'dd',
        'dl',
        'dt',
        'em',
        'h1',
        'h2',
        'h3',
        'h4',
        'h5',
        'h6',
        'hr',
        'i',
        'img',
        'kbd',
        'li',
        'ol',
        'p',
        'pre',
        's',
        'del',
        'section',
        'span',
        'strong',
        'sub',
        'sup',
        'ul',
        'table',
        'thead',
        'tbody',
        'th',
        'tr',
        'td',
    ],
    ALLOWED_ATTR: ['src', 'width', 'height', 'href', 'alt', 'title', 'style' ],
};

@tetron
Copy link
Member Author

tetron commented Jul 17, 2024

cross-referencing via HTML anchors from the resolved schema-salad identifiers of this and all sub-documents?

see also common-workflow-language/common-workflow-language#293

Yes, should be possible to cross-reference between 'doc' sections using the document id generated by schema salad, with a recommendation that the implementation will have them be the identifiers or will be rewritten to be correct.

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

2 participants