Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Content edits to HTML fields (sp-tinymce-editor directives) are not saved when form is edited through a portal page - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • Content edits to HTML fields (sp-tinymce-editor directives) are not saved when form is edited through a portal page
KB0717797

Content edits to HTML fields (sp-tinymce-editor directives) are not saved when form is edited through a portal page


2712 Views Last updated : Apr 7, 2024 public Copy Permalink
KB Summary by Now Assist

Description

Content edits to HTML fields are not saved when form is edited through a portal page. sp-tinymce-editor directives are not properly updating the model.

Steps to Reproduce

 

1. Log into an OOB instance
2. Open an incident form via Service Portal
i.e
https://{instance-name}.service-now.com/sp?id=form&table=incident&sys_id={sys_id}
3. Configure the form layout and add a HTML field
4. On the incident form, fill out the HTML field with a value i.e '1111'
5. Save the record
6. On the incident form, select and **cut (ctrl+X)** the value (i.e '1111') from the HTML field so that it is empty
7. Save the form

Observe the record still retains the previous value that was removed (i.e '1111'), instead of showing the HTML field empty. This behaviour also occurs with images that are cut from the html content.

 

Workaround

This is expected behaviour for the existing integration with the TinyMCE HTML Editor. The issue is with the ui-tinymce plugin for Angular JS.
Ref.: https://github.com/angular-ui/ui-tinymce/issues/323

You can update the $scope.c.submit function on the affected widget by adding this line:

c.desc = tinymce.activeEditor.getContent();


This will make sure that during submit the correct c.desc value is captured, as it seems that tinymce does not recognise the new value after a cut event. For example:

$scope.c.submit = function() {
console.log(c.desc);
c.desc = tinymce.activeEditor.getContent()
console.log(c.desc);
c.submitted = true;
c.submitText = 'Submitting the ticket...';
submitIt();
}


Related Problem: PRB1069743

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

Attachments

Attachments

No attachments found

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.