You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Online

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

#100126 JCE Pro breaks on extremely long lines

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by softmaker on Thursday, 13 June 2019 17:19 BST

softmaker
I have a case where extremely long lines break JCE Pro (I use 2.7.13).

The attached sample file contains a registration form with a dropdown list of all countries in the world. It is nicely formatted (one OPTION entry per line). If you paste it in JCE Pro, switch to WYSIWYG view and back, three unpleasant things happen:

#1 All OPTION pairs are formatted into one huge line. This makes them nearly impossible to edit. Ideally, the JCE formatter would place them as one entry per line.

#2 Because of the line length of the country list, JCE Pro gives up syntax highlighting near Tajikistan. This would be avoided by changing #1 above.

#3 Also because of the line length of the country list, JCE Pro inserts a misplaced /div just above the /form tag. This breaks the HTML. (If you reduce the country list before causing the reformat, it doesn't happen).

Martin Kotulla
SoftMaker

Attachments

jce.zip

Ryan
Please try JCE Pro 2.7.14 RC3 - https://www.joomlacontenteditor.net/downloads/editor/pro/development

Please clear your browser cache after installation.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

softmaker
Thank you, Ryan. This works well now. However, I am experiencing an indenting problem now. Maybe it was there before, maybe it was introduced with this build. Imagine this simple HTML:

<div>
	<div>
		<p>bla bla</p>
	</div>
	<div><img src="https://www.joomlacontenteditor.net/bla.png" /></div>
</div>
If you let JCE Pro format it, the final /div is indented when it shouldn't. Also, while I am in "wish mode", it would be beautiful if "input" tags in HTML would be placed on their own lines, like you do now with "option". Makes them much more readable. Martin Kotulla SoftMaker

Ryan
This should now be fixed in RC4 - https://www.joomlacontenteditor.net/downloads/editor/pro/development

Please clear your browser cache after installing.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

softmaker
Ryan, 1. The indenting is fixed. Good! 🙂 2. "input" tags are still not on separate lines:

<div>
<input name="utf8" type="hidden" value="1" /> 
<input name="lang" type="hidden" value="en" />
</div>
3. Another problem... in the following code, JCE invents height and width values:

                <div id="lightbox-content">
                    <iframe name="output" id="output"></iframe>
                </div>
Martin Kotulla SoftMaker

Ryan
2. "input" tags are still not on separate lines:


This is the result of the default settings of js-beautify - https://github.com/beautify-web/js-beautify - which the Code editor uses to format content. "input" is treated as an inline element, and therefore is not put on a new line.

Another problem... in the following code, JCE invents height and width values:


This will be fixed in the next update.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

Ryan
Please try JCE Pro 2.7.14 RC5 - https://www.joomlacontenteditor.net/downloads/editor/pro/development

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

softmaker
https://www.joomlacontenteditor.net/downloads/editor/pro/development points to an empty page.

Martin Kotulla
SoftMaker Software GmbH

Ryan
JCE Pro 2.7.14 is now available for download - https://www.joomlacontenteditor.net/downloads/editor/pro/latest

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

softmaker
Ryan, I gladly confirm that issues 2 and 3 (input tags on separate lines, iframe tag adds width and height) are fixed 2.7.14.

Great work! :-)

Martin Kotulla
SoftMaker