We've tried copying into TextEdit and pasting from there, but sometimes the formatting still changes.
Is there anyway to either keep the font completely consistent (i.e. ignore the spans etc) or maybe adding a 'Remove formatting' button to the editor?
Thanks
I have OC3038 with the original wysiwyg CKEditor.
I have removed and re-indent all my products description codes, removing all those annoying <spans> and then after a few months I found out all of them gone back to where they were before!!! all the code is on one very long line again and now I have to buy a train ticket again to catch the end of it.
It made me to pull all my hair from my bald head and now wondered if someone out there can help me.
The problem is that CKEditor adds <span style="font-size: 14px;"> on all paragraphs and makes it very difficult to change them in future in case I decide to go to 16px and also I have already set my font size in stylesheet and would like to control them that way globally with ease.
I am using English OpenCart 3.0.3.8, Default Template/Theme, php 7.4, Latest Brave Browser (No Ads-Blocker, etc.)
You could investigate TinyMCE. As far as I'm aware that only adds <p></p> tags.parkookk wrote: ↑Wed Dec 06, 2023 12:41 amHi,
I have OC3038 with the original wysiwyg CKEditor.
I have removed and re-indent all my products description codes, removing all those annoying <spans> and then after a few months I found out all of them gone back to where they were before!!! all the code is on one very long line again and now I have to buy a train ticket again to catch the end of it.
It made me to pull all my hair from my bald head and now wondered if someone out there can help me.
The problem is that CKEditor adds <span style="font-size: 14px;"> on all paragraphs and makes it very difficult to change them in future in case I decide to go to 16px and also I have already set my font size in stylesheet and would like to control them that way globally with ease.
https://www.opencart.com/index.php?rout ... n_id=45214
Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk
I can't believe the other developers above don't know about the keyboard shortcut.
Instead of Ctrl + V use Ctrl + Shift + V. That will paste without any styles.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
There are surprisingly quite a few end users who careless copy from dirty MS Word documents into the Opencart product description without giving it any further thoughts about the resulting potential issues. It's always best to have a modified CKEditor or Summernote editor which strips off the markup before pasting the text into the description.paulfeakins wrote: ↑Wed Dec 06, 2023 6:59 pmI can't believe the other developers above don't know about the keyboard shortcut.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Yes loads of "normal" users do this - why would they understand code? But I'm shocked that more developers don't know the way to paste plain text only.
Is there an extension for this?
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
For Summernote I use this simple modification in the admin/view/javascript/summernote/opencart.js :
Code: Select all
......
},
callbacks: {
onPaste: function (e) {
var bufferText = ((e.originalEvent || e).clipboardData || window.clipboardData).getData('Text');
e.preventDefault();
document.execCommand('insertText', false, bufferText);
}
}
......
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Very nice indeed.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Users browsing this forum: No registered users and 11 guests