Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The following instructions apply to versions 2.x.x and 3.x.x of Refinery CMS.</p> <p>However, in version 3.x.x you will need to use custom_visual_editor_boot_options instead of custom_wymeditor_boot_options.</p> <p>Using this file: <a href="https://github.com/refinery/refinerycms/blob/master/core/app/assets/javascripts/admin.js" rel="nofollow">https://github.com/refinery/refinerycms/blob/master/core/app/assets/javascripts/admin.js</a> you can specify custom options for WYMeditor in Refinery.</p> <p>First, you need to override the file:</p> <pre><code>bundle exec rake refinery:override javascript=admin </code></pre> <p>Now, open app/assets/javascripts/admin.js and edit it to be like the following:</p> <pre><code>// Use this to customize the wymeditor boot process // Just mirror the options specified in boot_wym.js with the new options here. // This will completely override anything specified in boot_wym.js for that key. // e.g. skin: 'something_else' if (typeof(custom_wymeditor_boot_options) == "undefined") { custom_wymeditor_boot_options = { containersItems: [ {'name': 'h1', 'title':'Heading_1', 'css':'wym_containers_h1'} , {'name': 'h2', 'title':'Heading_2', 'css':'wym_containers_h2'} , {'name': 'h3', 'title':'Heading_3', 'css':'wym_containers_h3'} , {'name': 'h4', 'title':'Heading_4', 'css':'wym_containers_h4'} , {'name': 'p', 'title':'Paragraph', 'css':'wym_containers_p'} ] }; } </code></pre> <p>Note that what you are doing is overriding boot_wym.js.erb which only specifies h1, h2, h3 and p as container tags. See: <a href="https://github.com/refinery/refinerycms/blob/2-0-stable/core/app/assets/javascripts/refinery/boot_wym.js.erb#L49-L54" rel="nofollow">https://github.com/refinery/refinerycms/blob/2-0-stable/core/app/assets/javascripts/refinery/boot_wym.js.erb#L49-L54</a></p> <p>Any options that you specify inside custom_wymeditor_boot_options override anything inside wymeditor_boot_options in boot_wym.js.erb so make sure that it's valid Javascript or else the editors won't load at all.</p> <p>Hope that helps; let me know if you need anything clarified.</p> <p>Phil</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload