GithubHelp home page GithubHelp logo

Comments (17)

tiff avatar tiff commented on July 28, 2024

Thanks. Will look into this.

from wysihtml5.

codingwithoutcomments avatar codingwithoutcomments commented on July 28, 2024

Did anyone find a work around for this? Blocking issue.

from wysihtml5.

codingwithoutcomments avatar codingwithoutcomments commented on July 28, 2024

Another Question: anyway to automate the clicking of the iframe contentEditable area?

from wysihtml5.

tiff avatar tiff commented on July 28, 2024

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.

codingwithoutcomments avatar codingwithoutcomments commented on July 28, 2024

This works! Thanks so much!

from wysihtml5.

codingwithoutcomments avatar codingwithoutcomments commented on July 28, 2024

Correction, doesn't work on firefox. Just works in Chrome :(

from wysihtml5.

raldred avatar raldred commented on July 28, 2024

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.

Petah avatar Petah commented on July 28, 2024

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.

tiff avatar tiff commented on July 28, 2024

@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.

raldred avatar raldred commented on July 28, 2024

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.

tiff avatar tiff commented on July 28, 2024

@raldred Looks like someone had a deep look into the code. :) Awesome.

from wysihtml5.

Petah avatar Petah commented on July 28, 2024

Loving your work, keep it up!

from wysihtml5.

raldred avatar raldred commented on July 28, 2024

@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.

codingwithoutcomments avatar codingwithoutcomments commented on July 28, 2024

@tiff got it to work in ff! thanks!

from wysihtml5.

tiff avatar tiff commented on July 28, 2024

@codingwithoutcomments Thanks. I'm closing this one.
@raldred looks awesome. Be aware that there might be still some issues with iOS. (#62)

from wysihtml5.

LanFeusT23 avatar LanFeusT23 commented on July 28, 2024

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.

digitaldevelopmentrevolution avatar digitaldevelopmentrevolution commented on July 28, 2024

$('#CommentTextArea'+PostID).data("wysihtml5").editor.focus();

from wysihtml5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.