Announcement

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

#1 2005-03-14 14:27:29

dlst
Xinha Community Member
Registered: 2005-02-20
Posts: 33

Hide stylelist pane

Is it possible to hide the stylelist pane without reloading the page?  It's a fantastic plugin (better than the other CSS options, I think), but it takes up a lot of space.

Offline

#2 2005-03-15 09:00:18

Bone612
Xinha Community Member
Registered: 2005-03-14
Posts: 12

Re: Hide stylelist pane

Along with the above request, I am also looking for the line in the code where I can specify where to render the pane (left, right, top, bottom).  I have seen examples where it is on the right and bottom so I know this is possible, I just do not know where to set it.  Thanks.

Offline

#3 2005-03-15 09:35:48

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

Re: Hide stylelist pane

plugins/Stylist/stylist.js line 484:
editor._stylist = editor.addPanel('right');

but i don't know how you can change it without modifing the source of the plugin.
propably we could need there a plugin-config-setting??


Niko

Offline

#4 2005-03-15 15:33:57

dlst
Xinha Community Member
Registered: 2005-02-20
Posts: 33

Re: Hide stylelist pane

Along these same lines, I would like to see the Stylelist plugin use "custom" css styles to display.

Right now, it uses the following:

hr {
    border: none;
    border-top: 1px solid #ccb;
    margin: 2em 0;
}

:link, :visited {
    text-decoration: none;
    color: #b00;
    border-bottom: 1px dotted #bbb;
}

:link:hover, :visited:hover {
    background-color: #eee;
    color: #555;
}

But this is bad, since it breaks the rest of my application.  How about using custom styles, like

.stylelistHeader {
    border: none;
    border-top: 1px solid #ccb;
    margin: 2em 0;
}

I looked everywhere in the stylist.js file, but I couldn't find where to put these in without breaking other things.  Would anyone mind casting some light on the subject please?

Offline

#5 2005-03-15 15:49:00

Bone612
Xinha Community Member
Registered: 2005-03-14
Posts: 12

Re: Hide stylelist pane

dlst wrote:

Along these same lines, I would like to see the Stylelist plugin use "custom" css styles to display.

I believe what you are looking for is the following:

      // We can load an external stylesheet like this - NOTE : YOU MUST GIVE AN ABSOLUTE URL
      //  otherwise it won't work!
      xinha_config.stylistLoadStylesheet(document.location.href.replace(/[^\/]*\.html/, 'stylist.css'));

      // Or we can load styles directly
      xinha_config.stylistLoadStyles('p.red_text { color:red }');

I hope that helps

Offline

#6 2005-03-15 16:57:40

dlst
Xinha Community Member
Registered: 2005-02-20
Posts: 33

Re: Hide stylelist pane

Thanks Bone612, but I'm well aware of how to call styles that are displayed by the plugin.  I'm talking about how the plugin ITSELF is displayed.  In the example, the text is Arial red, with dotted border:

:link, :visited {
    text-decoration: none;
    color: #b00;
    border-bottom: 1px dotted #bbb;
}

This is called OUTSIDE of the stylistLoadStylesheet, it's the css called normally by the page that _displays_ the editor.

The problem, again, is that these are general css styles that affect the rest of the page, not just the xinha editor and how she looks.

I hope that makes more sense.

Offline

#7 2005-03-16 02:41:24

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

Re: Hide stylelist pane

dlst wrote:

Thanks Bone612, but I'm well aware of how to call styles that are displayed by the plugin.  I'm talking about how the plugin ITSELF is displayed.  In the example, the text is Arial red, with dotted border:

:link, :visited {
    text-decoration: none;
    color: #b00;
    border-bottom: 1px dotted #bbb;
}

This is called OUTSIDE of the stylistLoadStylesheet, it's the css called normally by the page that _displays_ the editor.

The problem, again, is that these are general css styles that affect the rest of the page, not just the xinha editor and how she looks.

I hope that makes more sense.

....make a patch and submit it as new ticket...
gogo will hopefully include it then!


Niko

Offline

#8 2005-03-16 13:53:30

JAC
Xinha Community Member
Registered: 2005-03-16
Posts: 11

Re: Hide stylelist pane

Relating to the question about the formatting for the Stylelist - is there any way of changing the width of the panel?

Thanks!

Offline

#9 2005-03-19 01:09:03

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Hide stylelist pane

JAC wrote:

Relating to the question about the formatting for the Stylelist - is there any way of changing the width of the panel?

Thanks!

See the config object (in htmlarea.js), it's in there.


James Sleeman

Offline

#10 2005-03-19 01:09:43

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Hide stylelist pane

dlst wrote:

Is it possible to hide the stylelist pane without reloading the page?  It's a fantastic plugin (better than the other CSS options, I think), but it takes up a lot of space.

Ummmm.  Not currently, but it could be.  Submit an enhancement request.


James Sleeman

Offline

#11 2005-03-19 01:14:42

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Hide stylelist pane

Bone612 wrote:

Along with the above request, I am also looking for the line in the code where I can specify where to render the pane (left, right, top, bottom).  I have seen examples where it is on the right and bottom so I know this is possible, I just do not know where to set it.  Thanks.

It's currently hard coded into plugins/Stylist/stylist.js, like 484.  I'll make it into a config option.


James Sleeman

Offline

#12 2005-03-19 01:19:53

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Hide stylelist pane

dlst wrote:

Along these same lines, I would like to see the Stylelist plugin use "custom" css styles to display.

Right now, it uses the following:

These are just the CSS rules for the example.  Stylist itself has no CSS rules to determine it's display.

You can make your own, everything in the stylist is contained within a div with classname .stylist.

.stylist h1 { /* whatever */ }
.stylist a { /* whatever */ }

you could use the firefox dom inspector to see what exactly is there for you to change, simply search for attr "class" contains "stylist" and explore away.


James Sleeman

Offline

#13 2005-03-21 18:46:44

dlst
Xinha Community Member
Registered: 2005-02-20
Posts: 33

Re: Hide stylelist pane

gogo wrote:
dlst wrote:

Along these same lines, I would like to see the Stylelist plugin use "custom" css styles to display.

Right now, it uses the following:

These are just the CSS rules for the example.  Stylist itself has no CSS rules to determine it's display.

You can make your own, everything in the stylist is contained within a div with classname .stylist.

.stylist h1 { /* whatever */ }
.stylist a { /* whatever */ }

you could use the firefox dom inspector to see what exactly is there for you to change, simply search for attr "class" contains "stylist" and explore away.

Thanks gogo.  Does this apply to the most recent nightly, or from a couple weeks ago?

Offline

#14 2005-03-22 01:10:01

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Hide stylelist pane

Should apply from day 1, it was the way I wrote it initially smile


James Sleeman

Offline

#15 2005-03-30 09:56:56

JAC
Xinha Community Member
Registered: 2005-03-16
Posts: 11

Re: Hide stylelist pane

gogo wrote:
JAC wrote:

Relating to the question about the formatting for the Stylelist - is there any way of changing the width of the panel?

Thanks!

See the config object (in htmlarea.js), it's in there.

Lines 275-281 control the editing of "panel_dimensions" which seems to do the trick.

Last edited by JAC (2005-03-30 12:45:37)

Offline

#16 2005-03-30 10:25:36

adamp
Xinha Pro
Registered: 2005-03-14
Posts: 77

Re: Hide stylelist pane

The styling of stylist itself could really do with being pulled out of stylist.js and stuck in a .css file or a config.js of some sort.

EDIT: n/m just read up tongue

Last edited by adamp (2005-03-30 10:26:33)

Offline

#17 2007-02-23 11:35:10

seanox
New member
Registered: 2007-02-23
Posts: 3

Re: Hide stylelist pane

I would like to hide the style list, because its pretty big (I don't need th ordered list option at all). This topic is a bit old, maybe there is a solution now. Please let me know if there is.

Thanks!

Offline

Board footer

Powered by FluxBB