I did indeed use Bootstrap for an earlier version of TiddlyWiki5. I abandoned it for several reasons:* Bootstrap markup uses IDs to tie elements together, which doesn't work in dynamic environments like TW5 where it's hard to ensure that IDs remain unique* As Mario says, the JS code in Bootstrap is useless for TW5 because it doesn't fit into the TW rendering structure* Bootstrap doesn't (or didn't when I was working with it) permit elements like tabs to be resized* Bootstrap is incredibly fussy about elements needing to be direct descendants of one another and so doesn't tolerate TW5's additional wrapper elements* Bootstrap uses Less.css to generate CSS whereas in TW5 it makes more sense to reuse the existing wikitext parsing pipelineTW5 still uses normalise.css, which is also a part of Bootstrap. It does a great job of smoothing out the differences between browsersBest wishesJeremyOn Wed, Sep 18, 2013 at 1:10 PM, Eskha <khask...@gmail.com> wrote:Thank you for your nice answer.
In fact, what I had in mind was to be able to create a theme (mainly an alternative page template) using CSS elements like the navbar, the span[n], the dropdown menu, the icons, ... from the Bootstrap CSS.
If I understand correctly your answer, I could still be able to do so by building and including a customize version of Bootsrap [1] which should not override components created by the wikitext renderers. Is it correct ?
Best regards.
Eskha
[1] http://getbootstrap.com/customize/
Le mardi 17 septembre 2013 13:49:27 UTC+2, PMario a écrit :On Tuesday, September 17, 2013 9:11:42 AM UTC+2, Eskha wrote:As far as styles are concerned would it be possible to use twitter bootstrap CSS and derived themes inside TW5 or are there some technical difficulties doing so ?
(btw I think it was an option you mention when you have started TW5, wasn't it ?)
It was part of TW5, but imo it clashed with the structure created by the wikitext renderers. ... For my taste twitter bootstrap is way to bloated allready and it defines a concept, that is very different to TW5. eg: It contains javascript, that handles sliders and tabs. But the TW tab and slider handling is defined in a totally different way. Tabs and sliders will be wikitext not html.
-m--
Jeremy Ruston
mailto:jeremy...@gmail.com
Hmm, I think I found an answer to this. I'll check the TiddlyWikiDev group to see if there's another way to get the Grid option working...
Hi Joshua,Hmm, I think I found an answer to this. I'll check the TiddlyWikiDev group to see if there's another way to get the Grid option working...My first question would be: Why JSON? ...as currently JSON support in TW is limited.
--The cleanest most TiddlywWiki approach here would be using tiddler fields, imho.Best wishes,Tobias.
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/uZUsq7dgJ3E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/c32e3e27-511f-49d2-a3f3-3a414cee741c%40googlegroups.com.
- The dataTiddler will have other fields to store more character data as JSON objects, such as !!attributes, !!health, !!inventory, !!factions, !!relationships, etc.
I'll consider this topic closed.
The "grid" feature requires a separate CSS module to work (bootstrap or foundation).
I'll consider this topic closed.Not so fast. :D
The "grid" feature requires a separate CSS module to work (bootstrap or foundation).What happens without such a "module"?
...and then what is that "module" to provide so that you can use either this or that "framework", e.g. bootstrap or some other?
- Open http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css in your browser and select all and copy to clipboard
- Open https://btheado.github.io/jsoneditor.html in your browser
- Create new tiddler titled "bootstrap" or whatever.
- Paste clipboard contents into the body of the tiddler
- Add the $:/tags/Stylesheet tag to the tiddler
- Save the tiddler
The stylesheet should now be applied and the json form becames misaligned and unreadable :-(. Not sure if it is due to some conflict the the tiddlywiki styles or if it is some other problem.
if (this.format === 'grid'){ do stuff to make grid }
// Normal layout// Layout the form for Grid formatcontainer = document.createElement('div');for(i=0; i<rows.length; i++) {var row = this.theme.getGridRow();container.appendChild(row);for(j=0; j<rows[i].editors.length; j++) { var key = rows[i].editors[j].key; var editor = this.editors[key]; if(editor.options.hidden) editor.container.style.display = 'none'; else this.theme.setGridColumnSize(editor.container,rows[i].editors[j].width); row.appendChild(editor.container); }}ontainer = document.createElement('div'); $each(this.property_order, function(i,key) { var editor = self.editors[key]; if(editor.property_removed) return; var row = self.theme.getGridRow(); container.appendChild(row); if(editor.options.hidden) editor.container.style.display = 'none'; else self.theme.setGridColumnSize(editor.container,12); row.appendChild(editor.container); });getGridRow: function() {
var el = document.createElement('div');
el.className = 'row';
return el;
}<div class="well well-sm" style="padding-bottom: 0px;"> <div> <div> <div class="row"> <div data-schematype="string" data-schemapath="root.name" class="col-md-12"> <div class=" form-group"> <label class=" control-label">name</label> <input type="text" class="form-control" pattern=".{4,}" name="root[name]"> <p class="help-block">First and Last name</p> </div> <div/> </div> </div> <div class="row"> <div data-schematype="integer" data-schemapath="root.age" class="col-md-12"> <div class=" form-group"> <label class=" control-label">age</label> <input type="text" class="form-control" name="root[age]"> </div> <div/> </div> </div> <div class="row"> <div data-schematype="string" data-schemapath="root.favorite_color" class="col-md-12"> <div class=" form-group"> <label class=" control-label">favorite color</label> <input type="color" class="form-control" data-schemaformat="color" name="root[favorite_color]"> </div> <div/> </div> </div> <div class="row"> <div data-schematype="string" data-schemapath="root.gender" class="col-md-12"> <div class=" form-group"> <label class=" control-label">gender</label> <select class="form-control" name="root[gender]"> <option value="undefined"> </option> <option value="male">male</option> <option value="female">female</option> </select> </div> <div/> </div> </div> </div> </div></div><div class="well well-sm" style="padding-bottom: 0px;"> <div> <div> <div class="row"> <div data-schematype="string" data-schemapath="root.name" class="col-md-5"> <div class=" form-group"> <label class=" control-label">name</label> <input type="text" class="form-control" pattern=".{4,}" name="root[name]"> <p class="help-block">First and Last name</p> </div> <div/> </div> <div data-schematype="integer" data-schemapath="root.age" class="col-md-2"> <div class=" form-group"> <label class=" control-label">age</label> <input type="text" class="form-control" name="root[age]"> </div> <div/> </div> <div data-schematype="string" data-schemapath="root.favorite_color" class="col-md-3"> <div class=" form-group"> <label class=" control-label">favorite color</label> <input type="color" class="form-control" data-schemaformat="color" name="root[favorite_color]"> </div> <div/> </div> <div data-schematype="string" data-schemapath="root.gender" class="col-md-2"> <div class=" form-group"> <label class=" control-label">gender</label> <select class="form-control" name="root[gender]"> <option value="undefined"> </option> <option value="male">male</option> <option value="female">female</option> </select> </div> <div/> </div> </div> </div> </div></div>--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/uZUsq7dgJ3E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/e8bf275c-d8ce-43f8-9c9d-a6f8e3c77f14%40googlegroups.com.
JSONEditorWidget.prototype.getOptionsFromAttributes = function() { ... }The jsonOutput attribute however is read-write. The form is populated from some initial json and as the user makes changes via the form, the resulting json is updated and saved back to the tiddler. So I thought I would need a pointer to where the json should be stored and a value wouldn't work there.
I guess I could make it more like an edit widget (since it is really about editing json) and associate it with certain tiddler types (any application/json which also had a schema referenced?). If that would work, it would probably be more consistent with the rest of TiddlyWiki.