News:

Wondering if this will always be free?  See why free is better.

Main Menu

rich_editor font-size:78%

Started by jastend, November 17, 2013, 05:26:07 PM

Previous topic - Next topic

jastend

Hi,

I'm working on a new theme for SMF and I'm wondering whether there is a way to disable the parameter "font-size:78%" in the WYSWIG-Editor.

By default, you have the following attributes:

color: black; background-color: white; font-size: 78%; font-family: Verdana, Arial, Helvetica, sans-serif; border: none; padding: 1px; margin: 0px;

Can you tell me where these values are stored so I can remove the font-size attribute?

Thank you in advance!

Arantor

Primarily it is pulled from the theme's index.css. It's only falling back to 78% in the main editor.js file if and ONLY if it couldn't get it from the main stylesheet in the first place.

If you set the font size in the body tag, it should be picked up quite happily.
Holder of controversial views, all of which my own.


jastend

Thank you Arantor!

I think I managed to corrupt it, since it doesn't react on the changes that I make.

The CSS I inserted looks like this:

/* Set a fontsize that will look the same in all browsers. */
body
{
background: #E9EEF2 url(../images/theme/backdrop.png) repeat-x;
font: 100%/100% "Verela Round", sans-serif;
margin: 0 auto;
padding: 15px 0;
}


Do you have an advice where I should look in order to find my mistake? I think it is the fact that I'm using a wrapper done by a custom header.php and footer.php which confuses it.

kat

I'm no coder. So, what I'm about to type might just be total rubbish. ;)

But, under the "Set a fontsize" heading, you're putting an image URL and a reference to a background.

Is that right? I mean, should that be done, there?

Arantor

The JavaScript just goes through all the CSS looking for that, not sure why it doesn't pick it up.
Holder of controversial views, all of which my own.


Oldiesmann

Make sure you do a hard refresh (CTRL+R) after editing the CSS so your browser will pick up the changes. The browser caches the CSS info so it doesn't have to be reloaded on every page load (since it rarely changes anyway).

jastend

Hi guys,

Thank you for all your responses. I think the main problem is, that I've wrapped the forum following this guide: http://wiki.simplemachines.org/smf/Integrating_SMF_with_your_website

Since it's wrapped into a wordpress, I think this confuses the javascript and causes the trouble. Is there a way to disable the javascript and give it fixed values instead?

Thank you!

Kindred

oh, ick , blah, ptooey....

Why would you ever do something like that?

You put smf inside wordpress?   you're going to have lots of conflicting css and probably conflicting code....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

jastend

Quote from: Kindred on November 24, 2013, 01:41:11 PM
oh, ick , blah, ptooey....

Why would you ever do something like that?

You put smf inside wordpress?   you're going to have lots of conflicting css and probably conflicting code....

Actually, if you're building up both CSS from the ground constantly checking the compatiblity it's quiet ok. It is also a question of how you wrap it and which scripts you're running (and there are a lot of people who are really satisfied with SMF and it's great functionality but want a bit more for their CMS pages).

Anyway, I'm not here to start an endless discussion about this, I'm focussing on the problem and what you have to do in order to prevent it from happening.

jastend

Unfortunately I couldn't find why it is not fetching the right CSS file. Though, I could solve the problem by editing the editor.js.

I know that this is not the best solution, but at least it is an interim solution. Thank you all for your help!

Advertisement: