mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-12 18:30:27 +00:00
Make test cases editable
This commit is contained in:
parent
b47c75785a
commit
4a0ffcfb97
@ -27,6 +27,7 @@ TestCaseWidget.prototype = new Widget();
|
||||
Render this widget into the DOM
|
||||
*/
|
||||
TestCaseWidget.prototype.render = function(parent,nextSibling) {
|
||||
var self = this;
|
||||
this.parentDomNode = parent;
|
||||
this.computeAttributes();
|
||||
this.execute();
|
||||
@ -48,7 +49,14 @@ TestCaseWidget.prototype.render = function(parent,nextSibling) {
|
||||
// Create a wiki
|
||||
this.testcaseWiki = new $tw.Wiki();
|
||||
// Always load the core plugin
|
||||
this.testcaseWiki.addTiddler(this.wiki.getTiddler("$:/core"));
|
||||
var loadTiddler = function(title) {
|
||||
var tiddler = self.wiki.getTiddler(title);
|
||||
if(tiddler) {
|
||||
self.testcaseWiki.addTiddler(tiddler);
|
||||
}
|
||||
}
|
||||
loadTiddler("$:/core");
|
||||
loadTiddler("$:/plugins/tiddlywiki/codemirror");
|
||||
// Load tiddlers from child data widgets
|
||||
var tiddlers = [];
|
||||
this.findChildrenDataWidgets(this.contentRoot.children,"data",function(widget) {
|
||||
|
@ -16,4 +16,4 @@ title: $:/core/ui/testcases/DefaultTemplate/Source
|
||||
</tbody>
|
||||
</table>
|
||||
</$list>
|
||||
<pre><$view tiddler=<<currentTab>>/></pre>
|
||||
<$edit class="tc-edit-texteditor" tiddler=<<currentTab>>/>
|
||||
|
@ -3,7 +3,8 @@
|
||||
"plugins": [
|
||||
"tiddlywiki/geospatial",
|
||||
"tiddlywiki/jszip",
|
||||
"tiddlywiki/xlsx-utils"
|
||||
"tiddlywiki/xlsx-utils",
|
||||
"tiddlywiki/codemirror"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
|
Loading…
Reference in New Issue
Block a user