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 Offline

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

Please create a new Ticket and we will get back to you as soon as we can.

#106296 Inline Elements & Unwanted tags

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 Ryan on Friday, 15 January 2021 15:44 GMT

[email protected]
Happy New Year, 😃

Is there a feature on the tool bar that allows me to insert a space or create another paragraph without doing a hard return? I want to get clarification on my statement below.

My developer said that when I do a hard return, JCE editor add unneeded tags.
See below.
He went into my pages and fixed all of these tags. Was this necessary? I don’t want to spend money if I don’t have to. How concerned should I be about this?

My Question
Adding spaces is a basic text editing feature. I got JCE Editor specifically to allow me to do basic editing— change font type, font type color, italics, bold, add pictures, video, etc. The last thing I wanted do was to have to pay someone to minor basic text things that I mentioned above, which can get expensive. Isn’t this what JCE editor for?

His Response
You're right. But the only issue in using JCE editor is - it adds all that CSS (for font type, color, italics, bold, size, alignment etc.) inline and if you give any spacing through the editor by pressing Enter key on your keyboard, it adds those unwanted tags. This is what is making the code not look clean (when you view it in the "Code" mode of JCE editor). Usually in any professionally made and maintained website, such things are done controlled using CSS by the developers.



Thanks,
Louis

Ryan
Is there a feature on the tool bar that allows me to insert a space or create another paragraph without doing a hard return? I want to get clarification on my statement below.


A hard return (Enter) creates a paragraph, that is the default intended behaviour.

To create another kind of space between two content blocks (assuming paragraphs), you need to add a margin to either paragraph. This can sometimes be done using styles included with the template. For example, in Yootheme templates, a margin can be added using the uk-margin class, which you can add to a paragrah in the editor using the Styles list.

My developer said that when I do a hard return, JCE editor add unneeded tags.


A hard return creates a new paragraph, that is all. It does not add "unneeded tags".

He went into my pages and fixed all of these tags. Was this necessary? I don’t want to spend money if I don’t have to. How concerned should I be about this?


Without knowing exactly what he did, I can't comment. He may be referring to inline styles (font size, color etc.) that you have been adding to text in the editor, instead of using styles provided by your template.

Ryan Demmer

Lead Developer / CEO / CTO

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

[email protected]
Thanks for your response.
Below are two other statements from developers to let you know what I’m talking about.

I’m confused about your comment --- “Without knowing exactly what he did, I can't comment. He may be referring to inline styles (font size, color etc.) that you have been adding to text in the editor, instead of using styles provided by your template.

I use the text editor tool bar for all of my formatting – http://prntscr.com/wlixvo
This is what the editor is for, to make it easy for people to format content.
What do you mean by styles provided by the template?

Am I using n Yootheme template?
Can you give me a video snippet for how to add a margin to create space between two blocks?


Developer Comments:

I see you're using a lot of inline CSS and unwanted <p>, <br> tags etc. As I advised earlier, this is not a good practice and makes the code difficult to maintain sometimes.

Cleanup of unwanted tags and inline CSS - I can do this but once it's done then you'll have to follow the same code structure as all the spacing, styling, fonts etc. will be controlled through CSS. If you try to change anything (other than content) yourself through the JCE editor, it may again disturb the code structure and add those unwanted tags & css too. So ideally you will have to get any changes done through me or any technical person who knows how to maintain the content without disturbing the code structure.


Thanks,
Louis

Ryan
I’m confused about your comment --- “Without knowing exactly what he did, I can't comment. He may be referring to inline styles (font size, color etc.) that you have been adding to text in the editor, instead of using styles provided by your template.

I use the text editor tool bar for all of my formatting – http://prntscr.com/wlixvo
This is what the editor is for, to make it easy for people to format content.



The purpose of the site template is to create the structure of the content displayed in the front-end, and to style the site and content using a predefined set of css styles, eg: headings, text, links etc.

This keeps the look of the content consistent across the site, as you don't need to set the font, colour or other formatting when creating content. If you want a heading, you select one of the Heading options in the editor, eg: Heading 2, and the template styles define the font size, colour et.c of that heading. Ditto for paragraph text, links etc.

Of course the editor includes a full set of font editing tools for you to use, and it is up to you whether you want to use them to style content differently to how the template does it. The downside to this is that to get a consistent look across the site, you need to make those changes in every article you write.

What do you mean by styles provided by the template?

Templates often use a "CSS Framework" - a generic predefined set of styles - on which to base the specific style of the template. For example, the Yootheme template your site uses, uses the UIKit CSS Framework as its base, then creates a unique look for the template with additional css styles to adjust font color, size, etc.

These frameworks can sometimes include useful utility styles to adjust margin and padding. For example, in Yootheme / UIKit templates, the "uk-margin" style will add a 20px bottom margin to an element, like a paragraph. You can apply this by clicking inside a paragraph in the editor, and then selecting "uk-margin" from Styles list in the editor toolbar.

Ryan Demmer

Lead Developer / CEO / CTO

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