What's New
Tagged: visual composer
- AuthorPosts
Hi
When i am adding text content with VC, it inserts an extra paragraph. For exaple:
1) when i add heading only to text block, after save, an extra paragraph appears
2) when i load an already save VC content, there is always an extra row at the end that contains a text block with an extra empty paragraph
Is this TinyMCE related or VC or something else?
How can i disable this?Another question: if i am using VC in “displayFullWidthTop”, how can i add content (row) that is not full width (has width of container only)? Or i need to use “displayHomeTop” for this and strech row for full width elements? No other way?
Thanks
Hi
See screenshot with the extra P element:
https://prnt.sc/ttvdmdAnd here’s the screenshot with the extra row:
https://prnt.sc/ttvcqyAlso check this:
https://prnt.sc/ttwrpd
This is how the Composer generated code looks like in code view. It’s full of unnecesarry paragpraphs.Basicly the extra row holds also an empty paragraph, which i presume is added to the end of the VC code and when re-loaded, detects this as text and inserts it in a text element.
Hi
That is very strange. I edited your content and i created a new one – all without issues. I cleaned the homepage code in a HTML editor, and now that works fine too.
I don’t know where is this coming from, but i encountered the issue on several other pages i created. Maybe at start there was an empty paragraph in the editor? Don’t know. And why is that sometimes the editor adds a P and other times it adds a div when you enter a text and center it for example?
Anyway. I will try to replicate the issue and if possible come back to you with details.
ThanksHi again
Managed to partially re-create the issue: go to a CMS page and you will see the added P-s, and i can’t get round this, not even if i remove everything and i paste a clean VC code to the source. Examples:
1) if i copy-paste a clean VC code to the source view of the CMS page, it will be filled with p-s everywhere
2) if i paste the same VC clean code to the normal CMS text editor (not source), than:
a) a p is added to the very beginning and to the end (the code is wrapped in a paragraph)
https://prnt.sc/tv0edh
b) backend editor loads all text as unformatted. See:
https://prnt.sc/tv0gu5
3) if i create content from a clean page, the p tags are also added and front end is all wrong
4) Text editor icons in VC are missingSee my full video for the whole process (the code in the first 2 steps is the clean code of the actual homepage – so this issue is only present on CMS pages per moment):
http://vitaking.creative-solutions.ro/upload/visual-composer-issues.mp4Please check and give me a solution. I cannot go on with the CMS pages.
ThanksHi,
The issue was due to Prestashop new text editor, please modify the /js/admin/tinymce.inc.js file, add the following code to it:force_p_newlines : false, cleanup: false, forced_root_block : false, force_br_newlines : true, verify_html : false,
See attached screenshot and clear the Smarty cache.
I attach you a clear VC code file, you can copy to test it.
Best regards.Hi
I already saw these tricks, but they won’t work in Prestashop 1.7.6. Changing tinymce.inc.js file has no effect at all.
Also, i told you, adding content directly from “VC Anywhere” menu is fine. Your sample code is fine because it’s from there. It’s the CMS pages where the p-s are added.
Again, you have access, you could have tried.
I already lost a week because of this, and i re-done / re-saved the pages hundreds of times and it’s causing me lots of problems, client is mad, and nobody will pay me these hours.
I just don’t get it.Hi,
You didn’t add that code, I added it for you. there is a lot of<p style="text-align: center;">
in the code of the VC anywhere, so you need to copy the text only to paste to the source code of the cms editor. if you just paste it to the text editor, the code included a lot of paragpraphs, the text editor will add the p tag automatically, see the video: https://drive.google.com/file/d/1zPTRHByWFHpT5f3zu6YfxsJGStLKUdS1/view
Best regards.Hi
Sorry, i should have mention, that i removed the changes after i saw it’s not working as i want to keep everything out of theme folder as default as it can be.
Regarding your video: after you paste the code in the source (what i did every time, even in my video) and save, it’s fine. But after that, if you format the title to be H1 and centered, the paragraphs are inserted again.
Plus you did not gave me a solution for the VC text editor missing icons.
See:
vitaking.creative-solutions.ro/upload/vc-bug.mp4Hi,
1. The text editor icons issue was a bug in VC module, I modified the /modules/jscomposer/jscomposer.php file to fix it for you, see attached screenshot.
2. I spent a few hours to investigate the issue, but no clues, as Prestashop 1.7 is using the new text editor, I tried to modify a lot of js files and configuration but no result. I will go on it tomorrow.
Best regards.Attachments:
Hi,
I modified Prestashop core file /vitadmin36/themes/new-theme/public/cms_page_form.bundle.js, added this code'forced_root_block': '', 'force_p_newlines' : false,
right after this"em[class|name|id],@[role|data-*|aria-*]",
to resolve the issue. please clear your browser cache to test it.
If you upgrade Prestashop, it requires to re-do these changes.
Best regards.- AuthorPosts
You must be logged in to reply to this topic.