all files / rich-text-editor/base/ constant.js

100% Statements 160/160
100% Branches 0/0
100% Functions 1/1
100% Lines 160/160
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332                                                                                                                                                                                                                                                                                                                                                        
define(["require", "exports"], function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.created = 'create';
    exports.destroyed = 'destroy';
    exports.tableclass = 'tableclass';
    exports.load = 'load';
    exports.initialLoad = 'initial-load';
    exports.contentChanged = 'content-changed';
    exports.initialEnd = 'initial-end';
    exports.iframeMouseDown = 'iframe-click';
    exports.destroy = 'destroy';
    exports.toolbarClick = 'toolbarClick';
    exports.toolbarRefresh = 'toolbar-refresh';
    exports.refreshBegin = 'refresh-begin';
    exports.toolbarUpdated = 'toolbar-updated';
    exports.bindOnEnd = 'bind-on-end';
    exports.htmlToolbarClick = 'html-toolbar-click';
    exports.markdownToolbarClick = 'markdown-toolbar-click';
    exports.modelChanged = 'model-changed';
    exports.tableModulekeyUp = 'tableModulekeyUp';
    exports.keyUp = 'keyUp';
    exports.keyDown = 'keyDown';
    exports.onImport = 'onImport';
    exports.onExport = 'onExport';
    exports.mouseUp = 'mouseUp';
    exports.toolbarCreated = 'toolbarCreated';
    exports.toolbarRenderComplete = 'toolbarRenderComplete';
    exports.enableFullScreen = 'enableFullScreen';
    exports.disableFullScreen = 'disableFullScreen';
    exports.dropDownSelect = 'dropDownSelect';
    exports.beforeDropDownItemRender = 'beforeDropDownItemRender';
    exports.execCommandCallBack = 'execCommandCallBack';
    exports.imageToolbarAction = 'image-toolbar-action';
    exports.audioToolbarAction = 'audio-toolbar-action';
    exports.videoToolbarAction = 'video-toolbar-action';
    exports.linkToolbarAction = 'link-toolbar-action';
    exports.windowResize = 'resize';
    exports.resizeStart = 'resizeStart';
    exports.onResize = 'resizing';
    exports.resizeStop = 'resizeStop';
    exports.undo = 'undo';
    exports.redo = 'redo';
    exports.insertLink = 'insertLink';
    exports.unLink = 'unLink';
    exports.editLink = 'editLink';
    exports.openLink = 'openLink';
    exports.actionBegin = 'actionBegin';
    exports.actionComplete = 'actionComplete';
    exports.updatedToolbarStatus = 'updatedToolbarStatus';
    exports.actionSuccess = 'actionSuccess';
    exports.updateToolbarItem = 'updateToolbarItem';
    exports.insertImage = 'insertImage';
    exports.insertAudio = 'insertAudio';
    exports.insertVideo = 'insertVideo';
    exports.insertCompleted = 'insertCompleted';
    exports.imageLeft = 'justifyLeft';
    exports.imageRight = 'justifyRight';
    exports.imageCenter = 'justifyCenter';
    exports.imageBreak = 'break';
    exports.imageInline = 'inline';
    exports.imageLink = 'insertImgLink';
    exports.imageAlt = 'imgAltText';
    exports.imageDelete = 'delete';
    exports.audioDelete = 'delete';
    exports.videoDelete = 'delete';
    exports.imageCaption = 'caption';
    exports.imageSize = 'imageSize';
    exports.videoSize = 'videoSize';
    exports.sourceCode = 'sourceCode';
    exports.updateSource = 'updateSource';
    exports.toolbarOpen = 'toolbarOpen';
    exports.beforeDropDownOpen = 'beforeDropDownOpen';
    exports.selectionSave = 'selection-save';
    exports.selectionRestore = 'selection-restore';
    exports.expandPopupClick = 'expandPopupClick';
    exports.count = 'count';
    exports.contentFocus = 'contentFocus';
    exports.contentBlur = 'contentBlur';
    exports.mouseDown = 'mouseDown';
    exports.sourceCodeMouseDown = 'sourceCodeMouseDown';
    exports.editAreaClick = 'editAreaClick';
    exports.scroll = 'scroll';
    exports.contentscroll = 'contentscroll';
    exports.colorPickerChanged = 'colorPickerChanged';
    exports.tableColorPickerChanged = 'tableColorPickerChanged';
    exports.focusChange = 'focusChange';
    exports.selectAll = 'selectAll';
    exports.selectRange = 'selectRange';
    exports.getSelectedHtml = 'getSelectedHtml';
    exports.renderInlineToolbar = 'renderInlineToolbar';
    exports.paste = 'paste-content';
    exports.imgModule = 'imageModule';
    exports.rtlMode = 'rtl-mode';
    exports.createTable = 'createTable';
    exports.docClick = 'docClick';
    exports.tableToolbarAction = 'table-toolbar-action';
    exports.checkUndo = 'checkUndoStack';
    exports.readOnlyMode = 'readOnlyMode';
    exports.pasteClean = 'pasteClean';
    exports.enterHandler = 'enterHandler';
    exports.beforeDialogOpen = 'beforeDialogOpen';
    exports.clearDialogObj = 'clearDialogObj';
    exports.dialogOpen = 'dialogOpen';
    exports.beforeDialogClose = 'beforeDialogClose';
    exports.dialogClose = 'dialogClose';
    exports.beforeQuickToolbarOpen = 'beforeQuickToolbarOpen';
    exports.quickToolbarOpen = 'quickToolbarOpen';
    exports.quickToolbarClose = 'quickToolbarClose';
    exports.popupHide = 'popupHide';
    exports.imageSelected = 'imageSelected';
    exports.imageUploading = 'imageUploading';
    exports.imageUploadSuccess = 'imageUploadSuccess';
    exports.imageUploadFailed = 'imageUploadFailed';
    exports.imageRemoving = 'imageRemoving';
    exports.fileSelected = 'fileSelected';
    exports.fileUploading = 'fileUploading';
    exports.fileUploadSuccess = 'fileUploadSuccess';
    exports.fileUploadFailed = 'fileUploadFailed';
    exports.fileRemoving = 'fileRemoving';
    exports.afterImageDelete = 'afterImageDelete';
    exports.afterMediaDelete = 'afterMediaDelete';
    exports.drop = 'drop';
    exports.xhtmlValidation = 'xhtmlValidation';
    exports.beforeImageUpload = 'beforeImageUpload';
    exports.beforeFileUpload = 'beforeFileUpload';
    exports.resizeInitialized = 'resizeInitialized';
    exports.renderFileManager = 'renderFileManager';
    exports.beforeImageDrop = 'beforeImageDrop';
    exports.dynamicModule = 'dynamicModule';
    exports.beforePasteCleanup = 'beforePasteCleanup';
    exports.afterPasteCleanup = 'afterPasteCleanup';
    exports.updateTbItemsStatus = 'updateTbItemsStatus';
    exports.showLinkDialog = 'showLinkDialog';
    exports.closeLinkDialog = 'closeLinkDialog';
    exports.showImageDialog = 'showImageDialog';
    exports.showAudioDialog = 'showAudioDialog';
    exports.showVideoDialog = 'showVideoDialog';
    exports.closeImageDialog = 'closeImageDialog';
    exports.closeAudioDialog = 'closeAudioDialog';
    exports.closeVideoDialog = 'closeVideoDialog';
    exports.showTableDialog = 'showTableDialog';
    exports.closeTableDialog = 'closeTableDialog';
    exports.bindCssClass = 'bindCssClass';
    exports.formatPainterClick = 'formatPainterClick';
    exports.formatPainterDoubleClick = 'formatPainterDoubleClick';
    exports.emojiPicker = 'emojiPicker';
    exports.destroyTooltip = 'destroyTooltip';
    exports.hidePopup = 'hidePopup';
    exports.cleanupResizeElements = 'cleanupResizeElements';
    exports.afterKeyDown = 'afterKeyDown';
    exports.updateValueOnIdle = 'updateValueOnIdle';
    exports.documentClickClosedBy = 'documentClickClosedBy';
    exports.showColorPicker = 'showColorPicker';
    exports.closeTooltip = 'closeTooltip';
    exports.autoResize = 'autoResize';
    exports.blockEmptyNodes = "address:empty, article:empty, aside:empty, blockquote:empty,\n details:empty, dd:empty, div:empty, dl:empty, dt:empty, fieldset:empty, footer:empty,form:empty, h1:empty,\n h2:empty, h3:empty, h4:empty, h5:empty, h6:empty, header:empty, hgroup:empty, li:empty, main:empty, nav:empty,\n noscript:empty, output:empty, p:empty, pre:empty, section:empty, td:empty, th:empty";
    exports.inlineEmptyNodes = "a:empty, abbr:empty, acronym:empty, b:empty, bdi:empty, bdo:empty, big:empty, button:empty,\ncanvas:empty, cite:empty, code:empty, data:empty, datalist:empty, del:empty, dfn:empty, em:empty, font:empty, i:empty, iframe:empty,\nins:empty, kbd:empty, label:empty, map:empty, mark:empty, meter:empty, noscript:empty, object:empty, output:empty, picture:empty, progress:empty,\nq:empty, ruby:empty, s:empty, samp:empty, script:empty, select:empty, slot:empty, small:empty, span:empty, strong:empty, strike:empty, sub:empty, sup:empty, svg:empty,\ntemplate:empty, textarea:empty, time:empty, u:empty, tt:empty, var:empty, wbr:empty";
    exports.supportedUnits = ['px', 'em', 'rem', 'pt', 'cm', 'mm', 'in', 'pc', 'vw', 'vh', 'vmin', 'vmax'];
    exports.conversionFactors = {
        'px': {
            'px': 1,
            'em': 0.0625,
            'rem': 0.0625,
            'pt': 0.75,
            'cm': 0.0264583,
            'mm': 0.0026458,
            'in': 0.0104167,
            'pc': 0.0625,
            'vw': 0.00625,
            'vh': 0.00625,
            'vmin': 0.00625,
            'vmax': 0.00625
        },
        'em': {
            'px': 16,
            'em': 1,
            'rem': 1,
            'pt': 12,
            'cm': 0.423333,
            'mm': 0.0423333,
            'in': 0.166667,
            'pc': 0.0625,
            'vw': 1,
            'vh': 1,
            'vmin': 1,
            'vmax': 1
        },
        'rem': {
            'px': 16,
            'em': 1,
            'rem': 1,
            'pt': 12,
            'cm': 0.423333,
            'mm': 0.0423333,
            'in': 0.166667,
            'pc': 0.0625,
            'vw': 1,
            'vh': 1,
            'vmin': 1,
            'vmax': 1
        },
        'pt': {
            'px': 1.33333,
            'em': 0.0833333,
            'rem': 0.0833333,
            'pt': 1,
            'cm': 0.0352778,
            'mm': 0.0035278,
            'in': 0.0138889,
            'pc': 0.0416667,
            'vw': 0.00416667,
            'vh': 0.00416667,
            'vmin': 0.00416667,
            'vmax': 0.00416667
        },
        'cm': {
            'px': 37.7953,
            'em': 2.3622,
            'rem': 2.3622,
            'pt': 28.3465,
            'cm': 1,
            'mm': 0.1,
            'in': 0.393701,
            'pc': 0.148148,
            'vw': 0.0377953,
            'vh': 0.0377953,
            'vmin': 0.0377953,
            'vmax': 0.0377953
        },
        'mm': {
            'px': 3.77953,
            'em': 0.23622,
            'rem': 0.23622,
            'pt': 2.83465,
            'cm': 10,
            'mm': 1,
            'in': 0.0393701,
            'pc': 0.0148148,
            'vw': 0.00377953,
            'vh': 0.00377953,
            'vmin': 0.00377953,
            'vmax': 0.00377953
        },
        'in': {
            'px': 96,
            'em': 6,
            'rem': 6,
            'pt': 72,
            'cm': 2.54,
            'mm': 25.4,
            'in': 1,
            'pc': 0.375,
            'vw': 0.09375,
            'vh': 0.09375,
            'vmin': 0.09375,
            'vmax': 0.09375
        },
        'pc': {
            'px': 16,
            'em': 1,
            'rem': 1,
            'pt': 12,
            'cm': 0.423333,
            'mm': 0.0423333,
            'in': 0.166667,
            'pc': 1,
            'vw': 0.0625,
            'vh': 0.0625,
            'vmin': 0.0625,
            'vmax': 0.0625
        },
        'vw': {
            'px': 160,
            'em': 10,
            'rem': 10,
            'pt': 120,
            'cm': 4.23333,
            'mm': 0.423333,
            'in': 1.66667,
            'pc': 0.625,
            'vw': 1,
            'vh': 1,
            'vmin': 1,
            'vmax': 1
        },
        'vh': {
            'px': 160,
            'em': 10,
            'rem': 10,
            'pt': 120,
            'cm': 4.23333,
            'mm': 0.423333,
            'in': 1.66667,
            'pc': 0.625,
            'vw': 1,
            'vh': 1,
            'vmin': 1,
            'vmax': 1
        },
        'vmin': {
            'px': 160,
            'em': 10,
            'rem': 10,
            'pt': 120,
            'cm': 4.23333,
            'mm': 0.423333,
            'in': 1.66667,
            'pc': 0.625,
            'vw': 1,
            'vh': 1,
            'vmin': 1,
            'vmax': 1
        },
        'vmax': {
            'px': 160,
            'em': 10,
            'rem': 10,
            'pt': 120,
            'cm': 4.23333,
            'mm': 0.423333,
            'in': 1.66667,
            'pc': 0.625,
            'vw': 1,
            'vh': 1,
            'vmin': 1,
            'vmax': 1
        }
    };
    exports.onHandleFontsizeChange = 'onHandleFontsizeChange';
});