Skip to content
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

Could we use a <div> instead of <iframe> for the editor? #1

Closed
frankai opened this issue Mar 27, 2012 · 2 comments
Closed

Could we use a <div> instead of <iframe> for the editor? #1

frankai opened this issue Mar 27, 2012 · 2 comments

Comments

@frankai
Copy link

frankai commented Mar 27, 2012

Hello! thanks for this great editor, I love its API.

I am working on a project where I can not use an iframe, I have to use a content editable DIV in the body of an html page.

Is it very difficult to modify Squire for this goal? Any clue?

Thanks in advance,

Best regards,

Frankai

@neilj
Copy link
Member

neilj commented Mar 27, 2012

I am working on a project where I can not use an iframe, I have to use a content editable DIV in the body of an html page.

Is it very difficult to modify Squire for this goal? Any clue?

It should be fairly straight forward to change the code to use a div; you just need to alter source/Editor.js, changing the bits that reference win or body I think. The main issue with using a div instead of an iframe though is that the browser does not maintain a separate selection context, so whenever you click outside the div, the selection inside it is lost.

Neil.

@frankai
Copy link
Author

frankai commented Mar 27, 2012

Thanks for the info Neil!

@frankai frankai closed this as completed Mar 27, 2012
matthewborden pushed a commit to matthewborden/Squire that referenced this issue May 5, 2015
Update Squire and implement hacks required for Mathjax SVG.
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

2 participants