• The plugin is suddenly acting really strange – I’m trying to edit the merge tags for email confirmations and the field pop-up thing is just taking over the whole page and glitching everything out. Unable to save and back out.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Ben

    (@benbaudart)

    Same issue here, on multiple websites & multiple forms.
    Email message editor breaks existing html and if you save the form you loose all previous formatting.

    C’mon team, you’re currently moving at the speed of a sumo, not a ninja. It’s time to fix all these email editor-related issues as it’s been waaaaaaaay too long. I’m talking about the code editor not recognising closing tags, the impossibility to add a merge tag when in code editor, …

    Faisal Ahammad

    (@faisalahammad)

    Hi!

    I’m a forum volunteer, and I can reproduce this issue.

    What’s happening:

    • In Email Actions > Email Message, if you switch to Code mode and the editor is empty, choosing a Merge Tag may not insert anything.

    If you’re not technical:

    1. Don’t edit plugin files yourself.
    2. Share this thread with your developer/host and ask them to apply the “maintainer patch” below.
    3. Temporary workaround: add merge tags in Visual mode first, then switch to Code mode.

    I tested a patch locally and it resolves the issue in Code mode.

    Root cause:

    • Merge-tag insertion flow still prioritizes Quill (visual editor) when CodeMirror (code mode) is active.
    • In empty code mode, selected tags have no valid insertion target.

    Patch applied and tested:

    => assets/js/min/builder.js

    • In mergeTagsButtonClick, add a CodeMirror-first branch:
      • Detect .setting.code-view:visible + .CodeMirror
      • Insert { at CodeMirror cursor
      • Save merge state/caret
      • Set window.nfCurrentCodeMirrorInstance = cm
      • Clear window.nfCurrentQuillInstance = null
      • Show/focus #merge-tags-box search input
      • return to avoid falling into Quill path
    • In insertTag, change Quill guard:
      • from:
        if (window.nfCurrentQuillInstance) { ... }
      • to:
        if (window.nfCurrentQuillInstance && !window.nfCurrentCodeMirrorInstance) { ... }
    • Add CodeMirror insertion branch:
      • Use current cursor and nearest { token start
      • replaceRange(tag, startPos, cursorPos)
      • Restore focus/cursor
      • Clear window.nfCurrentCodeMirrorInstance

    Post-patch:

    • Clear browser cache + server/CDN cache
    • Hard refresh wp-admin
    • Retest in Email action code mode with empty content

    Result:

    • Merge tags insert correctly in both Visual and Code mode.
Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.