%3 ::xowiki::formfield::richtext::ckeditor4 ::xowiki::formfield::richtext::ckeditor4 initialize js_image_helper pathNames render_input ::xowiki::formfield::richtext ::xowiki::formfield::richtext check=safe_html editor initialize pretty_value render_richtext_as_div ::xowiki::formfield::richtext::ckeditor4->::xowiki::formfield::richtext ::xowiki::formfield::form ::xowiki::formfield::form check=form initialize ::xowiki::formfield::form->::xowiki::formfield::richtext ::xowiki::formfield::localized_richtext ::xowiki::formfield::localized_richtext ::xowiki::formfield::localized_richtext->::xowiki::formfield::richtext ::xowiki::formfield::localized_text ::xowiki::formfield::localized_text ::xowiki::formfield::localized_richtext->::xowiki::formfield::localized_text ::xowiki::formfield::richtext::wym ::xowiki::formfield::richtext::wym initialize render_input ::xowiki::formfield::richtext::wym->::xowiki::formfield::richtext ::xowiki::formfield::richtext::xinha ::xowiki::formfield::richtext::xinha initialize render_input ::xowiki::formfield::richtext::xinha->::xowiki::formfield::richtext ::xowiki::formfield::textarea ::xowiki::formfield::textarea add_statistics clear_editor_mixins initialize render_input set_feedback ::xowiki::formfield::richtext->::xowiki::formfield::textarea ::xowiki::formfield::FormField ::xowiki::formfield::FormField ::xowiki::formfield::textarea->::xowiki::formfield::FormField

Class ::xowiki::formfield::richtext::wym

::xowiki::formfield::richtext::wym[i] create ... \
           [ -CSSclass (default "wymeditor") ] \
           [ -height height ] \
           [ -plugins (default "hovertools resizable fullscreen") ] \
           [ -skin (default "silver") ] \
           [ -width width ]

Class Relations

  • class: ::xotcl::Class[i]
  • superclass: ::xowiki::formfield::richtext[i]
::xotcl::Class create ::xowiki::formfield::richtext::wym \
     -superclass ::xowiki::formfield::richtext

Methods (to be applied on instances)

  • CSSclass (setter)

  • height (setter)

  • initialize (scripted)

    next
    set :widget_type richtext
  • plugins (setter)

  • render_input (scripted)

    set disabled [:is_disabled]
    if {![:istype ::xowiki::formfield::richtext] || $disabled } {
      :render_richtext_as_div
    } else {
      ::xo::Page requireCSS "/resources/xowiki/wymeditor/skins/default/screen.css"
      ::xo::Page requireJS urn:ad:js:jquery
      ::xo::Page requireJS  "/resources/xowiki/wymeditor/jquery.wymeditor.pack.js"
      set postinit ""
      foreach plugin {hovertools resizable fullscreen embed} {
        if {$plugin in [:plugins]} {
          switch -- $plugin {
            embed {}
            resizable {
              ::xo::Page requireJS  urn:ad:js:jquery-ui
              append postinit "wym.${plugin}();\n"
            }
            default {append postinit "wym.${plugin}();\n"}
          }
          ::xo::Page requireJS  "/resources/xowiki/wymeditor/plugins/$plugin/jquery.wymeditor.$plugin.js"
        }
      }
      regsub -all -- {[.:]} ${:id} {\\\\&} JID
    
      # possible skins are per in the distribution: "default", "sliver", "minimal" and "twopanels"
      set config [list "skin: '[:skin]'"]
    
      #:msg "wym, h [info exists :height] || w [info exists :width]"
      if {[info exists :height] || [info exists :width]} {
        set height_cmd ""
        set width_cmd ""
        if {[info exists :height]} {set height_cmd "jQuery(wym._box).find(wym._options.iframeSelector).css('height','[:height]');"}
        if {[info exists :width]}  {set width_cmd "wym_box.css('width', '[:width]');"}
        set postInit [subst -nocommand -nobackslash {
          postInit: function(wym) {
            wym_box = jQuery(".wym_box");
            $height_cmd
            $width_cmd
            $postinit
          }}]
        lappend config $postInit
      }
      if {$config ne ""} {
        set config \{[join $config ,]\}
      }
      ::xo::Page requireJS [subst -nocommand -nobackslash {
        jQuery(function() {
          jQuery("#$JID").wymeditor($config);
        });
      }]
    
      next
    }
  • skin (setter)

  • width (setter)