You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can support any/all renderers via dynamic import, keyed off the code fence.
import{compile}from'ember-repl';awaitcompile(text,{formats: {/** * example * ```gjs live * content here * ``` */gjs: {needsLiveMeta: true,// defaultcompiler: ()=>import(...),},/** * example * ```jsx live * content here * ``` */jsx: {compiler: ()=>import(...),},/** * example * ```svelte live * content here * ``` */svelte: {compiler: ()=>import(...),},/** * example * ```mermaid * content here * ``` */mermaid: {needsLiveMeta: false,// compile and replace with mermaid output, not previewcompiler: ()=>import(...),},},onSuccess: (RootComponent)=>{/* do something with the rendered `text` */}/* ... */});
// ComponentLike is "native" to the system, since it's Ember// string outputs will be innerHTML'd//// optionally, // nothing may be returned of the compiler wants to render in to the parentElementtypeCompiled=ComponentLike|string;typeCompiler=|(textContent: string,parentElement: HTMLElement)=>Compiled|void;interfaceLanguageOptions{compiler: ()=>Promise<{default: Compiler}>/* ... */}
Once the change is made to the REPL, this'll need to be updated:
We can support any/all renderers via dynamic import, keyed off the code fence.
To support https://mermaid.js.org/config/usage.html
The type for the above:
Once the change is made to the REPL, this'll need to be updated:
The text was updated successfully, but these errors were encountered: