mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-08-29 20:42:44 +00:00
24 lines
533 B
JavaScript
24 lines
533 B
JavaScript
/*\
|
|
title: $:/core/modules/editor/operations/text/replace-all.js
|
|
type: application/javascript
|
|
module-type: texteditoroperation
|
|
|
|
Text editor operation to replace the entire text
|
|
|
|
\*/
|
|
(function(){
|
|
|
|
/*jslint node: true, browser: true */
|
|
/*global $tw: false */
|
|
"use strict";
|
|
|
|
exports["replace-all"] = function(event,operation) {
|
|
operation.cutStart = 0;
|
|
operation.cutEnd = operation.text.length;
|
|
operation.replacement = event.paramObject.text;
|
|
operation.newSelStart = 0;
|
|
operation.newSelEnd = operation.replacement.length;
|
|
};
|
|
|
|
})();
|