You are not logged in.
Pages: 1
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
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
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
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
oh, thats something different then, i didn't understand you
please create a ticket on that bug!
Niko
Offline
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
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
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
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
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
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
Offline
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
could you post your code?
Niko
Offline
please post it!!!
Offline
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
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
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
i need some help on this FF-error!
Niko
Offline
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
Pages: 1