Since we had the exact same problem here (<p> disappearing...) , I slightly modified the magnolia code so that it won't call the method ReplacePByBr anymore in case of FCKEditor.
This is in SVN now.

I did not know magnolia had custom processing on top of code returned by rich editors. Happy to have learned that :D

Nicolas,

On May 12, 2006, at 1:37 AM, Moskos, Jay wrote:

Oleguer Serra provided me with this awhile back:

"Hi,

The problem is caused by a method called "replacePByBr". I've modified a class Save.java to
avoid it and make the it perfect XHTML.

protected String getRichEditValueStr(String value, int isRichEditValue) {

// encode the internal links to avoid dependences from the contextpath, position of the page
        String valueStr = LinkUtil.convertAbsoluteLinksToUUIDs(value);
        switch (isRichEditValue) {
            case ControlSuper.RICHEDIT_KUPU :
            case ControlSuper.RICHEDIT_FCK :
valueStr = StringUtils.replace(valueStr, "\r\n", " "); //$NON-NLS-1$ //$NON-NLS-2$ valueStr = StringUtils.replace(valueStr, "\n", " "); //$NON-NLS-1$ //$NON-NLS-2$

                // ie inserts some strange br...
valueStr = StringUtils.replace(valueStr, "</br>", "<br />"); //$NON-NLS-1$ valueStr = StringUtils.replace(valueStr, "</BR>", "<br />"); //$NON-NLS-1$ valueStr = StringUtils.replace(valueStr, "<P><BR>", "<P>"); //$NON-NLS-1$ //$NON-NLS-2$

valueStr = StringUtils.replace(valueStr, "<br>", "<br />"); //$NON-NLS-1$ //$NON-NLS-2$ valueStr = StringUtils.replace(valueStr, "<BR>", "<br />"); //$NON-NLS-1$ //$NON-NLS-2$ valueStr = StringUtils.replace(valueStr, "<br/>", "<br />"); //$NON-NLS-1$ //$NON-NLS-2$ valueStr = StringUtils.replace(valueStr, "<br/ >", "<br />"); //$NON-NLS-1$ //$NON-NLS-2$

                // replace <P>
// valueStr = replacePByBr(valueStr, "p"); //$NON- NLS-1$

// TODO remove it definitly: the method seams not to work // replace <a class="...></a> by <span class=""></ span>
                // valueStr = replaceABySpan(valueStr, "a");
                break;
            default :
                break;
        }
        return valueStr;

    }

... hope this can help you."

Cheers,
Jay Moskos

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 11, 2006 4:22 AM
To: [email protected]
Subject: [magnolia-user] FCKeditor swallows <p></p>

Hi out there,

I hope this is not an already discussed phenomenon, but I neither found something in the archives, nor on the FCKedit website. I have a paragraph template with one control, a FCKeditor. There I want to edit several paragraphs, each surrounded by <p></p>. Unfortunately when the page is being displayed, my beautiful paragraph tags are replaced by ugly <br/> tags. What can I do against it? Is there a possibility to tell the editor that my source code should be taken unchanged? Or is it not the FCKeditor but a part of magnolia? Before I forget it to mention, I edited the content in the source code view of FCKeditor.
Thank you very much for your help and have a nice day!

Peter

Accelsis Technologies GmbH
www.accelsis.biz

Aidenbachstr. 52
D - 81379 München

Tel. +49(0)89/548 038-0
Fax. +49(0)89/548 038-99

[EMAIL PROTECTED]
--
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Any opinions or advice contained in this email are subject to the terms and conditions expressed in the governing accelsis technologies
client engagement letter.


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to