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

Make document classes configurable #74

Open
ronaldtse opened this issue May 30, 2024 · 1 comment
Open

Make document classes configurable #74

ronaldtse opened this issue May 30, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@ronaldtse
Copy link
Contributor

Different organizations use slightly different document models.

We want to allow them to configure their own document schema via a configuration file. This should not require authoring a gem but a remote document schema file (determine which classes to adopt and how they behave differently).

@ronaldtse ronaldtse added the enhancement New feature or request label May 30, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Metanorma Jul 11, 2024
@ronaldtse ronaldtse moved this from 🆕 New to 🏕 Med priority in Metanorma Jul 11, 2024
@hmdne
Copy link
Contributor

hmdne commented Aug 28, 2024

The idea I have would be a DSL to generate document fragments. Like, let's say

builder.build {
  paragraph {
    children {
      text_node "abc"
      anchor "http://example.com", "hello"
      text_node "abc"
    }
  }
}

This would dispatch individual calls to classes like Coradoc::Element::Paragraph. But if we override the builder, it could give different classes for those calls. So, such a schema file, could be a DSL to configure said builder, or some other kind of config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🏕 Med priority
Development

No branches or pull requests

3 participants