xotcl.wu-wien.ac.at
Begin main content
Methods: Source: Variables:
[All Methods | Documented Methods | Hide Methods] [Display Source | Hide Source] [Show Variables | Hide Variables]

::xotcl::Class[i] ::xowiki::formfield::richtext

Class Hierarchy of ::xowiki::formfield::richtext

  • ::xotcl::Object[i]
    Meta-class:
    ::xotcl::Class[i]
    Methods for instances:
    __api_make_doc, __api_make_forward_doc, __timediff, abstract, ad_doc, ad_forward, ad_proc, appendC, arrayC, asHTML, autonameC, check, classC, cleanupC, configureC, containsC, copyC, db_0or1rowC, db_1rowC, debug, defaultmethodC, destroyC, destroy_on_cleanup, ds, evalC, existsC, extractConfigureArg, filterC, filterguardC, filtersearch, forward, hasclass, incrC, infoC, init, instvarC, invarC, isclass, ismetaclass, ismixin, isobject, istype, lappendC, log, method, mixinC, mixinguardC, moveC, msg, noinitC, objectparameter, parametercmdC, proc, procsearch, qn, requireNamespaceC, residualargsC, self, serialize, setC, set_instance_vars_defaults, show-object, substC, traceC, unknown, unsetC, uplevelC, upvarC, volatileC, vwait
    Methods to be applied on the class (in addition to the methods provided by the meta-class):
    getExitHandler, setExitHandler, unsetExitHandler
    • ::xo::OrderedComposite[i]
      Meta-class:
      ::xotcl::Class[i]
      Methods for instances:
      __compare, add, children, contains, delete, destroy, last_child, orderby, show
      Methods to be applied on the class:
      Methods provided by the meta-class
      • ::xo::tdom::AttributeManager[i]
        Meta-class:
        ::xotcl::Class[i]
        Methods for instances:
        get_attributes, get_local_attributes
        Methods to be applied on the class:
        Methods provided by the meta-class
        • ::xo::tdom::Object[i]
          Meta-class:
          ::xotcl::Class[i]
          Parameter for instances:
          autorender (default "true")
          Methods for instances:
          render
          Methods to be applied on the class:
          Methods provided by the meta-class
          • ::xowiki::formfield::FormField[i]
            Meta-class:
            ::xotcl::Class[i]
            Parameter for instances:
            CSSclass, answer, autocomplete, autofocus, correct_when, default, disabled, display_field (default "true"), error_msg (default ""), feedback_answer_correct, feedback_answer_incorrect, form_item_wrapper_CSSclass (default "form-item-wrapper"), form_widget_CSSclass (default "form-widget"), formnovalidate, help_text (default ""), hide_value (default "false"), id, inline (default "false"), label, locale, mode (default "edit"), multiple, name, object, pattern, placeholder, readonly, required (default "false"), show_raw_value, slot, spec (default ""), style, title, type (default "text"), validate_via_ajax, validator (default ""), value (default "")
            Methods for instances:
            answer_check=answer_words, answer_check=btwn, answer_check=eq, answer_check=ge, answer_check=gt, answer_check=in, answer_check=le, answer_check=lt, answer_check=match, answer_is_correct, asWidgetSpec, behavior, config_from_spec, convert_to_external, convert_to_internal, field_value, has_instance_variable, init, initialize, interprete_single_spec, localize, pretty_image, pretty_value, remove_omit, render, render_error_msg, render_form_widget, render_help_text, render_input, render_item, render_localizer, repeat, reset_parameter, same_value, set_disabled, set_is_repeat_template, validate, validation_check, value_if_nothing_is_returned_from_form
            Methods to be applied on the class (in addition to the methods provided by the meta-class):
            fc_decode, fc_encode, get_from_name, get_single_spec, interprete_condition
            • ::xowiki::formfield::textarea[i]
              Meta-class:
              ::xotcl::Class[i]
              Parameter for instances:
              cols (default "80"), rows (default "2"), spell (default "false")
              Methods for instances:
              initialize, render_input
              Methods to be applied on the class:
              Methods provided by the meta-class
              • ::xowiki::formfield::richtext[i]
                Meta-class:
                ::xotcl::Class[i]
                Parameter for instances:
                displayMode (default "standard"), folder_id, height, plugins, script_dir, width, wiki (default "false")
                Methods for instances:
                check=safe_html, editor, initialize, pretty_value, render_richtext_as_div, validatorC
                Methods to be applied on the class:
                Methods provided by the meta-class

Class Relations

  • superclass: ::xowiki::formfield::textarea[i]
  • subclass: ::xowiki::formfield::form[i], ::xowiki::formfield::richtext::ckeditor[i], ::xowiki::formfield::richtext::ckeditor4[i], ::xowiki::formfield::richtext::wym[i], ::xowiki::formfield::richtext::xinha[i]
::xotcl::Class create ::xowiki::formfield::richtext \
     -superclass ::xowiki::formfield::textarea \
     -parameter {{displayMode standard} folder_id height plugins script_dir width {wiki false}}

Methods

  • instproc check=safe_html

    ::1889053 instproc check=safe_html value {
        # don't check if the user has sufficient permissions on the package
        if {[::xo::cc permission  -object_id [::xo::cc package_id]  -privilege swa  -party_id [::xo::cc user_id]]} {
          set msg ""
        } else {
          set msg [ad_html_security_check $value]
        }
        if {$msg ne ""} {
          my uplevel [list set errorMsg $msg]
          return 0
        }
        return 1
      }
    
  • instproc editor

    ::1889053 instproc editor args {
        #
        # TODO: this should be made a slot setting
        #
        #my msg "setting editor for [my name], args=$args,[llength $args]"
        if {[llength $args] == 0} {return [my set editor]}
        set editor [lindex $args 0]
        if {[my exists editor] && $editor eq [my set editor] && [my exists __initialized]} return
    
        set editor_class [self class]::$editor
        if {$editor ne "" && ![my hasclass $editor_class]} {
          if {![my isclass $editor_class]} {
    	set editors [list]
    	foreach c [::xowiki::formfield::richtext info subclass] {
              if {![$c exists editor_mixin]} continue
    	  lappend editors [namespace tail $c]
    	}
    	error [_ xowiki.error-form_constraint-unknown_editor  [list name [my name] editor [my editor] editors $editors]]
          }
          foreach m [my info mixin] {if {[$m exists editor_mixin]} {my mixin delete $m}}
          my mixin add $editor_class
          #my msg "MIXIN $editor: [my info precedence]"
          my reset_parameter
          my set __initialized 1
        } 
        my set editor $editor
      }
    
  • instproc initialize

    ::1889053 instproc initialize {} {
        my display_field false
        switch -- [my set displayMode] {
          inplace -
          inline -
          standard {}
          default {error "value '[my set displayMode]' invalid: valid entries for displayMode are inplace, inline or standard (default)"}
        }
        next
        if {![my exists editor]} {
          # set the default editor; TODO: should be a parameter
          my set editor xinha
          #my set editor ckeditor4
          #my msg "setting default of [my name] to [my set editor]"
        }
        if {![my exists __initialized]} {
          # Mixin the editor based on the attribute 'editor' if necessary
          # and call initialize again in this case...
          my editor [my set editor]
          my initialize
        }
      }
    
  • instproc pretty_value

    ::1889053 instproc pretty_value v {
        # for richtext, perform minimal output escaping
        if {[my wiki]} {
          return [[my object] substitute_markup $v]
        } else {
          return [string map [list @ "@"] $v]
        }
      }
    
  • instproc render_richtext_as_div

    ::1889053 instproc render_richtext_as_div {} {
        #my msg "[my get_attributes id style {CSSclass class}]"
        ::html::div [my get_attributes id style {CSSclass class}] {
          if {[my wiki]} {
            [my object] set unresolved_references 0
            [my object] set __unresolved_references [list]
            #::html::t -disableOutputEscaping [[my object] substitute_markup [list [my value] text/html]]
            ::html::t -disableOutputEscaping [[my object] substitute_markup [my value]]
          } else {
            ::html::t -disableOutputEscaping [my value]
          }
        }
        ::html::div
      }
    

Methods: Source: Variables:
[All Methods | Documented Methods | Hide Methods] [Display Source | Hide Source] [Show Variables | Hide Variables]