Hi guys,
here is the code from widget:
<div class="step"> <span class="step-number">12</span> <h6 class="step-title">Title</h6> <p class="step-text">Text goes here </div>
The problem is when I use page builder all of that html is visible on the front end. When I switch from page builder with “Revert to editor” option
div class="step"is removed.
I tested with couple themes (default ones too) and only page builder plugin active, but the result was always the same.
I also thought that might be issue with WP editor, but when I pasted my html in “Text” view all of the code was visible.
I also tried this with your own widgets from SiteOrigin Widgets Bundle and the same thing happens.
Any ideas?
Cheers
Marcin
Hi Marcin
Thanks for reaching out. Sorry we weren’t able to reply sooner. I ran a quick test now and I’m able to insert your HTML into the Text tab of a SiteOrigin Editor widget in Page Builder and have it display as expected, just the text, no HTML with the HTML still there when I edit the widget. Are you still working on this challenge?
Hi Andrew,
yes, issue is still there.
Here are the steps to recreate it:
and everything else
There is no
there. It looks like when you hit “Revert to editor” it strips all divs from the widget
I tried this with other widgets from SiteOrigin Widgets Bundle and couple others. I tried to switch to another theme. Basically output is the same each time: it strips all divs inside the widget. Of course when I put whole markup in “Text” view it works just fine, but what I want is to make sure that when user switch to default editor it won’t break the whole site and the markup will be there.
I also tried to:
. Both divs were removed.
So, if you have an idea of how to solve this I would really appreciate any help :)
Best
Marcin
Thanks for all the effort involved in explaining this.
Revert to Editor is a one-way process that can’t be reversed without using page revisions. When you click the button you’re warned about losing your Page Builder layout. On any given page you can either work in the Visual/Text tabs OR work in Page Builder. You can’t switch between the two modes; if you go from Page Builder to the Visual/Text tabs and then try go back to Page Builder, all of your content will be dumped into a single SiteOrigin Editor widget. The button or process rather isn’t intended for users to move back and forth between the two modes of editing while maintaining Page Builder formatting.
I can log this as a bug for the team to assess. I’m not really following this use case though. If you insert say another row and another widget, revert to editor and then go back to Page Builder, your layout will be lost, everything will be in a single SiteOrigin Editor widget. It’s not something you’d want to do.
Thanks again for all the effort involved in reporting this issue. We’ll do our best to assist once we know more about the end use case. Cheers :)
Ideally, we’d have an easy to use filter for the Revert to Editor button to allow developers to remove it for client sites as required. That has been requested in the past but hasn’t been implemented yet. It is possible to hide that button using CSS if you’re interested.
Hi Andrew,
thanks for explanation :) CSS won’t be necessary.
I understand that switching between the two is not the way to go and why does it dump everything to single text widget when you switch back to page builder. It’s understandable. But the only thing that bothers me is that it removes all divs and I’m not sure if it is intended or not. If it is can you tell me why?
Really appreciate your time on this one :)
Best
Marcin
Sorry, I can’t edit my previous answer.
I guess I found js code that strips all divs
When I comment those all divs are there when I Revert to Editor. I guess this code should strip all SiteOrigin related divs like panel-grid and panel-grid-cell, but it strips all, even those that are not related to SO.
Is there anything you can do about it?
Best
Marcin
Hi again :)
looks like those are the lines to blame
siteorigin-panels.js
Maybe just add check for page builder specific classes like .panel-grid .panel-grid-cell .so-panel.widget or something like that and remove divs with those classes. That would solve the issue I guess.
Best
Marcin
Hi Marcin
Thanks, this is really useful and positive feedback. Greg let me know that originally, the divs were being stripped because the content in the Visual/Text tabs was/is being used by Yoast SEO and WordPress search and was therefore unnecessary. We have a project on the go at the moment. As soon as that wraps we’ll relook at this problem at improve it. Thanks again for your feedback and input. Sorry we don’t have a fix to offer right now.
Hi Andrew,
I’ll wait. Hopefully fix will be quick and easy one, good luck :)
Cheers
Thanks for your feedback and understanding :)
seems to be the same problem here. ist there any further information?
Sorry as an addition:
If I use something like
It outputs all the widgets-code but strips every div (like
If I use it like
It outputs everything correctly but it’s not inside the content anymore. So it goes from
TO
And AFTER the “goes to part” comes