Well, the error is that you post up a list.. and voila beautiful.. it's there..
But when you click modify, then you will see that it now says list type = none....
Then when you save it again, obviously the list disappears. No squares..
- But this only happens when you click the square lists though..
- Meaning that it can't save lists which do not have type explicitly stated?
You can try modifying my post to see the effect.. Or simply try it out yourself! :(
Apparently:
/* Set list-style to none by default. Best in most places.*/
ul, ol {
list-style: none;
}
kicks in and overrides the default style and sceditor picks that one for the list...even though in fact it should not.
After some testing, I would propose to:
diff --git a/themes/default/css/index.css b/themes/default/css/index.css
index cac2546..938d429 100644
--- a/themes/default/css/index.css
+++ b/themes/default/css/index.css
@@ -805,8 +805,8 @@ strong, .bbc_strong {
.bbc_list {
padding: 0 0 0 35px;
- list-style-type: square;
- text-align: left;
+ list-style-type: disc;
}
/* Everything is same except HTML5 valid */
diff --git a/themes/default/scripts/jquery.sceditor.elkarte.js b/themes/default/scripts/jquery.sceditor.elkarte.js
index e19f2f8..4b5a5fd 100644
--- a/themes/default/scripts/jquery.sceditor.elkarte.js
+++ b/themes/default/scripts/jquery.sceditor.elkarte.js
@@ -537,7 +537,7 @@ $.sceditor.plugins.bbcode.bbcode
if (attrs.type)
style = 'style="list-style-type: ' + attrs.type + '"';
- return '<' + code + ' ' + style + '>' + content + '</' + code + '>';
+ return '<' + code + ' class="bbc_list" ' + style + '>' + content + '</' + code + '>';
}
})
.set('li', {
@@ -556,7 +556,7 @@ $.sceditor.plugins.bbcode.bbcode
},
isInline: false,
skipLastLineBreak: true,
- html: '<ul>{0}</ul>'
+ html: '<ul class="bbc_list">{0}</ul>'
})
.set('ol', {
tags: {
It seems to fix the issue here.
If I would like to temporarily fix the Beta 1.1 version I have, which part of the code should I change?
I don't really get the code you have typed out.. :(
themes/default/css/index.css:
From
.bbc_list {
padding: 0 0 0 35px;
list-style-type: square;
text-align: left;
}
to:
.bbc_list {
padding: 0 0 0 35px;
list-style-type: disc;
}
themes/default/scripts/jquery.sceditor.elkarte.js:
from:
return '<' + code + ' ' + style + '>' + content + '</' + code + '>';
to:
return '<' + code + ' class="bbc_list" ' + style + '>' + content + '</' + code + '>';
and from:
html: '<ul>{0}</ul>'
to:
html: '<ul class="bbc_list">{0}</ul>'
HOORAY IT WORKS! :D :D :D