Aug 23, 2019, 11:06 PM

News:

Have you backed up YOUR database today


Code tags

Started by Bigguy, Mar 29, 2019, 03:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bigguy

Mar 29, 2019, 03:25 PM Last Edit: Apr 12, 2019, 07:58 PM by Bigguy
I'm gettin tired of this. I keep hopin it gets fixed but never does. Here is a section of css code copy and pasted into the editor, highlighted and the code bbc button pressed.

/* Those classes are sharing exact same gradient. *//* Background of buttons */.dropmenu li ul, .top_menu, .dropmenu li li:hover, .button,.dropmenu li li:hover > a, .dropmenu li li a:focus, .dropmenu li li a:hover,#top_section, #search_form .button, .quickbuttons li,.quickbuttons li ul, .quickbuttons li ul li:hover, .quickbuttons ul li a:focus,.popup_window, #inner_section { background: #fff; /* fallback for some browsers */ background-image: linear-gradient(to bottom, #e2e9f3 0%, #fff 70%);}/* Well some of them has different gradient effect on hover */.button:hover, #search_form .button:hover, .quickbuttons li:hover { background: #fff; background-image: linear-gradient(to bottom, #fff 0%, #e2e9f3 70%);}

Bigguy

I have to manually go in and take out the extra code tags in order for it to look right.

SychO

I'm afraid I do not understand what you mean.

Bigguy

Well, this is what I see.

Bigguy

That's one piece of code....

SychO

yea I see that as well, but I don't understand how you ended up with that

test:
/* You can find detailed information at https://wiki.simplemachines.org/smf/Curve2_CSS
/* Index */
html {
 background: #3e5a78;
}
body {
 background: #e9eef2;
 font: 83.33%/150% "Segoe UI", "Helvetica Neue", "Nimbus Sans L", Arial, "Liberation Sans", sans-serif;
 color: #4d4d4d;
 display: flex;
 flex-direction: column;
 min-height: 100vh;
}
/* General reset */
* {
 box-sizing: border-box;
 padding: 0;
 margin: 0;
}
ul, ol {
 list-style: none;
}
ul.normallist {
 list-style-type: disc;
 padding: 0 0 0 15px;
}
table {
 empty-cells: show;
}
abbr {
 border-bottom: 0.1em dotted;
}
input, button, select, textarea {
 color: #222;
 font: 83.33%/150% "Segoe UI", "Helvetica Neue", "Nimbus Sans L", Arial, "Liberation Sans", sans-serif;
 background: #fff;
 outline: none;
 border: 1px solid #bbb;
 vertical-align: middle;
 border-radius: 3px;
 box-shadow: 1px 2px 1px rgba(160, 187, 221, 0.2) inset;
 padding: 0.3em 0.4em;
}
input:hover, textarea:hover, button:hover, select:hover {
 outline: none;
 border-color: #82a2bc;
}
textarea:hover {
 background: #fbfbfb;
}
input:focus, textarea:focus, button:focus, select:focus {
 outline: none;
 border-color: #7fb0d8;
 background: #fff;
}
input, button, select {
 padding: 0 0.4em;
 height: 2em;
 line-height: 2em;
}
select {
 padding: 0.22em 0.2em; /* selects don't apply line-height */
}
/* Selects with more than one line */
select[size] {
 height: auto;
}
input[type="file"] {
 padding: 2px;
 height: auto;
}
/* Remove default mozilla dotted borders */
input[type="submit"]::-moz-focus-inner, button::-moz-focus-inner {
 border: 0;
}
/* Prevent inputs and images overflowing */
img, input, select, textarea {
 max-width: 100%;
}

Bigguy

Here is another screenshot.

EDIT: I highlighted a piece of code in an editor, pasted it to the editor here, highlighted it again and pressed the code tag in this editor. When you press the source view this is what it looks like

lurkalot

Mar 29, 2019, 04:10 PM #7 Last Edit: Mar 29, 2019, 04:12 PM by lurkalot
Testing.  Pasted code, highlighted then clicked the code button.
/* You can find detailed information at https://wiki.simplemachines.org/smf/Curve2_CSS
/* Index */
html {
 background: #3e5a78;
}
body {
 background: #e9eef2;
 font: 83.33%/150% "Segoe UI", "Helvetica Neue", "Nimbus Sans L", Arial, "Liberation Sans", sans-serif;
 color: #4d4d4d;
 display: flex;
 flex-direction: column;
 min-height: 100vh;
}


Testing.  This time clicking code button and then pasting code between the code tags.
/* You can find detailed information at https://wiki.simplemachines.org/smf/Curve2_CSS
/* Index */
html {
 background: #3e5a78;
}
body {
 background: #e9eef2;
 font: 83.33%/150% "Segoe UI", "Helvetica Neue", "Nimbus Sans L", Arial, "Liberation Sans", sans-serif;
 color: #4d4d4d;
 display: flex;
 flex-direction: column;
 min-height: 100vh;
}

Bigguy

I have some errors in the error log about this as well. I knew it was gonna happen so after I got my post ready to post I hit preview. I have 6 errors in the logs about this.

SychO


Bigguy

Screenshots...Firefox 66 x64

Bigguy

Undefined offsets 60, 91

SychO

Well if you click on the code button when you're on source mode this won't happen or if you paste "as plain text" instead of just paste, the WYGIWYS mode tries to also copie the pasted text's style so when you wrap it up in a code block it gets messy which is why you should paste as plain text, so I'm not sure it's a bug.

the errors on the other hand should definitely be fixed.

well it'd be great if you posted an issue on GitHub describing both issues so that something can be done about them in the near future :)

Bigguy

I'll post somethin later tonight or tomorrow then on GH. I think it is a bug really. I use the wysiwyg editor a lot, like all the time. This never used to happen in 2.0.x just in 2.1

SychO

that's probably because 2.0's is way too old, meanwhile just past the content as plain text instead of normal past if you're gonna wrap it in a code block