Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 1... Línea 1...
1
/**
1
/**
2
 * TinyMCE version 6.8.3 (2024-02-08)
2
 * TinyMCE version 7.7.1 (2025-03-05)
3
 */
3
 */
Línea 4... Línea 4...
4
 
4
 
5
(function () {
5
(function () {
Línea 19... Línea 19...
19
      };
19
      };
20
    };
20
    };
Línea 21... Línea 21...
21
 
21
 
Línea 22... Línea -...
22
    var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
-
 
23
 
-
 
24
    const constant = value => {
-
 
25
      return () => {
-
 
26
        return value;
-
 
27
      };
-
 
28
    };
22
    var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
Línea 29... Línea 23...
29
 
23
 
Línea 30... Línea 24...
30
    var global = tinymce.util.Tools.resolve('tinymce.Env');
24
    var global = tinymce.util.Tools.resolve('tinymce.Env');
Línea 103... Línea 97...
103
        resizeHeight = maxHeight;
97
        resizeHeight = maxHeight;
104
        toggleScrolling(editor, true);
98
        toggleScrolling(editor, true);
105
      } else {
99
      } else {
106
        toggleScrolling(editor, false);
100
        toggleScrolling(editor, false);
107
      }
101
      }
108
      if (resizeHeight !== oldSize.get()) {
102
      const old = oldSize.get();
-
 
103
      if (old.set) {
-
 
104
        editor.dom.setStyles(editor.getDoc().documentElement, { 'min-height': 0 });
-
 
105
        editor.dom.setStyles(editor.getBody(), { 'min-height': 'inherit' });
-
 
106
      }
-
 
107
      if (resizeHeight !== old.totalHeight && (contentHeight - resizeBottomMargin !== old.contentHeight || !old.set)) {
109
        const deltaSize = resizeHeight - oldSize.get();
108
        const deltaSize = resizeHeight - old.totalHeight;
110
        dom.setStyle(editor.getContainer(), 'height', resizeHeight + 'px');
109
        dom.setStyle(editor.getContainer(), 'height', resizeHeight + 'px');
-
 
110
        oldSize.set({
111
        oldSize.set(resizeHeight);
111
          totalHeight: resizeHeight,
-
 
112
          contentHeight,
-
 
113
          set: true
-
 
114
        });
112
        fireResizeEditor(editor);
115
        fireResizeEditor(editor);
113
        if (global.browser.isSafari() && (global.os.isMacOS() || global.os.isiOS())) {
116
        if (global.browser.isSafari() && (global.os.isMacOS() || global.os.isiOS())) {
114
          const win = editor.getWin();
117
          const win = editor.getWin();
115
          win.scrollTo(win.pageXOffset, win.pageYOffset);
118
          win.scrollTo(win.pageXOffset, win.pageYOffset);
116
        }
119
        }
Línea 121... Línea 124...
121
          resize(editor, oldSize, trigger, getExtraMarginBottom);
124
          resize(editor, oldSize, trigger, getExtraMarginBottom);
122
        }
125
        }
123
      }
126
      }
124
    };
127
    };
125
    const setup = (editor, oldSize) => {
128
    const setup = (editor, oldSize) => {
126
      let getExtraMarginBottom = () => getAutoResizeBottomMargin(editor);
129
      const getExtraMarginBottom = () => getAutoResizeBottomMargin(editor);
127
      let resizeCounter;
-
 
128
      let sizeAfterFirstResize;
-
 
129
      editor.on('init', e => {
130
      editor.on('init', e => {
130
        resizeCounter = 0;
-
 
131
        const overflowPadding = getAutoResizeOverflowPadding(editor);
131
        const overflowPadding = getAutoResizeOverflowPadding(editor);
132
        const dom = editor.dom;
132
        const dom = editor.dom;
133
        dom.setStyles(editor.getDoc().documentElement, { height: 'auto' });
133
        dom.setStyles(editor.getDoc().documentElement, { height: 'auto' });
134
        if (global.browser.isEdge() || global.browser.isIE()) {
134
        if (global.browser.isEdge() || global.browser.isIE()) {
135
          dom.setStyles(editor.getBody(), {
135
          dom.setStyles(editor.getBody(), {
Línea 142... Línea 142...
142
            paddingLeft: overflowPadding,
142
            paddingLeft: overflowPadding,
143
            paddingRight: overflowPadding
143
            paddingRight: overflowPadding
144
          });
144
          });
145
        }
145
        }
146
        resize(editor, oldSize, e, getExtraMarginBottom);
146
        resize(editor, oldSize, e, getExtraMarginBottom);
147
        resizeCounter += 1;
-
 
148
      });
147
      });
149
      editor.on('NodeChange SetContent keyup FullscreenStateChanged ResizeContent', e => {
148
      editor.on('NodeChange SetContent keyup FullscreenStateChanged ResizeContent', e => {
150
        if (resizeCounter === 1) {
-
 
151
          sizeAfterFirstResize = editor.getContainer().offsetHeight;
-
 
152
          resize(editor, oldSize, e, getExtraMarginBottom);
149
        resize(editor, oldSize, e, getExtraMarginBottom);
153
          resizeCounter += 1;
-
 
154
        } else if (resizeCounter === 2) {
-
 
155
          const isLooping = sizeAfterFirstResize < editor.getContainer().offsetHeight;
-
 
156
          if (isLooping) {
-
 
157
            const dom = editor.dom;
-
 
158
            const doc = editor.getDoc();
-
 
159
            dom.setStyles(doc.documentElement, { 'min-height': 0 });
-
 
160
            dom.setStyles(editor.getBody(), { 'min-height': 'inherit' });
-
 
161
          }
-
 
162
          getExtraMarginBottom = isLooping ? constant(0) : getExtraMarginBottom;
-
 
163
          resizeCounter += 1;
-
 
164
        } else {
-
 
165
          resize(editor, oldSize, e, getExtraMarginBottom);
-
 
166
        }
-
 
167
      });
150
      });
168
    };
151
    };
Línea 169... Línea 152...
169
 
152
 
170
    const register = (editor, oldSize) => {
153
    const register = (editor, oldSize) => {
Línea 178... Línea 161...
178
        register$1(editor);
161
        register$1(editor);
179
        if (!editor.options.isSet('resize')) {
162
        if (!editor.options.isSet('resize')) {
180
          editor.options.set('resize', false);
163
          editor.options.set('resize', false);
181
        }
164
        }
182
        if (!editor.inline) {
165
        if (!editor.inline) {
183
          const oldSize = Cell(0);
166
          const oldSize = Cell({
-
 
167
            totalHeight: 0,
-
 
168
            contentHeight: 0,
-
 
169
            set: false
-
 
170
          });
184
          register(editor, oldSize);
171
          register(editor, oldSize);
185
          setup(editor, oldSize);
172
          setup(editor, oldSize);
186
        }
173
        }
187
      });
174
      });
188
    };
175
    };