-
DescriptionI'm hoping to use my own EJS template that creates an HTML table. When I try to do so, I find that the Quarto rendering process is somehow modifying the HTML in my template, perhaps because Quarto is trying to process it as a Quarto listings table. Here's a minimal example. First the qmd file where I initially just create a basic HTML table and then try to create the equivalent HTML table in an EJS template (albeit without having the template fill in any values -- it's all just straight HTML for simplicity here). ---
title: "Test"
listing:
- id: test
template: test.ejs
---
A table directly.
<table>
<tbody>
<tr>
<th scope="row" style="width: 20%">Hello</th>
<td style="width: 40%;"><strong style="background-color:purple; border-radius: 9px; padding: 5px;">text</strong></td>
<td style="width: 40%;">2</td>
</tr>
</tbody>
</table>
A table via a template.
::: {#test}
::: Here is the EJS file.
The result in the rendered .html file is that the HTML from the template has been modified. The
Is there any way to just have the EJS template processed without Quarto doing additional processing? Side note: I've found that I can hack it in some cases (e.g., by inserting a dummy |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Could you format your post properly? You can share a Quarto document using the following syntax, i.e., using more backticks than you have in your document (usually four ````qmd
---
title: "Reproducible Quarto Document"
format: html
---
This is a reproducible Quarto document using `format: html`.
It is written in Markdown and contains embedded R code.
When you run the code, it will produce a plot.
```{r}
plot(cars)
```
The end.
```` |
Beta Was this translation helpful? Give feedback.
-
Thanks, that worked. Is there something that can be done in the Quarto processing system to better handle this sort of situation -- namely that when a custom EJS template is used, it is left alone? It's not clear to me if the behavior I was experiencing is what the developers intend? |
Beta Was this translation helpful? Give feedback.
Take a look at this https://quarto.org/docs/authoring/tables.html#disabling-quarto-table-processing