mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-18 18:29:42 +00:00
2adf09129d
Tada!
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;
|
|
};
|
|
|
|
})();
|