8000 use editor.doc.body.contentEditable=true for every browser · Issue #11 · cleditor/cleditor · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

use editor.doc.body.contentEditable=true for every browser #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dmitry-dedukhin opened this issue Jun 16, 2011 · 0 comments
Open

use editor.doc.body.contentEditable=true for every browser #11

dmitry-dedukhin opened this issue Jun 16, 2011 · 0 comments

Comments

@dmitry-dedukhin
Copy link

Hi.

The CLEditor uses contentEditable attribute only for IE, but Gecko/WebKit also support it a long while.
Particularly, there is a problem with designMode in Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=310488
This means that any flash-based video inserted into text is invisible in rich-text mode and this behaivor brings some issues.

My proposal is to use editor.doc.body.contentEditable=true for every browser. This allow us to see flash video in Firefox in rich-text mode. Though, we should do some kind of hack in Firefox during switching back from source mode to rich-text mode:

  // Show the iframe
  if (sourceMode(editor)) {
    delete editor.range;
    editor.$area.hide();
    editor.$frame.show();
    buttonDiv.title = button.title;
    // the next two lines are needed to enable rich-text mode after switching back from source mode
    editor.doc.body.contentEditable = false;
    editor.doc.body.contentEditable = true;
  }
@jzabroski jzabroski changed the title designMode vs. contentEditable and Firefox problem use editor.doc.body.contentEditable=true for every browser Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0