nova-editor-js icon indicating copy to clipboard operation
nova-editor-js copied to clipboard

generateHtmlOutput Renders encoded HTML entities

Open percymamedy opened this issue 1 year ago • 3 comments

When using \Advoor\NovaEditorJs\NovaEditorJs::generateHtmlOutput it automatically encodes html entities in the returned HtmlString object returned:

image

Then when using blade to output this string it shows as html tags which is not what we want:

image

I had to use this work around to make it work:

{!! html_entity_decode(\Advoor\NovaEditorJs\NovaEditorJs::generateHtmlOutput($content->body_default)) !!}

This does not work also:

{{ \Advoor\NovaEditorJs\NovaEditorJs::generateHtmlOutput($content->body_default) }}

percymamedy avatar Aug 24 '22 21:08 percymamedy

This should've been fixed by 510fea4ce8e959de29cc890ce661a5ebbbabd056. Are you using the most up-to-date views (or haven't published them)?

roelofr avatar Sep 25 '22 12:09 roelofr

I am using the latest version of the package which 3.1.0

percymamedy avatar Oct 11 '22 20:10 percymamedy

Apologies for the slow reply.

Your exported views are likely outdated. You may want to compare them against the current versions in this repository.

If you haven't changed the views (or if you're comfortable using Git to check your changes), you may run the following command to overwrite your views with the package's default one:

Warning This will overwrite any changes made to the views, so use with caution.

php artisan vendor:publish --provider="Advoor\NovaEditorJs\FieldServiceProvider" --tag=views --force

I hope this resolves this issue.

roelofr avatar Oct 27 '22 13:10 roelofr