cancel
Showing results for 
Search instead for 
Did you mean: 

Style in Create Web Content Wizard

peggyw
Champ in-the-making
Champ in-the-making
Does anybody know how to add a Style dropdown lists that shows all the classes/ids of the style sheets chosen to use In the Create Web Content Wizard when creating a web content using a web form?

I have added 'styleselect' to <widget xforms-type="xf:textarea"
                   appearance="full"
                   javascript-class-name="alfresco.xforms.RichTextEditor">
             <param name="theme_advanced_buttons1">bold,italic,underline,strikethrough,separator,fontselect,fontsizeselect,styleselect</param>
in \tomcat\webapps\alfresco\WEB-INF\classes\alfresco\web-client-config-wcm.xml

I have added the line
<param name="content_css">http://168.122.34.203:8080/alfresco/styles/contentr.css</param>
to point to the style sheet I want to use in the file web-client-config-wcm.xml

And I have added  <xs:annotation>
      <xs:appinfo>
       <alf:appearance>full</alf:appearance>
      </xs:appinfo>
     </xs:annotation>
    </xs:element>
to the schema of the form.

But the Style drowdown list does not show anything:
http://smgtest1.bu.edu/style.doc


Could somebody give me some insights on this?

Thanks a lot.
3 REPLIES 3

mvlach
Champ in-the-making
Champ in-the-making
Hello,

I have same problem, but with no idea. When I break this problem, I will post the solution at this place.

Bye,  Mila

mbf
Champ in-the-making
Champ in-the-making
Hello,

Has anybody resolved this problem? I have instaled Alfresco Community 3.3 and I need to use custom styles, but I can not show the styles in the dropdown list of the styleselect button.

Thanks,

thomasg
Champ in-the-making
Champ in-the-making
Hi,

To enable advanced style in TinyMCE
you need to edit tomcat/webapps/alfresco/scripts/ajax/xforms.js

and add after the following code:

alfresco.constants.TINY_MCE_DEFAULT_SETTINGS =
{
  theme: "advanced",
  mode: "exact",
  plugins: alfresco.constants.TINY_MCE_DEFAULT_PLUGINS,
  width: -1,
  height: -1,
  auto_resize: false,
  force_p_newlines: false,
  encoding: "UTF-8",
  entity_encoding: "raw",
  add_unload_trigger: false,
  add_form_submit_trigger: false,
  theme_advanced_toolbar_location: "top",
  theme_advanced_toolbar_align: "left",
  theme_advanced_buttons1: "",
  theme_advanced_buttons2: "",
  theme_advanced_buttons3: "",
[…]

the line
 theme_advanced_styles: "", 
e.g.

alfresco.constants.TINY_MCE_DEFAULT_SETTINGS =
{
  theme: "advanced",
  mode: "exact",
  plugins: alfresco.constants.TINY_MCE_DEFAULT_PLUGINS,
  width: -1,
  height: -1,
  auto_resize: false,
  force_p_newlines: false,
  encoding: "UTF-8",
  entity_encoding: "raw",
  add_unload_trigger: false,
  add_form_submit_trigger: false,
  theme_advanced_toolbar_location: "top",
  theme_advanced_toolbar_align: "left",
  theme_advanced_buttons1: "",
  theme_advanced_buttons2: "",
  theme_advanced_buttons3: "",
  theme_advanced_styles: "",


Hope it helps out.

Thomas