ckeditor-externs 1.0.0-beta.1

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.

Released 2014-11-18.

To install, run:

haxelib install ckeditor-externs 1.0.0-beta.1

See using Haxelib in Haxelib documentation for more information.

Maintainerjason
Websitehttps://github.com/tjrhodes/ckeditor-externs
Current version1.0.0-beta.1
StatisticsInstalled 51 times
LicenseMIT
Tags cross, detox, dom, domtools, dtx, js, xml

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);