
-
AuthorPosts
-
March 23, 2015 at 4:58 pm #416465
Hi, Maybe this topic has already been discussed, but i don’t find it, neither by searching in this forum neither anywhere.
My problem. Except using the “code block” available in content element, i try to paste a sample of code (xml for example) in order it’s readable by every one.
Like “code block”.But my problem is:
actually i use the accordion tool, and i want that one of my items contains a sample of code.
When i paste my code as text, this one is correctly written.Example, if i write in visual mode <p>, it will be correctly written like this <p>
When i publish my page then i look at it, there is no problem.When i come back, in my page, my <p> or <p> have completely disappeared.
my impression is, that “enfold theme” considers that is full html and not html written with special characters.
Have you got a solution ? or a different way to put a code block in the accordion tool ?
Thanks in advance
March 23, 2015 at 6:46 pm #416568i try to add this directly in the accordion tabs.
but no way, when, i publish my page and i come back to edit it all is disapearedi try to write this:
[av_codeblock wrapper_element='' wrapper_element_attributes='']
<?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>
<xs:schema version=”1.0″ xmlns:xs=”http://www.w3.org/2001/XMLSchema”><xs:element name=”Report” type=”orderReportModel”></xs:element>
</xs:schema>
[/av_codeblock]March 24, 2015 at 6:18 pm #417257Hey!
You’ll need to use the default editor and then type your code out inside the accordion like so.
[av_toggle_container initial='0' mode='accordion' sort=''] [av_toggle title='Toggle 1' tags=''] <pre>Here is some code</pre> [/av_toggle] [av_toggle title='Toggle 2' tags=''] Toggle Content goes here [/av_toggle] [/av_toggle_container]
Or if you want to use the advanced layout editor then you can try doing this, http://kriesi.at/documentation/enfold/enable-advanced-layout-builder-debug/, and then type your code out inside the accordion shortcode that you see in the debug view.
Regards,
ElliottMarch 25, 2015 at 12:51 pm #417706Hi thanks,
It’s what i jave already done but.
When i try to put some xml code snipped.
All code disapeared when i publish my page.March 26, 2015 at 5:28 pm #418656Hi!
Paste the code your using here and we’ll test it on our end.
Best regards,
ElliottMarch 26, 2015 at 6:02 pm #418691I found an alternative solution using the advanced-layout-builder-debug.
But now i have to use exclusivly it for this kind of page.[av_toggle_container initial='0' mode='accordion' sort=''] [av_toggle title='my title' tags=''] [av_codeblock wrapper_element='pre' wrapper_element_attributes='' escape_html='aviaTBescape_html'] <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="sales" type="sample"></xs:element> <xs:complexType name="sample"> <xs:sequence> <xs:element name="shopName" type="xs:string" nillable="true"></xs:element> <xs:element name="zipCode" type="xs:int"></xs:element> <xs:element name="day" type="xs:dateTime" nillable="true"></xs:element> <xs:element name="items" type="salesItem" nillable="true" minOccurs="0" maxOccurs="unbounded"></xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="salesItem"> <xs:sequence> <xs:element name="articleName" type="xs:string" nillable="true"></xs:element> <xs:element name="category" type="category" nillable="true"></xs:element> <xs:element name="price" type="xs:double"></xs:element> <xs:element name="runningTotal" type="xs:double"></xs:element> </xs:sequence> </xs:complexType> <xs:simpleType name="category"> <xs:restriction base="xs:string"> <xs:enumeration value="Furniture"></xs:enumeration> <xs:enumeration value="Art"></xs:enumeration> <xs:enumeration value="Supplies"></xs:enumeration> <xs:enumeration value="Travelling"></xs:enumeration> </xs:restriction> </xs:simpleType> </xs:schema> [/av_codeblock] [/av_toggle] [/av_toggle_container]
March 26, 2015 at 6:07 pm #418695Do you think an update will come with this problem corrected ?
I mean, you can use the < pre > tag to write code snipped (C#, Java, Cobol, php) , but you can put neither html code neither xml code in it.
The only solution i find is to use my solution. Then be careful cause you cant use the advanced layout editor anymore, you must to write directly in the advanced-layout-builder-debug to modify it-
This reply was modified 10 years, 3 months ago by
barthvader.
March 26, 2015 at 6:20 pm #418706If you try without the [av_codeblock] tag,
you will see that xml disappeared when you publish then return to your page in order to edit it.Try this
[av_toggle_container initial='0' mode='accordion' sort=''] [av_toggle title='my title' tags=''] <pre> <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="sales" type="sample"></xs:element> <xs:complexType name="sample"> <xs:sequence> <xs:element name="shopName" type="xs:string" nillable="true"></xs:element> <xs:element name="zipCode" type="xs:int"></xs:element> <xs:element name="day" type="xs:dateTime" nillable="true"></xs:element> <xs:element name="items" type="salesItem" nillable="true" minOccurs="0" maxOccurs="unbounded"></xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="salesItem"> <xs:sequence> <xs:element name="articleName" type="xs:string" nillable="true"></xs:element> <xs:element name="category" type="category" nillable="true"></xs:element> <xs:element name="price" type="xs:double"></xs:element> <xs:element name="runningTotal" type="xs:double"></xs:element> </xs:sequence> </xs:complexType> <xs:simpleType name="category"> <xs:restriction base="xs:string"> <xs:enumeration value="Furniture"></xs:enumeration> <xs:enumeration value="Art"></xs:enumeration> <xs:enumeration value="Supplies"></xs:enumeration> <xs:enumeration value="Travelling"></xs:enumeration> </xs:restriction> </xs:simpleType> </xs:schema> <pre> [/av_toggle] [/av_toggle_container]
-
This reply was modified 10 years, 3 months ago by
barthvader.
March 27, 2015 at 6:58 pm #419555Hi!
It’s working fine on my end. Make sure you check the “Escape HTML Code” option in the codeblock element.
Regards,
ElliottMarch 31, 2015 at 10:18 am #421019Hi
Yes i did ! Escape HTML code is checked.
Let me try to explain
– code block tool is working fine
– accordion tool is working fine
But if you want to put some code block short code with XML in the accordion tools:
it’s working fine but :
When you save your page, publish it, and finally edit again the accordion tools, XML has completely disappeared.
Regards.
April 1, 2015 at 4:51 pm #422015Hey!
Oh I see. In this case you’ll need to escape your code. You can use a tool such as this, http://www.freeformatter.com/html-escape.html.
Cheers!
ElliottApril 1, 2015 at 5:51 pm #422057Hi,
Thanks for that solution.
Unfortunately it’s exactly the same problem when you save, publish then return to edit the page all xml code has disappeared.
With this tool the disadvantage more, is that it does not preserve neither spaces neither tabs.
For the moment i have to keep my solution and must write directly with the advanced-layout-builder-debug to modify it.Thanks anyway
Maybe a correction in a next update
Barth.
-
This reply was modified 10 years, 3 months ago by
-
AuthorPosts
- The topic ‘problem with "paste as text" function’ is closed to new replies.