mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-02 12:19:11 +00:00
Widgets and macro calls should be spans not divs
Although it does mean that we'll end up creating divs inside spans, which isn't strictly legal but works in all browsers
This commit is contained in:
parent
2689f6b1e5
commit
6ccf13e624
@ -83,7 +83,7 @@ MacroCallRenderer.prototype.render = function(type) {
|
|||||||
|
|
||||||
MacroCallRenderer.prototype.renderInDom = function() {
|
MacroCallRenderer.prototype.renderInDom = function() {
|
||||||
// Create the element
|
// Create the element
|
||||||
this.domNode = document.createElement("div");
|
this.domNode = document.createElement("span");
|
||||||
this.domNode.setAttribute("data-macro-name",this.parseTreeNode.name);
|
this.domNode.setAttribute("data-macro-name",this.parseTreeNode.name);
|
||||||
// Render any child nodes
|
// Render any child nodes
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@ -77,7 +77,7 @@ WidgetRenderer.prototype.render = function(type) {
|
|||||||
|
|
||||||
WidgetRenderer.prototype.renderInDom = function() {
|
WidgetRenderer.prototype.renderInDom = function() {
|
||||||
// Create the wrapper element
|
// Create the wrapper element
|
||||||
this.domNode = document.createElement("div");
|
this.domNode = document.createElement("span");
|
||||||
this.domNode.setAttribute("data-widget-type",this.parseTreeNode.tag);
|
this.domNode.setAttribute("data-widget-type",this.parseTreeNode.tag);
|
||||||
this.domNode.setAttribute("data-widget-attr",JSON.stringify(this.attributes));
|
this.domNode.setAttribute("data-widget-attr",JSON.stringify(this.attributes));
|
||||||
// Render the widget if we've got one
|
// Render the widget if we've got one
|
||||||
|
Loading…
Reference in New Issue
Block a user