You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Ritu Raj Lakhera <rr...@solveda.com> on 2014/01/14 07:48:18 UTC
Content WYSIWYG Editor does not support the FTL syntax
Hi All,
When I am changing the content in WYSIWYG Editor . This is loosing the FTL syntax after saving.
I tried with ' STDWRAP001 ' data resource.
https://demo-trunk.ofbiz.apache.org:8443/content/control/EditHtmlText?dataResourceId=STDWRAP001
https://demo-trunk.ofbiz.apache.org:8443/content/control/EditElectronicText?dataResourceId=STDWRAP001
You can check this with 'WRAP_STD_001' data resource.
https://demo-trunk.ofbiz.apache.org:8443/content/control/EditElectronicText?dataResourceId=WRAP_STD_001
https://demo-trunk.ofbiz.apache.org:8443/content/control/EditHtmlText?dataResourceId=WRAP_STD_001
For Ex:
If content have the below text
<#if x == 1>
x is 1
<#else>
x is not 1
</#if>
and then go to WYSIWYG Editor, it becomes:
<#if x == 1>
x is 1
<#else / >
x is not 1
<!--#if-->
Is there a way to configure this WYSIWYG Editor to handle these idioms so that when I change the data in this editor and a simple text area that the markup remains consistent?
Regards
Ritu Raj Lakhera
Solveda India
(formerly known as Salmon India)
Phone. +91-9560087139
Email. rrlakhera@solveda.com
Skype. lakhera.rituraj
Re: Content WYSIWYG Editor does not support the FTL syntax
Posted by Jacques Le Roux <ja...@les7arts.com>.
I checked this was working in R09.04, I will have a closer look...
Jacques
On Sunday, January 19, 2014 3:02 PM, jacques.le.roux@les7arts.com wrote
> This is indeed an issue but can't be fixed with WYSIWYG Editor (nor with jQuery).
>
> In EditHtmlText.textData form field we need to use encode-output="true" for things to work, but then we are screwed when
> updating.
> So we need to find a way to decode back before saving. Since we use the updateElectronicText service and it's implemented by a
> simple-method, I think the only option is to rather switch to Java for this peculiar case. A Jira issue with a contribution would
> be become...
>
> Jacques
>
> On Tuesday, January 14, 2014 7:48 AM, rrlakhera@solveda.com wrote
>> Hi All,
>>
>> When I am changing the content in WYSIWYG Editor . This is loosing the FTL syntax after saving.
>>
>> I tried with ' STDWRAP001 ' data resource.
>> https://demo-trunk.ofbiz.apache.org:8443/content/control/EditHtmlText?dataResourceId=STDWRAP001
>> https://demo-trunk.ofbiz.apache.org:8443/content/control/EditElectronicText?dataResourceId=STDWRAP001
>>
>> You can check this with 'WRAP_STD_001' data resource.
>> https://demo-trunk.ofbiz.apache.org:8443/content/control/EditElectronicText?dataResourceId=WRAP_STD_001
>> https://demo-trunk.ofbiz.apache.org:8443/content/control/EditHtmlText?dataResourceId=WRAP_STD_001
>>
>> For Ex:
>> If content have the below text
>> <#if x == 1>
>> x is 1
>> <#else>
>> x is not 1
>> </#if>
>>
>> and then go to WYSIWYG Editor, it becomes:
>>
>> <#if x == 1>
>> x is 1
>> <#else / >
>> x is not 1
>> <!--#if-->
>>
>> Is there a way to configure this WYSIWYG Editor to handle these idioms so that when I change the data in this editor and a simple
>> text area that the markup remains consistent?
>>
>> Regards
>>
>> Ritu Raj Lakhera
>>
>> Solveda India
>> (formerly known as Salmon India)
>> Phone. +91-9560087139
>> Email. rrlakhera@solveda.com
>> Skype. lakhera.rituraj
Re: Content WYSIWYG Editor does not support the FTL syntax
Posted by Jacques Le Roux <ja...@les7arts.com>.
This is indeed an issue but can't be fixed with WYSIWYG Editor (nor with jQuery).
In EditHtmlText.textData form field we need to use encode-output="true" for things to work, but then we are screwed when updating.
So we need to find a way to decode back before saving. Since we use the updateElectronicText service and it's implemented by a simple-method, I think the only option is to rather switch to Java for this peculiar case.
A Jira issue with a contribution would be become...
Jacques
On Tuesday, January 14, 2014 7:48 AM, rrlakhera@solveda.com wrote
> Hi All,
>
> When I am changing the content in WYSIWYG Editor . This is loosing the FTL syntax after saving.
>
> I tried with ' STDWRAP001 ' data resource.
> https://demo-trunk.ofbiz.apache.org:8443/content/control/EditHtmlText?dataResourceId=STDWRAP001
> https://demo-trunk.ofbiz.apache.org:8443/content/control/EditElectronicText?dataResourceId=STDWRAP001
>
> You can check this with 'WRAP_STD_001' data resource.
> https://demo-trunk.ofbiz.apache.org:8443/content/control/EditElectronicText?dataResourceId=WRAP_STD_001
> https://demo-trunk.ofbiz.apache.org:8443/content/control/EditHtmlText?dataResourceId=WRAP_STD_001
>
> For Ex:
> If content have the below text
> <#if x == 1>
> x is 1
> <#else>
> x is not 1
> </#if>
>
> and then go to WYSIWYG Editor, it becomes:
>
> <#if x == 1>
> x is 1
> <#else / >
> x is not 1
> <!--#if-->
>
> Is there a way to configure this WYSIWYG Editor to handle these idioms so that when I change the data in this editor and a simple
> text area that the markup remains consistent?
>
> Regards
>
> Ritu Raj Lakhera
>
> Solveda India
> (formerly known as Salmon India)
> Phone. +91-9560087139
> Email. rrlakhera@solveda.com
> Skype. lakhera.rituraj