Announcement

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

#1 2005-04-04 14:02:37

KaplanDigital
Xinha Community Member
Registered: 2005-04-04
Posts: 22

Fullscreen + Div Implimentation

Is there a way to run Xinha within a div but allow the fullscreen plugin to function properly?

For example

<div class="classnamegoeshere">

Xinha code

</div>

Offline

#2 2005-04-04 14:46:30

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

Re: Fullscreen + Div Implimentation

i don't understand what you mean.
Xinha is written in JavaScript and replaces Textareas in a HTML-Form.

you can of course place your textarea within any div or other html-strucutre..


Niko

Offline

#3 2005-04-04 14:57:50

KaplanDigital
Xinha Community Member
Registered: 2005-04-04
Posts: 22

Re: Fullscreen + Div Implimentation

niko wrote:

i don't understand what you mean.
Xinha is written in JavaScript and replaces Textareas in a HTML-Form.

you can of course place your textarea within any div or other html-strucutre..

I am saying that if you place a Xinha textarea within a div, the fullscreen plugin does not function properly. It only maximizes to the size of the div.

EDITED FOR TYPO

Last edited by KaplanDigital (2005-04-04 14:58:31)

Offline

#4 2005-04-04 15:14:36

mokhet
Xinha Authority
From: Paris, France
Registered: 2005-04-03
Posts: 105
Website

Re: Fullscreen + Div Implimentation

humm, i'm using version #58 with multiple editors on same page between a layout with <div>, <form>, <ul>, <dd> and such, but i didnt noticed this issue. What version are you using, any basic example online ?

Though i didnt try within a <table>. Perhaps it's some issue with configuration.

Offline

#5 2005-04-04 15:15:27

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

Re: Fullscreen + Div Implimentation

oh, thats something different then, i didn't understand you big_smile
please create a ticket on that bug!


Niko

Offline

#6 2005-04-04 15:17:14

KaplanDigital
Xinha Community Member
Registered: 2005-04-04
Posts: 22

Re: Fullscreen + Div Implimentation

I am talking about a div with a class like the one below

    position:                        relative;
    top:                            -5px;
    display:                        none;
    border:                            1px solid #003399;
    margin:                            0px 10px 20px 25px;
    padding:                        10px;
    background-image:                 url("../images/bg/section.jpg");
    background-position:             top right;
    background-repeat:                 no-repeat;        
    display:                        block;

In other words, when Xinha resizes, it does not seem to compensate for the margin or padding.
I am using last nights build.

Offline

#7 2005-04-05 00:24:39

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

Re: Fullscreen + Div Implimentation

It'll be the relative position that throws things off I expect.


James Sleeman

Offline

#8 2005-04-07 04:31:47

raldnor
New member
Registered: 2005-04-07
Posts: 2

Re: Fullscreen + Div Implimentation

It's not the relative position I'm afraid. I've got exactly the same problem. In firefox it's all working ok, but in Internet Explorer when I use the fullscreen button it scales within the div, and then explorer crashes. I think it has to do with the way the javascript of the fullscreen plugin figures out what the dimensions of the browser window are. My div looks like this:

<div style="overflow: auto; height: 540px; padding: 5px;" id="scrolldiv">

Offline

#9 2005-04-07 07:01:49

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

Re: Fullscreen + Div Implimentation

What about if you remove overflow:auto (and what styles are set for #scrolldiv in your CSS)?

The code that determines the window size is simply...

    if (self.innerHeight) // all except Explorer
    {
      x = self.innerWidth;
      y = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight)
      // Explorer 6 Strict Mode
    {
      x = document.documentElement.clientWidth;
      y = document.documentElement.clientHeight;
    }
    else if (document.body) // other Explorers
    {
      x = document.body.clientWidth;
      y = document.body.clientHeight;
    }

James Sleeman

Offline

#10 2005-04-08 04:15:05

raldnor
New member
Registered: 2005-04-07
Posts: 2

Re: Fullscreen + Div Implimentation

Hi gogo,

When I remove the div it works flawlessly (just like in Firefox). I haven't set any styles for the scrolldiv. It's just the div only.
What I meant with it's perhaps a problem with the resizing code for IE is that I think we need another way to figure out the size of the browserwindow for IE. Because it seems like IE can only determine the size within the div this way.

Offline

#11 2005-04-10 14:26:50

noxi
New member
From: Denmark
Registered: 2005-03-26
Posts: 9
Website

Re: Fullscreen + Div Implimentation

hmmm it might be that xinha inherit the padding/margin etc etc. Posible fix would be to define that(margin/padding) in what ever div/span/table xinha is in when fullscreen'ed...


[i]To live is to die ...[/i]

Offline

#12 2005-04-18 18:50:45

ProtUK
New member
Registered: 2005-04-18
Posts: 1

Re: Fullscreen + Div Implimentation

Dang, was hoping for a solution to this problem. I use purely css based layouts and anyone who does will understand the absolute need to use relatively positioned divs, if for no other reason than to pull IE (accursed be it's name:)) into line when floating a div.

Putting the editor in a floated div also causes it to flicker when you mouse over a button which is depressed, or a link in the statusbar in Firefox.

Has anyone come across a solution for these problems?

P.S. I really love the editor, keep up the great work smile

Offline

#13 2005-04-18 19:05:16

KaplanDigital
Xinha Community Member
Registered: 2005-04-04
Posts: 22

Re: Fullscreen + Div Implimentation

I found a solution to my problem. I set up a few js code lines (within the fullscreen plugin javascript file) to alter the style of the div containing Xinha so that all the positioning was 0 when in fullscreen mode. Then when Xinha returns to normal size, the style is restored. This same procedure would work whether you were using inline or style classes. This solution is a temporary fix as it only works when Xinha is contained in the same div id all the time.

Offline

#14 2005-04-19 01:56:08

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

Re: Fullscreen + Div Implimentation

could you post your code?


Niko

Offline

#15 2005-04-19 10:53:24

stachrom
New member
Registered: 2005-02-20
Posts: 4

Re: Fullscreen + Div Implimentation

please post it!!!

Offline

#16 2005-04-19 17:36:54

KaplanDigital
Xinha Community Member
Registered: 2005-04-04
Posts: 22

Re: Fullscreen + Div Implimentation

Use code like this in the full-screen.js file at the start of the size it up function.

if (document.getElementById("tadiv"))
        {
    var node = document.getElementById("tadiv");
    node.className = "";
        }

To return the editor to its previous class, just use the same code as above at the start of the size it down function but specify a class name.
NOTE Make sure you change the current div name  ("tadiv") to your own.

Offline

#17 2005-04-19 17:58:41

KaplanDigital
Xinha Community Member
Registered: 2005-04-04
Posts: 22

Re: Fullscreen + Div Implimentation

KaplanDigital wrote:

I found a solution to my problem. I set up a few js code lines (within the fullscreen plugin javascript file) to alter the style of the div containing Xinha so that all the positioning was 0 when in fullscreen mode. Then when Xinha returns to normal size, the style is restored. This same procedure would work whether you were using inline or style classes. This solution is a temporary fix as it only works when Xinha is contained in the same div id all the time.

Please remember what I said earlier.

Offline

#18 2005-04-20 02:33:28

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

Re: Fullscreen + Div Implimentation

I wrote a little patch that moves the htmlarea wen making it fullscreen directly into document.body - and then back again.

It works nice in IE, but in FF i get all content lost sad

i need some help on this FF-error!

http://xinha.python-hosting.com/ticket/119


Niko

Offline

#19 2005-04-28 05:11:32

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

Re: Fullscreen + Div Implimentation

please, i need some help

how far i got:
- bevore resizeing the editor gets deactivated: line 156 this.deactivateEditor()
- after resizing the editor should get activated again: line 234: this.activateEditor()
- but fails in htmlarea.js line 1407: this_doc.designMode = 'on'
   (the try-catch-block catches the exception)
if i remove the try-catch i get this on the JS-console:

Fehler: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.designMode]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: http://localhost/xinha/htmlarea.js :: anonymous :: line 1407"  data: no]
Quelldatei: http://localhost/xinha/htmlarea.js
Zeile: 1407

gogo, or anybody else, please help
you wrote the original fullscreen...


Niko

Offline

Board footer

Powered by FluxBB