Comments (10)
My current fix is to add a global variable:
var isSubmitRteEventWiredUp = false;
and wrap the submit event wire up:
if (isSubmitRteEventWiredUp == false) {
$(self.iframe).parents('form').submit(
function() { self.disable_design_mode(true); }
);
isSubmitRteEventWiredUp = true;
}
This seems to work but I feel like it could be problematic.
Original comment by [email protected]
on 5 Mar 2009 at 8:00
from lwrte.
Still can't reproduce that bug :( There was 'duplicate problem' in the past,
but i
was sure it was fixed. I'm going to release next version soon, try to test new
wersion. because right now i haven't that problem forages - at least i'm using
it as
editor for my cms.
Original comment by plandem
on 5 Mar 2009 at 10:45
from lwrte.
have you tried last version?
Original comment by plandem
on 9 Mar 2009 at 3:03
from lwrte.
Ok, I've tested with the last version(1.2) and run with both jQuery 1.2.6 and
1.3.2.
I get the same results as before.
I have an aspx form with the lwRTE control. If I don't include the code I
posted in
comment 1 and I submit the form in visual editing mode an <input> control is
created
for each time the editor was toggled back and forth.
This tells me that each time I toggle into the visual editor the function
enable_design_mode is being called and 'function() {
self.disable_design_mode(true);'
is being added to the parent form submit event. When the submit event is
called it
runs through the 'self.disable_design_mode(true);' function for each time the
editor
was toggled and creates an <input> control. I can watch this happen in firebug
and
have attached a screen shot.
I'm sure the code I'm using isn't the best solution but I have not been
successful
trying to unbind the function from the submit event. I believe if it is
unbound when
the iframe_doc and iframe are removed at the end of the disable_design_mode
function
then I wouldn't see this problem.
Thanks
Original comment by [email protected]
on 9 Mar 2009 at 9:28
Attachments:
from lwrte.
will try to dig that problem more :( still can't reproduce. Aspx - ASP.NET?
Original comment by plandem
on 22 Mar 2009 at 11:28
from lwrte.
[deleted comment]
from lwrte.
It has been a while but I still wanted you to know we've ported over to MVC and
no
longer have this problem. I'm going to guess that we had some web control that
was
conflicting with this that when we rewrote it to use MVC it fixed the problem.
Thanks for your help.
Original comment by [email protected]
on 1 Jun 2009 at 10:14
from lwrte.
I had the same problem (aspx - WinForm).
Solved it like this:
lwRTE.prototype.enable_design_mode = function() {
...
/* added */
$(self.iframe).parents('form').unbind('submit');
/* original */
$(self.iframe).parents('form').submit(
function() { self.disable_design_mode(true); }
);
...
}
Original comment by [email protected]
on 20 Jun 2009 at 10:45
from lwrte.
Thanks, that worked for me for the most part. I ended up just removing the
ability
to toggle to html mode just because my users really don't need that
functionality.
Unless it is already there and I'm just missing it, it would be nice to have the
ability to turn on and off the toggle button as an option to send to the
plug-in when
I create it.
Original comment by [email protected]
on 11 Aug 2009 at 7:10
from lwrte.
I don't understand why you placed the code to listing to the submit event of
the form
in the enable_design_mode method.
It would be better to place it in the constructor
...
var lwRTE = function (textarea, options) {
..
}
and attach to the form this way:
...
$j(textarea).parents('form').first()
.submit(function(){
...
Original comment by [email protected]
on 24 May 2010 at 3:09
from lwrte.
Related Issues (20)
- Height value ignored always HOT 1
- Link not working with image HOT 1
- Ability to switch off design/html toggle functionality
- Ability to switch off design/html toggle functionality
- rte-panel (such as Link dialog box) location offscreen or not centered
- Feature Request : One toolbar for several iframe ?
- Initialize RTE, remove iframe/texterea -> jQuery bug (a.contentWindow is null)
- keep up this good project, still alive?
- Missing "Create Link" Window
- Resize produces automatic "reload"
- Demo.css is missing
- i am using internet explorer 8 and 9 and i want to implement a fuction that operates on keypress by using radio button
- operation of radio button on key press in lwrte
- HELP Required! Need to limit user to enter only 200 char of text in the design mode. HOT 1
- Alt tag for a image?
- Tab doesn't work in chrome
- $.browser is no longer in jquery HOT 1
- get_content() doesn't update when removing a hyperlink at the end of the content
- IMG paste is not working Internet Explorer (IE8)
- Is there any option to select image and delete HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lwrte.