Design View Changing Custom HTML Code?

  • 1
  • Problem
  • Updated 4 years ago
  • Not a Problem
  • (Edited)
When attempting to create a Multi-page Presentation using my own divs and placeholders inside of them with switching buttons, the Editor keeps changing my custom div tags and properties. I'm assuming it has something to do with my IDs on my divs, as they are similar (but not identical) to the IDs for my placeholders. Is there a way to prevent this from happening in the future?

It changes whenever I go into Design view, so if I don't want it to change anything I have to edit my whole Presentation in HTML view.

Edit: I should also mention that I have placeholder set to false for my custom div styles.
Photo of Colin Quinn

Colin Quinn

  • 300 Points 250 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Neal

Neal

  • 61,252 Points 50k badge 2x thumb
When you say it keeps on changing the div tags and properties, can you provide more detail as to how they are being changed?  Could you provide screenshots of before and after the change so that we can better understand what you're seeing?

Thanks.
Photo of Colin Quinn

Colin Quinn

  • 300 Points 250 badge 2x thumb

Here is the first image, and I have blocked the section I'm referring to.


This is the second image, after I have clicked to Design View and back to HTML view. The IDs of the divs changed, as well as their dimensions. (The background colors were also changed, but I ended up keeping this change intact as it illustrates for test purposes better.)

Thanks for your reply, Neal.


EDIT: I just noticed the additional three lines of code at the bottom of the second screen shot, could this lead to why this is happening?
(Edited)
Photo of David Lugo

David Lugo

  • 1,014 Points 1k badge 2x thumb
Hi Colin,

The code at the bottom could be causing the changes you're seeing.  Have you been following the Developer Documentation on building Multi-Page Presentations? http://www.risevision.com/help/developers/multi-page-presentations/. Let me know if this helps.

Thanks,
David


 
Photo of Colin Quinn

Colin Quinn

  • 300 Points 250 badge 2x thumb
I have been following most of the Documentation for Multi-Page Presentations, but I created my own switching JavaScript function to change div visibility. Since these functions don't run until the Presentation does, I don't think that's why Design View is changing my HTML code.

When I go to Design view and return back to HTML, the code at the bottom of the second screen shot was added by itself. Those are the properties that should be contained in the boxed divs, but for some reason they are being duplicated and thrown to the bottom of the page. Then, the boxed divs take the content from their switching boxes (id 1-3, 200px x 200px, located towards the bottom of the page).

I really can't fathom why this is happening, but it is definitely consistent, and it happens every time I try to revert the changes Design View makes to my HTML.
Photo of Donna Peplinskie

Donna Peplinskie

  • 7,142 Points 5k badge 2x thumb
Colin,

Are you assigning the numbers as ids of the div tags, or is the Editor doing that? If you're assigning them, try changing them so that they start with a letter. Not sure if that's the cause but it's worth a try. Also, double check to ensure that all of your tags are closed.

Thx.
Photo of Colin Quinn

Colin Quinn

  • 300 Points 250 badge 2x thumb
I did have three div ids set as just numbers, so I changed that and the Design View is no longer changing my code.

I also removed the placeholder="false" tag from the other set of divs and now everything is functioning correctly. 

Thank you all for your help!