Service Portal widget - sp-tinymce-editor image upload not working

Tommy Jensen
Giga Guru

I have this very simple widget with the tiny mce html editor. It appears fine one the form and the editor seems to be working. Except when I try to upload an image. The image is not inserted into the editor and I get no error messages in the console log. What am I missing ?

 

<div class="panel panel-default">
  <div class="panel-heading">Preview</div>
  <sp-tinymce-editor ng-model="c.data.text" ng-model-options="{getterSetter: true}"></sp-tinymce-editor>
</div>
11 REPLIES 11

TJ29
Tera Contributor

Thanks @dhananjay21 - this was exactly what I needed to wrap up a custom widget!

Miika K_
Tera Contributor

Hi, check out this OOB widget Knowledge Article Comments which also uses the sp-tinymce-editor directive: https://{yourinstance}.service-now.com/sp_widget.do?sys_id=077810090be432004ce28ffe15673adb&

At least the record table name is required to make it work, possibly the attachment-guid as well. Note also that the table name needs to be in triple quotes.

<sp-tinymce-editor attachment-guid = "-1" f record-table-name="'table-name-here'" ng-model-options="{}" ng-model="c.data.description" id="description"></sp-tinymce-editor>