How to style html tags that are inside a variable

Asked

Viewed 18 times

1

Please, can someone help me in this example? Use ckeditor5 with Svelte, using the package ckeditor5-svelte, and wanted to increase the preview image of the post, but I do not know how to achieve this.

in my code, the preview is like this, in the Editor class.svelte:

<div class="preview" >{@html record.title}</div> 

and the record.title text, something like that:

<figure class="image"><img src="https://lh3.googleusercontent.com/a-/AOh14Gih2jtUuKIoZdE54flFC12c-aT2Csjn87o5ARlXWA=s96-c" alt="user-avatar"><figcaption>aaa</figcaption></figure><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse porta, dui a semper faucibus, velit mas

What I wanted to do was apply style within the tags of this variable, so it fills the container width. how do I do this?

inserir a descrição da imagem aqui

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.