0

so.. i really want to use EE's great Wygwam extension that is built on CKeditor to put predefined div's into a wygwam field.. what i mean is i'd like to select a style from the drop down and something like the below gets inserted...

<div class="factwrapper220">
    <div class="smNumCentre">ONE IN TWO</div>
    <div class="factTextCentre">Nunc non est feugiat enim imperdiet commodo eu non eros.</div>
    <div style="clear:both"></div>
</div>

some of the div's would be prefilled and then the content editor can then change these values/text.. i just wanted to know is this approach possible ? and if not what would be a better way of allowing content creators fill predefined div structures..

thanks in advance!

Tim
  • 13
  • 3

3 Answers3

0

I'd suggest posting this as a support question with Pixel and Tonic.

Derek Hogue
  • 4,589
  • 1
  • 15
  • 27
0

Instead of using the Styles combo that it's mean to change the style of the current selection, you should use the Templates button and that way you can configure it to insert whatever content you want.

If you want to use a combo pane instead of a dialog, you should try to search for an existing plugin (this one should be quite easy) or create it on your own, but using the Styles combo is the wrong approach.

AlfonsoML
  • 12,634
  • 2
  • 46
  • 53
0

Wygwam supports templates (there's a button on the toolbar), and you'll also need to select the template_files option under Advanced Settings within the fieldtype setup. You may also need to use the "templates" setting to define the list of templates available.

More details here: http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Templates

Peter Lewis
  • 1,090
  • 1
  • 9
  • 16