Developer forum

Forum » Development » paragraph module settings with dw:Editor not saved

paragraph module settings with dw:Editor not saved

Remi Muller
Reply

I am trying to add dw:Editor to the paragraph settings of a module.

Fields like dw:filemanager and input are saved but the dw:Editor is not.
Is there something additional i need to do for the dw:Editor to save.
I have added the ID to the Module settings value.

This is on dw 8.4.1.12.


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Remi

The dw:editor has a hidden textarea that contains the html being shown in the editor. That textarea should have the name of your editor - you can check that with DOM explorer. Also check with DOM explorer that it actually gets updated when writing something in the editor.

I do not think we have any modules that uses that control on the _edit.aspx page. Could you also check if you get any JS exceptions?

Thanks, Nicolai

 
Jan Sangill
Reply

Hi,

I am using 8.4.1.19

I am having the same issue when using the dw:editor.

The DOM does not seem to get updated when writing.

The name of the textarea that is hidden is for instance: DescriptionNew

And the name of the CKE editor is: cke_DescriptionNew


Moreover:

The dw:FileManager is also not sending any values when pressing save. Always empty string.

Any ideas what the issues could be?

Everything is sent via ajx, its just some of the values are not sent with:

Example XML it sends:

<ParagraphModuleCSS></ParagraphModuleCSS><ParagraphModuleJS></ParagraphModuleJS>
<?xml version="1.0" encoding="utf-8"?>
<Settings>
<HelloText>Default Hello Text</HelloText>
<DescriptionNew></DescriptionNew>
<SampleTemplate></SampleTemplate>
</Settings>

Code is basicly just taken from your example with modules. Seems some of the controls is not sending values properly.

 
Nicolai Høeg Pedersen
Reply

Have you included this control as well?

<dw:ModuleSettings ID="ModuleSettings1" runat="server" ModuleSystemName="NameOfYourModule" Value="DescriptionNew, SampleTemplate" />

Hope this helps

 
Jan Sangill
Reply

Hi Nikolai,

yes this is included.

But I then tested the FileManager in another custom module I just tried, and it works there, so I must be doing something wrong in my first custom module:)

Regarding the description - Havent tested that on my new module, but most likely they are related.

Was about to write di disregard my question, but then I saw you already replied:)

 
Vladimir
Reply

Hi Jan,

yes, I noticed the problem with editor. 

Until we implement a general solution, try to use this one:

1. Register onSave event:

    document.observe('dom:loaded', function () {
        window["paragraphEvents"].setBeforeSave(SaveEditor);
    });

2. SaveEditor is depended from editor type:

    function SaveEditor(){
         $('YourEditorName').value = CKEDITOR.instances.editor1.getData();
    }

Best regards,

Vladimir

 

 

 

You must be logged in to post in the forum