Retain the formatting of comment and form submission

Hi, may I ask how to retain the formatting of comment and form submission?


I'm trying to publish the comment submission or custom form submission as it is. But the testing submissions I used lost all of their original formatting after being submitted into the Matrix. Is there a way to fix this? Can a WYSIWYG be provided at the front end for user to submit their comments?



Thanks in advance for your help!!

[quote]Hi, may I ask how to retain the formatting of comment and form submission?


I'm trying to publish the comment submission or custom form submission as it is. But the testing submissions I used lost all of their original formatting after being submitted into the Matrix. Is there a way to fix this? Can a WYSIWYG be provided at the front end for user to submit their comments?



Thanks in advance for your help!![/quote]



You can use <pre> formatting to keep the existing formatting.



In the next release there is a wysiwyg metadata type that you can use if you want to provide a wysiwyg area in an asset builder for example.


Interesting! Which release is this?

This will be released in 3.20.2, which is set to be released on March 2nd.

Thanks a lot for your advice. Can you explain more how to use the <pre> tag, together with the comment asset or form field?

Much appreciate!

Would it be possible to back port this wysiwyg metadata type into a 3.18 version. If it is possible how difficult a task is it and how long would it take the Squiz developers to do.

What i need is for users to be able to submit formated submissions using a front end wysiwyg facility without logging in. Ideally the wysiwyg should have a code and preview section. The wysiwyg should function in custom form, comments and any other user input field.

Also is it possible to back port this wysiwyg metadata type into a 3.16 version.

[quote]Would it be possible to back port this wysiwyg metadata type into a 3.18 version. If it is possible how difficult a task is it and how long would it take the Squiz developers to do.


What i need is for users to be able to submit formated submissions using a front end wysiwyg facility without logging in. Ideally the wysiwyg should have a code and preview section. The wysiwyg should function in custom form, comments and any other user input field.



Also is it possible to back port this wysiwyg metadata type into a 3.16 version.[/quote]



Have you look into using NicEdit?

[quote]Would it be possible to back port this wysiwyg metadata type into a 3.18 version. If it is possible how difficult a task is it and how long would it take the Squiz developers to do.


Also is it possible to back port this wysiwyg metadata type into a 3.16 version.[/quote]



Thanks for suggesting NicEdit.



Is it possible to back port this wysiwyg metadata type into 3.18 version, and 3.16 version?

[quote]Thanks for suggesting NicEdit.


Is it possible to back port this wysiwyg metadata type into 3.18 version, and 3.16 version?[/quote]



Officially or unofficially? Squiz is not adding new features to 3.16, so I think this would be an issue. Backporting to 3.18 would probably be quite simple, but on the other hand, upgrading from 3.18 to 3.20 is pretty straightforward too…

While I can't speak for the contents of releases specifically, I can say that some minor features are making it into 3.18.x however the majority of these are only included from 3.20.x. Due to the underlying core changes and the fact that 3.16.x is officially deprecated, I would suggest that this would not be officially supported in this branch.



In the end, the benefits of many new features in each successive branch version is a great incentive to upgrade. :slight_smile:

I'm not sure if it's the same problem I was having with the loss of formatting for metadata tied to calendar events, but after some googling, I came across the following CSS as a way to get content to still display correctly without ending up with long unbroken lines on the page while trying to use the <pre></pre> tags:


[codebox]pre {

font-family:Arial, Helvetica, sans-serif;

font-size: 80%

white-space: pre; /* CSS2 /

white-space: -moz-pre-wrap; /
Mozilla /

white-space: -hp-pre-wrap; /
HP printers /

white-space: -o-pre-wrap; /
Opera 7 /

white-space: -pre-wrap; /
Opera 4-6 /

white-space: pre-wrap; /
CSS 2.1 /

white-space: pre-line; /
CSS 3 (and 2.1 as well, actually) /

word-wrap: break-word; /
IE */

width: 100%

}[/codebox]



So far from what I tested it worked in all various browser tests I did on Windows with IE6/7/8, FF2/3, Opera 9.63, Google Chrome 1.0.1 and Safari 3.2.1 (all xenocode virtual application browsers). You obviously can set font family/size/width or more properties if you want.