Skip to content

HTML widget for identification panel #14348

Description

@mariano-merlo

Expected Behavior

In GeoNode 4.4, when enabling "Use a custom template" for the GetFeatureInfo template in the Dataset Metadata Editor, the TinyMCE HTML editor included a "Source Code" button (<> icon) that allowed pasting raw HTML (tables, divs, custom styles, etc.) so it would be rendered as markup in the GetFeatureInfo popup.

Actual Behavior

In GeoNode 5.0.1, the same "Use a custom template" field in the Dataset only shows a TinyMCE editor with a "Format" dropdown offering: Normal, H1–H6, Blockquote, and Code (paragraph style). There is no "Source Code" toolbar button. When pasting raw HTML directly into the editor, it is escaped and displayed as literal text in the popup instead of being rendered as HTML.
We checked settings.py and local_settings.py and found no TINYMCE_DEFAULT_CONFIG override in this installation, so the editor is using whatever default toolbar/plugin configuration ships with GeoNode 5.0.1. It's unclear whether:
the code plugin (which adds the source-code view) was removed from the default TinyMCE config between 4.4 and 5.0.1, or
this is specific to our installation and something else changed (e.g. a different widget/field now renders this template editor).

Steps to Reproduce the Problem

Go to a Dataset's Metadata Editor in GeoNode 5.0.1 and enable "Use a custom template" for the GetFeatureInfo template field.
Try to paste a raw HTML snippet (e.g. a <table> with ${properties.<attribute_name>} placeholders) directly into the TinyMCE editor.
Save and view the dataset's GetFeatureInfo popup on a map — the HTML tags appear as literal text instead of being rendered, and there is no "Source Code" (<>) button in the editor toolbar to switch to raw HTML input mode (unlike in GeoNode 4.4).

Specifications

GeoNode version: 5.0.1
Installation method (manual)

  • Additional details:
    TINYMCE_DEFAULT_CONFIG is not set in settings.py or local_settings.py (default config is in use)
    Comparison was made against a working GeoNode 4.4 installation where the same workflow (paste raw HTML in custom template) worked via a visible "Source Code" button
    Could you confirm whether the code plugin / toolbar button was intentionally removed or changed in the default TinyMCE configuration for the GetFeatureInfo custom template field in 5.x? If so, what is the recommended way to re-enable raw HTML editing for this field — overriding TINYMCE_DEFAULT_CONFIG, or is there a different/dedicated config variable for this specific field?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions