Standalone editor formatting issues after clicking "Update"

Standalone editor formatting issues after clicking "Update"

paravisparavis Posts: 37Questions: 8Answers: 1

Not quite sure how to describe the issue, so here's a screenshot: https://paravis.net/images/editor_formatting.png

The standalone editing functions work just fine, but after clicking "Update", the normal-looking data that used to be in the box turns into this:

<div class="DTE DTE_Inline"><div class="DTE_Inline_Field"><div class="DTE_Field DTE_Field_Type_text DTE_Field_Name_domains.email"><label data-dte-e="label" class="DTE_Label" for="DTE_Field_domains.email">Domain Email<div data-dte-e="msg-label" class="DTE_Label_Info"></div></label><div data-dte-e="input" class="DTE_Field_Input"><div data-dte-e="input-control" class="DTE_Field_InputControl" style="display: block;"><input id="DTE_Field_domains-email" type="text"></div><div data-dte-e="multi-value" class="multi-value" style="display: none;">Multiple values<span data-dte-e="multi-info" class="multi-info" style="display: none;">The selected items contain different values for this input. To edit and set all items for this input to the same value, click or tap here, otherwise they will retain their individual values.</span></div><div data-dte-e="msg-multi" class="multi-restore">Undo changes</div><div data-dte-e="msg-error" class="DTE_Field_Error" style=""></div><div data-dte-e="msg-message" class="DTE_Field_Message" style="display: none;"></div><div data-dte-e="msg-info" class="DTE_Field_Info"></div></div></div></div><div class="DTE_Inline_Buttons"></div></div>

The fields are being pre-populated using PHP, which queries the database (not through the Editor PHP libraries) for the information, applies the proper "data-editor-id=row_" etc. And the right information is updated. So I'm not exactly sure why it is displayed like this after being edited.

The XHR response looks good as well. It contains only one row of data.

Also, after clicking "Update", the button does not go away and unfocus input field, which will confuse our users, as they won't know if anything actually happened after clicking since the update happens so fast.

Any suggestions? Here is the code we are using:

<div class="panel" data-editor-id="row_3">
    <dl>
        <dt data-editor-label="domains.public_name">Public Name:</dt>
        <dd class="smallBlock" data-editor-field="domains.public_name">Business Name</dd>
        <dt data-editor-label="domains.short_name">Short Name:</dt>
        <dd class="smallBlock" data-editor-field="domains.short_name">Business</dd>
        <dt data-editor-label="domains.description">Description:</dt>
        <dd class="smallBlock" data-editor-field="domains.description">This is our business.</dd>
        <dt data-editor-label="domains.enforce_email_sig">Enforce Email Signature:</dt>
        <dd class="smallBlock" data-editor-field="domains.enforce_email_sig">No</dd>
        <dt data-editor-label="domains.email_signature">Email Signature:</dt>
        <dd class="largeBlock" data-editor-field="domains.email_signature"></dd>
        <dt data-editor-label="domains.email">Email Address:</dt>
        <dd class="smallBlock" data-editor-field="domains.email">email@business.com</dd>
        <dt data-editor-label="domains.email_from">Email From Name:</dt>
        <dd class="smallBlock" data-editor-field="domains.email_from">Your Friends at Business Name</dd>
        <dt data-editor-label="domains.portal">Portal Address:</dt>
        <dd class="smallBlock" data-editor-field="domains.portal">http://portal.business.com</dd>
    </dl>
</div>

<script>
var domainAdminEditor;
$(document).ready(function(){
    domainAdminEditor=new $.fn.dataTable.Editor({
        ajax:'library/editor/domains/domains.php?table=domain_admin&domain='+domain+'&id='+authId+'&ip='+clientIp,
        idSrc:'domains.id',
        fields:[
            {name:"domains.id",type:'hidden',def:domain},
            {name:"domains.public_name"},
            {name:"domains.short_name"},
            {name:"domains.description"},
            {name:"domains.email"},
            {name:"domains.email_from"},
            {name:"domains.enforce_email_sig",type:'selectize',options:[{label:'No',value:0},{label:'Yes',value:1}],def:0},
            {name:"domains.email_signature",type:'ckeditor'},
            {name:"domains.portal"}
        ]
    });

    $('[data-editor-field]').on('click',function(e){
        domainAdminEditor.inline(this,{buttons:'_basic'});
    });
});
</script>

Replies

  • paravisparavis Posts: 37Questions: 8Answers: 1

    I would like to quickly add that I am using the latest version of Editor.

    Thank you.

  • allanallan Posts: 61,821Questions: 1Answers: 10,127 Site admin

    Are you able to give me a link to the page showing the issue so I can debug what is happening here please? You can PM me by clicking my name above and then the "Send message" button if you can't make the link public.

    Thanks,
    Allan

  • paravisparavis Posts: 37Questions: 8Answers: 1

    Sure. Thanks Allan.

This discussion has been closed.