ckeditor-externs

Javascript externs for CK Editor, a browser based wysiwyg editor. These externs are functional for basic usage, but by no means complete. You are welcome to contribute via Github.
https://github.com/tjrhodes/ckeditor-externs

To install, run:

haxelib install ckeditor-externs 1.0.0-beta.1 

See using Haxelib in Haxelib documentation for more information.

README.md

ckeditor-externs

HaxeJS externs for CKEDITOR

These externs are NOT complete but they already work well enough to be usefull.

Over time I want to improve the typing etc. (still afew too dynamics for my liking).

Here are a couple of quick examples of usage.

  1. Replace a textarea with the default editor...

            var contentBox = Lib.document.getElementById("contentBox");
            CKEDITOR.replace(contentBox);
    
  2. Create a custom inline editor in a div called "contentWrapper" which has contenteditable="true" as an attribute.

            var mainConfig = cast( { } );
            mainConfig.format_tags = "p;h4;h5";
            mainConfig.allowedContent =     {
                                                            "p h4 h5 ol ul li em strong": {},
                                                            "a": {
                                                                            attributes:"!href"
                                                            },
                                                            "p": {
                                                                            classes:"italic-quote"
                                                            },
                                                            "div": {
                                                                            classes:"*",
                                                                            attributes:"*"
                                                            }
                                            };
            mainConfig.removeButtons = "Styles";
            var mainEditorDOM = new Element(Lib.document.getElementById("contentWrapper"));
            CKEDITOR.inlineEditor(mainEditorDOM, mainConfig);
            CKEDITOR.instances.contentWrapper.on(Editor.FOCUS, editorFocussed);
            CKEDITOR.instances.contentWrapper.on(Editor.BLUR, editorBlurred);
    
Contributors
jason
Version
1.0.0-beta.1
Published
3 years ago
License
MIT

All libraries are free

Every month, more than thousand developers use haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on Github!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on Github