Formatting text with a CMSB wysiwyg

5 posts by 3 authors in: Forums > CMS Builder
Last Post: March 16, 2009   (RSS)

Hi, there.

I have a client's site already set up with CMSB, and they can update the table on this page using the wyswyg editor: http://www.bikramyogawhiterock.com/scheduleDetail.php.

I set up a <p> tag class so that the text in the table should appear smaller than a standard <p> tag, as can be seen on this example: http://www.commonsensedesign.net/extranet/bikram/schedule.shtml. However, the text that is input through the CMSB wysiwyg editor is changing this to the standard <p>.

This is an example of what the code looks like for a table cell in the calendar:

<P CLASS="pScheduleDetails"><?php echo $scheduleRecord['monday_row_1'] ?></P>

Does anyone know how I can get the smaller class of <p> to override what CMSB is generating? I have to use the wysiwyg field rather than a plain textbox so that the client can add links where necessary.

Thanks!
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net

Re: [NigelGordijk] Formatting text with a CMSB wysiwyg

By Dave - March 13, 2009

Hi Nigel,

There's a few things you could do here.

You could add the .pScheduleDetails class to cmsAdmin/css/wysiwyg.css so the text was stylized when it appeared in the wysiwyg.

You could comment out the options: paste_use_dialog and paste_auto_cleanup_on_paste in cmsAdmin/lib/wysiwyg.php to disable the auto "paste from word" cleanup so pasting html into the wysiwyg didn't automatically strip out the <p> classes.

You could paste in the HTML in the HTML popup window of the wysiwyg so the classes were preserved and not filtered out.

You could enable the styles pulldown in the wysiwyg so the end-user could select the pScheduleDetails from the pulldown instead of font size/face and apply it as needed.

Or you could update your CSS to apply to the elements and not the classes and give the schedule table a unique id. eg: #scheduleTable p { ... }

Let me know if any of those would work for you or how we can best help.
Dave Edis - Senior Developer
interactivetools.com

Re: [NigelGordijk] Formatting text with a CMSB wysiwyg

By ross - March 16, 2009

Hi Nigel

Check out this tutorial:


http://www.interactivetools.com/forum/gforum.cgi?post=58380#58380


It will go over how to enable your style drop down.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Formatting text with a CMSB wysiwyg

Thanks, Ross.
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net