How to configure the Summernote editor to display a web page within the window?

Asked

Viewed 225 times

0

Good morning, wanted a little help and tips to make the summernote text editor open a web page, for example on a page I am typing HTML normally and with clicked to see the code, would appear the ready page.

example:

quando estou digitando um codigo HTML

E quando clicar para visualizar a pagina

1 answer

1

You can take the html created in Summernote this way:

var htmlPagina = $('#idDoEditor').summernote('code');

Create a div where you want to put the result:

<div id="htmlGerado"></div>

And with jquery play summernote html on it:

$('#htmlGerado').html(htmlPagina);

Browser other questions tagged

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