emilianotisato / nova-tinymce

Laravel Nova TinyMCE editor (with images upload capabilities!)
MIT License
116 stars 38 forks source link

Add possibility to output html #70

Open novelnet opened 2 years ago

novelnet commented 2 years ago

Would be nice to have kind of ->asHtml() option to display optionally raw html

breizhwave commented 2 years ago

modify src/NovaTinyMCE.php :

add public $asHtml = false;

   public function asHtml()
    {

        $this->asHtml = true;

        return $this;
    }

and 'asHtml' => $this->asHtml,

in jsonSerialize array_merge

  public function jsonSerialize(): array
    {
        return array_merge(parent::jsonSerialize(), [
            'asHtml' => $this->asHtml,
            'shouldShow' => $this->shouldBeExpanded(),
        ]);
    }

does the job

chrispage1 commented 2 years ago

Take a look at PR #77

emilianotisato commented 2 years ago

Merged

semihASH commented 1 year ago

Version 2.0.0 does not have this update, when can you release the new version?

jonfackrell commented 1 year ago

@emilianotisato I see you merged this last year. Would be great if you could tag a release. Thanks!