Post by emollusion » Fri Dec 22, 2017 8:30 pm

Hi!

I have had to manually edit the html for my information pages. This due to a really extensive HTML write out by the WYSIWYG editor. It is kinda like it takes what the CSS says, and then puts it in html. But worse.

Examples:
<p style="line-height: 1.2; margin-top: 0pt; margin-bottom: 5pt; background-color: rgb(255, 255, 255);" dir="ltr"><span style="background-color: transparent; font-family: Arial; font-size: 20pt; white-space: pre-wrap;">HEADLINE</span><br></p>

<p style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" dir="ltr"><span style="color: rgb(0, 0, 0); font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; background-color: transparent;">ROW TEXT</span></p>

<p style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" dir="ltr"><span style="font-family: Arial; font-size: 14.66px; white-space: pre-wrap;">ANOTHER ROW TEXT</span><font face="Arial"><span style="font-size: 14.66px; white-space: pre-wrap; background-color: rgb(255, 255, 255);"> </span></font></p><p style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" dir="ltr"><font face="Arial"><span style="font-size: 14.66px; white-space: pre-wrap; background-color: rgb(255, 255, 255);"><br></span></font>

<h1 style="line-height: 1.2; margin-top: 20pt; margin-bottom: 5pt; background-color: rgb(255, 255, 255);" dir="ltr">HEADLINE<br></h1>

This is what I get in code view after writing in the wysiwyg editor. Cleaning this up, and making the text appear as it is supposed to is a real hassle.
What can I do about this?

Thank you!

Newbie

Posts

Joined
Fri Sep 22, 2017 9:17 am

Post by straightlight » Fri Dec 22, 2017 9:29 pm

Posted in feedbacks regarding bad HTML codes. Although, no OC version posted.

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by emollusion » Wed Jan 03, 2018 7:41 pm

What has the wysisyg in OpenCart to do with the forums user contributed errors?
Specific opencart version is 3.0.2.0, if this was your question.

Newbie

Posts

Joined
Fri Sep 22, 2017 9:17 am

Post by IP_CAM » Thu Jan 04, 2018 2:52 am

This due to a really extensive HTML write out by the WYSIWYG editor.
Well, you did not mention, if you created your Code in the SOURCE View or
in the Wysiwyg View, wich would be comparable to entering plain HTML Code
onto a MS FrontPage Wysiwyg Screen.

Otherwise, the unfamous OC-2/3 Editor, as well as some older ckEditors, had
some problems with changing SOURCE, when saving the Content in OC. And
it also depends on, wich way one saves the Code, if saved in Source Mode, some
keep the format, as entered, but it always has been a trail & error Game, to recall,
with Editor I used before, to avoid such problems, when, by example, adding a simple
class="img-responsive" Code to an image/banner source, to make it look swell
in all resolutions.

But ckEditor's seem to exist for all later OC-Versions, I would try one of those, to
possibly solve your Problems.
Good Luck! ;)
Ernie

Ernie's OpenCart v.1.5.6.5 LIGHT + V-Pro + OpenShop Admin v.1.75 Test Sites
http://www.bigmax.ch - http://www.opencart.li/shop/ - http://www.velomech.ch/cart/
Image


User avatar
Guru Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by qahar » Wed Feb 21, 2018 2:23 am

Editors usually have Paste as Text option to remove html tags from external source (site page, file document, pdf etc).

If it's not available paste the content to text based editor (notepad or vim), copy again and paste to editor in WYSIWYG mode.
The worse outcome each paragraph separated with <br> instead of wrapped in <p> tags; use view source to see it.

User avatar
Expert Member

Posts

Joined
Tue Jun 29, 2010 10:24 pm
Location - Indonesia
Who is online

Users browsing this forum: No registered users and 2 guests