CMSB v3.82 Released (Improved UI, Menu Count Badges, & .env support)

14 posts by 7 authors in: Forums > CMS Builder
Last Post: Yesterday at 11:25pm   (RSS)

Bug with the WYSIWYG function.  Added Title (centered bold), list text (on the left) and a photo to float right.  My WYSIWYG field title is "alternate_content"The php/html code on the Details page was simple (and has worked in the past):

<?php if ($servicesRecord['alternate_content']): ?>
	<div<?php if ($servicesRecord['alternate_color']): ?> style="background-color:#<?php echo $servicesRecord['alternate_color'] ?>;"<?php endif ?>>
		<div class="breathingspace">
			<div class="altpage">
			<?php echo $servicesRecord['alternate_content'] ?>
			</div>
		</div>
	</div>
<?php endif ?>

The stylesheet for "altpage" div is simple:

.altpage	{
	width: 100%;
	padding: 10px;
	border: 10px;
}

Attached are screenshots of the cmsb WYSIWYG field filled in, and the resulting source code.

What should happen, and used to happen, is all the WYSIWYG code gets dumped into the Details page between my html/php code (as outlined above in the "altpage" div) and should be fine after that.  I typically do not use a "clearing" code in the css as haven't for years (maybe that's a fix if the WYSIWYG isn't going to change?).  What happens in the browser is the data from the WYSIWYG field breaks out of, and through, the divs.  I tried to deleting and redoing it...it's a consistent issue.  Do you think I need to adjust my php/html or is this truly a bug?

Thanks in advance.

Codee

Remove the surrounding <p> tag around the image. You have to be careful when using the WYSIWYG editor, always check the source to see if it has been applied correctly.

<p style="text-align: center, ><span style="font-size: 36pt; >Big Title Stuff Here</span></p>
<img src="/cecmsuAdmin4891/uploads/kohler_001.jpg" width="600" height="400" alt=''style=float: right;/> 
<p›<span style="font-size: 24pt:">Text and stuff goes here for this item. </span></p> <p›<span style="font-size: 24pt;">Text and stuff goes here for this item. </span></p>
<p><span style="font-size: 24pt,"> Text and stuff goes here for this item. </span></p>
<p><span style="font-size: 24pt;"> Text and stuff goes here. </span></p>

Thanks, zaba!  That partially corrected it, until the content in the WYSIWYG field was modified again and, frankly, the client will have no clue about modifying the source code in the cmsb wysiwyg panel. I just modified the php page and added a second wrapper div (with the clearfix hack) inside my altpage div. This ensures the image and the surrounding divs don't run into each other.  

So, not a bug...just needed to adjust my html/php/css code.  I appreciate it.