Skip to content

[FR] Ability to style {dc.embed} output #129

@johnghill

Description

@johnghill

I have been playing with dc.embed to fetch meeting notes from journal pages and report them on project pages. Something like this:

return function View() {
  const here = dc.useCurrentPath();
  const sections = dc.useQuery(`@section and #meeting and $file = "${here}"`);

  const COLUMNS = [
    {
      id: "Source",
      value: s => s.$file,   
      render: filePath => dc.fileLink(filePath)
    },
    {
      id: "Section",
      value: s => s.$name ?? "",
      render: (_title, s) => dc.embed(s) 
    }
  ];

  return <dc.Table rows={sections} columns={COLUMNS} paging={false} />;
}

While the code works, I have been unable to style the embed chunks which make up column 2 of that table. By default they appear with a grey background and super sized vertical line spacing (huge space between headings and lists, huge space within lists).

Feature Request : please introduce the ability to style dc.embed content.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions