We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

TinyMCE Error on a Stand Alone Edit Page

Development and Programming

Narthex's avatar
Narthex
83 posts
16 years ago
Narthex's avatar Narthex

Since TinyMCE has been working great for me as a Stand Alone Entry Form editor I decided to try it for editing existing pages, too.

Thankfully it works well! When the page loads the text gets passed into the textarea on the page and then TinyMCE loads up and works its magic on the text… but with one error: -br- code gets misinterpreted or rather pre-interpreted wrongly. Easiest to show an example:

First how it’s written, then how it’s being interpreted:

Code written as:

Hello.
<div>
</div>
How are you?
<div>
</div>
I am fine.

Is reading as:

Hello.
<div>
</div>
How are you?
<div>
</div>
I am fine.

See the difference? It’s interpreting the -br- and using it to line break between the -div-. So the text in TinyMCE is single spaced without a blank line inbetween. But the -br- is still there, as a Preview of the apparently single-spaced tinymce text comes up double-spaced with the -br- being interpreted correctly.

Once when the page was loading slowly I got the attached screenshot, too, which shows the error.

Any thoughts on how to fix this? Obviously the -br- is getting interpreted as part of the page’s html instead as a part of the body code. But TinyMCE must know how to handle this kind of scenario since it renders text correctly – even between previews – when it is first creating a post…

       
Narthex's avatar
Narthex
83 posts
16 years ago
Narthex's avatar Narthex

Okay, helps to be sure you know what you’re doing first.

Turns out I was stripping out the br and p with Solspace’s form_helper code. I had the following in the page:

{exp:form_helper:field_parser}{body}{/exp:form_helper:field_parser}

The field_parser was doing the stripping.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.