htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Add-Ons:
Dynamic CSS Plugin (HTMLArea CVS)


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

First page Previous page 1 2 3 Next page Last page  View All


hhees
Novice

Jun 2, 2004, 11:13 AM

Post #1 of 58 (9664 views)
Shortcut
Dynamic CSS Plugin (HTMLArea CVS) Can't Post

the plugin provide a selectbox with all stylesheetclasses from the assigned iframe-css in context of active html-tag.

tested on mozilla 1.7 (firefox >0.8) and ie 6

changelog
1.2
- styleparsing bugfixes (display dummy-'default'-option when no default-style but an class-style is available in css-file for the active tag)

1.3
- minor optimization

1.4
- parse all available StyleSheets
- display 'Not defined' when the html-tag has a styleclass but it's not definded in css
- parse equal styles (Mozilla specific) e.q h1, h2 {border: 1px;}

1.4.1
- bugfix for report from user novocaine. dynamicCSS start an new attempt of parsing stylesheets 1 second after first initialisation of the plugin. (for longer initialisation of external style files)

1.5
-- style setting is only allowed on body tag when fullpage mode is on. otherwise you must set an format tag first (<p> <h1> ...)
-- performance fixes (recreate of the select box only when parent tag or class are changed)

1.5.2
- reparsing of stylesheets after 1,2,4 and 8 seconds (now you get absolutely all Styles)
- rebuild of style selectbox after reparsing only when new styles are found



sorry my poor english


(This post was edited by hhees on Jun 23, 2004, 11:04 AM)
Attachments: DynamicCSS_1.5.2.tar.gz (3.38 KB)


nikotto
User

Jun 3, 2004, 12:59 AM

Post #2 of 58 (9560 views)
Shortcut
Re: [hhees] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

wow, that really great!
I love that Plugin!

the CSS-Plugin was so difficult to configure... but this one is much, much easier :D

thx :D


chet
User

Jun 3, 2004, 3:34 PM

Post #3 of 58 (9502 views)
Shortcut
Re: [nikotto] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

Great addon Shocked


novocaine
Novice

Jun 4, 2004, 2:10 PM

Post #4 of 58 (9435 views)
Shortcut
Re: [hhees] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

The plugin is awesome!
Only bummer is that it doesn't work with my IE. Don't know why though.
JS-Debugger says something like "illegal procedure call on line 48".

Maybe you can take a look into.

Cheers,

novocaine


hhees
Novice

Jun 5, 2004, 4:57 AM

Post #5 of 58 (9422 views)
Shortcut
Re: [novocaine] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

cat you tell me which IE,Windows and DynamicCSS (1.3 or 1.4) Version you use


(This post was edited by hhees on Jun 5, 2004, 4:58 AM)


chet
User

Jun 5, 2004, 5:25 AM

Post #6 of 58 (9413 views)
Shortcut
Re: [hhees] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

Using Mozilla and IE 6.0 with css version 1.4
(same problem in 1.3)

What's really strange is that it only read a few css variables in the css file.

For example it reads this

.newsarticle {
font-size: 11px;
color: White;
}
.base {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFFFFF;
}
.baselink {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: Silver;
}

but it doesn't read the other styles for example

.style1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-weight: bold;
color: #707C8A;
}
.style2 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #333333;
}


novocaine
Novice

Jun 5, 2004, 5:33 AM

Post #7 of 58 (9410 views)
Shortcut
Re: [hhees] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

Thanks for your fast reply hhees!

I'm using IE 6.0.2800.1106.xpsp2.030422-1633 (latest sp/build i guess).
The problem occurs with v1.3 of your plugin. However with v1.4 I get no errors but the CSS dropdown only shows styles which i included in a function for showing tableborders when 0 px. Only occurs in IE.


Code
 HTMLArea.prototype._toggleBorders = function()  
{
tables = this._doc.getElementsByTagName('TABLE');
if(tables.length != 0){
if(!this.borders){
name = "bordered";
this.borders = true;
}
else{
name = "";
this.borders = false;
}
for (var ix=0;ix < tables.length;ix++){
if(this.borders)
{
this._addClasses(tables[ix], 'htmtableborders');
}
else
{
this._removeClasses(tables[ix], 'htmtableborders');
}
}
}
return true;
}



Thanks again for your reply.

Best regards,
novocaine


hhees
Novice

Jun 5, 2004, 8:02 AM

Post #8 of 58 (9406 views)
Shortcut
Re: [novocaine and chet] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

Hi novocaine and chet,

can you give me a example page with the addidional included css files.

i created a page where i include an external style file with the styles from user chet and it works for me with mozilla and ie6.


dmijic
New User

Jun 10, 2004, 7:15 PM

Post #9 of 58 (9243 views)
Shortcut
Re: [hhees] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

I love this plug-in. It is just what I needed. However there is one problem. When CSS style is assigned to entire text in editor it is applied to whole body. There is no <p> or <div> tags around text so it is logical that this happens. When edited text is saved and reloaded in editor there is no formatting since style applied to body was not saved anywhere. Only šart of the html document is being edited so there is no body.
Dynamic CSS plug-in should wrap <p> or <div> tags around text when text is in root of the hierarchy in editor.


hhees
Novice

Jun 14, 2004, 2:19 AM

Post #10 of 58 (9136 views)
Shortcut
Re: [dmijic] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

test the new version


Ecco
Novice

Jun 14, 2004, 3:52 AM

Post #11 of 58 (9134 views)
Shortcut
Re: [hhees] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

Hi folks.

I wish I had seen this earlier. I just spent a lot of time figuring out a method of my own. I'll share it with you anyway.

Thanks to an article and javascript we found at http://iamcal.com/publish/articles/hacks/alternative_stylesheets/ we were able to allow our visitors to choose between the three skins we installed. The script uses cookies so the selected stylesheet will be remembered and automatically selected on subsequent visits. It's easy to install.

I managed to have Htmlarea use the selected skin/stylesheet by changing this line in htmlarea.js :

html += "<style>" + editor.config.pageStyle +" html,body { border: 0px; }</style>\n";

into :

html+="<link rel=\"StyleSheet\" href=\"blue.css\" type=\"text/css\" /><link rel=\"alternate stylesheet\" type=\"text/css\" title=\"original\" href=\"original.css\" /><link rel=\"alternate stylesheet\" type=\"text/css\" title=\"ek2004\" href=\"ek2004.css\" /><script src=\"/styles.js\"></script>";

which loads our default skin, two alternative skins, and the style-script. It's a bit of an ugly solution but it seems to work.

Cheers,
Ecco


agf
User

Jun 23, 2004, 10:45 AM

Post #12 of 58 (8869 views)
Shortcut
Re: [hhees] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

Could someone post their working code examples? I can't seem to get it to work:|


hhees
Novice

Jun 23, 2004, 10:48 AM

Post #13 of 58 (8866 views)
Shortcut
Re: [agf] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

try the example 'examples/dynamic_css.html'


agf
User

Jun 23, 2004, 10:57 AM

Post #14 of 58 (8864 views)
Shortcut
Re: [hhees] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

Yes, I have.

I just get a textarea - not even the HTMLArea.

The error is:
i18n has no properties.


hhees
Novice

Jun 23, 2004, 11:03 AM

Post #15 of 58 (8863 views)
Shortcut
Re: [agf] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

which htmlarea version, which language and which browser are you using.

i try it with htmlarea (cvs) and it works.


agf
User

Jun 23, 2004, 11:34 AM

Post #16 of 58 (8861 views)
Shortcut
Re: [hhees] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

htmlarea 1.79

IE 6 & Firefox .9


hhees
Novice

Jun 24, 2004, 1:22 AM

Post #17 of 58 (8842 views)
Shortcut
Re: [agf] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

can you send the exact error message with the code line number. no i18n sounds like a missing translation in your language file.

i checked out the last cvs and try the plain example with ie6 and firefox it works fine here. you can also try my last version 1.5.2.


Fireball29
New User

Jun 24, 2004, 4:46 AM

Post #18 of 58 (8831 views)
Shortcut
Re: [hhees] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

I tested the Dynamic CSS Plugin with the RC1 of htmlArea, but it seem that the CSS styles didn't load from "dynamic.css" file, because the only styles that appear in the select box are "Undefined" and "Default".

Any ideas what is happening.

I use Windows XP with IE 6.0.2800 and the examples have been called directly (not through webserver).

Thanx

Fireball


Fireball29
New User

Jun 24, 2004, 5:39 AM

Post #19 of 58 (8827 views)
Shortcut
Re: [Fireball29] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

Another thing is, why is the select box disabled for elements with no style (first row in example)?


hhees
Novice

Jun 24, 2004, 5:59 AM

Post #20 of 58 (8825 views)
Shortcut
Re: [Fireball29] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

i tried the example and here is the same effect. It seems that the ie has problems with relativ stylesheet url on local filesystem.

over the web it works. i tested htmlarea 3.0rc1 & cvs.


agf
User

Jun 24, 2004, 7:42 AM

Post #21 of 58 (8819 views)
Shortcut
Re: [hhees] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

This line throws the error:

Code
select.options[0]=new Option(i18n["Default"],'none');


The exact error is:
i18n has no properties


hhees
Novice

Jun 24, 2004, 9:20 AM

Post #22 of 58 (8812 views)
Shortcut
Re: [agf] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

this looks like there is no i18n file for your language. i translated the plugin only to english and german. if you need another language you must translate it yourself.


agf
User

Jun 24, 2004, 9:31 AM

Post #23 of 58 (8813 views)
Shortcut
Re: [hhees] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

I'm using English.


hhees
Novice

Jun 24, 2004, 9:52 AM

Post #24 of 58 (8809 views)
Shortcut
Re: [agf] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

can you send an complete example as zip file to me? (htmlarea, plugin an example init file)


Mutti
New User

Jun 25, 2004, 9:07 AM

Post #25 of 58 (8765 views)
Shortcut
Re: [Fireball29] Dynamic CSS Plugin (HTMLArea CVS) [In reply to] Can't Post

I have got the same problem, with locals or remote css file.

It happen also with the dynamic_css.html sample included in the downloadable Zip file.

Any idea ?

First page Previous page 1 2 3 Next page Last page  View All
 
 


Search for (options)