Files
Umbraco-CMS/umbraco/presentation/umbraco_client/tinymce3/umbraco-implementation-notes.txt
2012-05-09 14:14:42 -02:00

80 lines
3.6 KiB
Plaintext

When upgrading TinyMCE be aware of the following Umbraco specific things:
0. General
- Start by unpacking the tinymce update to /umbraco_client/tinymce3/
- Check the files listed below by 'Visual Diff'-ing to the previous version
- Apply changes to the _src.js versions, which is the version that gets loaded by the .NET Compressor used by Umbraco.
Hints:
- While comparing to prev. version; Look for comments starting with UMBRACO, these mark changes that were made to make TinyMCE play nicely with Umbraco.
- It doesn't hurt to YUI compress and store the changed _src.js files to the .js equivalents, just to make sure everything remains in sync.
1. Plugins
Unless a specific file or folder is mentioned, the following changes should be applied to the editor_plugin(_src).js file.
1.1 Contextmenu
- Update translations
- Ensure Umbraco image plugin is used (mceUmbimage)
1.2 Paste
- Add Umbraco-specific preprocessing to the _preProcess method
1.3 umbracoimg
- Apply any changes that were applied to the default advImg plugin
- Make sure you keep the existing settings (width/height/modal window location)
1.4 advLink
- Configure the plugin to load the Umbraco modal window
- Correct width & height
- js/advLink.js
- Update the advlink.js to make sure that it doesn't check for the loads of tabs in the traditional tiny link dialog (check old version)
1.5 InlinePopups
- Check for changes that would require the Umbraco skin to be updated.
If the default skin hasn't changed, the Umbraco skin probably won't need to either.
2. Umbraco Theme
The Umbraco theme is based off the Advanced theme which is included with TinyMCE.
You will need to sync the changes made to the Advanced theme, while keeping the Umbraco-specific code.
- Update the "langs" folder. Make sure to replace "advanced" with "umbraco" in each file.
- Update editor_template.js to correctly inject the external toolbar in the Umbraco UI
- Update the .html dialog files
- Head will contain a custom base-path & possibly encoding
- The Action Panel will contain custom markup surrounding the buttons. Make sure the buttons are up-to-date.
- Some labels are hardcoded in the Umbraco version
3. OBSOLETE
The following instruction appear to be obsolete
3.1 Fix for macro div being inserted with surrounding p (TinyMCE 3.4.7)
if (s.forced_root_block) {
//ed.onInit.add(t.forceRoots, t);
//ed.onSetContent.add(t.forceRoots, t);
//ed.onBeforeGetContent.add(t.forceRoots, t);
}
},
setup : function() {
var t = this, ed = t.editor, s = ed.settings, dom = ed.dom, selection = ed.selection;
// Force root blocks when typing and when getting output
if (s.forced_root_block) {
//ed.onBeforeExecCommand.add(t.forceRoots, t);
ed.onKeyUp.add(t.forceRoots, t);
ed.onPreProcess.add(t.forceRoots, t);
}
4. EXTRA NOTES BY SGAY - MIGRATING TOWARDS 3.5
Migration performed by merging TinyMCE changes into Umbraco + TinyMCE-3.4.7.
All compressed .js files removed, since they are not used anyway, to keep things clean.
Umbraco expressely uses _src.js files, see the modified compressor code.
Only tiny_mce_popup.js remains compressed, because that is how it is used, plus the original Umbraco Code used the stock 3.4 version so Umbraco does not seem to patch it. In any case, source is in TinyMCE dev package, under "classes", Popup.js.
Currently at TinyMCE 3.5
Still some work needs to be done on the Umbraco template, ui.css and editor_template.js
Especially to fix the external toolbar, to get it closer to the 'avanced' theme
The idea being to have as little differences as possible with 'advanced'