Introduce extensible viewer modules for the view macro

This commit is contained in:
Jeremy Ruston
2012-10-18 18:27:27 +01:00
parent 7d60c8f55e
commit cd04fa22c6
8 changed files with 186 additions and 71 deletions
+12
View File
@@ -523,6 +523,18 @@ exports.initEditors = function(moduleType) {
}
};
/*
Install viewer modules for the edit macro
*/
exports.initViewers = function(moduleType) {
moduleType = moduleType || "viewer";
var viewMacro = this.macros.view;
if(viewMacro) {
viewMacro.viewers = {};
$tw.modules.applyMethods(moduleType,viewMacro.viewers);
}
};
/*
Install view modules for the story macro
*/