Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-49292

There is no programmatic way to access Editor instance

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.7.6, 2.8.4
    • Text editor Atto
    • MOODLE_27_STABLE, MOODLE_28_STABLE
    • Hide

      This has no immediate effect in core as core does not use it.

      To test you need to make sure that Atto editor has not been affected at all.
      The code change is in the initialisation of the editor.

      1. Log in as an admin.
      2. Edit a course and check that the editor loads for the desc.
      3. Edit a quiz check that all editor instances load correctly.
      Show
      This has no immediate effect in core as core does not use it. To test you need to make sure that Atto editor has not been affected at all. The code change is in the initialisation of the editor. Log in as an admin. Edit a course and check that the editor loads for the desc. Edit a quiz check that all editor instances load correctly.

      Sometimes it is useful to access Editor instance using javascript.
      For instance, when content of Editor needs to be cleaned or filled using pre-defined template.

      I suggest adding Editor instance to relevant textarea as one of data attribute:
      this.textarea.setData('Editor', this);

      In this case Editor instance can be accessed by:
      Y.one('#textareaid').getData('Editor')
      and perform required action like cleanEditorHTML or updateFromTextArea

            valeriik Valerii Kuznetsov
            valeriik Valerii Kuznetsov
            Frédéric Massart Frédéric Massart
            Dan Poltawski Dan Poltawski
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.