Squire/README.md at master · neilj/Squire · GitHub

/README.md

  • Squire
    http://neilj.github.io/Squire

    Un éditeur wysiwyg simple et léger (en HTML 5) basé sur un iframe dont le <body> à pour attribut « contenteditable=’true’ » à la place du classique <textarea> (autorise aussi l’utilisation d’un quelconque noeud du DOM à la place d’un iframe)
    Utilisé comme éditeur du webmail ProtonMail

    Squire is an HTML5 rich text editor, which provides powerful cross-browser normalisation, whilst being supremely lightweight and flexible. It is built for the present and the future, and as such does not support truly ancient browsers. It should work fine back to around Opera 10, Firefox 3.5, Safari 4, Chrome 9 and IE8.
    Unlike other HTML5 rich text editors, Squire was written as a component for writing documents (emails, essays, etc.), not doing wysiwyg websites.
    If you are looking for support for inserting form controls or flash components or the like, you’ll need to look elsewhere. However for many purposes, Squire may be just what you need, providing the power without the bloat.
    Installation
    – Download the source from neilj/Squire
    – Copy the contents of the build/ directory onto your server.
    – Edit the <style> block in document.html to add the default styles you would like the editor to use (or link to an external stylesheet).
    – In your application, instead of a <textarea>, use an <iframe src='https://seenthis.net/path/to/document.html'>.
    – In your JS, attach an event listener to the load event of the iframe. When this fires you can grab a reference to the editor object through iframe.contentWindow.editor.
    – Use the API below with the editor object to set and get data and integrate with your application or framework.

    Voir la doc officielle sur https://github.com/neilj/Squire/blob/master/README.md

    #editeur #wysiwyg #squire #protonmail #textarea #iframe