Comments (17)
Thanks. Will look into this.
from wysihtml5.
Did anyone find a work around for this? Blocking issue.
from wysihtml5.
Another Question: anyway to automate the clicking of the iframe contentEditable area?
from wysihtml5.
I think this could work:
editor.focus();
editor.composer.commands.exec("insertHTML", "foobar")
I'll make sure that it works without having to focus it manually.
from wysihtml5.
This works! Thanks so much!
from wysihtml5.
Correction, doesn't work on firefox. Just works in Chrome :(
from wysihtml5.
No problems in IE,Firefox,Chrome for me.
I'm using the following:
editor.currentView.element.focus();
editor.composer.commands.exec("insertImage", {"src":src,"alt":alt_text});
from wysihtml5.
I thought execCommand had extreme cross browser differences. Is it the best way to go, why could you not detect the selection and then insert HTML via different, fully supported, methods?
Raptor Editor (http://www.raptor-editor.com/) tries to avoid execCommand as much as possible.
from wysihtml5.
@Petah I'm aware of the browser differences and documented some of them in a separate repository (https://github.com/tiff/wysihtml5-tests). That's why wysihtml5 is hardly using native execCommand. Instead it relies heavily on the selection api to do formatting.
@codingwithoutcomments Did you somehow managed to get it working in Firefox?
from wysihtml5.
Hi David, wysihtml5 hardly uses the native execCommand, it mostly
implements its own. much like the alternative editor you suggested.
On 1 June 2012 12:19, David Neilsen
[email protected]
wrote:
I thought execCommand had extreme cross browser differences. Is it the best way to go, why could you not detect the selection and then insert HTML via different, fully supported, methods?
Raptor Editor (http://www.raptor-editor.com/) tries to avoid execCommand as much as possible.
Reply to this email directly or view it on GitHub:
#50 (comment)
from wysihtml5.
@raldred Looks like someone had a deep look into the code. :) Awesome.
from wysihtml5.
Loving your work, keep it up!
from wysihtml5.
@tiff heh, been working on integrating into my jquery mobile app (aimed at desktop browsers), been spending a bit of time reading the code learning how it all works so i can wire up custom dialogs for uploading images and other things.
Really impressed and very grateful for your hardwork.
If you're interesting how im using wysihtml5 & what im doing, heres a couple of shots.
https://docs.google.com/open?id=0B5i-3K7ouEzeN2wzenhicmxKcnc
https://docs.google.com/open?id=0B5i-3K7ouEzeb1gxTWZJTW0zdzg
(btw probably good to close this ticket now)
from wysihtml5.
@tiff got it to work in ff! thanks!
from wysihtml5.
@codingwithoutcomments Thanks. I'm closing this one.
@raldred looks awesome. Be aware that there might be still some issues with iOS. (#62)
from wysihtml5.
FYI this is happening to me on wysihtml5-0.3.0.min.js I'm unable to use insertHTML when using Firefox, as the .focus() won't ever focus in IE.
I've tried:
editor.focus();
document.getElementById("editorId").focus();
$("editorId").focus();
editor.currentView.element.focus();
none of the above work, works fine in Chrome and IE with the default editor.focus() though.
from wysihtml5.
$('#CommentTextArea'+PostID).data("wysihtml5").editor.focus();
from wysihtml5.
Related Issues (20)
- Chrome - Cursor Jumping HOT 2
- Many textarea HOT 2
- Custom text colors
- Words merged in editor
- Focus on many textareas
- Show images with local url in attribute src HOT 1
- alex
- Removes Closing Tag For img, br and input elements
- Function for updating iframe CSS
- Multiple Submit Functions are called in Angularjs2
- Scroll bar does not automatically scroll to bottom after paste
- Firefox compatibility problems
- Font-Size not Overriding HOT 1
- How to add multiple rich text editors?
- Set default text align to right
- set different heading styles in same line
- Android native and Chrome browser error in console: Uncaught TypeError: Cannot read property 'contentDocument' of undefined
- How to add attribute "id"?
- I cannot post long text! HOT 1
- Cannot remove custom color. 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 wysihtml5.