WYSYWIG HTML - use styles (classes)

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

WYSYWIG HTML - use styles (classes)

Post by macangelo »

Hi
Is there a way to use styles (classes) in the WYSYWIG editing mode?

I want to display a list with some items indent. In normal html I would define a style with some padding-left. What can I do here?

Any ideas? workarounds?

Thanks a lot

Uwe
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

try this mod...
[url]http://www.phpwcms.de/forum/viewtopic.php?t=1876[url]
and use the [CLASS]myclass[/CLASS] replacement tag
note: the class you wish to use must be in the phpwcms_templates/inc_css/frontend.css file
I can't say it will work as i don't use any or wysiwyg editors

let me know how you get on
macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

Post by macangelo »

Hi pSouper,

Danke für den Tipp! Ich habe ihn noch nicht ausprobiert. Diese [CLASS][/CLASS]-Geschichte ist für meine "Redakteurin" (die Dame der ich diese Site pro bono mache) nicht so sexy wie für uns code-freaks. Also habe ich in der frontend.css mein "p" auf kleinere Zeilenhöhe gesetzt. Jetzt kann sie mit den von Word bekannten Icons einrücken und es sieht normal aus.

Vielleicht würde dies mal hinhauen, wenn man eine Auswahl von Klassen in einem Aufklappmenü bei den Icons zur Verfügung hat. (hint, hint ;-)

Trotzdem herzlichen Dank - und ein schönes Wochenende

Uwe
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

macangelo wrote:Hi pSouper,

Danke für den Tipp!
pSouper do not speak german that last time I talked with him....
http://www.studmed.dk Portal for doctors and medical students in Denmark
macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

Post by macangelo »

(Sorry - thanks frold) Hi pSouper,

Thanks for your help. Allthough - I didn't try it out. This [CLASS][/CLASS]-thing is not so sexy for that lady I'm doing this for (pro bono) as for us code-freaks. So I changed my "p" in my frontend.css to a smaller line-height. Now she can use the WYSIWIG-icons she is familiar with from word.

Perhaps it would work out having a little pull-down menu with a selection of styles with those icons... (hint, hint ;-)

Anyway, thanks a lot (it helped me thinking! - and have a great weekend!
Uwe
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

macangelo wrote:(Sorry - thanks frold) Hi pSouper,

Thanks for your help. Allthough - I didn't try it out. This [CLASS][/CLASS]-thing is not so sexy for that lady I'm doing this for (pro bono) as for us code-freaks. So I changed my "p" in my frontend.css to a smaller line-height. Now she can use the WYSIWIG-icons she is familiar with from word.

Perhaps it would work out having a little pull-down menu with a selection of styles with those icons... (hint, hint ;-)

Anyway, thanks a lot (it helped me thinking! - and have a great weekend!
Uwe
Np. :wink:

what editor do you use? as default: spaw or fck?
http://www.studmed.dk Portal for doctors and medical students in Denmark
macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

Post by macangelo »

... the default one (so I guess spaw ;-)

Uwe
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

then it is easy to use styles....

Open:

Code: Select all

 include\inc_ext\spaw\config\spaw_control.config.php
Find:

Code: Select all

// default dropdown content
$spaw_dropdown_data['style']['default'] = 'Normal';
Add after:

Code: Select all

$spaw_dropdown_data['style']['style1'] = 'Style no 1';
$spaw_dropdown_data['style']['style2'] = 'Style no 2';
To modify these 2 styles

Open:

Code: Select all

include\inc_ext\spaw\wysiwug.css
And modify:

Code: Select all

.style1 {
	color: green;
	font-family: Verdana, Arial, Helvetica, sans-serif;
  font-weight : bolder;
	font-size: 10pt;
}
.style2 {
	color: red;
  background-color: #dddddd;
	font-family: Verdana, Arial, Helvetica, sans-serif;
  font-weight : bolder;
	font-size: 12pt;
}


Well now you see the point, so it easy to add more styles...

To use the style, just mark the text and choose the style from the drop down...
http://www.studmed.dk Portal for doctors and medical students in Denmark
macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

Post by macangelo »

Hi frold,

are a superangel or what? (except, I don't have anything like spaw in my inc_ext-folder, am I using something else?)

Thanks a lot

macangelo
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

what browser and browser version do you have?

And what do you have in this line in include/inc_conf/conf_inc.php

Code: Select all

$phpwcms["wysiwyg_editor"]    = 3;  //0 = no wysiwyg editor, 1 = HTMLarea, 2 = FCKeditor, 3 = browser based

Eg. change 3 to 4 then it will only use spaw
http://www.studmed.dk Portal for doctors and medical students in Denmark
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

macangelo wrote:Hi frold,

are a superangel or what? (except, I don't have anything like spaw in my inc_ext-folder, am I using something else?)

Thanks a lot

macangelo
what version of phpwcms do you use? when did you install it?
http://www.studmed.dk Portal for doctors and medical students in Denmark
macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

Post by macangelo »

Hi frold,

I tried hard all morning!

my phpwcms version is (as far as I can tell from the change log):
PHPWCMS changelog release v1.1-RC2
2004/02/15

Browser version on PC: EI version 6.0.2800.1106 xpsp2.030422-1633
Browser version on Mac: EI 5.2.3 (5815.1) and Safari 1.2 (125.1) - I don't get WYSISYG on the Mac anyway.

in my include/inc_conf/conf_inc.php I have:
$phpwcms["wysiwyg_editor"]    = 1;  //0 = no wysiwyg editor, 1 = HTMLarea, 2 = FCKeditor, 3 = browser based
"3" doesn't work, I only get plain html...

I downloaded spaw from SourceForge.net, put it into the folder: include/inc_ext/

I configured nothing, exept, I tried to set the wysiwyg_editor to 4 but got only plain html.

thanks a lot for your help!

macangelo
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

Looks like it's time for you to ~UPDATE~ your version of phpWCMS and avail yourself of it's enhancements :wink:
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

macangelo wrote:Hi frold,

I tried hard all morning!

my phpwcms version is (as far as I can tell from the change log):
PHPWCMS changelog release v1.1-RC2
2004/02/15
Yep I would upgrade to.... many things have been added and fixed since you installed phpwcms
http://www.studmed.dk Portal for doctors and medical students in Denmark
macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

Post by macangelo »

ok, I'm ready. Is there a (foolproof) howto telling me which files to replace and which not?

Thanks a lot

Macangelo
Post Reply