mirror of
https://github.com/webodf/WebODF.git
synced 2026-11-30 16:47:58 +01:00
* Supports multiple instances in the same doc * Able to exercise entire selection controller * Can say meow (and other text manipulation actions) * Knows about undo & redo * Will also destroy your document formatting too! * Can cut, copy & paste * Bella is a tidy cat and likes valid documents * Bella can be hooked up to use an existing cursor * Custom actions to be loaded externally * Has AMD integration * Add checks to ensure the cursor is in a valid step. Issue highlighted in review of PR #451. * Add a seeded random number generator to allow reproduction of crashes. Original source: https://github.com/davidbau/seedrandom * Add some really simple reporting stats * Allow seed to be specified via URL Major features ============== Add an "auto drive" feature (the cat herder) Auto drive will automatically cycle the page after the specified number of pounces. If an unhandled exception occurs, it will PUT a file to the server in the same location that contains the number of pounces that happened, and the original seed, along with the error information. Notes ===== * Limit how frequently document length checks are performed * Using a real SessionController causes problems with double-events
25 lines
726 B
JavaScript
25 lines
726 B
JavaScript
define("webodf/plugins/bella/BellaControl", [
|
|
"webodf/plugins/bella/Bella"
|
|
],
|
|
function(Bella) {
|
|
"use strict";
|
|
|
|
function BellaControl(onInitialise) {
|
|
var bella;
|
|
|
|
this.setEditorSession = function(editorSession) {
|
|
if (bella) {
|
|
bella.destroy();
|
|
bella = undefined;
|
|
}
|
|
if (editorSession) {
|
|
bella = new Bella(Bella.parseConfig(window.location.search));
|
|
bella.addToDocument(editorSession.sessionController);
|
|
editorSession.sessionView.showCaretAvatars();
|
|
editorSession.sessionView.showEditInfoMarkers();
|
|
}
|
|
};
|
|
}
|
|
|
|
return BellaControl;
|
|
}); |