Comments (12)
:( boo. Confirmed this is an issue. Just tried using onPaste/onAfterPaste events with designmode activation-- usually works for me with contentEditable blobs, but not this time.
Looks like @jhollingworth has to suss this one out alone. Sorry bud.
from bootstrap-wysihtml5.
I've found the code that causing this issue but not sure why we need the skipped code so decided to paste the changes here.
You can see below is the fire() method which gets called every-time you type or press any key being in an editor.
this.events = this.events || {};
var handlers = this.events[eventName] || [],
i = 0;
for (; i<handlers.length; i++) {
// I've put .call() in if-else condition for paste:composer to skip first 2 calls in order to suppress the bug
if (eventName === 'paste:composer' && (i === 0 || i === 1)) {
console.log(eventName + " " + handlers[i]);
} else {
handlers[i].call(this, payload);
}
}
return this;
},
2 calls I skipped : (which are causing a problem)
this.observe("paste:composer"); // This clears the formatting of existing content in an editor.
this.parent.observe("paste:composer"); // This clears the formatting of the content being pasted.
Hope this will help.
from bootstrap-wysihtml5.
Reproduced in Firefox 11.0. Fix on the horizon?
from bootstrap-wysihtml5.
Keep posted to the main xing/wysihtml5 branch-- once it gets sussed out there, it should be merged down here. That's definitely an issue with their editor.
from bootstrap-wysihtml5.
I checked xing/wysihtml5 editor which does not have that bug. Need to look into bootstrap-wysihtml5.js
from bootstrap-wysihtml5.
Funny you just commented on it, they added more documentation for the events they publish which clears up some of the issues here. Looking into the composer events to monitor copy/paste actions.
edit or I'm an idiot and didn't see the needle in the haystack there-- composer docs have just been chilling in the middle. My bad. Looking into it either way.
from bootstrap-wysihtml5.
Oh thank goodness!!! I do document development work and have been having this problem for quite some time now. It is absolutely maddening (not to mention a huge time waster), and I've been unable to find a solution online despite extensive efforts to do so. I'm not a coding person so I'm afraid I can't contribute to the solution, but I am so grateful that you are looking into it and only hope I can figure out how to apply the solution when you find it (the tech language is well over my head).
from bootstrap-wysihtml5.
Thanks @codef0rmer it's working just fine..
from bootstrap-wysihtml5.
Should be fixed now :)
from bootstrap-wysihtml5.
Hi--This is such wonderful news!
But I don't know what it means in terms of actual application. Do I have to do anything on my end? Download an update or something or is it just going to miraculously be working in both new AND old documents.
Thanks for help!
Cheers,
Susan
Susan Blatnik
Cook International, LLC
Document Development Services
2041 Weber Avenue
Chesapeake, VA 23320
757-366-5901 (office phone & fax)
757-348-1193 (mobile)
-----Original Message-----
From: James Hollingworth [mailto:[email protected]]
Sent: Sunday, June 17, 2012 3:43 PM
To: sblatnik8
Subject: Re: [bootstrap-wysihtml5] Ctrl+V removes all formatting (#7)
Should be fixed now :)
Reply to this email directly or view it on GitHub:
#7 (comment)
from bootstrap-wysihtml5.
Search for
fire: function(eventName, payload) {
this.events = this.events || {};
var handlers = this.events[eventName] || [],
i = 0;
for (; i<handlers.length; i++) {
handlers[i].call(this, payload);
}
return this;
},
IN wysihtml5-0.3.0.js
and replace it with
fire: function(eventName, payload) {
this.events = this.events || {};
var handlers = this.events[eventName] || [],
i = 0;
for (; i<handlers.length; i++) {
// I've put .call() in if-else condition for paste:composer to skip first 2 calls in order to suppress the bug
if (eventName === 'paste:composer' && (i === 0 || i === 1)) {
console.log(eventName + " " + handlers[i]);
} else {
handlers[i].call(this, payload);
}
}
return this;
},
from bootstrap-wysihtml5.
Dear Lord! LOL. I will find a program-competent friend to help me. I can write a dissertation like no one's business, but this stuff stymies me.
Thank you so very much for the info. I can't express how grateful I am. (No one believed this was a problem. Thought I was crazy or an idiot or perhaps both.)
Thanks again.
Cheers,
Susan
Susan Blatnik
Cook International, LLC
Document Development Services
2041 Weber Avenue
Chesapeake, VA 23320
757-366-5901 (office phone & fax)
757-348-1193 (mobile)
-----Original Message-----
From: Vinay Kumar D [mailto:[email protected]]
Sent: Thursday, June 28, 2012 2:34 PM
To: sblatnik8
Subject: Re: [bootstrap-wysihtml5] Ctrl+V removes all formatting (#7)
Search for
fire: function(eventName, payload) {
this.events = this.events || {};
var handlers = this.events[eventName] || [],
i = 0;
for (; i<handlers.length; i++) {
handlers[i].call(this, payload);
}
return this;
},
IN wysihtml5-0.3.0.js
and replace it with
fire: function(eventName, payload) {
this.events = this.events || {};
var handlers = this.events[eventName] || [], i = 0;
for (; i<handlers.length; i++) {
// I've put .call() in if-else condition for paste:composer to skip first 2 calls in order to suppress the bug if (eventName === 'paste:composer' && (i === 0 || i === 1)) { console.log(eventName + " " + handlers[i]); } else { handlers[i].call(this, payload); } } return this;
},
Reply to this email directly or view it on GitHub:
#7 (comment)
from bootstrap-wysihtml5.
Related Issues (20)
- version in dist file name
- Firefox compatibility problems
- Color: true, shows in text area, but doesn't save HOT 1
- test
- test HOT 1
- Empty class attribute[<a class=“”>test</a>] removed by editor in IE
- textarea with data-toggle HOT 1
- github not displaying readme properly
- how to set val
- Deprecation: Selection API: addRange() ignores additional Ranges HOT 1
- How to add multiple rich text editors?
- Arabic locale key is not set correctly
- destroy api?
- Failed to execute 'focus' on createLink and insertImage
- Error: Failed to execute focus - on chrome v64 HOT 3
- set different heading styles in same line
- Problem with Font Awesome 5 HOT 1
- bootstrap-wysihtml5 Not showing moodle after fixing focus blank
- how to remove h1 only from the font-styles drop menu
- Regular Expression DoS vulnerability
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 bootstrap-wysihtml5.