Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: meemzo on August 29, 2014, 11:22:09 AM

Title: Editing Text Editor
Post by: meemzo on August 29, 2014, 11:22:09 AM
Hope I'm in the right place.  I am trying to figure out how to change the line height of the text editor.  I use firebug to isolate the css code but I can't seem to find it anywhere.  I used it to find the css on this page.  It's in the default/css/index.css.  Tried adding textarea code to editor.css and index.css, no luck.  Any suggestions?

Title: Re: Editing Text Editor
Post by: meemzo on August 30, 2014, 10:28:25 PM
bumping time!  I wish I could figure this out for myself.  I'm no "expert" but I've edited my fair share of css files.  Don't know why this little bugger is so difficult.
Title: Re: Editing Text Editor
Post by: Arantor on August 30, 2014, 10:48:28 PM
The editor code is part of editor.css not index.css. On top of that... though... it's a complex mess because you're not just dealing with a textarea, but also an iframe.

You can try editing the definition of editor.css on line 9 where it declares for both .editor and .rich_editor_frame but expect weird things to happen in the rich text editor if you have it enabled. It's... fragile.
Title: Re: Editing Text Editor
Post by: meemzo on August 31, 2014, 11:49:06 AM
This makes me all kind of sad.  :(
Title: Re: Editing Text Editor
Post by: Arantor on August 31, 2014, 11:50:01 AM
I tried the part I just suggested and it worked when I tried it in Firefox without any obvious weirdness...
Title: Re: Editing Text Editor
Post by: meemzo on August 31, 2014, 11:51:29 AM
Oh, yay!  I will try then and see if it works.  Thanks for checking on it.!
Title: Re: Editing Text Editor
Post by: Arantor on August 31, 2014, 11:56:12 AM
If I thought it would have actual weirdness, I would have said ;) It's just that playing with the richtext editor can lead to unexpected issues, but I didn't find any obvious ones. Try it and see how it goes for you :)
Title: Re: Editing Text Editor
Post by: meemzo on August 31, 2014, 12:02:42 PM
Unfortunately it didn't work for me.  I have 4 rules in the editor css.  Adding line-height code to any of them didn't cause any changes.

.editor {
    max-width: 100%;
    min-width: 100%;
    width: 100%;
}
.editor, .rich_editor_frame {
    border: 1px solid #808080;
    margin: 0;
    padding: 2px !important;

}
.rich_editor_frame {
    background: none repeat scroll 0 0 #fff;
}
.richedit_resize {
    -moz-border-bottom-colors: none;
    -moz-border-left-colors: none;
    -moz-border-right-colors: none;
    -moz-border-top-colors: none;
    background: url("../images/bbc/resize-handle.gif") no-repeat scroll 50% 1px #eee;
    border-color: #ddd;
    border-image: none;
    border-right: 1px solid #ddd;
    border-style: solid;
    border-width: 0 1px 1px;
    cursor: s-resize;
    font-size: 0;
    height: 5px;
    padding: 0 2px;
    width: 100%;
}
Title: Re: Editing Text Editor
Post by: Arantor on August 31, 2014, 12:05:03 PM
.editor, .rich_editor_frame {
    border: 1px solid #808080;
    margin: 0;
    padding: 2px !important;

}


is the one to add it to, starting on line 9.

If you've edited the file you may need to force refresh to make the changes appear.