- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowiki::formfield::richtext::wym
::xowiki::formfield::richtext::wym create ... \
[ -CSSclass (default "wymeditor") ] \
[ -height height ] \
[ -plugins (default "hovertools resizable fullscreen") ] \
[ -skin (default "silver") ] \
[ -width width ]
Class Relations
::xotcl::Class create ::xowiki::formfield::richtext::wym \ -superclass ::xowiki::formfield::richtextMethods (to be applied on instances)
CSSclass (setter)
height (setter)
initialize (scripted)
next set :widget_type richtextplugins (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)
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables