Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2005-08-04 03:13:48

mmjaeger
Xinha Community Member
Registered: 2005-05-12
Posts: 21

HTMLarea question regarding css

Hello,

Although, this is not the HTMLarea forum, I hope to get some help here:

Does anybody know how I apply a css to the editor area in HTMLarea?

Thank you for your help.

Offline

#2 2005-08-04 03:52:44

niko
Xinha Authority
From: Salzburg/Austria
Registered: 2005-02-14
Posts: 338

Re: HTMLarea question regarding css

use config.pageStyle


Niko

Offline

#3 2005-08-04 03:56:22

mmjaeger
Xinha Community Member
Registered: 2005-05-12
Posts: 21

Re: HTMLarea question regarding css

thanks for getting back to me - tried it, but doesn't seems to have an impact at all????

this is what I have:

<script type="text/javascript">
    _editor_url = "/dev/wysiwyg/htmlarea/";
    _editor_lang = "en";
</script> 
<script type="text/javascript" src="htmlarea/htmlarea.js"></script>
<script type="text/javascript" >
    HTMLArea.loadPlugin("ImageManager"); 
    HTMLArea.loadPlugin("TableOperations"); 
    HTMLArea.loadPlugin("ContextMenu"); 
    HTMLArea.loadPlugin("ibrowser");
</script>
<script type="text/javascript">
    var editor = null;
    function initEditor() {
        editor = new HTMLArea("ta");
        var config = new HTMLArea.Config();
        editor.config.toolbar = [
            [ "formatblock", "space",
              "bold", "italic", "underline", "strikethrough", "separator",
              "subscript", "superscript", "separator",
              "copy", "cut", "paste", "space", "undo", "redo",
              "orderedlist", "unorderedlist", "separator",
              "inserthorizontalrule", "createlink", "insertimage", "inserttable", "htmlmode"]
            ];
        editor.config.width = '620px';
        editor.config.height = '440px';        
        editor.config.pageStyle = 'plugins/ibrowser/css/style.css'; 

        editor = new HTMLArea("ta");
        editor.registerPlugin(TableOperations);
        editor.registerPlugin(ContextMenu);
        editor.registerPlugin(ibrowser);
        setTimeout(function() {
        editor.generate();
          }, 500);
          return false;
    }
</script>

</head>
<body onload="initEditor()">

Offline

#4 2005-08-04 05:48:20

niko
Xinha Authority
From: Salzburg/Austria
Registered: 2005-02-14
Posts: 338

Re: HTMLarea question regarding css

write

editor.config.pageStyle = '@import url(plugins/ibrowser/css/style.css);'

that one should work

....but you are creating new HTMLArea("ta") twice in your code!
please follow the NewbieGuide or you might get trouble big_smile


Niko

Offline

#5 2005-08-04 07:14:38

mmjaeger
Xinha Community Member
Registered: 2005-05-12
Posts: 21

Re: HTMLarea question regarding css

got it to work - thank you

had to take out the orderered and unordered list, but that's o.k.

Offline

Board footer

Powered by FluxBB