remove gitiegnore to public
21
public/storage/assets/vendors/tinymce/bower.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "tinymce",
|
||||
"description": "Web based JavaScript HTML WYSIWYG editor control.",
|
||||
"license": "LGPL-2.1",
|
||||
"keywords": [
|
||||
"editor",
|
||||
"wysiwyg",
|
||||
"tinymce",
|
||||
"richtext",
|
||||
"javascript",
|
||||
"html"
|
||||
],
|
||||
"homepage": "http://www.tinymce.com",
|
||||
"ignore": [
|
||||
"readme.md",
|
||||
"composer.json",
|
||||
"package.json",
|
||||
".npmignore",
|
||||
"changelog.txt"
|
||||
]
|
||||
}
|
||||
715
public/storage/assets/vendors/tinymce/changelog.txt
vendored
Normal file
@@ -0,0 +1,715 @@
|
||||
Version 4.6.4 (2017-06-13)
|
||||
Fixed bug where the editor would move the caret when clicking on the scrollbar next to a content editable false block.
|
||||
Fixed bug where the text color select dropdowns wasn't placed correctly when they didn't fit the width of the screen.
|
||||
Fixed bug where the default editor line height wasn't working for mixed font size contents.
|
||||
Fixed bug where the content css files for inline editors were loaded multiple times for multiple editor instances.
|
||||
Fixed bug where the initial value of the font size/font family dropdowns wasn't displayed.
|
||||
Fixed bug where the I18n api was not supporting arrays as the translation replacement values.
|
||||
Fixed bug where chrome would display "The given range isn't in document." errors for invalid ranges passed to setRng.
|
||||
Fixed bug where the compat3x plugin wasn't working since the global tinymce references wasn't resolved correctly.
|
||||
Fixed bug where the preview plugin wasn't encoding the base url passed into the iframe contents producing a xss bug.
|
||||
Fixed bug where the dom parser/serializer wasn't handling some special elements like noframes, title and xmp.
|
||||
Fixed bug where the dom parser/serializer wasn't handling cdata sections with comments inside.
|
||||
Fixed bug where the editor would scroll to the top of the editable area if a dialog was closed in inline mode.
|
||||
Fixed bug where the link dialog would not display the right rel value if rel_list was configured.
|
||||
Fixed bug where the context menu would select images on some platforms but not others.
|
||||
Fixed bug where the filenames of images were not retained on dragged and drop into the editor from the desktop.
|
||||
Fixed bug where the paste plugin would misrepresent newlines when pasting plain text and having forced_root_block configured.
|
||||
Fixed so that the error messages for the imagetools plugin is more human readable.
|
||||
Fixed so the internal validate setting for the parser/serializer can't be set from editor initialization settings.
|
||||
Version 4.6.3 (2017-05-30)
|
||||
Fixed bug where the arrow keys didn't work correctly when navigating on nested inline boundary elements.
|
||||
Fixed bug where delete/backspace didn't work correctly on nested inline boundary elements.
|
||||
Fixed bug where image editing didn't work on subsequent edits of the same image.
|
||||
Fixed bug where charmap descriptions wouldn't properly wrap if they exceeded the width of the box.
|
||||
Fixed bug where the default image upload handler only accepted 200 as a valid http status code.
|
||||
Fixed so rel on target=_blank links gets forced with only noopener instead of both noopener and noreferrer.
|
||||
Version 4.6.2 (2017-05-23)
|
||||
Fixed bug where the SaxParser would run out of memory on very large documents.
|
||||
Fixed bug with formatting like font size wasn't applied to del elements.
|
||||
Fixed bug where various api calls would be throwing exceptions if they where invoked on a removed editor instance.
|
||||
Fixed bug where the branding position would be incorrect if the editor was inside a hidden tab and then later showed.
|
||||
Fixed bug where the color levels feature in the imagetools dialog wasn't working properly.
|
||||
Fixed bug where imagetools dialog wouldn't pre-load images from CORS domains, before trying to prepare them for editing.
|
||||
Fixed bug where the tab key would move the caret to the next table cell if being pressed inside a list inside a table.
|
||||
Fixed bug where the cut/copy operations would loose parent context like the current format etc.
|
||||
Fixed bug with format preview not working on invalid elements excluded by valid_elements.
|
||||
Fixed bug where blocks would be merged in incorrect order on backspace/delete.
|
||||
Fixed bug where zero length text nodes would cause issues with the undo logic if there where iframes present.
|
||||
Fixed bug where the font size/family select lists would throw errors if the first node was a comment.
|
||||
Fixed bug with csp having to allow local script evaluation since it was used to detect global scope.
|
||||
Fixed bug where CSP required a relaxed option for javascript: URLs in unsupported legacy browsers.
|
||||
Fixed bug where a fake caret would be rendered for td with the contenteditable=false.
|
||||
Fixed bug where typing would be blocked on IE 11 when within a nested contenteditable=true/false structure.
|
||||
Version 4.6.1 (2017-05-10)
|
||||
Added configuration option to list plugin to disable tab indentation.
|
||||
Fixed bug where format change on very specific content could cause the selection to change.
|
||||
Fixed bug where TinyMCE could not be lazyloaded through jquery integration.
|
||||
Fixed bug where entities in style attributes weren't decoded correctly on paste in webkit.
|
||||
Fixed bug where fontsize_formats option had been renamed incorrectly.
|
||||
Fixed bug with broken backspace/delete behaviour between contenteditable=false blocks.
|
||||
Fixed bug where it wasn't possible to backspace to the previous line with the inline boundaries functionality turned on.
|
||||
Fixed bug where is wasn't possible to move caret left and right around a linked image with the inline boundaries functionality turned on.
|
||||
Fixed bug where pressing enter after/before hr element threw exception. Patch contributed bradleyke.
|
||||
Fixed so the CSS in the visualblocks plugin doesn't overwrite background color. Patch contributed by Christian Rank.
|
||||
Fixed bug where multibyte characters weren't encoded correctly. Patch contributed by James Tarkenton.
|
||||
Fixed bug where shift-click to select within contenteditable=true fields wasn't working.
|
||||
Version 4.6.0 (2017-05-04)
|
||||
Dropped support for IE 8-10 due to market share and lack of support from Microsoft. See tinymce docs for details.
|
||||
Added an inline boundary caret position feature that makes it easier to type at the beginning/end of links/code elements.
|
||||
Added a help plugin that adds a button and a dialog showing the editor shortcuts and loaded plugins.
|
||||
Added an inline_boundaries option that allows you to disable the inline boundary feature if it's not desired.
|
||||
Added a new ScrollIntoView event that allows you to override the default scroll to element behavior.
|
||||
Added role and aria- attributes as valid elements in the default valid elements config.
|
||||
Added new internal flag for PastePreProcess/PastePostProcess this is useful to know if the paste was coming from an external source.
|
||||
Added new ignore function to UndoManager this works similar to transact except that it doesn't add an undo level by default.
|
||||
Fixed so that urls gets retained for images when being edited. This url is then passed on to the upload handler.
|
||||
Fixed so that the editors would be initialized on readyState interactive instead of complete.
|
||||
Fixed so that the init event of the editor gets fired once all contentCSS files have been properly loaded.
|
||||
Fixed so that width/height of the editor gets taken from the textarea element if it's explicitly specified in styles.
|
||||
Fixed so that keep_styles set to false no longer clones class/style from the previous paragraph on enter.
|
||||
Fixed so that the default line-height is 1.2em to avoid zwnbsp characters from producing text rendering glitches on Windows.
|
||||
Fixed so that loading errors of content css gets presented by a notification message.
|
||||
Fixed so figure image elements can be linked when selected this wraps the figure image in a anchor element.
|
||||
Fixed bug where it wasn't possible to copy/paste rows with colspans by using the table copy/paste feature.
|
||||
Fixed bug where the protect setting wasn't properly applied to header/footer parts when using the fullpage plugin.
|
||||
Fixed bug where custom formats that specified upper case element names where not applied correctly.
|
||||
Fixed bug where some screen readers weren't reading buttons due to an aria specific fix for IE 8.
|
||||
Fixed bug where cut wasn't working correctly on iOS due to it's clipboard API not working correctly.
|
||||
Fixed bug where Edge would paste div elements instead of paragraphs when pasting plain text.
|
||||
Fixed bug where the textpattern plugin wasn't dealing with trailing punctuations correctly.
|
||||
Fixed bug where image editing would some times change the image format from jpg to png.
|
||||
Fixed bug where some UI elements could be inserted into the toolbar even if they where not registered.
|
||||
Fixed bug where it was possible to click the TD instead of the character in the character map and that caused an exception.
|
||||
Fixed bug where the font size/font family dropdowns would sometimes show an incorrect value due to css not being loaded in time.
|
||||
Fixed bug with the media plugin inserting undefined instead of retaining size when media_dimensions was set to false.
|
||||
Fixed bug with deleting images when forced_root_blocks where set to false.
|
||||
Fixed bug where input focus wasn't properly handled on nested content editable elements.
|
||||
Fixed bug where Chrome/Firefox would throw an exception when selecting images due to recent change of setBaseAndExtent support.
|
||||
Fixed bug where malformed blobs would throw exceptions now they are simply ignored.
|
||||
Fixed bug where backspace/delete wouldn't work properly in some cases where all contents was selected in WebKit.
|
||||
Fixed bug with Angular producing errors since it was expecting events objects to be patched with their custom properties.
|
||||
Fixed bug where the formatter would apply formatting to spellchecker errors now all bogus elements are excluded.
|
||||
Fixed bug with backspace/delete inside table caption elements wouldn't behave properly on IE 11.
|
||||
Fixed bug where typing after a contenteditable false inline element could move the caret to the end of that element.
|
||||
Fixed bug where backspace before/after contenteditable false blocks wouldn't properly remove the right element.
|
||||
Fixed bug where backspace before/after contenteditable false inline elements wouldn't properly empty the current block element.
|
||||
Fixed bug where vertical caret navigation with a custom line-height would sometimes match incorrect positions.
|
||||
Fixed bug with paste on Edge where character encoding wasn't handled properly due to a browser bug.
|
||||
Fixed bug with paste on Edge where extra fragment data was inserted into the contents when pasting.
|
||||
Fixed bug with pasting contents when having a whole block element selected on WebKit could cause WebKit spans to appear.
|
||||
Fixed bug where the visualchars plugin wasn't working correctly showing invisible nbsp characters.
|
||||
Fixed bug where browsers would hang if you tried to load some malformed html contents.
|
||||
Fixed bug where the init call promise wouldn't resolve if the specified selector didn't find any matching elements.
|
||||
Fixed bug where the Schema isValidChild function was case sensitive.
|
||||
Version 4.5.3 (2017-02-01)
|
||||
Added keyboard navigation for menu buttons when the menu is in focus.
|
||||
Added api to the list plugin for setting custom classes/attributes on lists.
|
||||
Added validation for the anchor plugin input field according to W3C id naming specifications.
|
||||
Fixed bug where media placeholders were removed after resize with the forced_root_block setting set to false.
|
||||
Fixed bug where deleting selections with similar sibling nodes sometimes deleted the whole document.
|
||||
Fixed bug with inlite theme where several toolbars would appear scrolling when more than one instance of the editor was in use.
|
||||
Fixed bug where the editor would throw error with the fontselect plugin on hidden editor instances in Firefox.
|
||||
Fixed bug where the background color would not stretch to the font size.
|
||||
Fixed bug where font size would be removed when changing background color.
|
||||
Fixed bug where the undomanager trimmed away whitespace between nodes on undo/redo.
|
||||
Fixed bug where media_dimensions=false in media plugin caused the editor to throw an error.
|
||||
Fixed bug where IE was producing font/u elements within links on paste.
|
||||
Fixed bug where some button tooltips were broken when compat3x was in use.
|
||||
Fixed bug where backspace/delete/typeover would remove the caption element.
|
||||
Fixed bug where powerspell failed to function when compat3x was enabled.
|
||||
Fixed bug where it wasn't possible to apply sub/sup on text with large font size.
|
||||
Fixed bug where pre tags with spaces weren't treated as content.
|
||||
Fixed bug where Meta+A would select the entire document instead of all contents in nested ce=true elements.
|
||||
Version 4.5.2 (2017-01-04)
|
||||
Added missing keyboard shortcut description for the underline menu item in the format menu.
|
||||
Fixed bug where external blob urls wasn't properly handled by editor upload logic. Patch contributed by David Oviedo.
|
||||
Fixed bug where urls wasn't treated as a single word by the wordcount plugin.
|
||||
Fixed bug where nbsp characters wasn't treated as word delimiters by the wordcount plugin.
|
||||
Fixed bug where editor instance wasn't properly passed to the format preview logic. Patch contributed by NullQuery.
|
||||
Fixed bug where the fake caret wasn't hidden when you moved selection to a cE=false element.
|
||||
Fixed bug where it wasn't possible to edit existing code sample blocks.
|
||||
Fixed bug where it wasn't possible to delete editor contents if the selection included an empty block.
|
||||
Fixed bug where the formatter wasn't expanding words on some international characters. Patch contributed by Martin Larochelle.
|
||||
Fixed bug where the open link feature wasn't working correctly on IE 11.
|
||||
Fixed bug where enter before/after a cE=false block wouldn't properly padd the paragraph with an br element.
|
||||
Fixed so font size and font family select boxes always displays a value by using the runtime style as a fallback.
|
||||
Fixed so missing plugins will be logged to console as warnings rather than halting the initialization of the editor.
|
||||
Fixed so splitbuttons become normal buttons in advlist plugin if styles are empty. Patch contributed by René Schleusner.
|
||||
Fixed so you can multi insert rows/cols by selecting table cells and using insert rows/columns.
|
||||
Version 4.5.1 (2016-12-07)
|
||||
Fixed bug where the lists plugin wouldn't initialize without the advlist plugins if served from cdn.
|
||||
Fixed bug where selectors with "*" would cause the style format preview to throw an error.
|
||||
Fixed bug with toggling lists off on lists with empty list items would throw an error.
|
||||
Fixed bug where editing images would produce non existing blob uris.
|
||||
Fixed bug where the offscreen toc selection would be treated as the real toc element.
|
||||
Fixed bug where the aria level attribute for element path would have an incorrect start index.
|
||||
Fixed bug where the offscreen selection of cE=false that where very wide would be shown onscreen. Patch contributed by Steven Bufton.
|
||||
Fixed so the default_link_target gets applied to links created by the autolink plugin.
|
||||
Fixed so that the name attribute gets removed by the anchor plugin if editing anchors.
|
||||
Version 4.5.0 (2016-11-23)
|
||||
Added new toc plugin allows you to insert table of contents based on editor headings.
|
||||
Added new auto complete menu to all url fields. Adds history, link to anchors etc.
|
||||
Added new sidebar api that allows you to add custom sidebar panels and buttons to toggle these.
|
||||
Added new insert menu button that allows you to have multiple insert functions under the same menu button.
|
||||
Added new open link feature to ctrl+click, alt+enter and context menu.
|
||||
Added new media_embed_handler option to allow the media plugin to be populated with custom embeds.
|
||||
Added new support for editing transparent images using the image tools dialog.
|
||||
Added new images_reuse_filename option to allow filenames of images to be retained for upload.
|
||||
Added new security feature where links with target="_blank" will by default get rel="noopener noreferrer".
|
||||
Added new allow_unsafe_link_target to allow you to opt-out of the target="_blank" security feature.
|
||||
Added new style_formats_autohide option to automatically hide styles based on context.
|
||||
Added new codesample_content_css option to specify where the code sample prism css is loaded from.
|
||||
Added new support for Japanese/Chinese word count following the unicode standards on this.
|
||||
Added new fragmented undo levels this dramatically reduces flicker on contents with iframes.
|
||||
Added new live previews for complex elements like table or lists.
|
||||
Fixed bug where it wasn't possible to properly tab between controls in a dialog with a disabled form item control.
|
||||
Fixed bug where firefox would generate a rectangle on elements produced after/before a cE=false elements.
|
||||
Fixed bug with advlist plugin not switching list element format properly in some edge cases.
|
||||
Fixed bug where col/rowspans wasn't correctly computed by the table plugin in some cases.
|
||||
Fixed bug where the table plugin would thrown an error if object_resizing was disabled.
|
||||
Fixed bug where some invalid markup would cause issues when running in XHTML mode. Patch contributed by Charles Bourasseau.
|
||||
Fixed bug where the fullscreen class wouldn't be removed properly when closing dialogs.
|
||||
Fixed bug where the PastePlainTextToggle event wasn't fired by the paste plugin when the state changed.
|
||||
Fixed bug where table the row type wasn't properly updated in table row dialog. Patch contributed by Matthias Balmer.
|
||||
Fixed bug where select all and cut wouldn't place caret focus back to the editor in WebKit. Patch contributed by Daniel Jalkut.
|
||||
Fixed bug where applying cell/row properties to multiple cells/rows would reset other unchanged properties.
|
||||
Fixed bug where some elements in the schema would have redundant/incorrect children.
|
||||
Fixed bug where selector and target options would cause issues if used together.
|
||||
Fixed bug where drag/drop of images from desktop on chrome would thrown an error.
|
||||
Fixed bug where cut on WebKit/Blink wouldn't add an undo level.
|
||||
Fixed bug where IE 11 would scroll to the cE=false elements when they where selected.
|
||||
Fixed bug where keys like F5 wouldn't work when a cE=false element was selected.
|
||||
Fixed bug where the undo manager wouldn't stop the typing state when commands where executed.
|
||||
Fixed bug where unlink on wrapped links wouldn't work properly.
|
||||
Fixed bug with drag/drop of images on WebKit where the image would be deleted form the source editor.
|
||||
Fixed bug where the visual characters mode would be disabled when contents was extracted from the editor.
|
||||
Fixed bug where some browsers would toggle of formats applied to the caret when clicking in the editor toolbar.
|
||||
Fixed bug where the custom theme function wasn't working correctly.
|
||||
Fixed bug where image option for custom buttons required you to have icon specified as well.
|
||||
Fixed bug where the context menu and contextual toolbars would be visible at the same time and sometimes overlapping.
|
||||
Fixed bug where the noneditable plugin would double wrap elements when using the noneditable_regexp option.
|
||||
Fixed bug where tables would get padding instead of margin when you used the indent button.
|
||||
Fixed bug where the charmap plugin wouldn't properly insert non breaking spaces.
|
||||
Fixed bug where the color previews in color input boxes wasn't properly updated.
|
||||
Fixed bug where the list items of previous lists wasn't merged in the right order.
|
||||
Fixed bug where it wasn't possible to drag/drop inline-block cE=false elements on IE 11.
|
||||
Fixed bug where some table cell merges would produce incorrect rowspan/colspan.
|
||||
Fixed so the font size of the editor defaults to 14px instead of 11px this can be overridden by custom css.
|
||||
Fixed so wordcount is debounced to reduce cpu hogging on larger texts.
|
||||
Fixed so tinymce global gets properly exported as a module when used with some module bundlers.
|
||||
Fixed so it's possible to specify what css properties you want to preview on specific formats.
|
||||
Fixed so anchors are contentEditable=false while within the editor.
|
||||
Fixed so selected contents gets wrapped in a inline code element by the codesample plugin.
|
||||
Fixed so conditional comments gets properly stripped independent of case. Patch contributed by Georgii Dolzhykov.
|
||||
Fixed so some escaped css sequences gets properly handled. Patch contributed by Georgii Dolzhykov.
|
||||
Fixed so notifications with the same message doesn't get displayed at the same time.
|
||||
Fixed so F10 can be used as an alternative key to focus to the toolbar.
|
||||
Fixed various api documentation issues and typos.
|
||||
Removed layer plugin since it wasn't really ported from 3.x and there doesn't seem to be much use for it.
|
||||
Removed moxieplayer.swf from the media plugin since it wasn't used by the media plugin.
|
||||
Removed format state from the advlist plugin to be more consistent with common word processors.
|
||||
Version 4.4.3 (2016-09-01)
|
||||
Fixed bug where copy would produce an exception on Chrome.
|
||||
Fixed bug where deleting lists on IE 11 would merge in correct text nodes.
|
||||
Fixed bug where deleting partial lists with indentation wouldn't cause proper normalization.
|
||||
Version 4.4.2 (2016-08-25)
|
||||
Added new importcss_exclusive option to disable unique selectors per group.
|
||||
Added new group specific selector_converter option to importcss plugin.
|
||||
Added new codesample_languages option to apply custom languages to codesample plugin.
|
||||
Added new codesample_dialog_width/codesample_dialog_height options.
|
||||
Fixed bug where fullscreen button had an incorrect keyboard shortcut.
|
||||
Fixed bug where backspace/delete wouldn't work correctly from a block to a cE=false element.
|
||||
Fixed bug where smartpaste wasn't detecting links with special characters in them like tilde.
|
||||
Fixed bug where the editor wouldn't get proper focus if you clicked on a cE=false element.
|
||||
Fixed bug where it wasn't possible to copy/paste table rows that had merged cells.
|
||||
Fixed bug where merging cells could some times produce invalid col/rowspan attibute values.
|
||||
Fixed bug where getBody would sometimes thrown an exception now it just returns null if the iframe is clobbered.
|
||||
Fixed bug where drag/drop of cE=false element wasn't properly constrained to viewport.
|
||||
Fixed bug where contextmenu on Mac would collapse any selection to a caret.
|
||||
Fixed bug where rtl mode wasn't rendered properly when loading a language pack with the rtl flag.
|
||||
Fixed bug where Kamer word bounderies would be stripped from contents.
|
||||
Fixed bug where lists would sometimes render two dots or numbers on the same line.
|
||||
Fixed bug where the skin_url wasn't used by the inlite theme.
|
||||
Fixed so data attributes are ignored when comparing formats in the formatter.
|
||||
Fixed so it's possible to disable inline toolbars in the inlite theme.
|
||||
Fixed so template dialog gets resized if it doesn't fit the window viewport.
|
||||
Version 4.4.1 (2016-07-26)
|
||||
Added smart_paste option to paste plugin to allow disabling the paste behavior if needed.
|
||||
Fixed bug where png urls wasn't properly detected by the smart paste logic.
|
||||
Fixed bug where the element path wasn't working properly when multiple editor instances where used.
|
||||
Fixed bug with creating lists out of multiple paragraphs would just create one list item instead of multiple.
|
||||
Fixed bug where scroll position wasn't properly handled by the inlite theme to place the toolbar properly.
|
||||
Fixed bug where multiple instances of the editor using the inlite theme didn't render the toolbar properly.
|
||||
Fixed bug where the shortcut label for fullscreen mode didn't match the actual shortcut key.
|
||||
Fixed bug where it wasn't possible to select cE=false blocks using touch devices on for example iOS.
|
||||
Fixed bug where it was possible to select the child image within a cE=false on IE 11.
|
||||
Fixed so inserts of html containing lists doesn't merge with any existing lists unless it's a paste operation.
|
||||
Version 4.4.0 (2016-06-30)
|
||||
Added new inlite theme this is a more lightweight inline UI.
|
||||
Added smarter paste logic that auto detects urls in the clipboard and inserts images/links based on that.
|
||||
Added a better image resize algorithm for better image quality in the imagetools plugin.
|
||||
Fixed bug where it wasn't possible to drag/dropping cE=false elements on FF.
|
||||
Fixed bug where backspace/delete before/after a cE=false block would produce a new paragraph.
|
||||
Fixed bug where list style type css property wasn't preserved when indenting lists.
|
||||
Fixed bug where merging of lists where done even if the list style type was different.
|
||||
Fixed bug where the image_dataimg_filter function wasn't used when pasting images.
|
||||
Fixed bug where nested editable within a non editable element would cause scroll on focus in Chrome.
|
||||
Fixed so invalid targets for inline mode is blocked on initialization. We only support elements that can have children.
|
||||
Version 4.3.13 (2016-06-08)
|
||||
Added characters with a diacritical mark to charmap plugin. Patch contributed by Dominik Schilling.
|
||||
Added better error handling if the image proxy service would produce errors.
|
||||
Fixed issue with pasting list items into list items would produce nested list rather than a merged list.
|
||||
Fixed bug where table selection could get stuck in selection mode for inline editors.
|
||||
Fixed bug where it was possible to place the caret inside the resize grid elements.
|
||||
Fixed bug where it wasn't possible to place in elements horizontally adjacent cE=false blocks.
|
||||
Fixed bug where multiple notifications wouldn't be properly placed on screen.
|
||||
Fixed bug where multiple editor instance of the same id could be produces in some specific integrations.
|
||||
Version 4.3.12 (2016-05-10)
|
||||
Fixed bug where focus calls couldn't be made inside the editors PostRender event handler.
|
||||
Fixed bug where some translations wouldn't work as expected due to a bug in editor.translate.
|
||||
Fixed bug where the node change event could fire with a node out side the root of the editor.
|
||||
Fixed bug where Chrome wouldn't properly present the keyboard paste clipboard details when paste was clicked.
|
||||
Fixed bug where merged cells in tables couldn't be selected from right to left.
|
||||
Fixed bug where insert row wouldn't properly update a merged cells rowspan property.
|
||||
Fixed bug where the color input boxes preview field wasn't properly set on initialization.
|
||||
Fixed bug where IME composition inside table cells wouldn't work as expected on IE 11.
|
||||
Fixed so all shadow dom support is under and experimental flag due to flaky browser support.
|
||||
Version 4.3.11 (2016-04-25)
|
||||
Fixed bug where it wasn't possible to insert empty blocks though the API unless they where padded.
|
||||
Fixed bug where you couldn't type the Euro character on Windows.
|
||||
Fixed bug where backspace/delete from a cE=false element to a text block didn't work properly.
|
||||
Fixed bug where the text color default grid would render incorrectly.
|
||||
Fixed bug where the codesample plugin wouldn't load the css in the editor for multiple editors.
|
||||
Fixed so the codesample plugin textarea gets focused by default.
|
||||
Version 4.3.10 (2016-04-12)
|
||||
Fixed bug where the key "y" on WebKit couldn't be entered due to conflict with keycode for F10 on keypress.
|
||||
Version 4.3.9 (2016-04-12)
|
||||
Added support for focusing the contextual toolbars using keyboard.
|
||||
Added keyboard support for slider UI controls. You can no increase/decrease using arrow keys.
|
||||
Added url pattern matching for Dailymotion to media plugin. Patch contributed by Bertrand Darbon.
|
||||
Added body_class to template plugin preview. Patch contributed by Milen Petrinski.
|
||||
Added options to better override textcolor pickers with custom colors. Patch contributed by Xavier Boubert.
|
||||
Added visual arrows to inline contextual toolbars so that they point to the element being active.
|
||||
Fixed so toolbars for tables or other larger elements get better positioned below the scrollable viewport.
|
||||
Fixed bug where it was possible to click links inside cE=false blocks.
|
||||
Fixed bug where event targets wasn't properly handled in Safari Technical Preview.
|
||||
Fixed bug where drag/drop text in FF 45 would make the editor caret invisible.
|
||||
Fixed bug where the remove state wasn't properly set on editor instances when detected as clobbered.
|
||||
Fixed bug where offscreen selection of some cE=false elements would render onscreen. Patch contributed by Steven Bufton
|
||||
Fixed bug where enter would clone styles out side the root on editors inside a span. Patch contributed by ChristophKaser.
|
||||
Fixed bug where drag/drop of images into the editor didn't work correctly in FF.
|
||||
Fixed so the first item in panels for the imagetools dialog gets proper keyboard focus.
|
||||
Changed the Meta+Shift+F shortcut to Ctrl+Shift+F since Czech, Slovak, Polish languages used the first one for input.
|
||||
Version 4.3.8 (2016-03-15)
|
||||
Fixed bug where inserting HR at the end of a block element would produce an extra empty block.
|
||||
Fixed bug where links would be clickable when readonly mode was enabled.
|
||||
Fixed bug where the formatter would normalize to the wrong node on very specific content.
|
||||
Fixed bug where some nested list items couldn't be indented properly.
|
||||
Fixed bug where links where clickable in the preview dialog.
|
||||
Fixed so the alt attribute doesn't get padded with an empty value by default.
|
||||
Fixed so nested alignment works more correctly. You will now alter the alignment to the closest block parent.
|
||||
Version 4.3.7 (2016-03-02)
|
||||
Fixed bug where incorrect icons would be rendered for imagetools edit and color levels.
|
||||
Fixed bug where navigation using arrow keys inside a SelectBox didn't move up/down.
|
||||
Fixed bug where the visualblocks plugin would render borders round internal UI elements.
|
||||
Version 4.3.6 (2016-03-01)
|
||||
Added new paste_remember_plaintext_info option to allow a global disable of the plain text mode notification.
|
||||
Added new PastePlainTextToggle event that fires when plain text mode toggles on/off.
|
||||
Fixed bug where it wasn't possible to select media elements since the drag logic would snap it to mouse cursor.
|
||||
Fixed bug where it was hard to place the caret inside nested cE=true elements when the outer cE=false element was focused.
|
||||
Fixed bug where editors wouldn't properly initialize if both selector and mode where used.
|
||||
Fixed bug where IME input inside table cells would switch the IME off.
|
||||
Fixed bug where selection inside the first table cell would cause the whole table cell to get selected.
|
||||
Fixed bug where error handling of images being uploaded wouldn't properly handle faulty statuses.
|
||||
Fixed bug where inserting contents before a HR would cause an exception to be thrown.
|
||||
Fixed bug where copy/paste of Excel data would be inserted as an image.
|
||||
Fixed caret position issues with copy/paste of inline block cE=false elements.
|
||||
Fixed issues with various menu item focus bugs in Chrome. Where the focused menu bar item wasn't properly blurred.
|
||||
Fixed so the notifications have a solid background since it would be hard to read if there where text under it.
|
||||
Fixed so notifications gets animated similar to the ones used by dialogs.
|
||||
Fixed so larger images that gets pasted is handled better.
|
||||
Fixed so the window close button is more uniform on various platform and also increased it's hit area.
|
||||
Version 4.3.5 (2016-02-11)
|
||||
Npm version bump due to package not being fully updated.
|
||||
Version 4.3.4 (2016-02-11)
|
||||
Added new OpenWindow/CloseWindow events that gets fired when windows open/close.
|
||||
Added new NewCell/NewRow events that gets fired when table cells/rows are created.
|
||||
Added new Promise return value to tinymce.init makes it easier to handle initialization.
|
||||
Removed the jQuery version the jQuery plugin is now moved into the main package.
|
||||
Removed jscs from build process since eslint can now handle code style checking.
|
||||
Fixed various bugs with drag/drop of contentEditable:false elements.
|
||||
Fixed bug where deleting of very specific nested list items would result in an odd list.
|
||||
Fixed bug where lists would get merged with adjacent lists outside the editable inline root.
|
||||
Fixed bug where MS Edge would crash when closing a dialog then clicking a menu item.
|
||||
Fixed bug where table cell selection would add undo levels.
|
||||
Fixed bug where table cell selection wasn't removed when inline editor where removed.
|
||||
Fixed bug where table cell selection wouldn't work properly on nested tables.
|
||||
Fixed bug where table merge menu would be available when merging between thead and tbody.
|
||||
Fixed bug where table row/column resize wouldn't get properly removed when the editor was removed.
|
||||
Fixed bug where Chrome would scroll to the editor if there where a empty hash value in document url.
|
||||
Fixed bug where the cache suffix wouldn't work correctly with the importcss plugin.
|
||||
Fixed bug where selection wouldn't work properly on MS Edge on Windows Phone 10.
|
||||
Fixed so adjacent pre blocks gets joined into one pre block since that seems like the user intent.
|
||||
Fixed so events gets properly dispatched in shadow dom. Patch provided by Nazar Mokrynskyi.
|
||||
Version 4.3.3 (2016-01-14)
|
||||
Added new table_resize_bars configuration setting. This setting allows you to disable the table resize bars.
|
||||
Added new beforeInitialize event to tinymce.util.XHR lets you modify XHR properties before open. Patch contributed by Brent Clintel.
|
||||
Added new autolink_pattern setting to autolink plugin. Enables you to override the default autolink formats. Patch contributed by Ben Tiedt.
|
||||
Added new charmap option that lets you override the default charmap of the charmap plugin.
|
||||
Added new charmap_append option that lets you add new characters to the default charmap of the charmap plugin.
|
||||
Added new insertCustomChar event that gets fired when a character is inserted by the charmap plugin.
|
||||
Fixed bug where table cells started with a superfluous in IE10+.
|
||||
Fixed bug where table plugin would retain all BR tags when cells were merged.
|
||||
Fixed bug where media plugin would strip underscores from youtube urls.
|
||||
Fixed bug where IME input would fail on IE 11 if you typed within a table.
|
||||
Fixed bug where double click selection of a word would remove the space before the word on insert contents.
|
||||
Fixed bug where table plugin would produce exceptions when hovering tables with invalid structure.
|
||||
Fixed bug where fullscreen wouldn't scroll back to it's original position when untoggled.
|
||||
Fixed so the template plugins templates setting can be a function that gets a callback that can provide templates.
|
||||
Version 4.3.2 (2015-12-14)
|
||||
Fixed bug where the resize bars for table cells were not affected by the object_resizing property.
|
||||
Fixed bug where the contextual table toolbar would appear incorrectly if TinyMCE was initialized inline inside a table.
|
||||
Fixed bug where resizing table cells did not fire a node change event or add an undo level.
|
||||
Fixed bug where double click selection of text on IE 11 wouldn't work properly.
|
||||
Fixed bug where codesample plugin would incorrectly produce br elements inside code elements.
|
||||
Fixed bug where media plugin would strip dashes from youtube urls.
|
||||
Fixed bug where it was possible to move the caret into the table resize bars.
|
||||
Fixed bug where drag/drop into a cE=false element was possible on IE.
|
||||
Version 4.3.1 (2015-11-30)
|
||||
Fixed so it's possible to disable the table inline toolbar by setting it to false or an empty string.
|
||||
Fixed bug where it wasn't possible to resize some tables using the drag handles.
|
||||
Fixed bug where unique id:s would clash for multiple editor instances and cE=false selections.
|
||||
Fixed bug where the same plugin could be initialized multiple times.
|
||||
Fixed bug where the table inline toolbars would be displayed at the same time as the image toolbars.
|
||||
Fixed bug where the table selection rect wouldn't be removed when selecting another control element.
|
||||
Version 4.3.0 (2015-11-23)
|
||||
Added new table column/row resize support. Makes it a lot more easy to resize the columns/rows in a table.
|
||||
Added new table inline toolbar. Makes it easier to for example add new rows or columns to a table.
|
||||
Added new notification API. Lets you display floating notifications to the end user.
|
||||
Added new codesample plugin that lets you insert syntax highlighted pre elements into the editor.
|
||||
Added new image_caption to images. Lets you create images with captions using a HTML5 figure/figcaption elements.
|
||||
Added new live previews of embeded videos. Lets you play the video right inside the editor.
|
||||
Added new setDirty method and "dirty" event to the editor. Makes it easier to track the dirty state change.
|
||||
Added new setMode method to Editor instances that lets you dynamically switch between design/readonly.
|
||||
Added new core support for contentEditable=false elements within the editor overrides the browsers broken behavior.
|
||||
Rewrote the noneditable plugin to use the new contentEditable false core logic.
|
||||
Fixed so the dirty state doesn't set set to false automatically when the undo index is set to 0.
|
||||
Fixed the Selection.placeCaretAt so it works better on IE when the coordinate is between paragraphs.
|
||||
Fixed bug where data-mce-bogus="all" element contents where counted by the word count plugin.
|
||||
Fixed bug where contentEditable=false elements would be indented by the indent buttons.
|
||||
Fixed bug where images within contentEditable=false would be selected in WebKit on mouse click.
|
||||
Fixed bug in DOMUntils split method where the replacement parameter wouldn't work on specific cases.
|
||||
Fixed bug where the importcss plugin would import classes from the skin content css file.
|
||||
Fixed so all button variants have a wrapping span for it's text to make it easier to skin.
|
||||
Fixed so it's easier to exit pre block using the arrow keys.
|
||||
Fixed bug where listboxes with fix widths didn't render correctly.
|
||||
Version 4.2.8 (2015-11-13)
|
||||
Fixed bug where it was possible to delete tables as the inline root element if all columns where selected.
|
||||
Fixed bug where the UI buttons active state wasn't properly updated due to recent refactoring of that logic.
|
||||
Version 4.2.7 (2015-10-27)
|
||||
Fixed bug where backspace/delete would remove all formats on the last paragraph character in WebKit/Blink.
|
||||
Fixed bug where backspace within a inline format element with a bogus caret container would move the caret.
|
||||
Fixed bug where backspace/delete on selected table cells wouldn't add an undo level.
|
||||
Fixed bug where script tags embedded within the editor could sometimes get a mce- prefix prepended to them
|
||||
Fixed bug where validate: false option could produce an error to be thrown from the Serialization step.
|
||||
Fixed bug where inline editing of a table as the root element could let the user delete that table.
|
||||
Fixed bug where inline editing of a table as the root element wouldn't properly handle enter key.
|
||||
Fixed bug where inline editing of a table as the root element would normalize the selection incorrectly.
|
||||
Fixed bug where inline editing of a list as the root element could let the user delete that list.
|
||||
Fixed bug where inline editing of a list as the root element could let the user split that list.
|
||||
Fixed bug where resize handles would be rendered on editable root elements such as table.
|
||||
Version 4.2.6 (2015-09-28)
|
||||
Added capability to set request headers when using XHRs.
|
||||
Added capability to upload local images automatically default delay is set to 30 seconds after editing images.
|
||||
Added commands ids mceEditImage, mceAchor and mceMedia to be avaiable from execCommand.
|
||||
Added Edge browser to saucelabs grunt task. Patch contributed by John-David Dalton.
|
||||
Fixed bug where blob uris not produced by tinymce would produce HTML invalid markup.
|
||||
Fixed bug where selection of contents of a nearly empty editor in Edge would sometimes fail.
|
||||
Fixed bug where color styles woudln't be retained on copy/paste in Blink/Webkit.
|
||||
Fixed bug where the table plugin would throw an error when inserting rows after a child table.
|
||||
Fixed bug where the template plugin wouldn't handle functions as variable replacements.
|
||||
Fixed bug where undo/redo sometimes wouldn't work properly when applying formatting collapsed ranges.
|
||||
Fixed bug where shift+delete wouldn't do a cut operation on Blink/WebKit.
|
||||
Fixed bug where cut action wouldn't properly store the before selection bookmark for the undo level.
|
||||
Fixed bug where backspace in side an empty list element on IE would loose editor focus.
|
||||
Fixed bug where the save plugin wouldn't enable the buttons when a change occurred.
|
||||
Fixed bug where Edge wouldn't initialize the editor if a document.domain was specified.
|
||||
Fixed bug where enter key before nested images would sometimes not properly expand the previous block.
|
||||
Fixed bug where the inline toolbars wouldn't get properly hidden when blurring the editor instance.
|
||||
Fixed bug where Edge would paste Chinese characters on some Windows 10 installations.
|
||||
Fixed bug where IME would loose focus on IE 11 due to the double trailing br bug fix.
|
||||
Fixed bug where the proxy url in imagetools was incorrect. Patch contributed by Wong Ho Wang.
|
||||
Version 4.2.5 (2015-08-31)
|
||||
Added fullscreen capability to embedded youtube and vimeo videos.
|
||||
Fixed bug where the uploadImages call didn't work on IE 10.
|
||||
Fixed bug where image place holders would be uploaded by uploadImages call.
|
||||
Fixed bug where images marked with bogus would be uploaded by the uploadImages call.
|
||||
Fixed bug where multiple calls to uploadImages would result in decreased performance.
|
||||
Fixed bug where pagebreaks were editable to imagetools patch contributed by Rasmus Wallin.
|
||||
Fixed bug where the element path could cause too much recursion exception.
|
||||
Fixed bug for domains containing ".min". Patch contributed by Loïc Février.
|
||||
Fixed so validation of external links to accept a number after www. Patch contributed by Victor Carvalho.
|
||||
Fixed so the charmap is exposed though execCommand. Patch contributed by Matthew Will.
|
||||
Fixed so that the image uploads are concurrent for improved performance.
|
||||
Fixed various grammar problems in inline documentation. Patches provided by nikolas.
|
||||
Version 4.2.4 (2015-08-17)
|
||||
Added picture as a valid element to the HTML 5 schema. Patch contributed by Adam Taylor.
|
||||
Fixed bug where contents would be duplicated on drag/drop within the same editor.
|
||||
Fixed bug where floating/alignment of images on Edge wouldn't work properly.
|
||||
Fixed bug where it wasn't possible to drag images on IE 11.
|
||||
Fixed bug where image selection on Edge would sometimes fail.
|
||||
Fixed bug where contextual toolbars icons wasn't rendered properly when using the toolbar_items_size.
|
||||
Fixed bug where searchreplace dialog doesn't get prefilled with the selected text.
|
||||
Fixed bug where fragmented matches wouldn't get properly replaced by the searchreplace plugin.
|
||||
Fixed bug where enter key wouldn't place the caret if was after a trailing space within an inline element.
|
||||
Fixed bug where the autolink plugin could produce multiple links for the same text on Gecko.
|
||||
Fixed bug where EditorUpload could sometimes throw an exception if the blob wasn't found.
|
||||
Fixed xss issues with media plugin not properly filtering out some script attributes.
|
||||
Version 4.2.3 (2015-07-30)
|
||||
Fixed bug where image selection wasn't possible on Edge due to incompatible setBaseAndExtend API.
|
||||
Fixed bug where image blobs urls where not properly destroyed by the imagetools plugin.
|
||||
Fixed bug where keyboard shortcuts wasn't working correctly on IE 8.
|
||||
Fixed skin issue where the borders of panels where not visible on IE 8.
|
||||
Version 4.2.2 (2015-07-22)
|
||||
Fixed bug where float panels were not being hidden on inline editor blur when fixed_toolbar_container config option was in use.
|
||||
Fixed bug where combobox states wasn't properly updated if contents where updated without keyboard.
|
||||
Fixed bug where pasting into textbox or combobox would move the caret to the end of text.
|
||||
Fixed bug where removal of bogus span elements before block elements would remove whitespace between nodes.
|
||||
Fixed bug where repositioning of inline toolbars where async and producing errors if the editor was removed from DOM to early. Patch by iseulde.
|
||||
Fixed bug where element path wasn't working correctly. Patch contributed by iseulde.
|
||||
Fixed bug where menus wasn't rendered correctly when custom images where added to a menu. Patch contributed by Naim Hammadi.
|
||||
Version 4.2.1 (2015-06-29)
|
||||
Fixed bug where back/forward buttons in the browser would render blob images as broken images.
|
||||
Fixed bug where Firefox would throw regexp to big error when replacing huge base64 chunks.
|
||||
Fixed bug rendering issues with resize and context toolbars not being placed properly until next animation frame.
|
||||
Fixed bug where the rendering of the image while cropping would some times not be centered correctly.
|
||||
Fixed bug where listbox items with submenus would me selected as active.
|
||||
Fixed bug where context menu where throwing an error when rendering.
|
||||
Fixed bug where resize both option wasn't working due to resent addClass API change. Patch contributed by Jogai.
|
||||
Fixed bug where a hideAll call for container rendered inline toolbars would throw an error.
|
||||
Fixed bug where onclick event handler on combobox could cause issues if element.id was a function by some polluting libraries.
|
||||
Fixed bug where listboxes wouldn't get proper selected sub menu item when using link_list or image_list.
|
||||
Fixed so the UI controls are as wide as 4.1.x to avoid wrapping controls in toolbars.
|
||||
Fixed so the imagetools dialog is adaptive for smaller screen sizes.
|
||||
Version 4.2.0 (2015-06-25)
|
||||
Added new flat default skin to make the UI more modern.
|
||||
Added new imagetools plugin, lets you crop/resize and apply filters to images.
|
||||
Added new contextual toolbars support to the API lets you add floating toolbars for specific CSS selectors.
|
||||
Added new promise feature fill as tinymce.util.Promise.
|
||||
Added new built in image upload feature lets you upload any base64 encoded image within the editor as files.
|
||||
Fixed bug where resize handles would appear in the right position in the wrong editor when switching between resizable content in different inline editors.
|
||||
Fixed bug where tables would not be inserted in inline mode due to previous float panel fix.
|
||||
Fixed bug where floating panels would remain open when focus was lost on inline editors.
|
||||
Fixed bug where cut command on Chrome would thrown a browser security exception.
|
||||
Fixed bug where IE 11 sometimes would report an incorrect size for images in the image dialog.
|
||||
Fixed bug where it wasn't possible to remove inline formatting at the end of block elements.
|
||||
Fixed bug where it wasn't possible to delete table cell contents when cell selection was vertical.
|
||||
Fixed bug where table cell wasn't emptied from block elements if delete/backspace where pressed in empty cell.
|
||||
Fixed bug where cmd+shift+arrow didn't work correctly on Firefox mac when selecting to start/end of line.
|
||||
Fixed bug where removal of bogus elements would sometimes remove whitespace between nodes.
|
||||
Fixed bug where the resize handles wasn't updated when the main window was resized.
|
||||
Fixed so script elements gets removed by default to prevent possible XSS issues in default config implementations.
|
||||
Fixed so the UI doesn't need manual reflows when using non native layout managers.
|
||||
Fixed so base64 encoded images doesn't slow down the editor on modern browsers while editing.
|
||||
Fixed so all UI elements uses touch events to improve mobile device support.
|
||||
Removed the touch click quirks patch for iOS since it did more harm than good.
|
||||
Removed the non proportional resize handles since. Unproportional resize can still be done by holding the shift key.
|
||||
Version 4.1.10 (2015-05-05)
|
||||
Fixed bug where plugins loaded with compat3x would sometimes throw errors when loading using the jQuery version.
|
||||
Fixed bug where extra empty paragraphs would get deleted in WebKit/Blink due to recent Quriks fix.
|
||||
Fixed bug where the editor wouldn't work properly on IE 12 due to some required browser sniffing.
|
||||
Fixed bug where formatting shortcut keys where interfering with Mac OS X screenshot keys.
|
||||
Fixed bug where the caret wouldn't move to the next/previous line boundary on Cmd+Left/Right on Gecko.
|
||||
Fixed bug where it wasn't possible to remove formats from very specific nested contents.
|
||||
Fixed bug where undo levels wasn't produced when typing letters using the shift or alt+ctrl modifiers.
|
||||
Fixed bug where the dirty state wasn't properly updated when typing using the shift or alt+ctrl modifiers.
|
||||
Fixed bug where an error would be thrown if an autofocused editor was destroyed quickly after its initialization. Patch provided by thorn0.
|
||||
Fixed issue with dirty state not being properly updated on redo operation.
|
||||
Fixed issue with entity decoder not handling incorrectly written numeric entities.
|
||||
Fixed issue where some PI element values wouldn't be properly encoded.
|
||||
Version 4.1.9 (2015-03-10)
|
||||
Fixed bug where indentation wouldn't work properly for non list elements.
|
||||
Fixed bug with image plugin not pulling the image dimensions out correctly if a custom document_base_url was used.
|
||||
Fixed bug where ctrl+alt+[1-9] would conflict with the AltGr+[1-9] on Windows. New shortcuts is ctrl+shift+[1-9].
|
||||
Fixed bug with removing formatting on nodes in inline mode would sometimes include nodes outside the editor body.
|
||||
Fixed bug where extra nbsp:s would be inserted when you replaced a word surrounded by spaces using insertContent.
|
||||
Fixed bug with pasting from Google Docs would produce extra strong elements and line feeds.
|
||||
Version 4.1.8 (2015-03-05)
|
||||
Added new html5 sizes attribute to img elements used together with srcset.
|
||||
Added new elementpath option that makes it possible to disable the element path but keep the statusbar.
|
||||
Added new option table_style_by_css for the table plugin to set table styling with css rather than table attributes.
|
||||
Added new link_assume_external_targets option to prompt the user to prepend http:// prefix if the supplied link does not contain a protocol prefix.
|
||||
Added new image_prepend_url option to allow a custom base path/url to be added to images.
|
||||
Added new table_appearance_options option to make it possible to disable some options.
|
||||
Added new image_title option to make it possible to alter the title of the image, disabled by default.
|
||||
Fixed bug where selection starting from out side of the body wouldn't produce a proper selection range on IE 11.
|
||||
Fixed bug where pressing enter twice before a table moves the cursor in the table and causes a javascript error.
|
||||
Fixed bug where advanced image styles were not respected.
|
||||
Fixed bug where the less common Shift+Delete didn't produce a proper cut operation on WebKit browsers.
|
||||
Fixed bug where image/media size constrain logic would produce NaN when handling non number values.
|
||||
Fixed bug where internal classes where removed by the removeformat command.
|
||||
Fixed bug with creating links table cell contents with a specific selection would throw a exceptions on WebKit/Blink.
|
||||
Fixed bug where valid_classes option didn't work as expected according to docs. Patch provided by thorn0.
|
||||
Fixed bug where jQuery plugin would patch the internal methods multiple times. Patch provided by Drew Martin.
|
||||
Fixed bug where backspace key wouldn't delete the current selection of newly formatted content.
|
||||
Fixed bug where type over of inline formatting elements wouldn't properly keep the format on WebKit/Blink.
|
||||
Fixed bug where selection needed to be properly normalized on modern IE versions.
|
||||
Fixed bug where Command+Backspace didn't properly delete the whole line of text but the previous word.
|
||||
Fixed bug where UI active states wheren't properly updated on IE if you placed caret within the current range.
|
||||
Fixed bug where delete/backspace on WebKit/Blink would remove span elements created by the user.
|
||||
Fixed bug where delete/backspace would produce incorrect results when deleting between two text blocks with br elements.
|
||||
Fixed bug where captions where removed when pasting from MS Office.
|
||||
Fixed bug where lists plugin wouldn't properly remove fully selected nested lists.
|
||||
Fixed bug where the ttf font used for icons would throw an warning message on Gecko on Mac OS X.
|
||||
Fixed a bug where applying a color to text did not update the undo/redo history.
|
||||
Fixed so shy entities gets displayed when using the visualchars plugin.
|
||||
Fixed so removeformat removes ins/del by default since these might be used for strikethough.
|
||||
Fixed so multiple language packs can be loaded and added to the global I18n data structure.
|
||||
Fixed so transparent color selection gets treated as a normal color selection. Patch contributed by Alexander Hofbauer.
|
||||
Fixed so it's possible to disable autoresize_overflow_padding, autoresize_bottom_margin options by setting them to false.
|
||||
Fixed so the charmap plugin shows the description of the character in the dialog. Patch contributed by Jelle Hissink.
|
||||
Removed address from the default list of block formats since it tends to be missused.
|
||||
Fixed so the pre block format is called preformatted to make it more verbose.
|
||||
Fixed so it's possible to context scope translation strings this isn't needed most of the time.
|
||||
Fixed so the max length of the width/height input fields of the media dialog is 5 instead of 3.
|
||||
Fixed so drag/dropped contents gets properly processed by paste plugin since it's basically a paste. Patch contributed by Greg Fairbanks.
|
||||
Fixed so shortcut keys for headers is ctrl+alt+[1-9] instead of ctrl+[1-9] since these are for switching tabs in the browsers.
|
||||
Fixed so "u" doesn't get converted into a span element by the legacy input filter. Since this is now a valid HTML5 element.
|
||||
Fixed font families in order to provide appropriate web-safe fonts.
|
||||
Version 4.1.7 (2014-11-27)
|
||||
Added HTML5 schema support for srcset, source and picture. Patch contributed by mattheu.
|
||||
Added new cache_suffix setting to enable cache busting by producing unique urls.
|
||||
Added new paste_convert_word_fake_lists option to enable users to disable the fake lists convert logic.
|
||||
Fixed so advlist style changes adds undo levels for each change.
|
||||
Fixed bug where WebKit would sometimes produce an exception when the autolink plugin where looking for URLs.
|
||||
Fixed bug where IE 7 wouldn't be rendered properly due to to aggressive css compression.
|
||||
Fixed bug where DomQuery wouldn't accept window as constructor element.
|
||||
Fixed bug where the color picker in 3.x dialogs wouldn't work properly. Patch contributed by Callidior.
|
||||
Fixed bug where the image plugin wouldn't respect the document_base_url.
|
||||
Fixed bug where the jQuery plugin would fail to append to elements named array prototype names.
|
||||
Version 4.1.6 (2014-10-08)
|
||||
Fixed bug with clicking on the scrollbar of the iframe would cause a JS error to be thrown.
|
||||
Fixed bug where null would produce an exception if you passed it to selection.setRng.
|
||||
Fixed bug where Ctrl/Cmd+Tab would indent the current list item if you switched tabs in the browser.
|
||||
Fixed bug where pasting empty cells from Excel would result in a broken table.
|
||||
Fixed bug where it wasn't possible to switch back to default list style type.
|
||||
Fixed issue where the select all quirk fix would fire for other modifiers than Ctrl/Cmd combinations.
|
||||
Replaced jake with grunt since it is more mainstream and has better plugin support.
|
||||
Version 4.1.5 (2014-09-09)
|
||||
Fixed bug where sometimes the resize rectangles wouldn't properly render on images on WebKit/Blink.
|
||||
Fixed bug in list plugin where delete/backspace would merge empty LI elements in lists incorrectly.
|
||||
Fixed bug where empty list elements would result in empty LI elements without it's parent container.
|
||||
Fixed bug where backspace in empty caret formatted element could produce an type error exception of Gecko.
|
||||
Fixed bug where lists pasted from word with a custom start index above 9 wouldn't be properly handled.
|
||||
Fixed bug where tabfocus plugin would tab out of the editor instance even if the default action was prevented.
|
||||
Fixed bug where tabfocus wouldn't tab properly to other adjacent editor instances.
|
||||
Fixed bug where the DOMUtils setStyles wouldn't properly removed or update the data-mce-style attribute.
|
||||
Fixed bug where dialog select boxes would be placed incorrectly if document.body wasn't statically positioned.
|
||||
Fixed bug where pasting would sometimes scroll to the top of page if the user was using the autoresize plugin.
|
||||
Fixed bug where caret wouldn't be properly rendered by Chrome when clicking on the iframes documentElement.
|
||||
Fixed so custom images for menubutton/splitbutton can be provided. Patch contributed by Naim Hammadi.
|
||||
Fixed so the default action of windows closing can be prevented by blocking the default action of the close event.
|
||||
Fixed so nodeChange and focus of the editor isn't automatically performed when opening sub dialogs.
|
||||
Version 4.1.4 (2014-08-21)
|
||||
Added new media_filter_html option to media plugin that blocks any conditional comments, scripts etc within a video element.
|
||||
Added new content_security_policy option allows you to set custom policy for iframe contents. Patch contributed by Francois Chagnon.
|
||||
Fixed bug where activate/deactivate events wasn't firing properly when switching between editors.
|
||||
Fixed bug where placing the caret on iOS was difficult due to a WebKit bug with touch events.
|
||||
Fixed bug where the resize helper wouldn't render properly on older IE versions.
|
||||
Fixed bug where resizing images inside tables on older IE versions would sometimes fail depending mouse position.
|
||||
Fixed bug where editor.insertContent would produce an exception when inserting select/option elements.
|
||||
Fixed bug where extra empty paragraphs would be produced if block elements where inserted inside span elements.
|
||||
Fixed bug where the spellchecker menu item wouldn't be properly checked if spell checking was started before it was rendered.
|
||||
Fixed bug where the DomQuery filter function wouldn't remove non elements from collection.
|
||||
Fixed bug where document with custom document.domain wouldn't properly render the editor.
|
||||
Fixed bug where IE 8 would throw exception when trying to enter invalid color values into colorboxes.
|
||||
Fixed bug where undo manager could incorrectly add an extra undo level when custom resize handles was removed.
|
||||
Fixed bug where it wouldn't be possible to alter cell properties properly on table cells on IE 8.
|
||||
Fixed so the color picker button in table dialog isn't shown unless you include the colorpicker plugin or add your own custom color picker.
|
||||
Fixed so activate/deactivate events fire when windowManager opens a window since.
|
||||
Fixed so the table advtab options isn't separated by an underscore to normalize naming with image_advtab option.
|
||||
Fixed so the table cell dialog has proper padding when the advanced tab in disabled.
|
||||
Version 4.1.3 (2014-07-29)
|
||||
Added event binding logic to tinymce.util.XHR making it possible to override headers and settings before any request is made.
|
||||
Fixed bug where drag events wasn't fireing properly on older IE versions since the event handlers where bound to document.
|
||||
Fixed bug where drag/dropping contents within the editor on IE would force the contents into plain text mode even if it was internal content.
|
||||
Fixed bug where IE 7 wouldn't open menus properly due to a resize bug in the browser auto closing them immediately.
|
||||
Fixed bug where the DOMUtils getPos logic wouldn't produce a valid coordinate inside the body if the body was positioned non static.
|
||||
Fixed bug where the element path and format state wasn't properly updated if you had the wordcount plugin enabled.
|
||||
Fixed bug where a comment at the beginning of source would produce an exception in the formatter logic.
|
||||
Fixed bug where setAttrib/getAttrib on null would throw exception together with any hooked attributes like style.
|
||||
Fixed bug where table sizes wasn't properly retained when copy/pasting on WebKit/Blink.
|
||||
Fixed bug where WebKit/Blink would produce colors in RGB format instead of the forced HEX format when deleting contents.
|
||||
Fixed bug where the width attribute wasn't updated on tables if you changed the size inside the table dialog.
|
||||
Fixed bug where control selection wasn't properly handled when the caret was placed directly after an image.
|
||||
Fixed bug where selecting the contents of table cells using the selection.select method wouldn't place the caret properly.
|
||||
Fixed bug where the selection state for images wasn't removed when placing the caret right after an image on WebKit/Blink.
|
||||
Fixed bug where all events wasn't properly unbound when and editor instance was removed or destroyed by some external innerHTML call.
|
||||
Fixed bug where it wasn't possible or very hard to select images on iOS when the onscreen keyboard was visible.
|
||||
Fixed so auto_focus can take a boolean argument this will auto focus the last initialized editor might be useful for single inits.
|
||||
Fixed so word auto detect lists logic works better for faked lists that doesn't have specific markup.
|
||||
Fixed so nodeChange gets fired on mouseup as it used to before 4.1.1 we optimized that event to fire less often.
|
||||
Removed the finish menu item from spellchecker menu since it's redundant you can stop spellchecking by toggling menu item or button.
|
||||
Version 4.1.2 (2014-07-15)
|
||||
Added offset/grep to DomQuery class works basically the same as it's jQuery equivalent.
|
||||
Fixed bug where backspace/delete or setContent with an empty string would remove header data when using the fullpage plugin.
|
||||
Fixed bug where tinymce.remove with a selector not matching any editors would remove all editors.
|
||||
Fixed bug where resizing of the editor didn't work since the theme was calling setStyles instead of setStyle.
|
||||
Fixed bug where IE 7 would fail to append html fragments to iframe document when using DomQuery.
|
||||
Fixed bug where the getStyle DOMUtils method would produce an exception if it was called with null as it's element.
|
||||
Fixed bug where the paste plugin would remove the element if the none of the paste_webkit_styles rules matched the current style.
|
||||
Fixed bug where contextmenu table items wouldn't work properly on IE since it would some times fire an incorrect selection change.
|
||||
Fixed bug where the padding/border values wasn't used in the size calculation for the body size when using autoresize. Patch contributed by Matt Whelan.
|
||||
Fixed bug where conditional word comments wouldn't be properly removed when pasting plain text.
|
||||
Fixed bug where resizing would sometime fail on IE 11 when the mouseup occurred inside the resizable element.
|
||||
Fixed so the iframe gets initialized without any inline event handlers for better CSP support. Patch contributed by Matt Whelan.
|
||||
Fixed so the tinymce.dom.Sizzle is the latest version of sizzle this resolves the document context bug.
|
||||
Version 4.1.1 (2014-07-08)
|
||||
Fixed bug where pasting plain text on some WebKit versions would result in an empty line.
|
||||
Fixed bug where resizing images inside tables on IE 11 wouldn't work properly.
|
||||
Fixed bug where IE 11 would sometimes throw "Invalid argument" exception when editor contents was set to an empty string.
|
||||
Fixed bug where document.activeElement would throw exceptions on IE 9 when that element was hidden or removed from dom.
|
||||
Fixed bug where WebKit/Blink sometimes produced br elements with the Apple-interchange-newline class.
|
||||
Fixed bug where table cell selection wasn't properly removed when copy/pasting table cells.
|
||||
Fixed bug where pasting nested list items from Word wouldn't produce proper semantic nested lists.
|
||||
Fixed bug where right clicking using the contextmenu plugin on WebKit/Blink on Mac OS X would select the target current word or line.
|
||||
Fixed bug where it wasn't possible to alter table cell properties on IE 8 using the context menu.
|
||||
Fixed bug where the resize helper wouldn't be correctly positioned on older IE versions.
|
||||
Fixed bug where fullpage plugin would produce an error if you didn't specify a doctype encoding.
|
||||
Fixed bug where anchor plugin would get the name/id of the current element even if it wasn't anchor element.
|
||||
Fixed bug where visual aids for tables wouldn't be properly disabled when changing the border size.
|
||||
Fixed bug where some control selection events wasn't properly fired on older IE versions.
|
||||
Fixed bug where table cell selection on older IE versions would prevent resizing of images.
|
||||
Fixed bug with paste_data_images paste option not working properly on modern IE versions.
|
||||
Fixed bug where custom elements with underscores in the name wasn't properly parsed/serialized.
|
||||
Fixed bug where applying inline formats to nested list elements would produce an incorrect formatting result.
|
||||
Fixed so it's possible to hide items from elements path by using preventDefault/stopPropagation.
|
||||
Fixed so inline mode toolbar gets rendered right aligned if the editable element positioned to the documents right edge.
|
||||
Fixed so empty inline elements inside empty block elements doesn't get removed if configured to be kept intact.
|
||||
Fixed so DomQuery parentsUntil/prevUntil/nextUntil supports selectors/elements/filters etc.
|
||||
Fixed so legacyoutput plugin overrides fontselect and fontsizeselect controls and handles font elements properly.
|
||||
Version 4.1.0 (2014-06-18)
|
||||
Added new file_picker_callback option to replace the old file_browser_callback the latter will still work though.
|
||||
Added new custom colors to textcolor plugin will be displayed if a color picker is provided also shows the latest colors.
|
||||
Added new color_picker_callback option to enable you to add custom color pickers to the editor.
|
||||
Added new advanced tabs to table/cell/row dialogs to enable you to select colors for border/background.
|
||||
Added new colorpicker plugin that lets you select colors from a hsv color picker.
|
||||
Added new tinymce.util.Color class to handle color parsing and converting.
|
||||
Added new colorpicker UI widget element lets you add a hsv color picker to any form/window.
|
||||
Added new textpattern plugin that allows you to use markdown like text patterns to format contents.
|
||||
Added new resize helper element that shows the current width & height while resizing.
|
||||
Added new "once" method to Editor and EventDispatcher enables since callback execution events.
|
||||
Added new jQuery like class under tinymce.dom.DomQuery it's exposed on editor instances (editor.$) and globally under (tinymce.$).
|
||||
Fixed so the default resize method for images are proportional shift/ctrl can be used to make an unproportional size.
|
||||
Fixed bug where the image_dimensions option of the image plugin would cause exceptions when it tried to update the size.
|
||||
Fixed bug where table cell dialog class field wasn't properly updated when editing an a table cell with an existing class.
|
||||
Fixed bug where Safari on Mac would produce webkit-fake-url for pasted images so these are now removed.
|
||||
Fixed bug where the nodeChange event would get fired before the selection was changed when clicking inside the current selection range.
|
||||
Fixed bug where valid_classes option would cause exception when it removed internal prefixed classes like mce-item-.
|
||||
Fixed bug where backspace would cause navigation in IE 8 on an inline element and after a caret formatting was applied.
|
||||
Fixed so placeholder images produced by the media plugin gets selected when inserted/edited.
|
||||
Fixed so it's possible to drag in images when the paste_data_images option is enabled. Might be useful for mail clients.
|
||||
Fixed so images doesn't get a width/height applied if the image_dimensions option is set to false useful for responsive contents.
|
||||
Fixed so it's possible to pass in an optional arguments object for the nodeChanged function to be passed to all nodechange event listeners.
|
||||
Fixed bug where media plugin embed code didn't update correctly.
|
||||
42
public/storage/assets/vendors/tinymce/composer.json
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "tinymce/tinymce",
|
||||
"version": "4.6.4",
|
||||
"description": "Web based JavaScript HTML WYSIWYG editor control.",
|
||||
"license": [
|
||||
"LGPL-2.1"
|
||||
],
|
||||
"keywords": [
|
||||
"editor",
|
||||
"wysiwyg",
|
||||
"tinymce",
|
||||
"richtext",
|
||||
"javascript",
|
||||
"html"
|
||||
],
|
||||
"homepage": "http://www.tinymce.com",
|
||||
"type": "component",
|
||||
"extra": {
|
||||
"component": {
|
||||
"scripts": [
|
||||
"tinymce.js",
|
||||
"plugins/*/plugin.js",
|
||||
"themes/*/theme.js"
|
||||
],
|
||||
"files": [
|
||||
"tinymce.min.js",
|
||||
"plugins/*/plugin.min.js",
|
||||
"themes/*/theme.min.js",
|
||||
"skins/**"
|
||||
]
|
||||
}
|
||||
},
|
||||
"archive": {
|
||||
"exclude": [
|
||||
"readme.md",
|
||||
"bower.js",
|
||||
"package.json",
|
||||
".npmignore",
|
||||
"changelog.txt"
|
||||
]
|
||||
}
|
||||
}
|
||||
1
public/storage/assets/vendors/tinymce/jquery.tinymce.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c;g("0",[],function(){return function(a){function b(){function a(a){"remove"===a&&this.each(function(a,b){var c=d(b);c&&c.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(a,b){var c=i().get(b.id.replace(/_parent$/,""));c&&c.remove()})}function b(b){var c,d=this;if(null!=b)a.call(d),d.each(function(a,c){var d;(d=i().get(c.id))&&d.setContent(b)});else if(d.length>0&&(c=i().get(d[0].id)))return c.getContent()}function d(a){var b=null;return a&&a.id&&g.tinymce&&(b=i().get(a.id)),b}function e(a){return!!(a&&a.length&&g.tinymce&&a.is(":tinymce"))}var h={};f.each(["text","html","val"],function(a,g){var i=h[g]=f.fn[g],j="text"===g;f.fn[g]=function(a){var g=this;if(!e(g))return i.apply(g,arguments);if(a!==c)return b.call(g.filter(":tinymce"),a),i.apply(g.not(":tinymce"),arguments),g;var h="",k=arguments;return(j?g:g.eq(0)).each(function(a,b){var c=d(b);h+=c?j?c.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):c.getContent({save:!0}):i.apply(f(b),k)}),h}}),f.each(["append","prepend"],function(a,b){var g=h[b]=f.fn[b],i="prepend"===b;f.fn[b]=function(a){var b=this;return e(b)?a!==c?("string"==typeof a&&b.filter(":tinymce").each(function(b,c){var e=d(c);e&&e.setContent(i?a+e.getContent():e.getContent()+a)}),g.apply(b.not(":tinymce"),arguments),b):void 0:g.apply(b,arguments)}}),f.each(["remove","replaceWith","replaceAll","empty"],function(b,c){var d=h[c]=f.fn[c];f.fn[c]=function(){return a.call(this,c),d.apply(this,arguments)}}),h.attr=f.fn.attr,f.fn.attr=function(a,g){var i=this,j=arguments;if(!a||"value"!==a||!e(i))return g!==c?h.attr.apply(i,j):h.attr.apply(i,j);if(g!==c)return b.call(i.filter(":tinymce"),g),h.attr.apply(i.not(":tinymce"),j),i;var k=i[0],l=d(k);return l?l.getContent({save:!0}):h.attr.apply(f(k),j)}}var c,d,e,f,g,h=[];g=a?a:window,f=g.jQuery;var i=function(){return g.tinymce};f.fn.tinymce=function(a){function c(){var c=[],d=0;e||(b(),e=!0),m.each(function(b,e){var f,g=e.id,h=a.oninit;g||(e.id=g=i().DOM.uniqueId()),i().get(g)||(f=i().createEditor(g,a),c.push(f),f.on("init",function(){var a,b=h;m.css("visibility",""),h&&++d==c.length&&("string"==typeof b&&(a=b.indexOf(".")===-1?null:i().resolve(b.replace(/\.\w+$/,"")),b=i().resolve(b)),b.apply(a||i(),c))}))}),f.each(c,function(a,b){b.render()})}var j,k,l,m=this,n="";if(!m.length)return m;if(!a)return i()?i().get(m[0].id):null;if(m.css("visibility","hidden"),g.tinymce||d||!(j=a.script_url))1===d?h.push(c):c();else{d=1,k=j.substring(0,j.lastIndexOf("/")),j.indexOf(".min")!=-1&&(n=".min"),g.tinymce=g.tinyMCEPreInit||{base:k,suffix:n},j.indexOf("gzip")!=-1&&(l=a.language||"en",j=j+(/\?/.test(j)?"&":"?")+"js=true&core=true&suffix="+escape(n)+"&themes="+escape(a.theme||"modern")+"&plugins="+escape(a.plugins||"")+"&languages="+(l||""),g.tinyMCE_GZ||(g.tinyMCE_GZ={start:function(){function b(a){i().ScriptLoader.markDone(i().baseURI.toAbsolute(a))}b("langs/"+l+".js"),b("themes/"+a.theme+"/theme"+n+".js"),b("themes/"+a.theme+"/langs/"+l+".js"),f.each(a.plugins.split(","),function(a,c){c&&(b("plugins/"+c+"/plugin"+n+".js"),b("plugins/"+c+"/langs/"+l+".js"))})},end:function(){}}));var o=document.createElement("script");o.type="text/javascript",o.onload=o.onreadystatechange=function(b){b=b||window.event,2===d||"load"!=b.type&&!/complete|loaded/.test(o.readyState)||(i().dom.Event.domLoaded=1,d=2,a.script_loaded&&a.script_loaded(),c(),f.each(h,function(a,b){b()}))},o.src=j,document.body.appendChild(o)}return m},f.extend(f.expr[":"],{tinymce:function(a){var b;return!!(a.id&&"tinymce"in g&&(b=i().get(a.id),b&&b.editorManager===i()))}})}}),d("0")()}();
|
||||
1
public/storage/assets/vendors/tinymce/jquery.tinymce.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c;g("0",[],function(){return function(a){function b(){function a(a){"remove"===a&&this.each(function(a,b){var c=d(b);c&&c.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(a,b){var c=i().get(b.id.replace(/_parent$/,""));c&&c.remove()})}function b(b){var c,d=this;if(null!=b)a.call(d),d.each(function(a,c){var d;(d=i().get(c.id))&&d.setContent(b)});else if(d.length>0&&(c=i().get(d[0].id)))return c.getContent()}function d(a){var b=null;return a&&a.id&&g.tinymce&&(b=i().get(a.id)),b}function e(a){return!!(a&&a.length&&g.tinymce&&a.is(":tinymce"))}var h={};f.each(["text","html","val"],function(a,g){var i=h[g]=f.fn[g],j="text"===g;f.fn[g]=function(a){var g=this;if(!e(g))return i.apply(g,arguments);if(a!==c)return b.call(g.filter(":tinymce"),a),i.apply(g.not(":tinymce"),arguments),g;var h="",k=arguments;return(j?g:g.eq(0)).each(function(a,b){var c=d(b);h+=c?j?c.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):c.getContent({save:!0}):i.apply(f(b),k)}),h}}),f.each(["append","prepend"],function(a,b){var g=h[b]=f.fn[b],i="prepend"===b;f.fn[b]=function(a){var b=this;return e(b)?a!==c?("string"==typeof a&&b.filter(":tinymce").each(function(b,c){var e=d(c);e&&e.setContent(i?a+e.getContent():e.getContent()+a)}),g.apply(b.not(":tinymce"),arguments),b):void 0:g.apply(b,arguments)}}),f.each(["remove","replaceWith","replaceAll","empty"],function(b,c){var d=h[c]=f.fn[c];f.fn[c]=function(){return a.call(this,c),d.apply(this,arguments)}}),h.attr=f.fn.attr,f.fn.attr=function(a,g){var i=this,j=arguments;if(!a||"value"!==a||!e(i))return g!==c?h.attr.apply(i,j):h.attr.apply(i,j);if(g!==c)return b.call(i.filter(":tinymce"),g),h.attr.apply(i.not(":tinymce"),j),i;var k=i[0],l=d(k);return l?l.getContent({save:!0}):h.attr.apply(f(k),j)}}var c,d,e,f,g,h=[];g=a?a:window,f=g.jQuery;var i=function(){return g.tinymce};f.fn.tinymce=function(a){function c(){var c=[],d=0;e||(b(),e=!0),m.each(function(b,e){var f,g=e.id,h=a.oninit;g||(e.id=g=i().DOM.uniqueId()),i().get(g)||(f=i().createEditor(g,a),c.push(f),f.on("init",function(){var a,b=h;m.css("visibility",""),h&&++d==c.length&&("string"==typeof b&&(a=b.indexOf(".")===-1?null:i().resolve(b.replace(/\.\w+$/,"")),b=i().resolve(b)),b.apply(a||i(),c))}))}),f.each(c,function(a,b){b.render()})}var j,k,l,m=this,n="";if(!m.length)return m;if(!a)return i()?i().get(m[0].id):null;if(m.css("visibility","hidden"),g.tinymce||d||!(j=a.script_url))1===d?h.push(c):c();else{d=1,k=j.substring(0,j.lastIndexOf("/")),j.indexOf(".min")!=-1&&(n=".min"),g.tinymce=g.tinyMCEPreInit||{base:k,suffix:n},j.indexOf("gzip")!=-1&&(l=a.language||"en",j=j+(/\?/.test(j)?"&":"?")+"js=true&core=true&suffix="+escape(n)+"&themes="+escape(a.theme||"modern")+"&plugins="+escape(a.plugins||"")+"&languages="+(l||""),g.tinyMCE_GZ||(g.tinyMCE_GZ={start:function(){function b(a){i().ScriptLoader.markDone(i().baseURI.toAbsolute(a))}b("langs/"+l+".js"),b("themes/"+a.theme+"/theme"+n+".js"),b("themes/"+a.theme+"/langs/"+l+".js"),f.each(a.plugins.split(","),function(a,c){c&&(b("plugins/"+c+"/plugin"+n+".js"),b("plugins/"+c+"/langs/"+l+".js"))})},end:function(){}}));var o=document.createElement("script");o.type="text/javascript",o.onload=o.onreadystatechange=function(b){b=b||window.event,2===d||"load"!=b.type&&!/complete|loaded/.test(o.readyState)||(i().dom.Event.domLoaded=1,d=2,a.script_loaded&&a.script_loaded(),c(),f.each(h,function(a,b){b()}))},o.src=j,document.body.appendChild(o)}return m},f.extend(f.expr[":"],{tinymce:function(a){var b;return!!(a.id&&"tinymce"in g&&(b=i().get(a.id),b&&b.editorManager===i()))}})}}),d("0")()}();
|
||||
504
public/storage/assets/vendors/tinymce/license.txt
vendored
Normal file
@@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
43
public/storage/assets/vendors/tinymce/package.json
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"_from": "tinymce@4.6.4",
|
||||
"_id": "tinymce@4.6.4",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-dBVVnyZt4kvqfmnVnkPh5h59EaQ=",
|
||||
"_location": "/tinymce",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "tinymce@4.6.4",
|
||||
"name": "tinymce",
|
||||
"escapedName": "tinymce",
|
||||
"rawSpec": "4.6.4",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "4.6.4"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/tinymce/-/tinymce-4.6.4.tgz",
|
||||
"_shasum": "7415559f266de24bea7e69d59e43e1e61e7d11a4",
|
||||
"_spec": "tinymce@4.6.4",
|
||||
"_where": "/Users/jyothish/Documents/polluxui-free/template",
|
||||
"bugs": {
|
||||
"url": "http://www.tinymce.com/develop/bugtracker.php"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Web based JavaScript HTML WYSIWYG editor control.",
|
||||
"keywords": [
|
||||
"editor",
|
||||
"wysiwyg",
|
||||
"tinymce",
|
||||
"richtext",
|
||||
"javascript",
|
||||
"html"
|
||||
],
|
||||
"license": "LGPL-2.1",
|
||||
"main": "tinymce.js",
|
||||
"name": "tinymce",
|
||||
"version": "4.6.4"
|
||||
}
|
||||
7
public/storage/assets/vendors/tinymce/plugins/advlist/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "advlist" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/advlist')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/advlist'
|
||||
require('./plugin.js');
|
||||
283
public/storage/assets/vendors/tinymce/plugins/advlist/plugin.js
vendored
Normal file
@@ -0,0 +1,283 @@
|
||||
(function () {
|
||||
|
||||
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
||||
|
||||
// Used when there is no 'main' module.
|
||||
// The name is probably (hopefully) unique so minification removes for releases.
|
||||
var register_3795 = function (id) {
|
||||
var module = dem(id);
|
||||
var fragments = id.split('.');
|
||||
var target = Function('return this;')();
|
||||
for (var i = 0; i < fragments.length - 1; ++i) {
|
||||
if (target[fragments[i]] === undefined)
|
||||
target[fragments[i]] = {};
|
||||
target = target[fragments[i]];
|
||||
}
|
||||
target[fragments[fragments.length - 1]] = module;
|
||||
};
|
||||
|
||||
var instantiate = function (id) {
|
||||
var actual = defs[id];
|
||||
var dependencies = actual.deps;
|
||||
var definition = actual.defn;
|
||||
var len = dependencies.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(dependencies[i]);
|
||||
var defResult = definition.apply(null, instances);
|
||||
if (defResult === undefined)
|
||||
throw 'module [' + id + '] returned undefined';
|
||||
actual.instance = defResult;
|
||||
};
|
||||
|
||||
var def = function (id, dependencies, definition) {
|
||||
if (typeof id !== 'string')
|
||||
throw 'module id must be a string';
|
||||
else if (dependencies === undefined)
|
||||
throw 'no dependencies for ' + id;
|
||||
else if (definition === undefined)
|
||||
throw 'no definition function for ' + id;
|
||||
defs[id] = {
|
||||
deps: dependencies,
|
||||
defn: definition,
|
||||
instance: undefined
|
||||
};
|
||||
};
|
||||
|
||||
var dem = function (id) {
|
||||
var actual = defs[id];
|
||||
if (actual === undefined)
|
||||
throw 'module [' + id + '] was undefined';
|
||||
else if (actual.instance === undefined)
|
||||
instantiate(id);
|
||||
return actual.instance;
|
||||
};
|
||||
|
||||
var req = function (ids, callback) {
|
||||
var len = ids.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances.push(dem(ids[i]));
|
||||
callback.apply(null, callback);
|
||||
};
|
||||
|
||||
var ephox = {};
|
||||
|
||||
ephox.bolt = {
|
||||
module: {
|
||||
api: {
|
||||
define: def,
|
||||
require: req,
|
||||
demand: dem
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var define = def;
|
||||
var require = req;
|
||||
var demand = dem;
|
||||
// this helps with minificiation when using a lot of global references
|
||||
var defineGlobal = function (id, ref) {
|
||||
define(id, [], function () { return ref; });
|
||||
};
|
||||
/*jsc
|
||||
["tinymce.plugins.advlist.Plugin","tinymce.core.PluginManager","tinymce.core.util.Tools","global!tinymce.util.Tools.resolve"]
|
||||
jsc*/
|
||||
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.PluginManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.PluginManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.util.Tools',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.util.Tools');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class contains all core logic for the advlist plugin.
|
||||
*
|
||||
* @class tinymce.plugins.advlist.Plugin
|
||||
* @private
|
||||
*/
|
||||
define(
|
||||
'tinymce.plugins.advlist.Plugin',
|
||||
[
|
||||
'tinymce.core.PluginManager',
|
||||
'tinymce.core.util.Tools'
|
||||
],
|
||||
function (PluginManager, Tools) {
|
||||
PluginManager.add('advlist', function (editor) {
|
||||
var olMenuItems, ulMenuItems;
|
||||
|
||||
var hasPlugin = function (editor, plugin) {
|
||||
var plugins = editor.settings.plugins ? editor.settings.plugins : '';
|
||||
return Tools.inArray(plugins.split(/[ ,]/), plugin) !== -1;
|
||||
};
|
||||
|
||||
function isChildOfBody(elm) {
|
||||
return editor.$.contains(editor.getBody(), elm);
|
||||
}
|
||||
|
||||
function isListNode(node) {
|
||||
return node && (/^(OL|UL|DL)$/).test(node.nodeName) && isChildOfBody(node);
|
||||
}
|
||||
|
||||
function buildMenuItems(listName, styleValues) {
|
||||
var items = [];
|
||||
if (styleValues) {
|
||||
Tools.each(styleValues.split(/[ ,]/), function (styleValue) {
|
||||
items.push({
|
||||
text: styleValue.replace(/\-/g, ' ').replace(/\b\w/g, function (chr) {
|
||||
return chr.toUpperCase();
|
||||
}),
|
||||
data: styleValue == 'default' ? '' : styleValue
|
||||
});
|
||||
});
|
||||
}
|
||||
return items;
|
||||
}
|
||||
|
||||
olMenuItems = buildMenuItems('OL', editor.getParam(
|
||||
"advlist_number_styles",
|
||||
"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman"
|
||||
));
|
||||
|
||||
ulMenuItems = buildMenuItems('UL', editor.getParam("advlist_bullet_styles", "default,circle,disc,square"));
|
||||
|
||||
function applyListFormat(listName, styleValue) {
|
||||
editor.undoManager.transact(function () {
|
||||
var list, dom = editor.dom, sel = editor.selection;
|
||||
|
||||
// Check for existing list element
|
||||
list = dom.getParent(sel.getNode(), 'ol,ul');
|
||||
|
||||
// Switch/add list type if needed
|
||||
if (!list || list.nodeName != listName || styleValue === false) {
|
||||
var detail = {
|
||||
'list-style-type': styleValue ? styleValue : ''
|
||||
};
|
||||
|
||||
editor.execCommand(listName == 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList', false, detail);
|
||||
}
|
||||
|
||||
list = dom.getParent(sel.getNode(), 'ol,ul');
|
||||
if (list) {
|
||||
Tools.each(dom.select('ol,ul', list).concat([list]), function (list) {
|
||||
if (list.nodeName !== listName && styleValue !== false) {
|
||||
list = dom.rename(list, listName);
|
||||
}
|
||||
|
||||
dom.setStyle(list, 'listStyleType', styleValue ? styleValue : null);
|
||||
list.removeAttribute('data-mce-style');
|
||||
});
|
||||
}
|
||||
|
||||
editor.focus();
|
||||
});
|
||||
}
|
||||
|
||||
function updateSelection(e) {
|
||||
var listStyleType = editor.dom.getStyle(editor.dom.getParent(editor.selection.getNode(), 'ol,ul'), 'listStyleType') || '';
|
||||
|
||||
e.control.items().each(function (ctrl) {
|
||||
ctrl.active(ctrl.settings.data === listStyleType);
|
||||
});
|
||||
}
|
||||
|
||||
var listState = function (listName) {
|
||||
return function () {
|
||||
var self = this;
|
||||
|
||||
editor.on('NodeChange', function (e) {
|
||||
var lists = Tools.grep(e.parents, isListNode);
|
||||
self.active(lists.length > 0 && lists[0].nodeName === listName);
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
if (hasPlugin(editor, "lists")) {
|
||||
editor.addCommand('ApplyUnorderedListStyle', function (ui, value) {
|
||||
applyListFormat('UL', value['list-style-type']);
|
||||
});
|
||||
|
||||
editor.addCommand('ApplyOrderedListStyle', function (ui, value) {
|
||||
applyListFormat('OL', value['list-style-type']);
|
||||
});
|
||||
|
||||
editor.addButton('numlist', {
|
||||
type: (olMenuItems.length > 0) ? 'splitbutton' : 'button',
|
||||
tooltip: 'Numbered list',
|
||||
menu: olMenuItems,
|
||||
onPostRender: listState('OL'),
|
||||
onshow: updateSelection,
|
||||
onselect: function (e) {
|
||||
applyListFormat('OL', e.control.settings.data);
|
||||
},
|
||||
onclick: function () {
|
||||
applyListFormat('OL', false);
|
||||
}
|
||||
});
|
||||
|
||||
editor.addButton('bullist', {
|
||||
type: (ulMenuItems.length > 0) ? 'splitbutton' : 'button',
|
||||
tooltip: 'Bullet list',
|
||||
onPostRender: listState('UL'),
|
||||
menu: ulMenuItems,
|
||||
onshow: updateSelection,
|
||||
onselect: function (e) {
|
||||
applyListFormat('UL', e.control.settings.data);
|
||||
},
|
||||
onclick: function () {
|
||||
applyListFormat('UL', false);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return function () { };
|
||||
|
||||
}
|
||||
);
|
||||
dem('tinymce.plugins.advlist.Plugin')();
|
||||
})();
|
||||
1
public/storage/assets/vendors/tinymce/plugins/advlist/plugin.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.PluginManager")}),g("2",["3"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2"],function(a,b){return a.add("advlist",function(a){function c(b){return a.$.contains(a.getBody(),b)}function d(a){return a&&/^(OL|UL|DL)$/.test(a.nodeName)&&c(a)}function e(a,c){var d=[];return c&&b.each(c.split(/[ ,]/),function(a){d.push({text:a.replace(/\-/g," ").replace(/\b\w/g,function(a){return a.toUpperCase()}),data:"default"==a?"":a})}),d}function f(c,d){a.undoManager.transact(function(){var e,f=a.dom,g=a.selection;if(e=f.getParent(g.getNode(),"ol,ul"),!e||e.nodeName!=c||d===!1){var h={"list-style-type":d?d:""};a.execCommand("UL"==c?"InsertUnorderedList":"InsertOrderedList",!1,h)}e=f.getParent(g.getNode(),"ol,ul"),e&&b.each(f.select("ol,ul",e).concat([e]),function(a){a.nodeName!==c&&d!==!1&&(a=f.rename(a,c)),f.setStyle(a,"listStyleType",d?d:null),a.removeAttribute("data-mce-style")}),a.focus()})}function g(b){var c=a.dom.getStyle(a.dom.getParent(a.selection.getNode(),"ol,ul"),"listStyleType")||"";b.control.items().each(function(a){a.active(a.settings.data===c)})}var h,i,j=function(a,c){var d=a.settings.plugins?a.settings.plugins:"";return b.inArray(d.split(/[ ,]/),c)!==-1};h=e("OL",a.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),i=e("UL",a.getParam("advlist_bullet_styles","default,circle,disc,square"));var k=function(c){return function(){var e=this;a.on("NodeChange",function(a){var f=b.grep(a.parents,d);e.active(f.length>0&&f[0].nodeName===c)})}};j(a,"lists")&&(a.addCommand("ApplyUnorderedListStyle",function(a,b){f("UL",b["list-style-type"])}),a.addCommand("ApplyOrderedListStyle",function(a,b){f("OL",b["list-style-type"])}),a.addButton("numlist",{type:h.length>0?"splitbutton":"button",tooltip:"Numbered list",menu:h,onPostRender:k("OL"),onshow:g,onselect:function(a){f("OL",a.control.settings.data)},onclick:function(){f("OL",!1)}}),a.addButton("bullist",{type:i.length>0?"splitbutton":"button",tooltip:"Bullet list",onPostRender:k("UL"),menu:i,onshow:g,onselect:function(a){f("UL",a.control.settings.data)},onclick:function(){f("UL",!1)}}))}),function(){}}),d("0")()}();
|
||||
7
public/storage/assets/vendors/tinymce/plugins/anchor/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "anchor" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/anchor')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/anchor'
|
||||
require('./plugin.js');
|
||||
235
public/storage/assets/vendors/tinymce/plugins/anchor/plugin.js
vendored
Normal file
@@ -0,0 +1,235 @@
|
||||
(function () {
|
||||
|
||||
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
||||
|
||||
// Used when there is no 'main' module.
|
||||
// The name is probably (hopefully) unique so minification removes for releases.
|
||||
var register_3795 = function (id) {
|
||||
var module = dem(id);
|
||||
var fragments = id.split('.');
|
||||
var target = Function('return this;')();
|
||||
for (var i = 0; i < fragments.length - 1; ++i) {
|
||||
if (target[fragments[i]] === undefined)
|
||||
target[fragments[i]] = {};
|
||||
target = target[fragments[i]];
|
||||
}
|
||||
target[fragments[fragments.length - 1]] = module;
|
||||
};
|
||||
|
||||
var instantiate = function (id) {
|
||||
var actual = defs[id];
|
||||
var dependencies = actual.deps;
|
||||
var definition = actual.defn;
|
||||
var len = dependencies.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(dependencies[i]);
|
||||
var defResult = definition.apply(null, instances);
|
||||
if (defResult === undefined)
|
||||
throw 'module [' + id + '] returned undefined';
|
||||
actual.instance = defResult;
|
||||
};
|
||||
|
||||
var def = function (id, dependencies, definition) {
|
||||
if (typeof id !== 'string')
|
||||
throw 'module id must be a string';
|
||||
else if (dependencies === undefined)
|
||||
throw 'no dependencies for ' + id;
|
||||
else if (definition === undefined)
|
||||
throw 'no definition function for ' + id;
|
||||
defs[id] = {
|
||||
deps: dependencies,
|
||||
defn: definition,
|
||||
instance: undefined
|
||||
};
|
||||
};
|
||||
|
||||
var dem = function (id) {
|
||||
var actual = defs[id];
|
||||
if (actual === undefined)
|
||||
throw 'module [' + id + '] was undefined';
|
||||
else if (actual.instance === undefined)
|
||||
instantiate(id);
|
||||
return actual.instance;
|
||||
};
|
||||
|
||||
var req = function (ids, callback) {
|
||||
var len = ids.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances.push(dem(ids[i]));
|
||||
callback.apply(null, callback);
|
||||
};
|
||||
|
||||
var ephox = {};
|
||||
|
||||
ephox.bolt = {
|
||||
module: {
|
||||
api: {
|
||||
define: def,
|
||||
require: req,
|
||||
demand: dem
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var define = def;
|
||||
var require = req;
|
||||
var demand = dem;
|
||||
// this helps with minificiation when using a lot of global references
|
||||
var defineGlobal = function (id, ref) {
|
||||
define(id, [], function () { return ref; });
|
||||
};
|
||||
/*jsc
|
||||
["tinymce.plugins.anchor.Plugin","tinymce.core.Env","tinymce.core.PluginManager","global!tinymce.util.Tools.resolve"]
|
||||
jsc*/
|
||||
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.Env',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.Env');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.PluginManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.PluginManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class contains all core logic for the anchor plugin.
|
||||
*
|
||||
* @class tinymce.anchor.Plugin
|
||||
* @private
|
||||
*/
|
||||
define(
|
||||
'tinymce.plugins.anchor.Plugin',
|
||||
[
|
||||
'tinymce.core.Env',
|
||||
'tinymce.core.PluginManager'
|
||||
],
|
||||
|
||||
function (Env, PluginManager) {
|
||||
PluginManager.add('anchor', function (editor) {
|
||||
var isAnchorNode = function (node) {
|
||||
return !node.attr('href') && (node.attr('id') || node.attr('name')) && !node.firstChild;
|
||||
};
|
||||
|
||||
var setContentEditable = function (state) {
|
||||
return function (nodes) {
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
if (isAnchorNode(nodes[i])) {
|
||||
nodes[i].attr('contenteditable', state);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
var isValidId = function (id) {
|
||||
// Follows HTML4 rules: https://www.w3.org/TR/html401/types.html#type-id
|
||||
return /^[A-Za-z][A-Za-z0-9\-:._]*$/.test(id);
|
||||
};
|
||||
|
||||
var showDialog = function () {
|
||||
var selectedNode = editor.selection.getNode();
|
||||
var isAnchor = selectedNode.tagName == 'A' && editor.dom.getAttrib(selectedNode, 'href') === '';
|
||||
var value = '';
|
||||
|
||||
if (isAnchor) {
|
||||
value = selectedNode.id || selectedNode.name || '';
|
||||
}
|
||||
|
||||
editor.windowManager.open({
|
||||
title: 'Anchor',
|
||||
body: { type: 'textbox', name: 'id', size: 40, label: 'Id', value: value },
|
||||
onsubmit: function (e) {
|
||||
var id = e.data.id;
|
||||
|
||||
if (!isValidId(id)) {
|
||||
e.preventDefault();
|
||||
editor.windowManager.alert(
|
||||
'Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.'
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (isAnchor) {
|
||||
selectedNode.removeAttribute('name');
|
||||
selectedNode.id = id;
|
||||
} else {
|
||||
editor.selection.collapse(true);
|
||||
editor.execCommand('mceInsertContent', false, editor.dom.createHTML('a', {
|
||||
id: id
|
||||
}));
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (Env.ceFalse) {
|
||||
editor.on('PreInit', function () {
|
||||
editor.parser.addNodeFilter('a', setContentEditable('false'));
|
||||
editor.serializer.addNodeFilter('a', setContentEditable(null));
|
||||
});
|
||||
}
|
||||
|
||||
editor.addCommand('mceAnchor', showDialog);
|
||||
|
||||
editor.addButton('anchor', {
|
||||
icon: 'anchor',
|
||||
tooltip: 'Anchor',
|
||||
onclick: showDialog,
|
||||
stateSelector: 'a:not([href])'
|
||||
});
|
||||
|
||||
editor.addMenuItem('anchor', {
|
||||
icon: 'anchor',
|
||||
text: 'Anchor',
|
||||
context: 'insert',
|
||||
onclick: showDialog
|
||||
});
|
||||
});
|
||||
|
||||
return function () { };
|
||||
}
|
||||
);
|
||||
dem('tinymce.plugins.anchor.Plugin')();
|
||||
})();
|
||||
1
public/storage/assets/vendors/tinymce/plugins/anchor/plugin.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.Env")}),g("2",["3"],function(a){return a("tinymce.PluginManager")}),g("0",["1","2"],function(a,b){return b.add("anchor",function(b){var c=function(a){return!a.attr("href")&&(a.attr("id")||a.attr("name"))&&!a.firstChild},d=function(a){return function(b){for(var d=0;d<b.length;d++)c(b[d])&&b[d].attr("contenteditable",a)}},e=function(a){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(a)},f=function(){var a=b.selection.getNode(),c="A"==a.tagName&&""===b.dom.getAttrib(a,"href"),d="";c&&(d=a.id||a.name||""),b.windowManager.open({title:"Anchor",body:{type:"textbox",name:"id",size:40,label:"Id",value:d},onsubmit:function(d){var f=d.data.id;return e(f)?void(c?(a.removeAttribute("name"),a.id=f):(b.selection.collapse(!0),b.execCommand("mceInsertContent",!1,b.dom.createHTML("a",{id:f})))):(d.preventDefault(),void b.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."))}})};a.ceFalse&&b.on("PreInit",function(){b.parser.addNodeFilter("a",d("false")),b.serializer.addNodeFilter("a",d(null))}),b.addCommand("mceAnchor",f),b.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:f,stateSelector:"a:not([href])"}),b.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:f})}),function(){}}),d("0")()}();
|
||||
7
public/storage/assets/vendors/tinymce/plugins/autolink/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "autolink" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/autolink')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/autolink'
|
||||
require('./plugin.js');
|
||||
352
public/storage/assets/vendors/tinymce/plugins/autolink/plugin.js
vendored
Normal file
@@ -0,0 +1,352 @@
|
||||
(function () {
|
||||
|
||||
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
||||
|
||||
// Used when there is no 'main' module.
|
||||
// The name is probably (hopefully) unique so minification removes for releases.
|
||||
var register_3795 = function (id) {
|
||||
var module = dem(id);
|
||||
var fragments = id.split('.');
|
||||
var target = Function('return this;')();
|
||||
for (var i = 0; i < fragments.length - 1; ++i) {
|
||||
if (target[fragments[i]] === undefined)
|
||||
target[fragments[i]] = {};
|
||||
target = target[fragments[i]];
|
||||
}
|
||||
target[fragments[fragments.length - 1]] = module;
|
||||
};
|
||||
|
||||
var instantiate = function (id) {
|
||||
var actual = defs[id];
|
||||
var dependencies = actual.deps;
|
||||
var definition = actual.defn;
|
||||
var len = dependencies.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(dependencies[i]);
|
||||
var defResult = definition.apply(null, instances);
|
||||
if (defResult === undefined)
|
||||
throw 'module [' + id + '] returned undefined';
|
||||
actual.instance = defResult;
|
||||
};
|
||||
|
||||
var def = function (id, dependencies, definition) {
|
||||
if (typeof id !== 'string')
|
||||
throw 'module id must be a string';
|
||||
else if (dependencies === undefined)
|
||||
throw 'no dependencies for ' + id;
|
||||
else if (definition === undefined)
|
||||
throw 'no definition function for ' + id;
|
||||
defs[id] = {
|
||||
deps: dependencies,
|
||||
defn: definition,
|
||||
instance: undefined
|
||||
};
|
||||
};
|
||||
|
||||
var dem = function (id) {
|
||||
var actual = defs[id];
|
||||
if (actual === undefined)
|
||||
throw 'module [' + id + '] was undefined';
|
||||
else if (actual.instance === undefined)
|
||||
instantiate(id);
|
||||
return actual.instance;
|
||||
};
|
||||
|
||||
var req = function (ids, callback) {
|
||||
var len = ids.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances.push(dem(ids[i]));
|
||||
callback.apply(null, callback);
|
||||
};
|
||||
|
||||
var ephox = {};
|
||||
|
||||
ephox.bolt = {
|
||||
module: {
|
||||
api: {
|
||||
define: def,
|
||||
require: req,
|
||||
demand: dem
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var define = def;
|
||||
var require = req;
|
||||
var demand = dem;
|
||||
// this helps with minificiation when using a lot of global references
|
||||
var defineGlobal = function (id, ref) {
|
||||
define(id, [], function () { return ref; });
|
||||
};
|
||||
/*jsc
|
||||
["tinymce.plugins.autolink.Plugin","tinymce.core.Env","tinymce.core.PluginManager","global!tinymce.util.Tools.resolve"]
|
||||
jsc*/
|
||||
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.Env',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.Env');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.PluginManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.PluginManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class contains all core logic for the autolink plugin.
|
||||
*
|
||||
* @class tinymce.autolink.Plugin
|
||||
* @private
|
||||
*/
|
||||
define(
|
||||
'tinymce.plugins.autolink.Plugin',
|
||||
[
|
||||
'tinymce.core.Env',
|
||||
'tinymce.core.PluginManager'
|
||||
],
|
||||
function (Env, PluginManager) {
|
||||
PluginManager.add('autolink', function (editor) {
|
||||
var AutoUrlDetectState;
|
||||
var AutoLinkPattern = /^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i;
|
||||
|
||||
if (editor.settings.autolink_pattern) {
|
||||
AutoLinkPattern = editor.settings.autolink_pattern;
|
||||
}
|
||||
|
||||
editor.on("keydown", function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
return handleEnter(editor);
|
||||
}
|
||||
});
|
||||
|
||||
// Internet Explorer has built-in automatic linking for most cases
|
||||
if (Env.ie) {
|
||||
editor.on("focus", function () {
|
||||
if (!AutoUrlDetectState) {
|
||||
AutoUrlDetectState = true;
|
||||
|
||||
try {
|
||||
editor.execCommand('AutoUrlDetect', false, true);
|
||||
} catch (ex) {
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
editor.on("keypress", function (e) {
|
||||
if (e.keyCode == 41) {
|
||||
return handleEclipse(editor);
|
||||
}
|
||||
});
|
||||
|
||||
editor.on("keyup", function (e) {
|
||||
if (e.keyCode == 32) {
|
||||
return handleSpacebar(editor);
|
||||
}
|
||||
});
|
||||
|
||||
function handleEclipse(editor) {
|
||||
parseCurrentLine(editor, -1, '(', true);
|
||||
}
|
||||
|
||||
function handleSpacebar(editor) {
|
||||
parseCurrentLine(editor, 0, '', true);
|
||||
}
|
||||
|
||||
function handleEnter(editor) {
|
||||
parseCurrentLine(editor, -1, '', false);
|
||||
}
|
||||
|
||||
function parseCurrentLine(editor, endOffset, delimiter) {
|
||||
var rng, end, start, endContainer, bookmark, text, matches, prev, len, rngText;
|
||||
|
||||
function scopeIndex(container, index) {
|
||||
if (index < 0) {
|
||||
index = 0;
|
||||
}
|
||||
|
||||
if (container.nodeType == 3) {
|
||||
var len = container.data.length;
|
||||
|
||||
if (index > len) {
|
||||
index = len;
|
||||
}
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
function setStart(container, offset) {
|
||||
if (container.nodeType != 1 || container.hasChildNodes()) {
|
||||
rng.setStart(container, scopeIndex(container, offset));
|
||||
} else {
|
||||
rng.setStartBefore(container);
|
||||
}
|
||||
}
|
||||
|
||||
function setEnd(container, offset) {
|
||||
if (container.nodeType != 1 || container.hasChildNodes()) {
|
||||
rng.setEnd(container, scopeIndex(container, offset));
|
||||
} else {
|
||||
rng.setEndAfter(container);
|
||||
}
|
||||
}
|
||||
|
||||
// Never create a link when we are inside a link
|
||||
if (editor.selection.getNode().tagName == 'A') {
|
||||
return;
|
||||
}
|
||||
|
||||
// We need at least five characters to form a URL,
|
||||
// hence, at minimum, five characters from the beginning of the line.
|
||||
rng = editor.selection.getRng(true).cloneRange();
|
||||
if (rng.startOffset < 5) {
|
||||
// During testing, the caret is placed between two text nodes.
|
||||
// The previous text node contains the URL.
|
||||
prev = rng.endContainer.previousSibling;
|
||||
if (!prev) {
|
||||
if (!rng.endContainer.firstChild || !rng.endContainer.firstChild.nextSibling) {
|
||||
return;
|
||||
}
|
||||
|
||||
prev = rng.endContainer.firstChild.nextSibling;
|
||||
}
|
||||
|
||||
len = prev.length;
|
||||
setStart(prev, len);
|
||||
setEnd(prev, len);
|
||||
|
||||
if (rng.endOffset < 5) {
|
||||
return;
|
||||
}
|
||||
|
||||
end = rng.endOffset;
|
||||
endContainer = prev;
|
||||
} else {
|
||||
endContainer = rng.endContainer;
|
||||
|
||||
// Get a text node
|
||||
if (endContainer.nodeType != 3 && endContainer.firstChild) {
|
||||
while (endContainer.nodeType != 3 && endContainer.firstChild) {
|
||||
endContainer = endContainer.firstChild;
|
||||
}
|
||||
|
||||
// Move range to text node
|
||||
if (endContainer.nodeType == 3) {
|
||||
setStart(endContainer, 0);
|
||||
setEnd(endContainer, endContainer.nodeValue.length);
|
||||
}
|
||||
}
|
||||
|
||||
if (rng.endOffset == 1) {
|
||||
end = 2;
|
||||
} else {
|
||||
end = rng.endOffset - 1 - endOffset;
|
||||
}
|
||||
}
|
||||
|
||||
start = end;
|
||||
|
||||
do {
|
||||
// Move the selection one character backwards.
|
||||
setStart(endContainer, end >= 2 ? end - 2 : 0);
|
||||
setEnd(endContainer, end >= 1 ? end - 1 : 0);
|
||||
end -= 1;
|
||||
rngText = rng.toString();
|
||||
|
||||
// Loop until one of the following is found: a blank space, , delimiter, (end-2) >= 0
|
||||
} while (rngText != ' ' && rngText !== '' && rngText.charCodeAt(0) != 160 && (end - 2) >= 0 && rngText != delimiter);
|
||||
|
||||
if (rng.toString() == delimiter || rng.toString().charCodeAt(0) == 160) {
|
||||
setStart(endContainer, end);
|
||||
setEnd(endContainer, start);
|
||||
end += 1;
|
||||
} else if (rng.startOffset === 0) {
|
||||
setStart(endContainer, 0);
|
||||
setEnd(endContainer, start);
|
||||
} else {
|
||||
setStart(endContainer, end);
|
||||
setEnd(endContainer, start);
|
||||
}
|
||||
|
||||
// Exclude last . from word like "www.site.com."
|
||||
text = rng.toString();
|
||||
if (text.charAt(text.length - 1) == '.') {
|
||||
setEnd(endContainer, start - 1);
|
||||
}
|
||||
|
||||
text = rng.toString();
|
||||
matches = text.match(AutoLinkPattern);
|
||||
|
||||
if (matches) {
|
||||
if (matches[1] == 'www.') {
|
||||
matches[1] = 'http://www.';
|
||||
} else if (/@$/.test(matches[1]) && !/^mailto:/.test(matches[1])) {
|
||||
matches[1] = 'mailto:' + matches[1];
|
||||
}
|
||||
|
||||
bookmark = editor.selection.getBookmark();
|
||||
|
||||
editor.selection.setRng(rng);
|
||||
editor.execCommand('createlink', false, matches[1] + matches[2]);
|
||||
|
||||
if (editor.settings.default_link_target) {
|
||||
editor.dom.setAttrib(editor.selection.getNode(), 'target', editor.settings.default_link_target);
|
||||
}
|
||||
|
||||
editor.selection.moveToBookmark(bookmark);
|
||||
editor.nodeChanged();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return function () { };
|
||||
}
|
||||
);
|
||||
dem('tinymce.plugins.autolink.Plugin')();
|
||||
})();
|
||||
1
public/storage/assets/vendors/tinymce/plugins/autolink/plugin.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.Env")}),g("2",["3"],function(a){return a("tinymce.PluginManager")}),g("0",["1","2"],function(a,b){return b.add("autolink",function(b){function c(a){f(a,-1,"(",!0)}function d(a){f(a,0,"",!0)}function e(a){f(a,-1,"",!1)}function f(a,b,c){function d(a,b){if(b<0&&(b=0),3==a.nodeType){var c=a.data.length;b>c&&(b=c)}return b}function e(a,b){1!=a.nodeType||a.hasChildNodes()?g.setStart(a,d(a,b)):g.setStartBefore(a)}function f(a,b){1!=a.nodeType||a.hasChildNodes()?g.setEnd(a,d(a,b)):g.setEndAfter(a)}var g,i,j,k,l,m,n,o,p,q;if("A"!=a.selection.getNode().tagName){if(g=a.selection.getRng(!0).cloneRange(),g.startOffset<5){if(o=g.endContainer.previousSibling,!o){if(!g.endContainer.firstChild||!g.endContainer.firstChild.nextSibling)return;o=g.endContainer.firstChild.nextSibling}if(p=o.length,e(o,p),f(o,p),g.endOffset<5)return;i=g.endOffset,k=o}else{if(k=g.endContainer,3!=k.nodeType&&k.firstChild){for(;3!=k.nodeType&&k.firstChild;)k=k.firstChild;3==k.nodeType&&(e(k,0),f(k,k.nodeValue.length))}i=1==g.endOffset?2:g.endOffset-1-b}j=i;do e(k,i>=2?i-2:0),f(k,i>=1?i-1:0),i-=1,q=g.toString();while(" "!=q&&""!==q&&160!=q.charCodeAt(0)&&i-2>=0&&q!=c);g.toString()==c||160==g.toString().charCodeAt(0)?(e(k,i),f(k,j),i+=1):0===g.startOffset?(e(k,0),f(k,j)):(e(k,i),f(k,j)),m=g.toString(),"."==m.charAt(m.length-1)&&f(k,j-1),m=g.toString(),n=m.match(h),n&&("www."==n[1]?n[1]="http://www.":/@$/.test(n[1])&&!/^mailto:/.test(n[1])&&(n[1]="mailto:"+n[1]),l=a.selection.getBookmark(),a.selection.setRng(g),a.execCommand("createlink",!1,n[1]+n[2]),a.settings.default_link_target&&a.dom.setAttrib(a.selection.getNode(),"target",a.settings.default_link_target),a.selection.moveToBookmark(l),a.nodeChanged())}}var g,h=/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i;return b.settings.autolink_pattern&&(h=b.settings.autolink_pattern),b.on("keydown",function(a){if(13==a.keyCode)return e(b)}),a.ie?void b.on("focus",function(){if(!g){g=!0;try{b.execCommand("AutoUrlDetect",!1,!0)}catch(a){}}}):(b.on("keypress",function(a){if(41==a.keyCode)return c(b)}),void b.on("keyup",function(a){if(32==a.keyCode)return d(b)}))}),function(){}}),d("0")()}();
|
||||
7
public/storage/assets/vendors/tinymce/plugins/autoresize/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "autoresize" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/autoresize')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/autoresize'
|
||||
require('./plugin.js');
|
||||
342
public/storage/assets/vendors/tinymce/plugins/autoresize/plugin.js
vendored
Normal file
@@ -0,0 +1,342 @@
|
||||
(function () {
|
||||
|
||||
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
||||
|
||||
// Used when there is no 'main' module.
|
||||
// The name is probably (hopefully) unique so minification removes for releases.
|
||||
var register_3795 = function (id) {
|
||||
var module = dem(id);
|
||||
var fragments = id.split('.');
|
||||
var target = Function('return this;')();
|
||||
for (var i = 0; i < fragments.length - 1; ++i) {
|
||||
if (target[fragments[i]] === undefined)
|
||||
target[fragments[i]] = {};
|
||||
target = target[fragments[i]];
|
||||
}
|
||||
target[fragments[fragments.length - 1]] = module;
|
||||
};
|
||||
|
||||
var instantiate = function (id) {
|
||||
var actual = defs[id];
|
||||
var dependencies = actual.deps;
|
||||
var definition = actual.defn;
|
||||
var len = dependencies.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(dependencies[i]);
|
||||
var defResult = definition.apply(null, instances);
|
||||
if (defResult === undefined)
|
||||
throw 'module [' + id + '] returned undefined';
|
||||
actual.instance = defResult;
|
||||
};
|
||||
|
||||
var def = function (id, dependencies, definition) {
|
||||
if (typeof id !== 'string')
|
||||
throw 'module id must be a string';
|
||||
else if (dependencies === undefined)
|
||||
throw 'no dependencies for ' + id;
|
||||
else if (definition === undefined)
|
||||
throw 'no definition function for ' + id;
|
||||
defs[id] = {
|
||||
deps: dependencies,
|
||||
defn: definition,
|
||||
instance: undefined
|
||||
};
|
||||
};
|
||||
|
||||
var dem = function (id) {
|
||||
var actual = defs[id];
|
||||
if (actual === undefined)
|
||||
throw 'module [' + id + '] was undefined';
|
||||
else if (actual.instance === undefined)
|
||||
instantiate(id);
|
||||
return actual.instance;
|
||||
};
|
||||
|
||||
var req = function (ids, callback) {
|
||||
var len = ids.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances.push(dem(ids[i]));
|
||||
callback.apply(null, callback);
|
||||
};
|
||||
|
||||
var ephox = {};
|
||||
|
||||
ephox.bolt = {
|
||||
module: {
|
||||
api: {
|
||||
define: def,
|
||||
require: req,
|
||||
demand: dem
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var define = def;
|
||||
var require = req;
|
||||
var demand = dem;
|
||||
// this helps with minificiation when using a lot of global references
|
||||
var defineGlobal = function (id, ref) {
|
||||
define(id, [], function () { return ref; });
|
||||
};
|
||||
/*jsc
|
||||
["tinymce.plugins.autoresize.Plugin","tinymce.core.dom.DOMUtils","tinymce.core.Env","tinymce.core.PluginManager","tinymce.core.util.Delay","global!tinymce.util.Tools.resolve"]
|
||||
jsc*/
|
||||
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.dom.DOMUtils',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.dom.DOMUtils');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.Env',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.Env');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.PluginManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.PluginManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.util.Delay',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.util.Delay');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class contains all core logic for the autoresize plugin.
|
||||
*
|
||||
* @class tinymce.autoresize.Plugin
|
||||
* @private
|
||||
*/
|
||||
define(
|
||||
'tinymce.plugins.autoresize.Plugin',
|
||||
[
|
||||
'tinymce.core.dom.DOMUtils',
|
||||
'tinymce.core.Env',
|
||||
'tinymce.core.PluginManager',
|
||||
'tinymce.core.util.Delay'
|
||||
],
|
||||
function (DOMUtils, Env, PluginManager, Delay) {
|
||||
var DOM = DOMUtils.DOM;
|
||||
|
||||
PluginManager.add('autoresize', function (editor) {
|
||||
var settings = editor.settings, oldSize = 0;
|
||||
|
||||
function isFullscreen() {
|
||||
return editor.plugins.fullscreen && editor.plugins.fullscreen.isFullscreen();
|
||||
}
|
||||
|
||||
if (editor.settings.inline) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method gets executed each time the editor needs to resize.
|
||||
*/
|
||||
function resize(e) {
|
||||
var deltaSize, doc, body, docElm, resizeHeight, myHeight,
|
||||
marginTop, marginBottom, paddingTop, paddingBottom, borderTop, borderBottom;
|
||||
|
||||
doc = editor.getDoc();
|
||||
if (!doc) {
|
||||
return;
|
||||
}
|
||||
|
||||
body = doc.body;
|
||||
docElm = doc.documentElement;
|
||||
resizeHeight = settings.autoresize_min_height;
|
||||
|
||||
if (!body || (e && e.type === "setcontent" && e.initial) || isFullscreen()) {
|
||||
if (body && docElm) {
|
||||
body.style.overflowY = "auto";
|
||||
docElm.style.overflowY = "auto"; // Old IE
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate outer height of the body element using CSS styles
|
||||
marginTop = editor.dom.getStyle(body, 'margin-top', true);
|
||||
marginBottom = editor.dom.getStyle(body, 'margin-bottom', true);
|
||||
paddingTop = editor.dom.getStyle(body, 'padding-top', true);
|
||||
paddingBottom = editor.dom.getStyle(body, 'padding-bottom', true);
|
||||
borderTop = editor.dom.getStyle(body, 'border-top-width', true);
|
||||
borderBottom = editor.dom.getStyle(body, 'border-bottom-width', true);
|
||||
myHeight = body.offsetHeight + parseInt(marginTop, 10) + parseInt(marginBottom, 10) +
|
||||
parseInt(paddingTop, 10) + parseInt(paddingBottom, 10) +
|
||||
parseInt(borderTop, 10) + parseInt(borderBottom, 10);
|
||||
|
||||
// Make sure we have a valid height
|
||||
if (isNaN(myHeight) || myHeight <= 0) {
|
||||
// Get height differently depending on the browser used
|
||||
// eslint-disable-next-line no-nested-ternary
|
||||
myHeight = Env.ie ? body.scrollHeight : (Env.webkit && body.clientHeight === 0 ? 0 : body.offsetHeight);
|
||||
}
|
||||
|
||||
// Don't make it smaller than the minimum height
|
||||
if (myHeight > settings.autoresize_min_height) {
|
||||
resizeHeight = myHeight;
|
||||
}
|
||||
|
||||
// If a maximum height has been defined don't exceed this height
|
||||
if (settings.autoresize_max_height && myHeight > settings.autoresize_max_height) {
|
||||
resizeHeight = settings.autoresize_max_height;
|
||||
body.style.overflowY = "auto";
|
||||
docElm.style.overflowY = "auto"; // Old IE
|
||||
} else {
|
||||
body.style.overflowY = "hidden";
|
||||
docElm.style.overflowY = "hidden"; // Old IE
|
||||
body.scrollTop = 0;
|
||||
}
|
||||
|
||||
// Resize content element
|
||||
if (resizeHeight !== oldSize) {
|
||||
deltaSize = resizeHeight - oldSize;
|
||||
DOM.setStyle(editor.iframeElement, 'height', resizeHeight + 'px');
|
||||
oldSize = resizeHeight;
|
||||
|
||||
// WebKit doesn't decrease the size of the body element until the iframe gets resized
|
||||
// So we need to continue to resize the iframe down until the size gets fixed
|
||||
if (Env.webKit && deltaSize < 0) {
|
||||
resize(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls the resize x times in 100ms intervals. We can't wait for load events since
|
||||
* the CSS files might load async.
|
||||
*/
|
||||
function wait(times, interval, callback) {
|
||||
Delay.setEditorTimeout(editor, function () {
|
||||
resize({});
|
||||
|
||||
if (times--) {
|
||||
wait(times, interval, callback);
|
||||
} else if (callback) {
|
||||
callback();
|
||||
}
|
||||
}, interval);
|
||||
}
|
||||
|
||||
// Define minimum height
|
||||
settings.autoresize_min_height = parseInt(editor.getParam('autoresize_min_height', editor.getElement().offsetHeight), 10);
|
||||
|
||||
// Define maximum height
|
||||
settings.autoresize_max_height = parseInt(editor.getParam('autoresize_max_height', 0), 10);
|
||||
|
||||
// Add padding at the bottom for better UX
|
||||
editor.on("init", function () {
|
||||
var overflowPadding, bottomMargin;
|
||||
|
||||
overflowPadding = editor.getParam('autoresize_overflow_padding', 1);
|
||||
bottomMargin = editor.getParam('autoresize_bottom_margin', 50);
|
||||
|
||||
if (overflowPadding !== false) {
|
||||
editor.dom.setStyles(editor.getBody(), {
|
||||
paddingLeft: overflowPadding,
|
||||
paddingRight: overflowPadding
|
||||
});
|
||||
}
|
||||
|
||||
if (bottomMargin !== false) {
|
||||
editor.dom.setStyles(editor.getBody(), {
|
||||
paddingBottom: bottomMargin
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Add appropriate listeners for resizing content area
|
||||
editor.on("nodechange setcontent keyup FullscreenStateChanged", resize);
|
||||
|
||||
if (editor.getParam('autoresize_on_init', true)) {
|
||||
editor.on('init', function () {
|
||||
// Hit it 20 times in 100 ms intervals
|
||||
wait(20, 100, function () {
|
||||
// Hit it 5 times in 1 sec intervals
|
||||
wait(5, 1000);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
|
||||
editor.addCommand('mceAutoResize', resize);
|
||||
});
|
||||
|
||||
return function () {};
|
||||
}
|
||||
);
|
||||
dem('tinymce.plugins.autoresize.Plugin')();
|
||||
})();
|
||||
1
public/storage/assets/vendors/tinymce/plugins/autoresize/plugin.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("5",tinymce.util.Tools.resolve),g("1",["5"],function(a){return a("tinymce.dom.DOMUtils")}),g("2",["5"],function(a){return a("tinymce.Env")}),g("3",["5"],function(a){return a("tinymce.PluginManager")}),g("4",["5"],function(a){return a("tinymce.util.Delay")}),g("0",["1","2","3","4"],function(a,b,c,d){var e=a.DOM;return c.add("autoresize",function(a){function c(){return a.plugins.fullscreen&&a.plugins.fullscreen.isFullscreen()}function f(d){var g,j,k,l,m,n,o,p,q,r,s,t;if(j=a.getDoc()){if(k=j.body,l=j.documentElement,m=h.autoresize_min_height,!k||d&&"setcontent"===d.type&&d.initial||c())return void(k&&l&&(k.style.overflowY="auto",l.style.overflowY="auto"));o=a.dom.getStyle(k,"margin-top",!0),p=a.dom.getStyle(k,"margin-bottom",!0),q=a.dom.getStyle(k,"padding-top",!0),r=a.dom.getStyle(k,"padding-bottom",!0),s=a.dom.getStyle(k,"border-top-width",!0),t=a.dom.getStyle(k,"border-bottom-width",!0),n=k.offsetHeight+parseInt(o,10)+parseInt(p,10)+parseInt(q,10)+parseInt(r,10)+parseInt(s,10)+parseInt(t,10),(isNaN(n)||n<=0)&&(n=b.ie?k.scrollHeight:b.webkit&&0===k.clientHeight?0:k.offsetHeight),n>h.autoresize_min_height&&(m=n),h.autoresize_max_height&&n>h.autoresize_max_height?(m=h.autoresize_max_height,k.style.overflowY="auto",l.style.overflowY="auto"):(k.style.overflowY="hidden",l.style.overflowY="hidden",k.scrollTop=0),m!==i&&(g=m-i,e.setStyle(a.iframeElement,"height",m+"px"),i=m,b.webKit&&g<0&&f(d))}}function g(b,c,e){d.setEditorTimeout(a,function(){f({}),b--?g(b,c,e):e&&e()},c)}var h=a.settings,i=0;a.settings.inline||(h.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight),10),h.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0),10),a.on("init",function(){var b,c;b=a.getParam("autoresize_overflow_padding",1),c=a.getParam("autoresize_bottom_margin",50),b!==!1&&a.dom.setStyles(a.getBody(),{paddingLeft:b,paddingRight:b}),c!==!1&&a.dom.setStyles(a.getBody(),{paddingBottom:c})}),a.on("nodechange setcontent keyup FullscreenStateChanged",f),a.getParam("autoresize_on_init",!0)&&a.on("init",function(){g(20,100,function(){g(5,1e3)})}),a.addCommand("mceAutoResize",f))}),function(){}}),d("0")()}();
|
||||
7
public/storage/assets/vendors/tinymce/plugins/autosave/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "autosave" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/autosave')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/autosave'
|
||||
require('./plugin.js');
|
||||
348
public/storage/assets/vendors/tinymce/plugins/autosave/plugin.js
vendored
Normal file
@@ -0,0 +1,348 @@
|
||||
(function () {
|
||||
|
||||
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
||||
|
||||
// Used when there is no 'main' module.
|
||||
// The name is probably (hopefully) unique so minification removes for releases.
|
||||
var register_3795 = function (id) {
|
||||
var module = dem(id);
|
||||
var fragments = id.split('.');
|
||||
var target = Function('return this;')();
|
||||
for (var i = 0; i < fragments.length - 1; ++i) {
|
||||
if (target[fragments[i]] === undefined)
|
||||
target[fragments[i]] = {};
|
||||
target = target[fragments[i]];
|
||||
}
|
||||
target[fragments[fragments.length - 1]] = module;
|
||||
};
|
||||
|
||||
var instantiate = function (id) {
|
||||
var actual = defs[id];
|
||||
var dependencies = actual.deps;
|
||||
var definition = actual.defn;
|
||||
var len = dependencies.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(dependencies[i]);
|
||||
var defResult = definition.apply(null, instances);
|
||||
if (defResult === undefined)
|
||||
throw 'module [' + id + '] returned undefined';
|
||||
actual.instance = defResult;
|
||||
};
|
||||
|
||||
var def = function (id, dependencies, definition) {
|
||||
if (typeof id !== 'string')
|
||||
throw 'module id must be a string';
|
||||
else if (dependencies === undefined)
|
||||
throw 'no dependencies for ' + id;
|
||||
else if (definition === undefined)
|
||||
throw 'no definition function for ' + id;
|
||||
defs[id] = {
|
||||
deps: dependencies,
|
||||
defn: definition,
|
||||
instance: undefined
|
||||
};
|
||||
};
|
||||
|
||||
var dem = function (id) {
|
||||
var actual = defs[id];
|
||||
if (actual === undefined)
|
||||
throw 'module [' + id + '] was undefined';
|
||||
else if (actual.instance === undefined)
|
||||
instantiate(id);
|
||||
return actual.instance;
|
||||
};
|
||||
|
||||
var req = function (ids, callback) {
|
||||
var len = ids.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances.push(dem(ids[i]));
|
||||
callback.apply(null, callback);
|
||||
};
|
||||
|
||||
var ephox = {};
|
||||
|
||||
ephox.bolt = {
|
||||
module: {
|
||||
api: {
|
||||
define: def,
|
||||
require: req,
|
||||
demand: dem
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var define = def;
|
||||
var require = req;
|
||||
var demand = dem;
|
||||
// this helps with minificiation when using a lot of global references
|
||||
var defineGlobal = function (id, ref) {
|
||||
define(id, [], function () { return ref; });
|
||||
};
|
||||
/*jsc
|
||||
["tinymce.plugins.autosave.Plugin","tinymce.core.EditorManager","tinymce.core.PluginManager","tinymce.core.util.LocalStorage","tinymce.core.util.Tools","global!window","global!tinymce.util.Tools.resolve"]
|
||||
jsc*/
|
||||
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.EditorManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.EditorManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.PluginManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.PluginManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.util.LocalStorage',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.util.LocalStorage');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.util.Tools',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.util.Tools');
|
||||
}
|
||||
);
|
||||
|
||||
defineGlobal("global!window", window);
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class contains all core logic for the autosave plugin.
|
||||
*
|
||||
* @class tinymce.autosave.Plugin
|
||||
* @private
|
||||
*/
|
||||
define(
|
||||
'tinymce.plugins.autosave.Plugin',
|
||||
[
|
||||
'tinymce.core.EditorManager',
|
||||
'tinymce.core.PluginManager',
|
||||
'tinymce.core.util.LocalStorage',
|
||||
'tinymce.core.util.Tools',
|
||||
'global!window'
|
||||
],
|
||||
function (EditorManager, PluginManager, LocalStorage, Tools, window) {
|
||||
EditorManager._beforeUnloadHandler = function () {
|
||||
var msg;
|
||||
|
||||
Tools.each(EditorManager.editors, function (editor) {
|
||||
// Store a draft for each editor instance
|
||||
if (editor.plugins.autosave) {
|
||||
editor.plugins.autosave.storeDraft();
|
||||
}
|
||||
|
||||
// Setup a return message if the editor is dirty
|
||||
if (!msg && editor.isDirty() && editor.getParam("autosave_ask_before_unload", true)) {
|
||||
msg = editor.translate("You have unsaved changes are you sure you want to navigate away?");
|
||||
}
|
||||
});
|
||||
|
||||
return msg;
|
||||
};
|
||||
|
||||
PluginManager.add('autosave', function (editor) {
|
||||
var settings = editor.settings, prefix, started;
|
||||
|
||||
prefix = settings.autosave_prefix || 'tinymce-autosave-{path}{query}-{id}-';
|
||||
prefix = prefix.replace(/\{path\}/g, document.location.pathname);
|
||||
prefix = prefix.replace(/\{query\}/g, document.location.search);
|
||||
prefix = prefix.replace(/\{id\}/g, editor.id);
|
||||
|
||||
function parseTime(time, defaultTime) {
|
||||
var multipels = {
|
||||
s: 1000,
|
||||
m: 60000
|
||||
};
|
||||
|
||||
time = /^(\d+)([ms]?)$/.exec('' + (time || defaultTime));
|
||||
|
||||
return (time[2] ? multipels[time[2]] : 1) * parseInt(time, 10);
|
||||
}
|
||||
|
||||
function hasDraft() {
|
||||
var time = parseInt(LocalStorage.getItem(prefix + "time"), 10) || 0;
|
||||
|
||||
if (new Date().getTime() - time > settings.autosave_retention) {
|
||||
removeDraft(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function removeDraft(fire) {
|
||||
LocalStorage.removeItem(prefix + "draft");
|
||||
LocalStorage.removeItem(prefix + "time");
|
||||
|
||||
if (fire !== false) {
|
||||
editor.fire('RemoveDraft');
|
||||
}
|
||||
}
|
||||
|
||||
function storeDraft() {
|
||||
if (!isEmpty() && editor.isDirty()) {
|
||||
LocalStorage.setItem(prefix + "draft", editor.getContent({ format: 'raw', no_events: true }));
|
||||
LocalStorage.setItem(prefix + "time", new Date().getTime());
|
||||
editor.fire('StoreDraft');
|
||||
}
|
||||
}
|
||||
|
||||
function restoreDraft() {
|
||||
if (hasDraft()) {
|
||||
editor.setContent(LocalStorage.getItem(prefix + "draft"), { format: 'raw' });
|
||||
editor.fire('RestoreDraft');
|
||||
}
|
||||
}
|
||||
|
||||
function startStoreDraft() {
|
||||
if (!started) {
|
||||
setInterval(function () {
|
||||
if (!editor.removed) {
|
||||
storeDraft();
|
||||
}
|
||||
}, settings.autosave_interval);
|
||||
|
||||
started = true;
|
||||
}
|
||||
}
|
||||
|
||||
settings.autosave_interval = parseTime(settings.autosave_interval, '30s');
|
||||
settings.autosave_retention = parseTime(settings.autosave_retention, '20m');
|
||||
|
||||
function postRender() {
|
||||
var self = this;
|
||||
|
||||
self.disabled(!hasDraft());
|
||||
|
||||
editor.on('StoreDraft RestoreDraft RemoveDraft', function () {
|
||||
self.disabled(!hasDraft());
|
||||
});
|
||||
|
||||
startStoreDraft();
|
||||
}
|
||||
|
||||
function restoreLastDraft() {
|
||||
editor.undoManager.beforeChange();
|
||||
restoreDraft();
|
||||
removeDraft();
|
||||
editor.undoManager.add();
|
||||
}
|
||||
|
||||
editor.addButton('restoredraft', {
|
||||
title: 'Restore last draft',
|
||||
onclick: restoreLastDraft,
|
||||
onPostRender: postRender
|
||||
});
|
||||
|
||||
editor.addMenuItem('restoredraft', {
|
||||
text: 'Restore last draft',
|
||||
onclick: restoreLastDraft,
|
||||
onPostRender: postRender,
|
||||
context: 'file'
|
||||
});
|
||||
|
||||
function isEmpty(html) {
|
||||
var forcedRootBlockName = editor.settings.forced_root_block;
|
||||
|
||||
html = Tools.trim(typeof html == "undefined" ? editor.getBody().innerHTML : html);
|
||||
|
||||
return html === '' || new RegExp(
|
||||
'^<' + forcedRootBlockName + '[^>]*>((\u00a0| |[ \t]|<br[^>]*>)+?|)<\/' + forcedRootBlockName + '>|<br>$', 'i'
|
||||
).test(html);
|
||||
}
|
||||
|
||||
if (editor.settings.autosave_restore_when_empty !== false) {
|
||||
editor.on('init', function () {
|
||||
if (hasDraft() && isEmpty()) {
|
||||
restoreDraft();
|
||||
}
|
||||
});
|
||||
|
||||
editor.on('saveContent', function () {
|
||||
removeDraft();
|
||||
});
|
||||
}
|
||||
|
||||
window.onbeforeunload = EditorManager._beforeUnloadHandler;
|
||||
|
||||
this.hasDraft = hasDraft;
|
||||
this.storeDraft = storeDraft;
|
||||
this.restoreDraft = restoreDraft;
|
||||
this.removeDraft = removeDraft;
|
||||
this.isEmpty = isEmpty;
|
||||
});
|
||||
|
||||
return function () { };
|
||||
}
|
||||
);
|
||||
dem('tinymce.plugins.autosave.Plugin')();
|
||||
})();
|
||||
1
public/storage/assets/vendors/tinymce/plugins/autosave/plugin.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("6",tinymce.util.Tools.resolve),g("1",["6"],function(a){return a("tinymce.EditorManager")}),g("2",["6"],function(a){return a("tinymce.PluginManager")}),g("3",["6"],function(a){return a("tinymce.util.LocalStorage")}),g("4",["6"],function(a){return a("tinymce.util.Tools")}),h("5",window),g("0",["1","2","3","4","5"],function(a,b,c,d,e){return a._beforeUnloadHandler=function(){var b;return d.each(a.editors,function(a){a.plugins.autosave&&a.plugins.autosave.storeDraft(),!b&&a.isDirty()&&a.getParam("autosave_ask_before_unload",!0)&&(b=a.translate("You have unsaved changes are you sure you want to navigate away?"))}),b},b.add("autosave",function(b){function f(a,b){var c={s:1e3,m:6e4};return a=/^(\d+)([ms]?)$/.exec(""+(a||b)),(a[2]?c[a[2]]:1)*parseInt(a,10)}function g(){var a=parseInt(c.getItem(o+"time"),10)||0;return!((new Date).getTime()-a>q.autosave_retention)||(h(!1),!1)}function h(a){c.removeItem(o+"draft"),c.removeItem(o+"time"),a!==!1&&b.fire("RemoveDraft")}function i(){!n()&&b.isDirty()&&(c.setItem(o+"draft",b.getContent({format:"raw",no_events:!0})),c.setItem(o+"time",(new Date).getTime()),b.fire("StoreDraft"))}function j(){g()&&(b.setContent(c.getItem(o+"draft"),{format:"raw"}),b.fire("RestoreDraft"))}function k(){p||(setInterval(function(){b.removed||i()},q.autosave_interval),p=!0)}function l(){var a=this;a.disabled(!g()),b.on("StoreDraft RestoreDraft RemoveDraft",function(){a.disabled(!g())}),k()}function m(){b.undoManager.beforeChange(),j(),h(),b.undoManager.add()}function n(a){var c=b.settings.forced_root_block;return a=d.trim("undefined"==typeof a?b.getBody().innerHTML:a),""===a||new RegExp("^<"+c+"[^>]*>((\xa0| |[ \t]|<br[^>]*>)+?|)</"+c+">|<br>$","i").test(a)}var o,p,q=b.settings;o=q.autosave_prefix||"tinymce-autosave-{path}{query}-{id}-",o=o.replace(/\{path\}/g,document.location.pathname),o=o.replace(/\{query\}/g,document.location.search),o=o.replace(/\{id\}/g,b.id),q.autosave_interval=f(q.autosave_interval,"30s"),q.autosave_retention=f(q.autosave_retention,"20m"),b.addButton("restoredraft",{title:"Restore last draft",onclick:m,onPostRender:l}),b.addMenuItem("restoredraft",{text:"Restore last draft",onclick:m,onPostRender:l,context:"file"}),b.settings.autosave_restore_when_empty!==!1&&(b.on("init",function(){g()&&n()&&j()}),b.on("saveContent",function(){h()})),e.onbeforeunload=a._beforeUnloadHandler,this.hasDraft=g,this.storeDraft=i,this.restoreDraft=j,this.removeDraft=h,this.isEmpty=n}),function(){}}),d("0")()}();
|
||||
7
public/storage/assets/vendors/tinymce/plugins/bbcode/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "bbcode" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/bbcode')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/bbcode'
|
||||
require('./plugin.js');
|
||||
262
public/storage/assets/vendors/tinymce/plugins/bbcode/plugin.js
vendored
Normal file
@@ -0,0 +1,262 @@
|
||||
(function () {
|
||||
|
||||
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
||||
|
||||
// Used when there is no 'main' module.
|
||||
// The name is probably (hopefully) unique so minification removes for releases.
|
||||
var register_3795 = function (id) {
|
||||
var module = dem(id);
|
||||
var fragments = id.split('.');
|
||||
var target = Function('return this;')();
|
||||
for (var i = 0; i < fragments.length - 1; ++i) {
|
||||
if (target[fragments[i]] === undefined)
|
||||
target[fragments[i]] = {};
|
||||
target = target[fragments[i]];
|
||||
}
|
||||
target[fragments[fragments.length - 1]] = module;
|
||||
};
|
||||
|
||||
var instantiate = function (id) {
|
||||
var actual = defs[id];
|
||||
var dependencies = actual.deps;
|
||||
var definition = actual.defn;
|
||||
var len = dependencies.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(dependencies[i]);
|
||||
var defResult = definition.apply(null, instances);
|
||||
if (defResult === undefined)
|
||||
throw 'module [' + id + '] returned undefined';
|
||||
actual.instance = defResult;
|
||||
};
|
||||
|
||||
var def = function (id, dependencies, definition) {
|
||||
if (typeof id !== 'string')
|
||||
throw 'module id must be a string';
|
||||
else if (dependencies === undefined)
|
||||
throw 'no dependencies for ' + id;
|
||||
else if (definition === undefined)
|
||||
throw 'no definition function for ' + id;
|
||||
defs[id] = {
|
||||
deps: dependencies,
|
||||
defn: definition,
|
||||
instance: undefined
|
||||
};
|
||||
};
|
||||
|
||||
var dem = function (id) {
|
||||
var actual = defs[id];
|
||||
if (actual === undefined)
|
||||
throw 'module [' + id + '] was undefined';
|
||||
else if (actual.instance === undefined)
|
||||
instantiate(id);
|
||||
return actual.instance;
|
||||
};
|
||||
|
||||
var req = function (ids, callback) {
|
||||
var len = ids.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances.push(dem(ids[i]));
|
||||
callback.apply(null, callback);
|
||||
};
|
||||
|
||||
var ephox = {};
|
||||
|
||||
ephox.bolt = {
|
||||
module: {
|
||||
api: {
|
||||
define: def,
|
||||
require: req,
|
||||
demand: dem
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var define = def;
|
||||
var require = req;
|
||||
var demand = dem;
|
||||
// this helps with minificiation when using a lot of global references
|
||||
var defineGlobal = function (id, ref) {
|
||||
define(id, [], function () { return ref; });
|
||||
};
|
||||
/*jsc
|
||||
["tinymce.plugins.bbcode.Plugin","tinymce.core.PluginManager","tinymce.core.util.Tools","global!tinymce.util.Tools.resolve"]
|
||||
jsc*/
|
||||
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.PluginManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.PluginManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.util.Tools',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.util.Tools');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class contains all core logic for the bbcode plugin.
|
||||
*
|
||||
* @class tinymce.bbcode.Plugin
|
||||
* @private
|
||||
*/
|
||||
define(
|
||||
'tinymce.plugins.bbcode.Plugin',
|
||||
[
|
||||
'tinymce.core.PluginManager',
|
||||
'tinymce.core.util.Tools'
|
||||
],
|
||||
function (PluginManager, Tools) {
|
||||
PluginManager.add('bbcode', function () {
|
||||
return {
|
||||
init: function (ed) {
|
||||
var self = this, dialect = ed.getParam('bbcode_dialect', 'punbb').toLowerCase();
|
||||
|
||||
ed.on('beforeSetContent', function (e) {
|
||||
e.content = self['_' + dialect + '_bbcode2html'](e.content);
|
||||
});
|
||||
|
||||
ed.on('postProcess', function (e) {
|
||||
if (e.set) {
|
||||
e.content = self['_' + dialect + '_bbcode2html'](e.content);
|
||||
}
|
||||
|
||||
if (e.get) {
|
||||
e.content = self['_' + dialect + '_html2bbcode'](e.content);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getInfo: function () {
|
||||
return {
|
||||
longname: 'BBCode Plugin',
|
||||
author: 'Ephox Corp',
|
||||
authorurl: 'http://www.tinymce.com',
|
||||
infourl: 'http://www.tinymce.com/wiki.php/Plugin:bbcode'
|
||||
};
|
||||
},
|
||||
|
||||
// Private methods
|
||||
|
||||
// HTML -> BBCode in PunBB dialect
|
||||
_punbb_html2bbcode: function (s) {
|
||||
s = Tools.trim(s);
|
||||
|
||||
function rep(re, str) {
|
||||
s = s.replace(re, str);
|
||||
}
|
||||
|
||||
// example: <strong> to [b]
|
||||
rep(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi, "[url=$1]$2[/url]");
|
||||
rep(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi, "[code][color=$1]$2[/color][/code]");
|
||||
rep(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi, "[quote][color=$1]$2[/color][/quote]");
|
||||
rep(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, "[code][color=$1]$2[/color][/code]");
|
||||
rep(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, "[quote][color=$1]$2[/color][/quote]");
|
||||
rep(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi, "[color=$1]$2[/color]");
|
||||
rep(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, "[color=$1]$2[/color]");
|
||||
rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi, "[size=$1]$2[/size]");
|
||||
rep(/<font>(.*?)<\/font>/gi, "$1");
|
||||
rep(/<img.*?src=\"(.*?)\".*?\/>/gi, "[img]$1[/img]");
|
||||
rep(/<span class=\"codeStyle\">(.*?)<\/span>/gi, "[code]$1[/code]");
|
||||
rep(/<span class=\"quoteStyle\">(.*?)<\/span>/gi, "[quote]$1[/quote]");
|
||||
rep(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi, "[code][b]$1[/b][/code]");
|
||||
rep(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi, "[quote][b]$1[/b][/quote]");
|
||||
rep(/<em class=\"codeStyle\">(.*?)<\/em>/gi, "[code][i]$1[/i][/code]");
|
||||
rep(/<em class=\"quoteStyle\">(.*?)<\/em>/gi, "[quote][i]$1[/i][/quote]");
|
||||
rep(/<u class=\"codeStyle\">(.*?)<\/u>/gi, "[code][u]$1[/u][/code]");
|
||||
rep(/<u class=\"quoteStyle\">(.*?)<\/u>/gi, "[quote][u]$1[/u][/quote]");
|
||||
rep(/<\/(strong|b)>/gi, "[/b]");
|
||||
rep(/<(strong|b)>/gi, "[b]");
|
||||
rep(/<\/(em|i)>/gi, "[/i]");
|
||||
rep(/<(em|i)>/gi, "[i]");
|
||||
rep(/<\/u>/gi, "[/u]");
|
||||
rep(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi, "[u]$1[/u]");
|
||||
rep(/<u>/gi, "[u]");
|
||||
rep(/<blockquote[^>]*>/gi, "[quote]");
|
||||
rep(/<\/blockquote>/gi, "[/quote]");
|
||||
rep(/<br \/>/gi, "\n");
|
||||
rep(/<br\/>/gi, "\n");
|
||||
rep(/<br>/gi, "\n");
|
||||
rep(/<p>/gi, "");
|
||||
rep(/<\/p>/gi, "\n");
|
||||
rep(/ |\u00a0/gi, " ");
|
||||
rep(/"/gi, "\"");
|
||||
rep(/</gi, "<");
|
||||
rep(/>/gi, ">");
|
||||
rep(/&/gi, "&");
|
||||
|
||||
return s;
|
||||
},
|
||||
|
||||
// BBCode -> HTML from PunBB dialect
|
||||
_punbb_bbcode2html: function (s) {
|
||||
s = Tools.trim(s);
|
||||
|
||||
function rep(re, str) {
|
||||
s = s.replace(re, str);
|
||||
}
|
||||
|
||||
// example: [b] to <strong>
|
||||
rep(/\n/gi, "<br />");
|
||||
rep(/\[b\]/gi, "<strong>");
|
||||
rep(/\[\/b\]/gi, "</strong>");
|
||||
rep(/\[i\]/gi, "<em>");
|
||||
rep(/\[\/i\]/gi, "</em>");
|
||||
rep(/\[u\]/gi, "<u>");
|
||||
rep(/\[\/u\]/gi, "</u>");
|
||||
rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi, "<a href=\"$1\">$2</a>");
|
||||
rep(/\[url\](.*?)\[\/url\]/gi, "<a href=\"$1\">$1</a>");
|
||||
rep(/\[img\](.*?)\[\/img\]/gi, "<img src=\"$1\" />");
|
||||
rep(/\[color=(.*?)\](.*?)\[\/color\]/gi, "<font color=\"$1\">$2</font>");
|
||||
rep(/\[code\](.*?)\[\/code\]/gi, "<span class=\"codeStyle\">$1</span> ");
|
||||
rep(/\[quote.*?\](.*?)\[\/quote\]/gi, "<span class=\"quoteStyle\">$1</span> ");
|
||||
|
||||
return s;
|
||||
}
|
||||
};
|
||||
});
|
||||
return function () { };
|
||||
}
|
||||
);
|
||||
dem('tinymce.plugins.bbcode.Plugin')();
|
||||
})();
|
||||
1
public/storage/assets/vendors/tinymce/plugins/bbcode/plugin.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.PluginManager")}),g("2",["3"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2"],function(a,b){return a.add("bbcode",function(){return{init:function(a){var b=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.on("beforeSetContent",function(a){a.content=b["_"+c+"_bbcode2html"](a.content)}),a.on("postProcess",function(a){a.set&&(a.content=b["_"+c+"_bbcode2html"](a.content)),a.get&&(a.content=b["_"+c+"_html2bbcode"](a.content))})},getInfo:function(){return{longname:"BBCode Plugin",author:"Ephox Corp",authorurl:"http://www.tinymce.com",infourl:"http://www.tinymce.com/wiki.php/Plugin:bbcode"}},_punbb_html2bbcode:function(a){function c(b,c){a=a.replace(b,c)}return a=b.trim(a),c(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),c(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),c(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),c(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),c(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),c(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),c(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),c(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),c(/<font>(.*?)<\/font>/gi,"$1"),c(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),c(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),c(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),c(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),c(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),c(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),c(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),c(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),c(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),c(/<\/(strong|b)>/gi,"[/b]"),c(/<(strong|b)>/gi,"[b]"),c(/<\/(em|i)>/gi,"[/i]"),c(/<(em|i)>/gi,"[i]"),c(/<\/u>/gi,"[/u]"),c(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),c(/<u>/gi,"[u]"),c(/<blockquote[^>]*>/gi,"[quote]"),c(/<\/blockquote>/gi,"[/quote]"),c(/<br \/>/gi,"\n"),c(/<br\/>/gi,"\n"),c(/<br>/gi,"\n"),c(/<p>/gi,""),c(/<\/p>/gi,"\n"),c(/ |\u00a0/gi," "),c(/"/gi,'"'),c(/</gi,"<"),c(/>/gi,">"),c(/&/gi,"&"),a},_punbb_bbcode2html:function(a){function c(b,c){a=a.replace(b,c)}return a=b.trim(a),c(/\n/gi,"<br />"),c(/\[b\]/gi,"<strong>"),c(/\[\/b\]/gi,"</strong>"),c(/\[i\]/gi,"<em>"),c(/\[\/i\]/gi,"</em>"),c(/\[u\]/gi,"<u>"),c(/\[\/u\]/gi,"</u>"),c(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),c(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),c(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),c(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),c(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span> '),c(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span> '),a}}}),function(){}}),d("0")()}();
|
||||
7
public/storage/assets/vendors/tinymce/plugins/charmap/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "charmap" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/charmap')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/charmap'
|
||||
require('./plugin.js');
|
||||
617
public/storage/assets/vendors/tinymce/plugins/charmap/plugin.js
vendored
Normal file
@@ -0,0 +1,617 @@
|
||||
(function () {
|
||||
|
||||
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
||||
|
||||
// Used when there is no 'main' module.
|
||||
// The name is probably (hopefully) unique so minification removes for releases.
|
||||
var register_3795 = function (id) {
|
||||
var module = dem(id);
|
||||
var fragments = id.split('.');
|
||||
var target = Function('return this;')();
|
||||
for (var i = 0; i < fragments.length - 1; ++i) {
|
||||
if (target[fragments[i]] === undefined)
|
||||
target[fragments[i]] = {};
|
||||
target = target[fragments[i]];
|
||||
}
|
||||
target[fragments[fragments.length - 1]] = module;
|
||||
};
|
||||
|
||||
var instantiate = function (id) {
|
||||
var actual = defs[id];
|
||||
var dependencies = actual.deps;
|
||||
var definition = actual.defn;
|
||||
var len = dependencies.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(dependencies[i]);
|
||||
var defResult = definition.apply(null, instances);
|
||||
if (defResult === undefined)
|
||||
throw 'module [' + id + '] returned undefined';
|
||||
actual.instance = defResult;
|
||||
};
|
||||
|
||||
var def = function (id, dependencies, definition) {
|
||||
if (typeof id !== 'string')
|
||||
throw 'module id must be a string';
|
||||
else if (dependencies === undefined)
|
||||
throw 'no dependencies for ' + id;
|
||||
else if (definition === undefined)
|
||||
throw 'no definition function for ' + id;
|
||||
defs[id] = {
|
||||
deps: dependencies,
|
||||
defn: definition,
|
||||
instance: undefined
|
||||
};
|
||||
};
|
||||
|
||||
var dem = function (id) {
|
||||
var actual = defs[id];
|
||||
if (actual === undefined)
|
||||
throw 'module [' + id + '] was undefined';
|
||||
else if (actual.instance === undefined)
|
||||
instantiate(id);
|
||||
return actual.instance;
|
||||
};
|
||||
|
||||
var req = function (ids, callback) {
|
||||
var len = ids.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances.push(dem(ids[i]));
|
||||
callback.apply(null, callback);
|
||||
};
|
||||
|
||||
var ephox = {};
|
||||
|
||||
ephox.bolt = {
|
||||
module: {
|
||||
api: {
|
||||
define: def,
|
||||
require: req,
|
||||
demand: dem
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var define = def;
|
||||
var require = req;
|
||||
var demand = dem;
|
||||
// this helps with minificiation when using a lot of global references
|
||||
var defineGlobal = function (id, ref) {
|
||||
define(id, [], function () { return ref; });
|
||||
};
|
||||
/*jsc
|
||||
["tinymce.plugins.charmap.Plugin","tinymce.core.PluginManager","tinymce.core.util.Tools","global!tinymce.util.Tools.resolve"]
|
||||
jsc*/
|
||||
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.PluginManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.PluginManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.util.Tools',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.util.Tools');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class contains all core logic for the charmap plugin.
|
||||
*
|
||||
* @class tinymce.charmap.Plugin
|
||||
* @private
|
||||
*/
|
||||
define(
|
||||
'tinymce.plugins.charmap.Plugin',
|
||||
[
|
||||
'tinymce.core.PluginManager',
|
||||
'tinymce.core.util.Tools'
|
||||
],
|
||||
function (PluginManager, Tools) {
|
||||
PluginManager.add('charmap', function (editor) {
|
||||
var isArray = Tools.isArray;
|
||||
|
||||
function getDefaultCharMap() {
|
||||
return [
|
||||
['160', 'no-break space'],
|
||||
['173', 'soft hyphen'],
|
||||
['34', 'quotation mark'],
|
||||
// finance
|
||||
['162', 'cent sign'],
|
||||
['8364', 'euro sign'],
|
||||
['163', 'pound sign'],
|
||||
['165', 'yen sign'],
|
||||
// signs
|
||||
['169', 'copyright sign'],
|
||||
['174', 'registered sign'],
|
||||
['8482', 'trade mark sign'],
|
||||
['8240', 'per mille sign'],
|
||||
['181', 'micro sign'],
|
||||
['183', 'middle dot'],
|
||||
['8226', 'bullet'],
|
||||
['8230', 'three dot leader'],
|
||||
['8242', 'minutes / feet'],
|
||||
['8243', 'seconds / inches'],
|
||||
['167', 'section sign'],
|
||||
['182', 'paragraph sign'],
|
||||
['223', 'sharp s / ess-zed'],
|
||||
// quotations
|
||||
['8249', 'single left-pointing angle quotation mark'],
|
||||
['8250', 'single right-pointing angle quotation mark'],
|
||||
['171', 'left pointing guillemet'],
|
||||
['187', 'right pointing guillemet'],
|
||||
['8216', 'left single quotation mark'],
|
||||
['8217', 'right single quotation mark'],
|
||||
['8220', 'left double quotation mark'],
|
||||
['8221', 'right double quotation mark'],
|
||||
['8218', 'single low-9 quotation mark'],
|
||||
['8222', 'double low-9 quotation mark'],
|
||||
['60', 'less-than sign'],
|
||||
['62', 'greater-than sign'],
|
||||
['8804', 'less-than or equal to'],
|
||||
['8805', 'greater-than or equal to'],
|
||||
['8211', 'en dash'],
|
||||
['8212', 'em dash'],
|
||||
['175', 'macron'],
|
||||
['8254', 'overline'],
|
||||
['164', 'currency sign'],
|
||||
['166', 'broken bar'],
|
||||
['168', 'diaeresis'],
|
||||
['161', 'inverted exclamation mark'],
|
||||
['191', 'turned question mark'],
|
||||
['710', 'circumflex accent'],
|
||||
['732', 'small tilde'],
|
||||
['176', 'degree sign'],
|
||||
['8722', 'minus sign'],
|
||||
['177', 'plus-minus sign'],
|
||||
['247', 'division sign'],
|
||||
['8260', 'fraction slash'],
|
||||
['215', 'multiplication sign'],
|
||||
['185', 'superscript one'],
|
||||
['178', 'superscript two'],
|
||||
['179', 'superscript three'],
|
||||
['188', 'fraction one quarter'],
|
||||
['189', 'fraction one half'],
|
||||
['190', 'fraction three quarters'],
|
||||
// math / logical
|
||||
['402', 'function / florin'],
|
||||
['8747', 'integral'],
|
||||
['8721', 'n-ary sumation'],
|
||||
['8734', 'infinity'],
|
||||
['8730', 'square root'],
|
||||
['8764', 'similar to'],
|
||||
['8773', 'approximately equal to'],
|
||||
['8776', 'almost equal to'],
|
||||
['8800', 'not equal to'],
|
||||
['8801', 'identical to'],
|
||||
['8712', 'element of'],
|
||||
['8713', 'not an element of'],
|
||||
['8715', 'contains as member'],
|
||||
['8719', 'n-ary product'],
|
||||
['8743', 'logical and'],
|
||||
['8744', 'logical or'],
|
||||
['172', 'not sign'],
|
||||
['8745', 'intersection'],
|
||||
['8746', 'union'],
|
||||
['8706', 'partial differential'],
|
||||
['8704', 'for all'],
|
||||
['8707', 'there exists'],
|
||||
['8709', 'diameter'],
|
||||
['8711', 'backward difference'],
|
||||
['8727', 'asterisk operator'],
|
||||
['8733', 'proportional to'],
|
||||
['8736', 'angle'],
|
||||
// undefined
|
||||
['180', 'acute accent'],
|
||||
['184', 'cedilla'],
|
||||
['170', 'feminine ordinal indicator'],
|
||||
['186', 'masculine ordinal indicator'],
|
||||
['8224', 'dagger'],
|
||||
['8225', 'double dagger'],
|
||||
// alphabetical special chars
|
||||
['192', 'A - grave'],
|
||||
['193', 'A - acute'],
|
||||
['194', 'A - circumflex'],
|
||||
['195', 'A - tilde'],
|
||||
['196', 'A - diaeresis'],
|
||||
['197', 'A - ring above'],
|
||||
['256', 'A - macron'],
|
||||
['198', 'ligature AE'],
|
||||
['199', 'C - cedilla'],
|
||||
['200', 'E - grave'],
|
||||
['201', 'E - acute'],
|
||||
['202', 'E - circumflex'],
|
||||
['203', 'E - diaeresis'],
|
||||
['274', 'E - macron'],
|
||||
['204', 'I - grave'],
|
||||
['205', 'I - acute'],
|
||||
['206', 'I - circumflex'],
|
||||
['207', 'I - diaeresis'],
|
||||
['298', 'I - macron'],
|
||||
['208', 'ETH'],
|
||||
['209', 'N - tilde'],
|
||||
['210', 'O - grave'],
|
||||
['211', 'O - acute'],
|
||||
['212', 'O - circumflex'],
|
||||
['213', 'O - tilde'],
|
||||
['214', 'O - diaeresis'],
|
||||
['216', 'O - slash'],
|
||||
['332', 'O - macron'],
|
||||
['338', 'ligature OE'],
|
||||
['352', 'S - caron'],
|
||||
['217', 'U - grave'],
|
||||
['218', 'U - acute'],
|
||||
['219', 'U - circumflex'],
|
||||
['220', 'U - diaeresis'],
|
||||
['362', 'U - macron'],
|
||||
['221', 'Y - acute'],
|
||||
['376', 'Y - diaeresis'],
|
||||
['562', 'Y - macron'],
|
||||
['222', 'THORN'],
|
||||
['224', 'a - grave'],
|
||||
['225', 'a - acute'],
|
||||
['226', 'a - circumflex'],
|
||||
['227', 'a - tilde'],
|
||||
['228', 'a - diaeresis'],
|
||||
['229', 'a - ring above'],
|
||||
['257', 'a - macron'],
|
||||
['230', 'ligature ae'],
|
||||
['231', 'c - cedilla'],
|
||||
['232', 'e - grave'],
|
||||
['233', 'e - acute'],
|
||||
['234', 'e - circumflex'],
|
||||
['235', 'e - diaeresis'],
|
||||
['275', 'e - macron'],
|
||||
['236', 'i - grave'],
|
||||
['237', 'i - acute'],
|
||||
['238', 'i - circumflex'],
|
||||
['239', 'i - diaeresis'],
|
||||
['299', 'i - macron'],
|
||||
['240', 'eth'],
|
||||
['241', 'n - tilde'],
|
||||
['242', 'o - grave'],
|
||||
['243', 'o - acute'],
|
||||
['244', 'o - circumflex'],
|
||||
['245', 'o - tilde'],
|
||||
['246', 'o - diaeresis'],
|
||||
['248', 'o slash'],
|
||||
['333', 'o macron'],
|
||||
['339', 'ligature oe'],
|
||||
['353', 's - caron'],
|
||||
['249', 'u - grave'],
|
||||
['250', 'u - acute'],
|
||||
['251', 'u - circumflex'],
|
||||
['252', 'u - diaeresis'],
|
||||
['363', 'u - macron'],
|
||||
['253', 'y - acute'],
|
||||
['254', 'thorn'],
|
||||
['255', 'y - diaeresis'],
|
||||
['563', 'y - macron'],
|
||||
['913', 'Alpha'],
|
||||
['914', 'Beta'],
|
||||
['915', 'Gamma'],
|
||||
['916', 'Delta'],
|
||||
['917', 'Epsilon'],
|
||||
['918', 'Zeta'],
|
||||
['919', 'Eta'],
|
||||
['920', 'Theta'],
|
||||
['921', 'Iota'],
|
||||
['922', 'Kappa'],
|
||||
['923', 'Lambda'],
|
||||
['924', 'Mu'],
|
||||
['925', 'Nu'],
|
||||
['926', 'Xi'],
|
||||
['927', 'Omicron'],
|
||||
['928', 'Pi'],
|
||||
['929', 'Rho'],
|
||||
['931', 'Sigma'],
|
||||
['932', 'Tau'],
|
||||
['933', 'Upsilon'],
|
||||
['934', 'Phi'],
|
||||
['935', 'Chi'],
|
||||
['936', 'Psi'],
|
||||
['937', 'Omega'],
|
||||
['945', 'alpha'],
|
||||
['946', 'beta'],
|
||||
['947', 'gamma'],
|
||||
['948', 'delta'],
|
||||
['949', 'epsilon'],
|
||||
['950', 'zeta'],
|
||||
['951', 'eta'],
|
||||
['952', 'theta'],
|
||||
['953', 'iota'],
|
||||
['954', 'kappa'],
|
||||
['955', 'lambda'],
|
||||
['956', 'mu'],
|
||||
['957', 'nu'],
|
||||
['958', 'xi'],
|
||||
['959', 'omicron'],
|
||||
['960', 'pi'],
|
||||
['961', 'rho'],
|
||||
['962', 'final sigma'],
|
||||
['963', 'sigma'],
|
||||
['964', 'tau'],
|
||||
['965', 'upsilon'],
|
||||
['966', 'phi'],
|
||||
['967', 'chi'],
|
||||
['968', 'psi'],
|
||||
['969', 'omega'],
|
||||
// symbols
|
||||
['8501', 'alef symbol'],
|
||||
['982', 'pi symbol'],
|
||||
['8476', 'real part symbol'],
|
||||
['978', 'upsilon - hook symbol'],
|
||||
['8472', 'Weierstrass p'],
|
||||
['8465', 'imaginary part'],
|
||||
// arrows
|
||||
['8592', 'leftwards arrow'],
|
||||
['8593', 'upwards arrow'],
|
||||
['8594', 'rightwards arrow'],
|
||||
['8595', 'downwards arrow'],
|
||||
['8596', 'left right arrow'],
|
||||
['8629', 'carriage return'],
|
||||
['8656', 'leftwards double arrow'],
|
||||
['8657', 'upwards double arrow'],
|
||||
['8658', 'rightwards double arrow'],
|
||||
['8659', 'downwards double arrow'],
|
||||
['8660', 'left right double arrow'],
|
||||
['8756', 'therefore'],
|
||||
['8834', 'subset of'],
|
||||
['8835', 'superset of'],
|
||||
['8836', 'not a subset of'],
|
||||
['8838', 'subset of or equal to'],
|
||||
['8839', 'superset of or equal to'],
|
||||
['8853', 'circled plus'],
|
||||
['8855', 'circled times'],
|
||||
['8869', 'perpendicular'],
|
||||
['8901', 'dot operator'],
|
||||
['8968', 'left ceiling'],
|
||||
['8969', 'right ceiling'],
|
||||
['8970', 'left floor'],
|
||||
['8971', 'right floor'],
|
||||
['9001', 'left-pointing angle bracket'],
|
||||
['9002', 'right-pointing angle bracket'],
|
||||
['9674', 'lozenge'],
|
||||
['9824', 'black spade suit'],
|
||||
['9827', 'black club suit'],
|
||||
['9829', 'black heart suit'],
|
||||
['9830', 'black diamond suit'],
|
||||
['8194', 'en space'],
|
||||
['8195', 'em space'],
|
||||
['8201', 'thin space'],
|
||||
['8204', 'zero width non-joiner'],
|
||||
['8205', 'zero width joiner'],
|
||||
['8206', 'left-to-right mark'],
|
||||
['8207', 'right-to-left mark']
|
||||
];
|
||||
}
|
||||
|
||||
function charmapFilter(charmap) {
|
||||
return Tools.grep(charmap, function (item) {
|
||||
return isArray(item) && item.length == 2;
|
||||
});
|
||||
}
|
||||
|
||||
function getCharsFromSetting(settingValue) {
|
||||
if (isArray(settingValue)) {
|
||||
return [].concat(charmapFilter(settingValue));
|
||||
}
|
||||
|
||||
if (typeof settingValue == "function") {
|
||||
return settingValue();
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
function extendCharMap(charmap) {
|
||||
var settings = editor.settings;
|
||||
|
||||
if (settings.charmap) {
|
||||
charmap = getCharsFromSetting(settings.charmap);
|
||||
}
|
||||
|
||||
if (settings.charmap_append) {
|
||||
return [].concat(charmap).concat(getCharsFromSetting(settings.charmap_append));
|
||||
}
|
||||
|
||||
return charmap;
|
||||
}
|
||||
|
||||
function getCharMap() {
|
||||
return extendCharMap(getDefaultCharMap());
|
||||
}
|
||||
|
||||
function insertChar(chr) {
|
||||
editor.fire('insertCustomChar', { chr: chr }).chr;
|
||||
editor.execCommand('mceInsertContent', false, chr);
|
||||
}
|
||||
|
||||
function showDialog() {
|
||||
var gridHtml, x, y, win;
|
||||
|
||||
function getParentTd(elm) {
|
||||
while (elm) {
|
||||
if (elm.nodeName == 'TD') {
|
||||
return elm;
|
||||
}
|
||||
|
||||
elm = elm.parentNode;
|
||||
}
|
||||
}
|
||||
|
||||
gridHtml = '<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>';
|
||||
|
||||
var charmap = getCharMap();
|
||||
var width = Math.min(charmap.length, 25);
|
||||
var height = Math.ceil(charmap.length / width);
|
||||
for (y = 0; y < height; y++) {
|
||||
gridHtml += '<tr>';
|
||||
|
||||
for (x = 0; x < width; x++) {
|
||||
var index = y * width + x;
|
||||
if (index < charmap.length) {
|
||||
var chr = charmap[index];
|
||||
var chrText = chr ? String.fromCharCode(parseInt(chr[0], 10)) : ' ';
|
||||
|
||||
gridHtml += (
|
||||
'<td title="' + chr[1] + '">' +
|
||||
'<div tabindex="-1" title="' + chr[1] + '" role="button" data-chr="' + chrText + '">' +
|
||||
chrText +
|
||||
'</div>' +
|
||||
'</td>'
|
||||
);
|
||||
} else {
|
||||
gridHtml += '<td />';
|
||||
}
|
||||
}
|
||||
|
||||
gridHtml += '</tr>';
|
||||
}
|
||||
|
||||
gridHtml += '</tbody></table>';
|
||||
|
||||
var charMapPanel = {
|
||||
type: 'container',
|
||||
html: gridHtml,
|
||||
onclick: function (e) {
|
||||
var target = e.target;
|
||||
|
||||
if (/^(TD|DIV)$/.test(target.nodeName)) {
|
||||
var charDiv = getParentTd(target).firstChild;
|
||||
if (charDiv && charDiv.hasAttribute('data-chr')) {
|
||||
insertChar(charDiv.getAttribute('data-chr'));
|
||||
|
||||
if (!e.ctrlKey) {
|
||||
win.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
onmouseover: function (e) {
|
||||
var td = getParentTd(e.target);
|
||||
|
||||
if (td && td.firstChild) {
|
||||
win.find('#preview').text(td.firstChild.firstChild.data);
|
||||
win.find('#previewTitle').text(td.title);
|
||||
} else {
|
||||
win.find('#preview').text(' ');
|
||||
win.find('#previewTitle').text(' ');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
win = editor.windowManager.open({
|
||||
title: "Special character",
|
||||
spacing: 10,
|
||||
padding: 10,
|
||||
items: [
|
||||
charMapPanel,
|
||||
{
|
||||
type: 'container',
|
||||
layout: 'flex',
|
||||
direction: 'column',
|
||||
align: 'center',
|
||||
spacing: 5,
|
||||
minWidth: 160,
|
||||
minHeight: 160,
|
||||
items: [
|
||||
{
|
||||
type: 'label',
|
||||
name: 'preview',
|
||||
text: ' ',
|
||||
style: 'font-size: 40px; text-align: center',
|
||||
border: 1,
|
||||
minWidth: 140,
|
||||
minHeight: 80
|
||||
},
|
||||
{
|
||||
type: 'spacer',
|
||||
minHeight: 20
|
||||
},
|
||||
{
|
||||
type: 'label',
|
||||
name: 'previewTitle',
|
||||
text: ' ',
|
||||
style: 'white-space: pre-wrap;',
|
||||
border: 1,
|
||||
minWidth: 140
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
buttons: [
|
||||
{
|
||||
text: "Close", onclick: function () {
|
||||
win.close();
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
editor.addCommand('mceShowCharmap', showDialog);
|
||||
|
||||
editor.addButton('charmap', {
|
||||
icon: 'charmap',
|
||||
tooltip: 'Special character',
|
||||
cmd: 'mceShowCharmap'
|
||||
});
|
||||
|
||||
editor.addMenuItem('charmap', {
|
||||
icon: 'charmap',
|
||||
text: 'Special character',
|
||||
cmd: 'mceShowCharmap',
|
||||
context: 'insert'
|
||||
});
|
||||
|
||||
return {
|
||||
getCharMap: getCharMap,
|
||||
insertChar: insertChar
|
||||
};
|
||||
});
|
||||
|
||||
return function () { };
|
||||
}
|
||||
);
|
||||
dem('tinymce.plugins.charmap.Plugin')();
|
||||
})();
|
||||
1
public/storage/assets/vendors/tinymce/plugins/charmap/plugin.min.js
vendored
Normal file
7
public/storage/assets/vendors/tinymce/plugins/code/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "code" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/code')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/code'
|
||||
require('./plugin.js');
|
||||
203
public/storage/assets/vendors/tinymce/plugins/code/plugin.js
vendored
Normal file
@@ -0,0 +1,203 @@
|
||||
(function () {
|
||||
|
||||
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
||||
|
||||
// Used when there is no 'main' module.
|
||||
// The name is probably (hopefully) unique so minification removes for releases.
|
||||
var register_3795 = function (id) {
|
||||
var module = dem(id);
|
||||
var fragments = id.split('.');
|
||||
var target = Function('return this;')();
|
||||
for (var i = 0; i < fragments.length - 1; ++i) {
|
||||
if (target[fragments[i]] === undefined)
|
||||
target[fragments[i]] = {};
|
||||
target = target[fragments[i]];
|
||||
}
|
||||
target[fragments[fragments.length - 1]] = module;
|
||||
};
|
||||
|
||||
var instantiate = function (id) {
|
||||
var actual = defs[id];
|
||||
var dependencies = actual.deps;
|
||||
var definition = actual.defn;
|
||||
var len = dependencies.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(dependencies[i]);
|
||||
var defResult = definition.apply(null, instances);
|
||||
if (defResult === undefined)
|
||||
throw 'module [' + id + '] returned undefined';
|
||||
actual.instance = defResult;
|
||||
};
|
||||
|
||||
var def = function (id, dependencies, definition) {
|
||||
if (typeof id !== 'string')
|
||||
throw 'module id must be a string';
|
||||
else if (dependencies === undefined)
|
||||
throw 'no dependencies for ' + id;
|
||||
else if (definition === undefined)
|
||||
throw 'no definition function for ' + id;
|
||||
defs[id] = {
|
||||
deps: dependencies,
|
||||
defn: definition,
|
||||
instance: undefined
|
||||
};
|
||||
};
|
||||
|
||||
var dem = function (id) {
|
||||
var actual = defs[id];
|
||||
if (actual === undefined)
|
||||
throw 'module [' + id + '] was undefined';
|
||||
else if (actual.instance === undefined)
|
||||
instantiate(id);
|
||||
return actual.instance;
|
||||
};
|
||||
|
||||
var req = function (ids, callback) {
|
||||
var len = ids.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances.push(dem(ids[i]));
|
||||
callback.apply(null, callback);
|
||||
};
|
||||
|
||||
var ephox = {};
|
||||
|
||||
ephox.bolt = {
|
||||
module: {
|
||||
api: {
|
||||
define: def,
|
||||
require: req,
|
||||
demand: dem
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var define = def;
|
||||
var require = req;
|
||||
var demand = dem;
|
||||
// this helps with minificiation when using a lot of global references
|
||||
var defineGlobal = function (id, ref) {
|
||||
define(id, [], function () { return ref; });
|
||||
};
|
||||
/*jsc
|
||||
["tinymce.plugins.code.Plugin","tinymce.core.dom.DOMUtils","tinymce.core.PluginManager","global!tinymce.util.Tools.resolve"]
|
||||
jsc*/
|
||||
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.dom.DOMUtils',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.dom.DOMUtils');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.PluginManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.PluginManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class contains all core logic for the code plugin.
|
||||
*
|
||||
* @class tinymce.code.Plugin
|
||||
* @private
|
||||
*/
|
||||
define(
|
||||
'tinymce.plugins.code.Plugin',
|
||||
[
|
||||
'tinymce.core.dom.DOMUtils',
|
||||
'tinymce.core.PluginManager'
|
||||
],
|
||||
function (DOMUtils, PluginManager) {
|
||||
PluginManager.add('code', function (editor) {
|
||||
function showDialog() {
|
||||
var win = editor.windowManager.open({
|
||||
title: "Source code",
|
||||
body: {
|
||||
type: 'textbox',
|
||||
name: 'code',
|
||||
multiline: true,
|
||||
minWidth: editor.getParam("code_dialog_width", 600),
|
||||
minHeight: editor.getParam("code_dialog_height", Math.min(DOMUtils.DOM.getViewPort().h - 200, 500)),
|
||||
spellcheck: false,
|
||||
style: 'direction: ltr; text-align: left'
|
||||
},
|
||||
onSubmit: function (e) {
|
||||
// We get a lovely "Wrong document" error in IE 11 if we
|
||||
// don't move the focus to the editor before creating an undo
|
||||
// transation since it tries to make a bookmark for the current selection
|
||||
editor.focus();
|
||||
|
||||
editor.undoManager.transact(function () {
|
||||
editor.setContent(e.data.code);
|
||||
});
|
||||
|
||||
editor.selection.setCursorLocation();
|
||||
editor.nodeChanged();
|
||||
}
|
||||
});
|
||||
|
||||
// Gecko has a major performance issue with textarea
|
||||
// contents so we need to set it when all reflows are done
|
||||
win.find('#code').value(editor.getContent({ source_view: true }));
|
||||
}
|
||||
|
||||
editor.addCommand("mceCodeEditor", showDialog);
|
||||
|
||||
editor.addButton('code', {
|
||||
icon: 'code',
|
||||
tooltip: 'Source code',
|
||||
onclick: showDialog
|
||||
});
|
||||
|
||||
editor.addMenuItem('code', {
|
||||
icon: 'code',
|
||||
text: 'Source code',
|
||||
context: 'tools',
|
||||
onclick: showDialog
|
||||
});
|
||||
});
|
||||
|
||||
return function () { };
|
||||
}
|
||||
);
|
||||
dem('tinymce.plugins.code.Plugin')();
|
||||
})();
|
||||
1
public/storage/assets/vendors/tinymce/plugins/code/plugin.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.dom.DOMUtils")}),g("2",["3"],function(a){return a("tinymce.PluginManager")}),g("0",["1","2"],function(a,b){return b.add("code",function(b){function c(){var c=b.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:b.getParam("code_dialog_width",600),minHeight:b.getParam("code_dialog_height",Math.min(a.DOM.getViewPort().h-200,500)),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(a){b.focus(),b.undoManager.transact(function(){b.setContent(a.data.code)}),b.selection.setCursorLocation(),b.nodeChanged()}});c.find("#code").value(b.getContent({source_view:!0}))}b.addCommand("mceCodeEditor",c),b.addButton("code",{icon:"code",tooltip:"Source code",onclick:c}),b.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:c})}),function(){}}),d("0")()}();
|
||||
138
public/storage/assets/vendors/tinymce/plugins/codesample/css/prism.css
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */
|
||||
/**
|
||||
* prism.js default theme for JavaScript, CSS and HTML
|
||||
* Based on dabblet (http://dabblet.com)
|
||||
* @author Lea Verou
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: black;
|
||||
text-shadow: 0 1px white;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
@media print {
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #f5f2f0;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: slategray;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #905;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #690;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #a67f59;
|
||||
background: hsla(0, 0%, 100%, .5);
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
color: #07a;
|
||||
}
|
||||
|
||||
.token.function {
|
||||
color: #DD4A68;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
color: #e90;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
7
public/storage/assets/vendors/tinymce/plugins/codesample/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "codesample" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/codesample')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/codesample'
|
||||
require('./plugin.js');
|
||||
1385
public/storage/assets/vendors/tinymce/plugins/codesample/plugin.js
vendored
Normal file
1
public/storage/assets/vendors/tinymce/plugins/codesample/plugin.min.js
vendored
Normal file
7
public/storage/assets/vendors/tinymce/plugins/colorpicker/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "colorpicker" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/colorpicker')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/colorpicker'
|
||||
require('./plugin.js');
|
||||
255
public/storage/assets/vendors/tinymce/plugins/colorpicker/plugin.js
vendored
Normal file
@@ -0,0 +1,255 @@
|
||||
(function () {
|
||||
|
||||
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
||||
|
||||
// Used when there is no 'main' module.
|
||||
// The name is probably (hopefully) unique so minification removes for releases.
|
||||
var register_3795 = function (id) {
|
||||
var module = dem(id);
|
||||
var fragments = id.split('.');
|
||||
var target = Function('return this;')();
|
||||
for (var i = 0; i < fragments.length - 1; ++i) {
|
||||
if (target[fragments[i]] === undefined)
|
||||
target[fragments[i]] = {};
|
||||
target = target[fragments[i]];
|
||||
}
|
||||
target[fragments[fragments.length - 1]] = module;
|
||||
};
|
||||
|
||||
var instantiate = function (id) {
|
||||
var actual = defs[id];
|
||||
var dependencies = actual.deps;
|
||||
var definition = actual.defn;
|
||||
var len = dependencies.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(dependencies[i]);
|
||||
var defResult = definition.apply(null, instances);
|
||||
if (defResult === undefined)
|
||||
throw 'module [' + id + '] returned undefined';
|
||||
actual.instance = defResult;
|
||||
};
|
||||
|
||||
var def = function (id, dependencies, definition) {
|
||||
if (typeof id !== 'string')
|
||||
throw 'module id must be a string';
|
||||
else if (dependencies === undefined)
|
||||
throw 'no dependencies for ' + id;
|
||||
else if (definition === undefined)
|
||||
throw 'no definition function for ' + id;
|
||||
defs[id] = {
|
||||
deps: dependencies,
|
||||
defn: definition,
|
||||
instance: undefined
|
||||
};
|
||||
};
|
||||
|
||||
var dem = function (id) {
|
||||
var actual = defs[id];
|
||||
if (actual === undefined)
|
||||
throw 'module [' + id + '] was undefined';
|
||||
else if (actual.instance === undefined)
|
||||
instantiate(id);
|
||||
return actual.instance;
|
||||
};
|
||||
|
||||
var req = function (ids, callback) {
|
||||
var len = ids.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances.push(dem(ids[i]));
|
||||
callback.apply(null, callback);
|
||||
};
|
||||
|
||||
var ephox = {};
|
||||
|
||||
ephox.bolt = {
|
||||
module: {
|
||||
api: {
|
||||
define: def,
|
||||
require: req,
|
||||
demand: dem
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var define = def;
|
||||
var require = req;
|
||||
var demand = dem;
|
||||
// this helps with minificiation when using a lot of global references
|
||||
var defineGlobal = function (id, ref) {
|
||||
define(id, [], function () { return ref; });
|
||||
};
|
||||
/*jsc
|
||||
["tinymce.plugins.colorpicker.Plugin","tinymce.core.PluginManager","tinymce.core.util.Color","global!tinymce.util.Tools.resolve"]
|
||||
jsc*/
|
||||
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.PluginManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.PluginManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.util.Color',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.util.Color');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class contains all core logic for the colorpicker plugin.
|
||||
*
|
||||
* @class tinymce.colorpicker.Plugin
|
||||
* @private
|
||||
*/
|
||||
define(
|
||||
'tinymce.plugins.colorpicker.Plugin',
|
||||
[
|
||||
'tinymce.core.PluginManager',
|
||||
'tinymce.core.util.Color'
|
||||
],
|
||||
function (PluginManager, Color) {
|
||||
PluginManager.add('colorpicker', function (editor) {
|
||||
function colorPickerCallback(callback, value) {
|
||||
function setColor(value) {
|
||||
var color = new Color(value), rgb = color.toRgb();
|
||||
|
||||
win.fromJSON({
|
||||
r: rgb.r,
|
||||
g: rgb.g,
|
||||
b: rgb.b,
|
||||
hex: color.toHex().substr(1)
|
||||
});
|
||||
|
||||
showPreview(color.toHex());
|
||||
}
|
||||
|
||||
function showPreview(hexColor) {
|
||||
win.find('#preview')[0].getEl().style.background = hexColor;
|
||||
}
|
||||
|
||||
var win = editor.windowManager.open({
|
||||
title: 'Color',
|
||||
items: {
|
||||
type: 'container',
|
||||
layout: 'flex',
|
||||
direction: 'row',
|
||||
align: 'stretch',
|
||||
padding: 5,
|
||||
spacing: 10,
|
||||
items: [
|
||||
{
|
||||
type: 'colorpicker',
|
||||
value: value,
|
||||
onchange: function () {
|
||||
var rgb = this.rgb();
|
||||
|
||||
if (win) {
|
||||
win.find('#r').value(rgb.r);
|
||||
win.find('#g').value(rgb.g);
|
||||
win.find('#b').value(rgb.b);
|
||||
win.find('#hex').value(this.value().substr(1));
|
||||
showPreview(this.value());
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'form',
|
||||
padding: 0,
|
||||
labelGap: 5,
|
||||
defaults: {
|
||||
type: 'textbox',
|
||||
size: 7,
|
||||
value: '0',
|
||||
flex: 1,
|
||||
spellcheck: false,
|
||||
onchange: function () {
|
||||
var colorPickerCtrl = win.find('colorpicker')[0];
|
||||
var name, value;
|
||||
|
||||
name = this.name();
|
||||
value = this.value();
|
||||
|
||||
if (name == "hex") {
|
||||
value = '#' + value;
|
||||
setColor(value);
|
||||
colorPickerCtrl.value(value);
|
||||
return;
|
||||
}
|
||||
|
||||
value = {
|
||||
r: win.find('#r').value(),
|
||||
g: win.find('#g').value(),
|
||||
b: win.find('#b').value()
|
||||
};
|
||||
|
||||
colorPickerCtrl.value(value);
|
||||
setColor(value);
|
||||
}
|
||||
},
|
||||
items: [
|
||||
{ name: 'r', label: 'R', autofocus: 1 },
|
||||
{ name: 'g', label: 'G' },
|
||||
{ name: 'b', label: 'B' },
|
||||
{ name: 'hex', label: '#', value: '000000' },
|
||||
{ name: 'preview', type: 'container', border: 1 }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
onSubmit: function () {
|
||||
callback('#' + this.toJSON().hex);
|
||||
}
|
||||
});
|
||||
|
||||
setColor(value);
|
||||
}
|
||||
|
||||
if (!editor.settings.color_picker_callback) {
|
||||
editor.settings.color_picker_callback = colorPickerCallback;
|
||||
}
|
||||
});
|
||||
|
||||
return function () { };
|
||||
}
|
||||
);
|
||||
dem('tinymce.plugins.colorpicker.Plugin')();
|
||||
})();
|
||||
1
public/storage/assets/vendors/tinymce/plugins/colorpicker/plugin.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.PluginManager")}),g("2",["3"],function(a){return a("tinymce.util.Color")}),g("0",["1","2"],function(a,b){return a.add("colorpicker",function(a){function c(c,d){function e(a){var c=new b(a),d=c.toRgb();g.fromJSON({r:d.r,g:d.g,b:d.b,hex:c.toHex().substr(1)}),f(c.toHex())}function f(a){g.find("#preview")[0].getEl().style.background=a}var g=a.windowManager.open({title:"Color",items:{type:"container",layout:"flex",direction:"row",align:"stretch",padding:5,spacing:10,items:[{type:"colorpicker",value:d,onchange:function(){var a=this.rgb();g&&(g.find("#r").value(a.r),g.find("#g").value(a.g),g.find("#b").value(a.b),g.find("#hex").value(this.value().substr(1)),f(this.value()))}},{type:"form",padding:0,labelGap:5,defaults:{type:"textbox",size:7,value:"0",flex:1,spellcheck:!1,onchange:function(){var a,b,c=g.find("colorpicker")[0];return a=this.name(),b=this.value(),"hex"==a?(b="#"+b,e(b),void c.value(b)):(b={r:g.find("#r").value(),g:g.find("#g").value(),b:g.find("#b").value()},c.value(b),void e(b))}},items:[{name:"r",label:"R",autofocus:1},{name:"g",label:"G"},{name:"b",label:"B"},{name:"hex",label:"#",value:"000000"},{name:"preview",type:"container",border:1}]}]},onSubmit:function(){c("#"+this.toJSON().hex)}});e(d)}a.settings.color_picker_callback||(a.settings.color_picker_callback=c)}),function(){}}),d("0")()}();
|
||||
7
public/storage/assets/vendors/tinymce/plugins/contextmenu/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "contextmenu" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/contextmenu')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/contextmenu'
|
||||
require('./plugin.js');
|
||||
949
public/storage/assets/vendors/tinymce/plugins/contextmenu/plugin.js
vendored
Normal file
@@ -0,0 +1,949 @@
|
||||
(function () {
|
||||
|
||||
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
||||
|
||||
// Used when there is no 'main' module.
|
||||
// The name is probably (hopefully) unique so minification removes for releases.
|
||||
var register_3795 = function (id) {
|
||||
var module = dem(id);
|
||||
var fragments = id.split('.');
|
||||
var target = Function('return this;')();
|
||||
for (var i = 0; i < fragments.length - 1; ++i) {
|
||||
if (target[fragments[i]] === undefined)
|
||||
target[fragments[i]] = {};
|
||||
target = target[fragments[i]];
|
||||
}
|
||||
target[fragments[fragments.length - 1]] = module;
|
||||
};
|
||||
|
||||
var instantiate = function (id) {
|
||||
var actual = defs[id];
|
||||
var dependencies = actual.deps;
|
||||
var definition = actual.defn;
|
||||
var len = dependencies.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(dependencies[i]);
|
||||
var defResult = definition.apply(null, instances);
|
||||
if (defResult === undefined)
|
||||
throw 'module [' + id + '] returned undefined';
|
||||
actual.instance = defResult;
|
||||
};
|
||||
|
||||
var def = function (id, dependencies, definition) {
|
||||
if (typeof id !== 'string')
|
||||
throw 'module id must be a string';
|
||||
else if (dependencies === undefined)
|
||||
throw 'no dependencies for ' + id;
|
||||
else if (definition === undefined)
|
||||
throw 'no definition function for ' + id;
|
||||
defs[id] = {
|
||||
deps: dependencies,
|
||||
defn: definition,
|
||||
instance: undefined
|
||||
};
|
||||
};
|
||||
|
||||
var dem = function (id) {
|
||||
var actual = defs[id];
|
||||
if (actual === undefined)
|
||||
throw 'module [' + id + '] was undefined';
|
||||
else if (actual.instance === undefined)
|
||||
instantiate(id);
|
||||
return actual.instance;
|
||||
};
|
||||
|
||||
var req = function (ids, callback) {
|
||||
var len = ids.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances.push(dem(ids[i]));
|
||||
callback.apply(null, callback);
|
||||
};
|
||||
|
||||
var ephox = {};
|
||||
|
||||
ephox.bolt = {
|
||||
module: {
|
||||
api: {
|
||||
define: def,
|
||||
require: req,
|
||||
demand: dem
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var define = def;
|
||||
var require = req;
|
||||
var demand = dem;
|
||||
// this helps with minificiation when using a lot of global references
|
||||
var defineGlobal = function (id, ref) {
|
||||
define(id, [], function () { return ref; });
|
||||
};
|
||||
/*jsc
|
||||
["tinymce.plugins.contextmenu.Plugin","tinymce.core.dom.DOMUtils","tinymce.core.Env","tinymce.core.PluginManager","tinymce.core.ui.Menu","tinymce.core.util.Tools","tinymce.plugins.contextmenu.RangePoint","global!tinymce.util.Tools.resolve","ephox.katamari.api.Arr","ephox.katamari.api.Option","global!Array","global!Error","global!String","ephox.katamari.api.Fun","global!Object"]
|
||||
jsc*/
|
||||
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.dom.DOMUtils',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.dom.DOMUtils');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.Env',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.Env');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.PluginManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.PluginManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.ui.Menu',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.ui.Menu');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.util.Tools',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.util.Tools');
|
||||
}
|
||||
);
|
||||
|
||||
defineGlobal("global!Array", Array);
|
||||
defineGlobal("global!Error", Error);
|
||||
define(
|
||||
'ephox.katamari.api.Fun',
|
||||
|
||||
[
|
||||
'global!Array',
|
||||
'global!Error'
|
||||
],
|
||||
|
||||
function (Array, Error) {
|
||||
|
||||
var noop = function () { };
|
||||
|
||||
var compose = function (fa, fb) {
|
||||
return function () {
|
||||
return fa(fb.apply(null, arguments));
|
||||
};
|
||||
};
|
||||
|
||||
var constant = function (value) {
|
||||
return function () {
|
||||
return value;
|
||||
};
|
||||
};
|
||||
|
||||
var identity = function (x) {
|
||||
return x;
|
||||
};
|
||||
|
||||
var tripleEquals = function(a, b) {
|
||||
return a === b;
|
||||
};
|
||||
|
||||
// Don't use array slice(arguments), makes the whole function unoptimisable on Chrome
|
||||
var curry = function (f) {
|
||||
// equivalent to arguments.slice(1)
|
||||
// starting at 1 because 0 is the f, makes things tricky.
|
||||
// Pay attention to what variable is where, and the -1 magic.
|
||||
// thankfully, we have tests for this.
|
||||
var args = new Array(arguments.length - 1);
|
||||
for (var i = 1; i < arguments.length; i++) args[i-1] = arguments[i];
|
||||
|
||||
return function () {
|
||||
var newArgs = new Array(arguments.length);
|
||||
for (var j = 0; j < newArgs.length; j++) newArgs[j] = arguments[j];
|
||||
|
||||
var all = args.concat(newArgs);
|
||||
return f.apply(null, all);
|
||||
};
|
||||
};
|
||||
|
||||
var not = function (f) {
|
||||
return function () {
|
||||
return !f.apply(null, arguments);
|
||||
};
|
||||
};
|
||||
|
||||
var die = function (msg) {
|
||||
return function () {
|
||||
throw new Error(msg);
|
||||
};
|
||||
};
|
||||
|
||||
var apply = function (f) {
|
||||
return f();
|
||||
};
|
||||
|
||||
var call = function(f) {
|
||||
f();
|
||||
};
|
||||
|
||||
var never = constant(false);
|
||||
var always = constant(true);
|
||||
|
||||
|
||||
return {
|
||||
noop: noop,
|
||||
compose: compose,
|
||||
constant: constant,
|
||||
identity: identity,
|
||||
tripleEquals: tripleEquals,
|
||||
curry: curry,
|
||||
not: not,
|
||||
die: die,
|
||||
apply: apply,
|
||||
call: call,
|
||||
never: never,
|
||||
always: always
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
defineGlobal("global!Object", Object);
|
||||
define(
|
||||
'ephox.katamari.api.Option',
|
||||
|
||||
[
|
||||
'ephox.katamari.api.Fun',
|
||||
'global!Object'
|
||||
],
|
||||
|
||||
function (Fun, Object) {
|
||||
|
||||
var never = Fun.never;
|
||||
var always = Fun.always;
|
||||
|
||||
/**
|
||||
Option objects support the following methods:
|
||||
|
||||
fold :: this Option a -> ((() -> b, a -> b)) -> Option b
|
||||
|
||||
is :: this Option a -> a -> Boolean
|
||||
|
||||
isSome :: this Option a -> () -> Boolean
|
||||
|
||||
isNone :: this Option a -> () -> Boolean
|
||||
|
||||
getOr :: this Option a -> a -> a
|
||||
|
||||
getOrThunk :: this Option a -> (() -> a) -> a
|
||||
|
||||
getOrDie :: this Option a -> String -> a
|
||||
|
||||
or :: this Option a -> Option a -> Option a
|
||||
- if some: return self
|
||||
- if none: return opt
|
||||
|
||||
orThunk :: this Option a -> (() -> Option a) -> Option a
|
||||
- Same as "or", but uses a thunk instead of a value
|
||||
|
||||
map :: this Option a -> (a -> b) -> Option b
|
||||
- "fmap" operation on the Option Functor.
|
||||
- same as 'each'
|
||||
|
||||
ap :: this Option a -> Option (a -> b) -> Option b
|
||||
- "apply" operation on the Option Apply/Applicative.
|
||||
- Equivalent to <*> in Haskell/PureScript.
|
||||
|
||||
each :: this Option a -> (a -> b) -> Option b
|
||||
- same as 'map'
|
||||
|
||||
bind :: this Option a -> (a -> Option b) -> Option b
|
||||
- "bind"/"flatMap" operation on the Option Bind/Monad.
|
||||
- Equivalent to >>= in Haskell/PureScript; flatMap in Scala.
|
||||
|
||||
flatten :: {this Option (Option a))} -> () -> Option a
|
||||
- "flatten"/"join" operation on the Option Monad.
|
||||
|
||||
exists :: this Option a -> (a -> Boolean) -> Boolean
|
||||
|
||||
forall :: this Option a -> (a -> Boolean) -> Boolean
|
||||
|
||||
filter :: this Option a -> (a -> Boolean) -> Option a
|
||||
|
||||
equals :: this Option a -> Option a -> Boolean
|
||||
|
||||
equals_ :: this Option a -> (Option a, a -> Boolean) -> Boolean
|
||||
|
||||
toArray :: this Option a -> () -> [a]
|
||||
|
||||
*/
|
||||
|
||||
var none = function () { return NONE; };
|
||||
|
||||
var NONE = (function () {
|
||||
var eq = function (o) {
|
||||
return o.isNone();
|
||||
};
|
||||
|
||||
// inlined from peanut, maybe a micro-optimisation?
|
||||
var call = function (thunk) { return thunk(); };
|
||||
var id = function (n) { return n; };
|
||||
var noop = function () { };
|
||||
|
||||
var me = {
|
||||
fold: function (n, s) { return n(); },
|
||||
is: never,
|
||||
isSome: never,
|
||||
isNone: always,
|
||||
getOr: id,
|
||||
getOrThunk: call,
|
||||
getOrDie: function (msg) {
|
||||
throw new Error(msg || 'error: getOrDie called on none.');
|
||||
},
|
||||
or: id,
|
||||
orThunk: call,
|
||||
map: none,
|
||||
ap: none,
|
||||
each: noop,
|
||||
bind: none,
|
||||
flatten: none,
|
||||
exists: never,
|
||||
forall: always,
|
||||
filter: none,
|
||||
equals: eq,
|
||||
equals_: eq,
|
||||
toArray: function () { return []; },
|
||||
toString: Fun.constant("none()")
|
||||
};
|
||||
if (Object.freeze) Object.freeze(me);
|
||||
return me;
|
||||
})();
|
||||
|
||||
|
||||
/** some :: a -> Option a */
|
||||
var some = function (a) {
|
||||
|
||||
// inlined from peanut, maybe a micro-optimisation?
|
||||
var constant_a = function () { return a; };
|
||||
|
||||
var self = function () {
|
||||
// can't Fun.constant this one
|
||||
return me;
|
||||
};
|
||||
|
||||
var map = function (f) {
|
||||
return some(f(a));
|
||||
};
|
||||
|
||||
var bind = function (f) {
|
||||
return f(a);
|
||||
};
|
||||
|
||||
var me = {
|
||||
fold: function (n, s) { return s(a); },
|
||||
is: function (v) { return a === v; },
|
||||
isSome: always,
|
||||
isNone: never,
|
||||
getOr: constant_a,
|
||||
getOrThunk: constant_a,
|
||||
getOrDie: constant_a,
|
||||
or: self,
|
||||
orThunk: self,
|
||||
map: map,
|
||||
ap: function (optfab) {
|
||||
return optfab.fold(none, function(fab) {
|
||||
return some(fab(a));
|
||||
});
|
||||
},
|
||||
each: function (f) {
|
||||
f(a);
|
||||
},
|
||||
bind: bind,
|
||||
flatten: constant_a,
|
||||
exists: bind,
|
||||
forall: bind,
|
||||
filter: function (f) {
|
||||
return f(a) ? me : NONE;
|
||||
},
|
||||
equals: function (o) {
|
||||
return o.is(a);
|
||||
},
|
||||
equals_: function (o, elementEq) {
|
||||
return o.fold(
|
||||
never,
|
||||
function (b) { return elementEq(a, b); }
|
||||
);
|
||||
},
|
||||
toArray: function () {
|
||||
return [a];
|
||||
},
|
||||
toString: function () {
|
||||
return 'some(' + a + ')';
|
||||
}
|
||||
};
|
||||
return me;
|
||||
};
|
||||
|
||||
/** from :: undefined|null|a -> Option a */
|
||||
var from = function (value) {
|
||||
return value === null || value === undefined ? NONE : some(value);
|
||||
};
|
||||
|
||||
return {
|
||||
some: some,
|
||||
none: none,
|
||||
from: from
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
defineGlobal("global!String", String);
|
||||
define(
|
||||
'ephox.katamari.api.Arr',
|
||||
|
||||
[
|
||||
'ephox.katamari.api.Option',
|
||||
'global!Array',
|
||||
'global!Error',
|
||||
'global!String'
|
||||
],
|
||||
|
||||
function (Option, Array, Error, String) {
|
||||
// Use the native Array.indexOf if it is available (IE9+) otherwise fall back to manual iteration
|
||||
// https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf
|
||||
var rawIndexOf = (function () {
|
||||
var pIndexOf = Array.prototype.indexOf;
|
||||
|
||||
var fastIndex = function (xs, x) { return pIndexOf.call(xs, x); };
|
||||
|
||||
var slowIndex = function(xs, x) { return slowIndexOf(xs, x); };
|
||||
|
||||
return pIndexOf === undefined ? slowIndex : fastIndex;
|
||||
})();
|
||||
|
||||
var indexOf = function (xs, x) {
|
||||
// The rawIndexOf method does not wrap up in an option. This is for performance reasons.
|
||||
var r = rawIndexOf(xs, x);
|
||||
return r === -1 ? Option.none() : Option.some(r);
|
||||
};
|
||||
|
||||
var contains = function (xs, x) {
|
||||
return rawIndexOf(xs, x) > -1;
|
||||
};
|
||||
|
||||
// Using findIndex is likely less optimal in Chrome (dynamic return type instead of bool)
|
||||
// but if we need that micro-optimisation we can inline it later.
|
||||
var exists = function (xs, pred) {
|
||||
return findIndex(xs, pred).isSome();
|
||||
};
|
||||
|
||||
var range = function (num, f) {
|
||||
var r = [];
|
||||
for (var i = 0; i < num; i++) {
|
||||
r.push(f(i));
|
||||
}
|
||||
return r;
|
||||
};
|
||||
|
||||
// It's a total micro optimisation, but these do make some difference.
|
||||
// Particularly for browsers other than Chrome.
|
||||
// - length caching
|
||||
// http://jsperf.com/browser-diet-jquery-each-vs-for-loop/69
|
||||
// - not using push
|
||||
// http://jsperf.com/array-direct-assignment-vs-push/2
|
||||
|
||||
var chunk = function (array, size) {
|
||||
var r = [];
|
||||
for (var i = 0; i < array.length; i += size) {
|
||||
var s = array.slice(i, i + size);
|
||||
r.push(s);
|
||||
}
|
||||
return r;
|
||||
};
|
||||
|
||||
var map = function(xs, f) {
|
||||
// pre-allocating array size when it's guaranteed to be known
|
||||
// http://jsperf.com/push-allocated-vs-dynamic/22
|
||||
var len = xs.length;
|
||||
var r = new Array(len);
|
||||
for (var i = 0; i < len; i++) {
|
||||
var x = xs[i];
|
||||
r[i] = f(x, i, xs);
|
||||
}
|
||||
return r;
|
||||
};
|
||||
|
||||
// Unwound implementing other functions in terms of each.
|
||||
// The code size is roughly the same, and it should allow for better optimisation.
|
||||
var each = function(xs, f) {
|
||||
for (var i = 0, len = xs.length; i < len; i++) {
|
||||
var x = xs[i];
|
||||
f(x, i, xs);
|
||||
}
|
||||
};
|
||||
|
||||
var eachr = function (xs, f) {
|
||||
for (var i = xs.length - 1; i >= 0; i--) {
|
||||
var x = xs[i];
|
||||
f(x, i, xs);
|
||||
}
|
||||
};
|
||||
|
||||
var partition = function(xs, pred) {
|
||||
var pass = [];
|
||||
var fail = [];
|
||||
for (var i = 0, len = xs.length; i < len; i++) {
|
||||
var x = xs[i];
|
||||
var arr = pred(x, i, xs) ? pass : fail;
|
||||
arr.push(x);
|
||||
}
|
||||
return { pass: pass, fail: fail };
|
||||
};
|
||||
|
||||
var filter = function(xs, pred) {
|
||||
var r = [];
|
||||
for (var i = 0, len = xs.length; i < len; i++) {
|
||||
var x = xs[i];
|
||||
if (pred(x, i, xs)) {
|
||||
r.push(x);
|
||||
}
|
||||
}
|
||||
return r;
|
||||
};
|
||||
|
||||
/*
|
||||
* Groups an array into contiguous arrays of like elements. Whether an element is like or not depends on f.
|
||||
*
|
||||
* f is a function that derives a value from an element - e.g. true or false, or a string.
|
||||
* Elements are like if this function generates the same value for them (according to ===).
|
||||
*
|
||||
*
|
||||
* Order of the elements is preserved. Arr.flatten() on the result will return the original list, as with Haskell groupBy function.
|
||||
* For a good explanation, see the group function (which is a special case of groupBy)
|
||||
* http://hackage.haskell.org/package/base-4.7.0.0/docs/Data-List.html#v:group
|
||||
*/
|
||||
var groupBy = function (xs, f) {
|
||||
if (xs.length === 0) {
|
||||
return [];
|
||||
} else {
|
||||
var wasType = f(xs[0]); // initial case for matching
|
||||
var r = [];
|
||||
var group = [];
|
||||
|
||||
for (var i = 0, len = xs.length; i < len; i++) {
|
||||
var x = xs[i];
|
||||
var type = f(x);
|
||||
if (type !== wasType) {
|
||||
r.push(group);
|
||||
group = [];
|
||||
}
|
||||
wasType = type;
|
||||
group.push(x);
|
||||
}
|
||||
if (group.length !== 0) {
|
||||
r.push(group);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
};
|
||||
|
||||
var foldr = function (xs, f, acc) {
|
||||
eachr(xs, function (x) {
|
||||
acc = f(acc, x);
|
||||
});
|
||||
return acc;
|
||||
};
|
||||
|
||||
var foldl = function (xs, f, acc) {
|
||||
each(xs, function (x) {
|
||||
acc = f(acc, x);
|
||||
});
|
||||
return acc;
|
||||
};
|
||||
|
||||
var find = function (xs, pred) {
|
||||
for (var i = 0, len = xs.length; i < len; i++) {
|
||||
var x = xs[i];
|
||||
if (pred(x, i, xs)) {
|
||||
return Option.some(x);
|
||||
}
|
||||
}
|
||||
return Option.none();
|
||||
};
|
||||
|
||||
var findIndex = function (xs, pred) {
|
||||
for (var i = 0, len = xs.length; i < len; i++) {
|
||||
var x = xs[i];
|
||||
if (pred(x, i, xs)) {
|
||||
return Option.some(i);
|
||||
}
|
||||
}
|
||||
|
||||
return Option.none();
|
||||
};
|
||||
|
||||
var slowIndexOf = function (xs, x) {
|
||||
for (var i = 0, len = xs.length; i < len; ++i) {
|
||||
if (xs[i] === x) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
};
|
||||
|
||||
var push = Array.prototype.push;
|
||||
var flatten = function (xs) {
|
||||
// Note, this is possible because push supports multiple arguments:
|
||||
// http://jsperf.com/concat-push/6
|
||||
// Note that in the past, concat() would silently work (very slowly) for array-like objects.
|
||||
// With this change it will throw an error.
|
||||
var r = [];
|
||||
for (var i = 0, len = xs.length; i < len; ++i) {
|
||||
// Ensure that each value is an array itself
|
||||
if (! Array.prototype.isPrototypeOf(xs[i])) throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
|
||||
push.apply(r, xs[i]);
|
||||
}
|
||||
return r;
|
||||
};
|
||||
|
||||
var bind = function (xs, f) {
|
||||
var output = map(xs, f);
|
||||
return flatten(output);
|
||||
};
|
||||
|
||||
var forall = function (xs, pred) {
|
||||
for (var i = 0, len = xs.length; i < len; ++i) {
|
||||
var x = xs[i];
|
||||
if (pred(x, i, xs) !== true) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var equal = function (a1, a2) {
|
||||
return a1.length === a2.length && forall(a1, function (x, i) {
|
||||
return x === a2[i];
|
||||
});
|
||||
};
|
||||
|
||||
var slice = Array.prototype.slice;
|
||||
var reverse = function (xs) {
|
||||
var r = slice.call(xs, 0);
|
||||
r.reverse();
|
||||
return r;
|
||||
};
|
||||
|
||||
var difference = function (a1, a2) {
|
||||
return filter(a1, function (x) {
|
||||
return !contains(a2, x);
|
||||
});
|
||||
};
|
||||
|
||||
var mapToObject = function(xs, f) {
|
||||
var r = {};
|
||||
for (var i = 0, len = xs.length; i < len; i++) {
|
||||
var x = xs[i];
|
||||
r[String(x)] = f(x, i);
|
||||
}
|
||||
return r;
|
||||
};
|
||||
|
||||
var pure = function(x) {
|
||||
return [x];
|
||||
};
|
||||
|
||||
var sort = function (xs, comparator) {
|
||||
var copy = slice.call(xs, 0);
|
||||
copy.sort(comparator);
|
||||
return copy;
|
||||
};
|
||||
|
||||
return {
|
||||
map: map,
|
||||
each: each,
|
||||
eachr: eachr,
|
||||
partition: partition,
|
||||
filter: filter,
|
||||
groupBy: groupBy,
|
||||
indexOf: indexOf,
|
||||
foldr: foldr,
|
||||
foldl: foldl,
|
||||
find: find,
|
||||
findIndex: findIndex,
|
||||
flatten: flatten,
|
||||
bind: bind,
|
||||
forall: forall,
|
||||
exists: exists,
|
||||
contains: contains,
|
||||
equal: equal,
|
||||
reverse: reverse,
|
||||
chunk: chunk,
|
||||
difference: difference,
|
||||
mapToObject: mapToObject,
|
||||
pure: pure,
|
||||
sort: sort,
|
||||
range: range
|
||||
};
|
||||
}
|
||||
);
|
||||
/**
|
||||
* RangePoint.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.plugins.contextmenu.RangePoint',
|
||||
[
|
||||
'ephox.katamari.api.Arr'
|
||||
],
|
||||
function (Arr) {
|
||||
var containsXY = function (clientRect, clientX, clientY) {
|
||||
return (
|
||||
clientX >= clientRect.left &&
|
||||
clientX <= clientRect.right &&
|
||||
clientY >= clientRect.top &&
|
||||
clientY <= clientRect.bottom
|
||||
);
|
||||
};
|
||||
|
||||
var isXYWithinRange = function (clientX, clientY, range) {
|
||||
if (range.collapsed) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return Arr.foldl(range.getClientRects(), function (state, rect) {
|
||||
return state || containsXY(rect, clientX, clientY);
|
||||
}, false);
|
||||
};
|
||||
|
||||
return {
|
||||
isXYWithinRange: isXYWithinRange
|
||||
};
|
||||
}
|
||||
);
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class contains all core logic for the contextmenu plugin.
|
||||
*
|
||||
* @class tinymce.contextmenu.Plugin
|
||||
* @private
|
||||
*/
|
||||
define(
|
||||
'tinymce.plugins.contextmenu.Plugin',
|
||||
[
|
||||
'tinymce.core.dom.DOMUtils',
|
||||
'tinymce.core.Env',
|
||||
'tinymce.core.PluginManager',
|
||||
'tinymce.core.ui.Menu',
|
||||
'tinymce.core.util.Tools',
|
||||
'tinymce.plugins.contextmenu.RangePoint'
|
||||
],
|
||||
function (DOMUtils, Env, PluginManager, Menu, Tools, RangePoint) {
|
||||
var DOM = DOMUtils.DOM;
|
||||
|
||||
PluginManager.add('contextmenu', function (editor) {
|
||||
var menu, visibleState, contextmenuNeverUseNative = editor.settings.contextmenu_never_use_native;
|
||||
|
||||
var isNativeOverrideKeyEvent = function (e) {
|
||||
return e.ctrlKey && !contextmenuNeverUseNative;
|
||||
};
|
||||
|
||||
var isMacWebKit = function () {
|
||||
return Env.mac && Env.webkit;
|
||||
};
|
||||
|
||||
var isContextMenuVisible = function () {
|
||||
return visibleState === true;
|
||||
};
|
||||
|
||||
var isImage = function (elm) {
|
||||
return elm && elm.nodeName === 'IMG';
|
||||
};
|
||||
|
||||
var isEventOnImageOutsideRange = function (evt, range) {
|
||||
return isImage(evt.target) && RangePoint.isXYWithinRange(evt.clientX, evt.clientY, range) === false;
|
||||
};
|
||||
|
||||
/**
|
||||
* This takes care of a os x native issue where it expands the selection
|
||||
* to the word at the caret position to do "lookups". Since we are overriding
|
||||
* the context menu we also need to override this expanding so the behavior becomes
|
||||
* normalized. Firefox on os x doesn't expand to the word when using the context menu.
|
||||
*/
|
||||
editor.on('mousedown', function (e) {
|
||||
if (isMacWebKit() && e.button === 2 && !isNativeOverrideKeyEvent(e) && editor.selection.isCollapsed()) {
|
||||
editor.once('contextmenu', function (e2) {
|
||||
if (!isImage(e2.target)) {
|
||||
editor.selection.placeCaretAt(e2.clientX, e2.clientY);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
editor.on('contextmenu', function (e) {
|
||||
var contextmenu;
|
||||
|
||||
if (isNativeOverrideKeyEvent(e)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isEventOnImageOutsideRange(e, editor.selection.getRng())) {
|
||||
editor.selection.select(e.target);
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
contextmenu = editor.settings.contextmenu || 'link openlink image inserttable | cell row column deletetable';
|
||||
|
||||
// Render menu
|
||||
if (!menu) {
|
||||
var items = [];
|
||||
|
||||
Tools.each(contextmenu.split(/[ ,]/), function (name) {
|
||||
var item = editor.menuItems[name];
|
||||
|
||||
if (name == '|') {
|
||||
item = { text: name };
|
||||
}
|
||||
|
||||
if (item) {
|
||||
item.shortcut = ''; // Hide shortcuts
|
||||
items.push(item);
|
||||
}
|
||||
});
|
||||
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
if (items[i].text == '|') {
|
||||
if (i === 0 || i == items.length - 1) {
|
||||
items.splice(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
menu = new Menu({
|
||||
items: items,
|
||||
context: 'contextmenu',
|
||||
classes: 'contextmenu'
|
||||
}).renderTo();
|
||||
|
||||
menu.on('hide', function (e) {
|
||||
if (e.control === this) {
|
||||
visibleState = false;
|
||||
}
|
||||
});
|
||||
|
||||
editor.on('remove', function () {
|
||||
menu.remove();
|
||||
menu = null;
|
||||
});
|
||||
|
||||
} else {
|
||||
menu.show();
|
||||
}
|
||||
|
||||
// Position menu
|
||||
var pos = { x: e.pageX, y: e.pageY };
|
||||
|
||||
if (!editor.inline) {
|
||||
pos = DOM.getPos(editor.getContentAreaContainer());
|
||||
pos.x += e.clientX;
|
||||
pos.y += e.clientY;
|
||||
}
|
||||
|
||||
menu.moveTo(pos.x, pos.y);
|
||||
visibleState = true;
|
||||
});
|
||||
|
||||
return {
|
||||
isContextMenuVisible: isContextMenuVisible
|
||||
};
|
||||
});
|
||||
return function () { };
|
||||
}
|
||||
);
|
||||
dem('tinymce.plugins.contextmenu.Plugin')();
|
||||
})();
|
||||
1
public/storage/assets/vendors/tinymce/plugins/contextmenu/plugin.min.js
vendored
Normal file
7
public/storage/assets/vendors/tinymce/plugins/directionality/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "directionality" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/directionality')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/directionality'
|
||||
require('./plugin.js');
|
||||
207
public/storage/assets/vendors/tinymce/plugins/directionality/plugin.js
vendored
Normal file
@@ -0,0 +1,207 @@
|
||||
(function () {
|
||||
|
||||
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
||||
|
||||
// Used when there is no 'main' module.
|
||||
// The name is probably (hopefully) unique so minification removes for releases.
|
||||
var register_3795 = function (id) {
|
||||
var module = dem(id);
|
||||
var fragments = id.split('.');
|
||||
var target = Function('return this;')();
|
||||
for (var i = 0; i < fragments.length - 1; ++i) {
|
||||
if (target[fragments[i]] === undefined)
|
||||
target[fragments[i]] = {};
|
||||
target = target[fragments[i]];
|
||||
}
|
||||
target[fragments[fragments.length - 1]] = module;
|
||||
};
|
||||
|
||||
var instantiate = function (id) {
|
||||
var actual = defs[id];
|
||||
var dependencies = actual.deps;
|
||||
var definition = actual.defn;
|
||||
var len = dependencies.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(dependencies[i]);
|
||||
var defResult = definition.apply(null, instances);
|
||||
if (defResult === undefined)
|
||||
throw 'module [' + id + '] returned undefined';
|
||||
actual.instance = defResult;
|
||||
};
|
||||
|
||||
var def = function (id, dependencies, definition) {
|
||||
if (typeof id !== 'string')
|
||||
throw 'module id must be a string';
|
||||
else if (dependencies === undefined)
|
||||
throw 'no dependencies for ' + id;
|
||||
else if (definition === undefined)
|
||||
throw 'no definition function for ' + id;
|
||||
defs[id] = {
|
||||
deps: dependencies,
|
||||
defn: definition,
|
||||
instance: undefined
|
||||
};
|
||||
};
|
||||
|
||||
var dem = function (id) {
|
||||
var actual = defs[id];
|
||||
if (actual === undefined)
|
||||
throw 'module [' + id + '] was undefined';
|
||||
else if (actual.instance === undefined)
|
||||
instantiate(id);
|
||||
return actual.instance;
|
||||
};
|
||||
|
||||
var req = function (ids, callback) {
|
||||
var len = ids.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances.push(dem(ids[i]));
|
||||
callback.apply(null, callback);
|
||||
};
|
||||
|
||||
var ephox = {};
|
||||
|
||||
ephox.bolt = {
|
||||
module: {
|
||||
api: {
|
||||
define: def,
|
||||
require: req,
|
||||
demand: dem
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var define = def;
|
||||
var require = req;
|
||||
var demand = dem;
|
||||
// this helps with minificiation when using a lot of global references
|
||||
var defineGlobal = function (id, ref) {
|
||||
define(id, [], function () { return ref; });
|
||||
};
|
||||
/*jsc
|
||||
["tinymce.plugins.directionality.Plugin","tinymce.core.PluginManager","tinymce.core.util.Tools","global!tinymce.util.Tools.resolve"]
|
||||
jsc*/
|
||||
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.PluginManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.PluginManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.util.Tools',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.util.Tools');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class contains all core logic for the directionality plugin.
|
||||
*
|
||||
* @class tinymce.directionality.Plugin
|
||||
* @private
|
||||
*/
|
||||
define(
|
||||
'tinymce.plugins.directionality.Plugin',
|
||||
[
|
||||
'tinymce.core.PluginManager',
|
||||
'tinymce.core.util.Tools'
|
||||
],
|
||||
function (PluginManager, Tools) {
|
||||
PluginManager.add('directionality', function (editor) {
|
||||
function setDir(dir) {
|
||||
var dom = editor.dom, curDir, blocks = editor.selection.getSelectedBlocks();
|
||||
|
||||
if (blocks.length) {
|
||||
curDir = dom.getAttrib(blocks[0], "dir");
|
||||
|
||||
Tools.each(blocks, function (block) {
|
||||
// Add dir to block if the parent block doesn't already have that dir
|
||||
if (!dom.getParent(block.parentNode, "*[dir='" + dir + "']", dom.getRoot())) {
|
||||
if (curDir != dir) {
|
||||
dom.setAttrib(block, "dir", dir);
|
||||
} else {
|
||||
dom.setAttrib(block, "dir", null);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
editor.nodeChanged();
|
||||
}
|
||||
}
|
||||
|
||||
function generateSelector(dir) {
|
||||
var selector = [];
|
||||
|
||||
Tools.each('h1 h2 h3 h4 h5 h6 div p'.split(' '), function (name) {
|
||||
selector.push(name + '[dir=' + dir + ']');
|
||||
});
|
||||
|
||||
return selector.join(',');
|
||||
}
|
||||
|
||||
editor.addCommand('mceDirectionLTR', function () {
|
||||
setDir("ltr");
|
||||
});
|
||||
|
||||
editor.addCommand('mceDirectionRTL', function () {
|
||||
setDir("rtl");
|
||||
});
|
||||
|
||||
editor.addButton('ltr', {
|
||||
title: 'Left to right',
|
||||
cmd: 'mceDirectionLTR',
|
||||
stateSelector: generateSelector('ltr')
|
||||
});
|
||||
|
||||
editor.addButton('rtl', {
|
||||
title: 'Right to left',
|
||||
cmd: 'mceDirectionRTL',
|
||||
stateSelector: generateSelector('rtl')
|
||||
});
|
||||
});
|
||||
|
||||
return function () { };
|
||||
}
|
||||
);
|
||||
dem('tinymce.plugins.directionality.Plugin')();
|
||||
})();
|
||||
1
public/storage/assets/vendors/tinymce/plugins/directionality/plugin.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.PluginManager")}),g("2",["3"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2"],function(a,b){return a.add("directionality",function(a){function c(c){var d,e=a.dom,f=a.selection.getSelectedBlocks();f.length&&(d=e.getAttrib(f[0],"dir"),b.each(f,function(a){e.getParent(a.parentNode,"*[dir='"+c+"']",e.getRoot())||(d!=c?e.setAttrib(a,"dir",c):e.setAttrib(a,"dir",null))}),a.nodeChanged())}function d(a){var c=[];return b.each("h1 h2 h3 h4 h5 h6 div p".split(" "),function(b){c.push(b+"[dir="+a+"]")}),c.join(",")}a.addCommand("mceDirectionLTR",function(){c("ltr")}),a.addCommand("mceDirectionRTL",function(){c("rtl")}),a.addButton("ltr",{title:"Left to right",cmd:"mceDirectionLTR",stateSelector:d("ltr")}),a.addButton("rtl",{title:"Right to left",cmd:"mceDirectionRTL",stateSelector:d("rtl")})}),function(){}}),d("0")()}();
|
||||
BIN
public/storage/assets/vendors/tinymce/plugins/emoticons/img/smiley-cool.gif
vendored
Normal file
|
After Width: | Height: | Size: 354 B |
BIN
public/storage/assets/vendors/tinymce/plugins/emoticons/img/smiley-cry.gif
vendored
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
public/storage/assets/vendors/tinymce/plugins/emoticons/img/smiley-embarassed.gif
vendored
Normal file
|
After Width: | Height: | Size: 331 B |
BIN
public/storage/assets/vendors/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif
vendored
Normal file
|
After Width: | Height: | Size: 342 B |
BIN
public/storage/assets/vendors/tinymce/plugins/emoticons/img/smiley-frown.gif
vendored
Normal file
|
After Width: | Height: | Size: 340 B |
BIN
public/storage/assets/vendors/tinymce/plugins/emoticons/img/smiley-innocent.gif
vendored
Normal file
|
After Width: | Height: | Size: 336 B |
BIN
public/storage/assets/vendors/tinymce/plugins/emoticons/img/smiley-kiss.gif
vendored
Normal file
|
After Width: | Height: | Size: 338 B |
BIN
public/storage/assets/vendors/tinymce/plugins/emoticons/img/smiley-laughing.gif
vendored
Normal file
|
After Width: | Height: | Size: 343 B |
BIN
public/storage/assets/vendors/tinymce/plugins/emoticons/img/smiley-money-mouth.gif
vendored
Normal file
|
After Width: | Height: | Size: 321 B |
BIN
public/storage/assets/vendors/tinymce/plugins/emoticons/img/smiley-sealed.gif
vendored
Normal file
|
After Width: | Height: | Size: 323 B |
BIN
public/storage/assets/vendors/tinymce/plugins/emoticons/img/smiley-smile.gif
vendored
Normal file
|
After Width: | Height: | Size: 344 B |
BIN
public/storage/assets/vendors/tinymce/plugins/emoticons/img/smiley-surprised.gif
vendored
Normal file
|
After Width: | Height: | Size: 338 B |
BIN
public/storage/assets/vendors/tinymce/plugins/emoticons/img/smiley-tongue-out.gif
vendored
Normal file
|
After Width: | Height: | Size: 328 B |
BIN
public/storage/assets/vendors/tinymce/plugins/emoticons/img/smiley-undecided.gif
vendored
Normal file
|
After Width: | Height: | Size: 337 B |
BIN
public/storage/assets/vendors/tinymce/plugins/emoticons/img/smiley-wink.gif
vendored
Normal file
|
After Width: | Height: | Size: 350 B |
BIN
public/storage/assets/vendors/tinymce/plugins/emoticons/img/smiley-yell.gif
vendored
Normal file
|
After Width: | Height: | Size: 336 B |
7
public/storage/assets/vendors/tinymce/plugins/emoticons/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "emoticons" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/emoticons')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/emoticons'
|
||||
require('./plugin.js');
|
||||
211
public/storage/assets/vendors/tinymce/plugins/emoticons/plugin.js
vendored
Normal file
@@ -0,0 +1,211 @@
|
||||
(function () {
|
||||
|
||||
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
||||
|
||||
// Used when there is no 'main' module.
|
||||
// The name is probably (hopefully) unique so minification removes for releases.
|
||||
var register_3795 = function (id) {
|
||||
var module = dem(id);
|
||||
var fragments = id.split('.');
|
||||
var target = Function('return this;')();
|
||||
for (var i = 0; i < fragments.length - 1; ++i) {
|
||||
if (target[fragments[i]] === undefined)
|
||||
target[fragments[i]] = {};
|
||||
target = target[fragments[i]];
|
||||
}
|
||||
target[fragments[fragments.length - 1]] = module;
|
||||
};
|
||||
|
||||
var instantiate = function (id) {
|
||||
var actual = defs[id];
|
||||
var dependencies = actual.deps;
|
||||
var definition = actual.defn;
|
||||
var len = dependencies.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(dependencies[i]);
|
||||
var defResult = definition.apply(null, instances);
|
||||
if (defResult === undefined)
|
||||
throw 'module [' + id + '] returned undefined';
|
||||
actual.instance = defResult;
|
||||
};
|
||||
|
||||
var def = function (id, dependencies, definition) {
|
||||
if (typeof id !== 'string')
|
||||
throw 'module id must be a string';
|
||||
else if (dependencies === undefined)
|
||||
throw 'no dependencies for ' + id;
|
||||
else if (definition === undefined)
|
||||
throw 'no definition function for ' + id;
|
||||
defs[id] = {
|
||||
deps: dependencies,
|
||||
defn: definition,
|
||||
instance: undefined
|
||||
};
|
||||
};
|
||||
|
||||
var dem = function (id) {
|
||||
var actual = defs[id];
|
||||
if (actual === undefined)
|
||||
throw 'module [' + id + '] was undefined';
|
||||
else if (actual.instance === undefined)
|
||||
instantiate(id);
|
||||
return actual.instance;
|
||||
};
|
||||
|
||||
var req = function (ids, callback) {
|
||||
var len = ids.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances.push(dem(ids[i]));
|
||||
callback.apply(null, callback);
|
||||
};
|
||||
|
||||
var ephox = {};
|
||||
|
||||
ephox.bolt = {
|
||||
module: {
|
||||
api: {
|
||||
define: def,
|
||||
require: req,
|
||||
demand: dem
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var define = def;
|
||||
var require = req;
|
||||
var demand = dem;
|
||||
// this helps with minificiation when using a lot of global references
|
||||
var defineGlobal = function (id, ref) {
|
||||
define(id, [], function () { return ref; });
|
||||
};
|
||||
/*jsc
|
||||
["tinymce.plugins.emoticons.Plugin","tinymce.core.PluginManager","tinymce.core.util.Tools","global!tinymce.util.Tools.resolve"]
|
||||
jsc*/
|
||||
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.PluginManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.PluginManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.util.Tools',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.util.Tools');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class contains all core logic for the emoticons plugin.
|
||||
*
|
||||
* @class tinymce.emoticons.Plugin
|
||||
* @private
|
||||
*/
|
||||
define(
|
||||
'tinymce.plugins.emoticons.Plugin',
|
||||
[
|
||||
'tinymce.core.PluginManager',
|
||||
'tinymce.core.util.Tools'
|
||||
],
|
||||
function (PluginManager, Tools) {
|
||||
PluginManager.add('emoticons', function (editor, url) {
|
||||
var emoticons = [
|
||||
["cool", "cry", "embarassed", "foot-in-mouth"],
|
||||
["frown", "innocent", "kiss", "laughing"],
|
||||
["money-mouth", "sealed", "smile", "surprised"],
|
||||
["tongue-out", "undecided", "wink", "yell"]
|
||||
];
|
||||
|
||||
function getHtml() {
|
||||
var emoticonsHtml;
|
||||
|
||||
emoticonsHtml = '<table role="list" class="mce-grid">';
|
||||
|
||||
Tools.each(emoticons, function (row) {
|
||||
emoticonsHtml += '<tr>';
|
||||
|
||||
Tools.each(row, function (icon) {
|
||||
var emoticonUrl = url + '/img/smiley-' + icon + '.gif';
|
||||
|
||||
emoticonsHtml += '<td><a href="#" data-mce-url="' + emoticonUrl + '" data-mce-alt="' + icon + '" tabindex="-1" ' +
|
||||
'role="option" aria-label="' + icon + '"><img src="' +
|
||||
emoticonUrl + '" style="width: 18px; height: 18px" role="presentation" /></a></td>';
|
||||
});
|
||||
|
||||
emoticonsHtml += '</tr>';
|
||||
});
|
||||
|
||||
emoticonsHtml += '</table>';
|
||||
|
||||
return emoticonsHtml;
|
||||
}
|
||||
|
||||
editor.addButton('emoticons', {
|
||||
type: 'panelbutton',
|
||||
panel: {
|
||||
role: 'application',
|
||||
autohide: true,
|
||||
html: getHtml,
|
||||
onclick: function (e) {
|
||||
var linkElm = editor.dom.getParent(e.target, 'a');
|
||||
|
||||
if (linkElm) {
|
||||
editor.insertContent(
|
||||
'<img src="' +
|
||||
linkElm.getAttribute('data-mce-url') +
|
||||
'" alt="' + linkElm.getAttribute('data-mce-alt') +
|
||||
'" />'
|
||||
);
|
||||
|
||||
this.hide();
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: 'Emoticons'
|
||||
});
|
||||
});
|
||||
|
||||
return function () { };
|
||||
}
|
||||
);
|
||||
dem('tinymce.plugins.emoticons.Plugin')();
|
||||
})();
|
||||
1
public/storage/assets/vendors/tinymce/plugins/emoticons/plugin.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.PluginManager")}),g("2",["3"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2"],function(a,b){return a.add("emoticons",function(a,c){function d(){var a;return a='<table role="list" class="mce-grid">',b.each(e,function(d){a+="<tr>",b.each(d,function(b){var d=c+"/img/smiley-"+b+".gif";a+='<td><a href="#" data-mce-url="'+d+'" data-mce-alt="'+b+'" tabindex="-1" role="option" aria-label="'+b+'"><img src="'+d+'" style="width: 18px; height: 18px" role="presentation" /></a></td>'}),a+="</tr>"}),a+="</table>"}var e=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];a.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:d,onclick:function(b){var c=a.dom.getParent(b.target,"a");c&&(a.insertContent('<img src="'+c.getAttribute("data-mce-url")+'" alt="'+c.getAttribute("data-mce-alt")+'" />'),this.hide())}},tooltip:"Emoticons"})}),function(){}}),d("0")()}();
|
||||
7
public/storage/assets/vendors/tinymce/plugins/fullpage/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "fullpage" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/fullpage')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/fullpage'
|
||||
require('./plugin.js');
|
||||
730
public/storage/assets/vendors/tinymce/plugins/fullpage/plugin.js
vendored
Normal file
@@ -0,0 +1,730 @@
|
||||
(function () {
|
||||
|
||||
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
||||
|
||||
// Used when there is no 'main' module.
|
||||
// The name is probably (hopefully) unique so minification removes for releases.
|
||||
var register_3795 = function (id) {
|
||||
var module = dem(id);
|
||||
var fragments = id.split('.');
|
||||
var target = Function('return this;')();
|
||||
for (var i = 0; i < fragments.length - 1; ++i) {
|
||||
if (target[fragments[i]] === undefined)
|
||||
target[fragments[i]] = {};
|
||||
target = target[fragments[i]];
|
||||
}
|
||||
target[fragments[fragments.length - 1]] = module;
|
||||
};
|
||||
|
||||
var instantiate = function (id) {
|
||||
var actual = defs[id];
|
||||
var dependencies = actual.deps;
|
||||
var definition = actual.defn;
|
||||
var len = dependencies.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(dependencies[i]);
|
||||
var defResult = definition.apply(null, instances);
|
||||
if (defResult === undefined)
|
||||
throw 'module [' + id + '] returned undefined';
|
||||
actual.instance = defResult;
|
||||
};
|
||||
|
||||
var def = function (id, dependencies, definition) {
|
||||
if (typeof id !== 'string')
|
||||
throw 'module id must be a string';
|
||||
else if (dependencies === undefined)
|
||||
throw 'no dependencies for ' + id;
|
||||
else if (definition === undefined)
|
||||
throw 'no definition function for ' + id;
|
||||
defs[id] = {
|
||||
deps: dependencies,
|
||||
defn: definition,
|
||||
instance: undefined
|
||||
};
|
||||
};
|
||||
|
||||
var dem = function (id) {
|
||||
var actual = defs[id];
|
||||
if (actual === undefined)
|
||||
throw 'module [' + id + '] was undefined';
|
||||
else if (actual.instance === undefined)
|
||||
instantiate(id);
|
||||
return actual.instance;
|
||||
};
|
||||
|
||||
var req = function (ids, callback) {
|
||||
var len = ids.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances.push(dem(ids[i]));
|
||||
callback.apply(null, callback);
|
||||
};
|
||||
|
||||
var ephox = {};
|
||||
|
||||
ephox.bolt = {
|
||||
module: {
|
||||
api: {
|
||||
define: def,
|
||||
require: req,
|
||||
demand: dem
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var define = def;
|
||||
var require = req;
|
||||
var demand = dem;
|
||||
// this helps with minificiation when using a lot of global references
|
||||
var defineGlobal = function (id, ref) {
|
||||
define(id, [], function () { return ref; });
|
||||
};
|
||||
/*jsc
|
||||
["tinymce.plugins.fullpage.Plugin","tinymce.core.html.DomParser","tinymce.core.html.Node","tinymce.core.html.Serializer","tinymce.core.PluginManager","tinymce.core.util.Tools","tinymce.plugins.fullpage.Protect","global!tinymce.util.Tools.resolve"]
|
||||
jsc*/
|
||||
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.html.DomParser',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.html.DomParser');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.html.Node',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.html.Node');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.html.Serializer',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.html.Serializer');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.PluginManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.PluginManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.util.Tools',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.util.Tools');
|
||||
}
|
||||
);
|
||||
|
||||
define(
|
||||
'tinymce.plugins.fullpage.Protect',
|
||||
[
|
||||
'tinymce.core.util.Tools'
|
||||
],
|
||||
function (Tools) {
|
||||
var protectHtml = function (protect, html) {
|
||||
Tools.each(protect, function (pattern) {
|
||||
html = html.replace(pattern, function (str) {
|
||||
return '<!--mce:protected ' + escape(str) + '-->';
|
||||
});
|
||||
});
|
||||
|
||||
return html;
|
||||
};
|
||||
|
||||
var unprotectHtml = function (html) {
|
||||
return html.replace(/<!--mce:protected ([\s\S]*?)-->/g, function (a, m) {
|
||||
return unescape(m);
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
protectHtml: protectHtml,
|
||||
unprotectHtml: unprotectHtml
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class contains all core logic for the fullpage plugin.
|
||||
*
|
||||
* @class tinymce.fullpage.Plugin
|
||||
* @private
|
||||
*/
|
||||
define(
|
||||
'tinymce.plugins.fullpage.Plugin',
|
||||
[
|
||||
'tinymce.core.html.DomParser',
|
||||
'tinymce.core.html.Node',
|
||||
'tinymce.core.html.Serializer',
|
||||
'tinymce.core.PluginManager',
|
||||
'tinymce.core.util.Tools',
|
||||
'tinymce.plugins.fullpage.Protect'
|
||||
],
|
||||
function (DomParser, Node, Serializer, PluginManager, Tools, Protect) {
|
||||
PluginManager.add('fullpage', function (editor) {
|
||||
var each = Tools.each;
|
||||
var head, foot;
|
||||
|
||||
function showDialog() {
|
||||
var data = htmlToData();
|
||||
|
||||
editor.windowManager.open({
|
||||
title: 'Document properties',
|
||||
data: data,
|
||||
defaults: { type: 'textbox', size: 40 },
|
||||
body: [
|
||||
{ name: 'title', label: 'Title' },
|
||||
{ name: 'keywords', label: 'Keywords' },
|
||||
{ name: 'description', label: 'Description' },
|
||||
{ name: 'robots', label: 'Robots' },
|
||||
{ name: 'author', label: 'Author' },
|
||||
{ name: 'docencoding', label: 'Encoding' }
|
||||
],
|
||||
onSubmit: function (e) {
|
||||
dataToHtml(Tools.extend(data, e.data));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function htmlToData() {
|
||||
var headerFragment = parseHeader(), data = {}, elm, matches;
|
||||
|
||||
function getAttr(elm, name) {
|
||||
var value = elm.attr(name);
|
||||
|
||||
return value || '';
|
||||
}
|
||||
|
||||
// Default some values
|
||||
data.fontface = editor.getParam("fullpage_default_fontface", "");
|
||||
data.fontsize = editor.getParam("fullpage_default_fontsize", "");
|
||||
|
||||
// Parse XML PI
|
||||
elm = headerFragment.firstChild;
|
||||
if (elm.type == 7) {
|
||||
data.xml_pi = true;
|
||||
matches = /encoding="([^"]+)"/.exec(elm.value);
|
||||
if (matches) {
|
||||
data.docencoding = matches[1];
|
||||
}
|
||||
}
|
||||
|
||||
// Parse doctype
|
||||
elm = headerFragment.getAll('#doctype')[0];
|
||||
if (elm) {
|
||||
data.doctype = '<!DOCTYPE' + elm.value + ">";
|
||||
}
|
||||
|
||||
// Parse title element
|
||||
elm = headerFragment.getAll('title')[0];
|
||||
if (elm && elm.firstChild) {
|
||||
data.title = elm.firstChild.value;
|
||||
}
|
||||
|
||||
// Parse meta elements
|
||||
each(headerFragment.getAll('meta'), function (meta) {
|
||||
var name = meta.attr('name'), httpEquiv = meta.attr('http-equiv'), matches;
|
||||
|
||||
if (name) {
|
||||
data[name.toLowerCase()] = meta.attr('content');
|
||||
} else if (httpEquiv == "Content-Type") {
|
||||
matches = /charset\s*=\s*(.*)\s*/gi.exec(meta.attr('content'));
|
||||
|
||||
if (matches) {
|
||||
data.docencoding = matches[1];
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Parse html attribs
|
||||
elm = headerFragment.getAll('html')[0];
|
||||
if (elm) {
|
||||
data.langcode = getAttr(elm, 'lang') || getAttr(elm, 'xml:lang');
|
||||
}
|
||||
|
||||
// Parse stylesheets
|
||||
data.stylesheets = [];
|
||||
Tools.each(headerFragment.getAll('link'), function (link) {
|
||||
if (link.attr('rel') == 'stylesheet') {
|
||||
data.stylesheets.push(link.attr('href'));
|
||||
}
|
||||
});
|
||||
|
||||
// Parse body parts
|
||||
elm = headerFragment.getAll('body')[0];
|
||||
if (elm) {
|
||||
data.langdir = getAttr(elm, 'dir');
|
||||
data.style = getAttr(elm, 'style');
|
||||
data.visited_color = getAttr(elm, 'vlink');
|
||||
data.link_color = getAttr(elm, 'link');
|
||||
data.active_color = getAttr(elm, 'alink');
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function dataToHtml(data) {
|
||||
var headerFragment, headElement, html, elm, value, dom = editor.dom;
|
||||
|
||||
function setAttr(elm, name, value) {
|
||||
elm.attr(name, value ? value : undefined);
|
||||
}
|
||||
|
||||
function addHeadNode(node) {
|
||||
if (headElement.firstChild) {
|
||||
headElement.insert(node, headElement.firstChild);
|
||||
} else {
|
||||
headElement.append(node);
|
||||
}
|
||||
}
|
||||
|
||||
headerFragment = parseHeader();
|
||||
headElement = headerFragment.getAll('head')[0];
|
||||
if (!headElement) {
|
||||
elm = headerFragment.getAll('html')[0];
|
||||
headElement = new Node('head', 1);
|
||||
|
||||
if (elm.firstChild) {
|
||||
elm.insert(headElement, elm.firstChild, true);
|
||||
} else {
|
||||
elm.append(headElement);
|
||||
}
|
||||
}
|
||||
|
||||
// Add/update/remove XML-PI
|
||||
elm = headerFragment.firstChild;
|
||||
if (data.xml_pi) {
|
||||
value = 'version="1.0"';
|
||||
|
||||
if (data.docencoding) {
|
||||
value += ' encoding="' + data.docencoding + '"';
|
||||
}
|
||||
|
||||
if (elm.type != 7) {
|
||||
elm = new Node('xml', 7);
|
||||
headerFragment.insert(elm, headerFragment.firstChild, true);
|
||||
}
|
||||
|
||||
elm.value = value;
|
||||
} else if (elm && elm.type == 7) {
|
||||
elm.remove();
|
||||
}
|
||||
|
||||
// Add/update/remove doctype
|
||||
elm = headerFragment.getAll('#doctype')[0];
|
||||
if (data.doctype) {
|
||||
if (!elm) {
|
||||
elm = new Node('#doctype', 10);
|
||||
|
||||
if (data.xml_pi) {
|
||||
headerFragment.insert(elm, headerFragment.firstChild);
|
||||
} else {
|
||||
addHeadNode(elm);
|
||||
}
|
||||
}
|
||||
|
||||
elm.value = data.doctype.substring(9, data.doctype.length - 1);
|
||||
} else if (elm) {
|
||||
elm.remove();
|
||||
}
|
||||
|
||||
// Add meta encoding
|
||||
elm = null;
|
||||
each(headerFragment.getAll('meta'), function (meta) {
|
||||
if (meta.attr('http-equiv') == 'Content-Type') {
|
||||
elm = meta;
|
||||
}
|
||||
});
|
||||
|
||||
if (data.docencoding) {
|
||||
if (!elm) {
|
||||
elm = new Node('meta', 1);
|
||||
elm.attr('http-equiv', 'Content-Type');
|
||||
elm.shortEnded = true;
|
||||
addHeadNode(elm);
|
||||
}
|
||||
|
||||
elm.attr('content', 'text/html; charset=' + data.docencoding);
|
||||
} else if (elm) {
|
||||
elm.remove();
|
||||
}
|
||||
|
||||
// Add/update/remove title
|
||||
elm = headerFragment.getAll('title')[0];
|
||||
if (data.title) {
|
||||
if (!elm) {
|
||||
elm = new Node('title', 1);
|
||||
addHeadNode(elm);
|
||||
} else {
|
||||
elm.empty();
|
||||
}
|
||||
|
||||
elm.append(new Node('#text', 3)).value = data.title;
|
||||
} else if (elm) {
|
||||
elm.remove();
|
||||
}
|
||||
|
||||
// Add/update/remove meta
|
||||
each('keywords,description,author,copyright,robots'.split(','), function (name) {
|
||||
var nodes = headerFragment.getAll('meta'), i, meta, value = data[name];
|
||||
|
||||
for (i = 0; i < nodes.length; i++) {
|
||||
meta = nodes[i];
|
||||
|
||||
if (meta.attr('name') == name) {
|
||||
if (value) {
|
||||
meta.attr('content', value);
|
||||
} else {
|
||||
meta.remove();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (value) {
|
||||
elm = new Node('meta', 1);
|
||||
elm.attr('name', name);
|
||||
elm.attr('content', value);
|
||||
elm.shortEnded = true;
|
||||
|
||||
addHeadNode(elm);
|
||||
}
|
||||
});
|
||||
|
||||
var currentStyleSheetsMap = {};
|
||||
Tools.each(headerFragment.getAll('link'), function (stylesheet) {
|
||||
if (stylesheet.attr('rel') == 'stylesheet') {
|
||||
currentStyleSheetsMap[stylesheet.attr('href')] = stylesheet;
|
||||
}
|
||||
});
|
||||
|
||||
// Add new
|
||||
Tools.each(data.stylesheets, function (stylesheet) {
|
||||
if (!currentStyleSheetsMap[stylesheet]) {
|
||||
elm = new Node('link', 1);
|
||||
elm.attr({
|
||||
rel: 'stylesheet',
|
||||
text: 'text/css',
|
||||
href: stylesheet
|
||||
});
|
||||
elm.shortEnded = true;
|
||||
addHeadNode(elm);
|
||||
}
|
||||
|
||||
delete currentStyleSheetsMap[stylesheet];
|
||||
});
|
||||
|
||||
// Delete old
|
||||
Tools.each(currentStyleSheetsMap, function (stylesheet) {
|
||||
stylesheet.remove();
|
||||
});
|
||||
|
||||
// Update body attributes
|
||||
elm = headerFragment.getAll('body')[0];
|
||||
if (elm) {
|
||||
setAttr(elm, 'dir', data.langdir);
|
||||
setAttr(elm, 'style', data.style);
|
||||
setAttr(elm, 'vlink', data.visited_color);
|
||||
setAttr(elm, 'link', data.link_color);
|
||||
setAttr(elm, 'alink', data.active_color);
|
||||
|
||||
// Update iframe body as well
|
||||
dom.setAttribs(editor.getBody(), {
|
||||
style: data.style,
|
||||
dir: data.dir,
|
||||
vLink: data.visited_color,
|
||||
link: data.link_color,
|
||||
aLink: data.active_color
|
||||
});
|
||||
}
|
||||
|
||||
// Set html attributes
|
||||
elm = headerFragment.getAll('html')[0];
|
||||
if (elm) {
|
||||
setAttr(elm, 'lang', data.langcode);
|
||||
setAttr(elm, 'xml:lang', data.langcode);
|
||||
}
|
||||
|
||||
// No need for a head element
|
||||
if (!headElement.firstChild) {
|
||||
headElement.remove();
|
||||
}
|
||||
|
||||
// Serialize header fragment and crop away body part
|
||||
html = new Serializer({
|
||||
validate: false,
|
||||
indent: true,
|
||||
apply_source_formatting: true,
|
||||
indent_before: 'head,html,body,meta,title,script,link,style',
|
||||
indent_after: 'head,html,body,meta,title,script,link,style'
|
||||
}).serialize(headerFragment);
|
||||
|
||||
head = html.substring(0, html.indexOf('</body>'));
|
||||
}
|
||||
|
||||
function parseHeader() {
|
||||
// Parse the contents with a DOM parser
|
||||
return new DomParser({
|
||||
validate: false,
|
||||
root_name: '#document'
|
||||
}).parse(head);
|
||||
}
|
||||
|
||||
function setContent(evt) {
|
||||
var startPos, endPos, content, headerFragment, styles = '', dom = editor.dom, elm;
|
||||
|
||||
if (evt.selection) {
|
||||
return;
|
||||
}
|
||||
|
||||
function low(s) {
|
||||
return s.replace(/<\/?[A-Z]+/g, function (a) {
|
||||
return a.toLowerCase();
|
||||
});
|
||||
}
|
||||
|
||||
content = Protect.protectHtml(editor.settings.protect, evt.content);
|
||||
|
||||
// Ignore raw updated if we already have a head, this will fix issues with undo/redo keeping the head/foot separate
|
||||
if (evt.format == 'raw' && head) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (evt.source_view && editor.getParam('fullpage_hide_in_source_view')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Fixed so new document/setContent('') doesn't remove existing header/footer except when it's in source code view
|
||||
if (content.length === 0 && !evt.source_view) {
|
||||
content = Tools.trim(head) + '\n' + Tools.trim(content) + '\n' + Tools.trim(foot);
|
||||
}
|
||||
|
||||
// Parse out head, body and footer
|
||||
content = content.replace(/<(\/?)BODY/gi, '<$1body');
|
||||
startPos = content.indexOf('<body');
|
||||
|
||||
if (startPos != -1) {
|
||||
startPos = content.indexOf('>', startPos);
|
||||
head = low(content.substring(0, startPos + 1));
|
||||
|
||||
endPos = content.indexOf('</body', startPos);
|
||||
if (endPos == -1) {
|
||||
endPos = content.length;
|
||||
}
|
||||
|
||||
evt.content = Tools.trim(content.substring(startPos + 1, endPos));
|
||||
foot = low(content.substring(endPos));
|
||||
} else {
|
||||
head = getDefaultHeader();
|
||||
foot = '\n</body>\n</html>';
|
||||
}
|
||||
|
||||
// Parse header and update iframe
|
||||
headerFragment = parseHeader();
|
||||
each(headerFragment.getAll('style'), function (node) {
|
||||
if (node.firstChild) {
|
||||
styles += node.firstChild.value;
|
||||
}
|
||||
});
|
||||
|
||||
elm = headerFragment.getAll('body')[0];
|
||||
if (elm) {
|
||||
dom.setAttribs(editor.getBody(), {
|
||||
style: elm.attr('style') || '',
|
||||
dir: elm.attr('dir') || '',
|
||||
vLink: elm.attr('vlink') || '',
|
||||
link: elm.attr('link') || '',
|
||||
aLink: elm.attr('alink') || ''
|
||||
});
|
||||
}
|
||||
|
||||
dom.remove('fullpage_styles');
|
||||
|
||||
var headElm = editor.getDoc().getElementsByTagName('head')[0];
|
||||
|
||||
if (styles) {
|
||||
dom.add(headElm, 'style', {
|
||||
id: 'fullpage_styles'
|
||||
}, styles);
|
||||
|
||||
// Needed for IE 6/7
|
||||
elm = dom.get('fullpage_styles');
|
||||
if (elm.styleSheet) {
|
||||
elm.styleSheet.cssText = styles;
|
||||
}
|
||||
}
|
||||
|
||||
var currentStyleSheetsMap = {};
|
||||
Tools.each(headElm.getElementsByTagName('link'), function (stylesheet) {
|
||||
if (stylesheet.rel == 'stylesheet' && stylesheet.getAttribute('data-mce-fullpage')) {
|
||||
currentStyleSheetsMap[stylesheet.href] = stylesheet;
|
||||
}
|
||||
});
|
||||
|
||||
// Add new
|
||||
Tools.each(headerFragment.getAll('link'), function (stylesheet) {
|
||||
var href = stylesheet.attr('href');
|
||||
if (!href) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!currentStyleSheetsMap[href] && stylesheet.attr('rel') == 'stylesheet') {
|
||||
dom.add(headElm, 'link', {
|
||||
rel: 'stylesheet',
|
||||
text: 'text/css',
|
||||
href: href,
|
||||
'data-mce-fullpage': '1'
|
||||
});
|
||||
}
|
||||
|
||||
delete currentStyleSheetsMap[href];
|
||||
});
|
||||
|
||||
// Delete old
|
||||
Tools.each(currentStyleSheetsMap, function (stylesheet) {
|
||||
stylesheet.parentNode.removeChild(stylesheet);
|
||||
});
|
||||
}
|
||||
|
||||
function getDefaultHeader() {
|
||||
var header = '', value, styles = '';
|
||||
|
||||
if (editor.getParam('fullpage_default_xml_pi')) {
|
||||
header += '<?xml version="1.0" encoding="' + editor.getParam('fullpage_default_encoding', 'ISO-8859-1') + '" ?>\n';
|
||||
}
|
||||
|
||||
header += editor.getParam('fullpage_default_doctype', '<!DOCTYPE html>');
|
||||
header += '\n<html>\n<head>\n';
|
||||
|
||||
if ((value = editor.getParam('fullpage_default_title'))) {
|
||||
header += '<title>' + value + '</title>\n';
|
||||
}
|
||||
|
||||
if ((value = editor.getParam('fullpage_default_encoding'))) {
|
||||
header += '<meta http-equiv="Content-Type" content="text/html; charset=' + value + '" />\n';
|
||||
}
|
||||
|
||||
if ((value = editor.getParam('fullpage_default_font_family'))) {
|
||||
styles += 'font-family: ' + value + ';';
|
||||
}
|
||||
|
||||
if ((value = editor.getParam('fullpage_default_font_size'))) {
|
||||
styles += 'font-size: ' + value + ';';
|
||||
}
|
||||
|
||||
if ((value = editor.getParam('fullpage_default_text_color'))) {
|
||||
styles += 'color: ' + value + ';';
|
||||
}
|
||||
|
||||
header += '</head>\n<body' + (styles ? ' style="' + styles + '"' : '') + '>\n';
|
||||
|
||||
return header;
|
||||
}
|
||||
|
||||
function getContent(evt) {
|
||||
if (!evt.selection && (!evt.source_view || !editor.getParam('fullpage_hide_in_source_view'))) {
|
||||
evt.content = Protect.unprotectHtml(Tools.trim(head) + '\n' + Tools.trim(evt.content) + '\n' + Tools.trim(foot));
|
||||
}
|
||||
}
|
||||
|
||||
editor.addCommand('mceFullPageProperties', showDialog);
|
||||
|
||||
editor.addButton('fullpage', {
|
||||
title: 'Document properties',
|
||||
cmd: 'mceFullPageProperties'
|
||||
});
|
||||
|
||||
editor.addMenuItem('fullpage', {
|
||||
text: 'Document properties',
|
||||
cmd: 'mceFullPageProperties',
|
||||
context: 'file'
|
||||
});
|
||||
|
||||
editor.on('BeforeSetContent', setContent);
|
||||
editor.on('GetContent', getContent);
|
||||
});
|
||||
return function () { };
|
||||
}
|
||||
);
|
||||
dem('tinymce.plugins.fullpage.Plugin')();
|
||||
})();
|
||||
1
public/storage/assets/vendors/tinymce/plugins/fullpage/plugin.min.js
vendored
Normal file
7
public/storage/assets/vendors/tinymce/plugins/fullscreen/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "fullscreen" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/fullscreen')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/fullscreen'
|
||||
require('./plugin.js');
|
||||
299
public/storage/assets/vendors/tinymce/plugins/fullscreen/plugin.js
vendored
Normal file
@@ -0,0 +1,299 @@
|
||||
(function () {
|
||||
|
||||
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
||||
|
||||
// Used when there is no 'main' module.
|
||||
// The name is probably (hopefully) unique so minification removes for releases.
|
||||
var register_3795 = function (id) {
|
||||
var module = dem(id);
|
||||
var fragments = id.split('.');
|
||||
var target = Function('return this;')();
|
||||
for (var i = 0; i < fragments.length - 1; ++i) {
|
||||
if (target[fragments[i]] === undefined)
|
||||
target[fragments[i]] = {};
|
||||
target = target[fragments[i]];
|
||||
}
|
||||
target[fragments[fragments.length - 1]] = module;
|
||||
};
|
||||
|
||||
var instantiate = function (id) {
|
||||
var actual = defs[id];
|
||||
var dependencies = actual.deps;
|
||||
var definition = actual.defn;
|
||||
var len = dependencies.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(dependencies[i]);
|
||||
var defResult = definition.apply(null, instances);
|
||||
if (defResult === undefined)
|
||||
throw 'module [' + id + '] returned undefined';
|
||||
actual.instance = defResult;
|
||||
};
|
||||
|
||||
var def = function (id, dependencies, definition) {
|
||||
if (typeof id !== 'string')
|
||||
throw 'module id must be a string';
|
||||
else if (dependencies === undefined)
|
||||
throw 'no dependencies for ' + id;
|
||||
else if (definition === undefined)
|
||||
throw 'no definition function for ' + id;
|
||||
defs[id] = {
|
||||
deps: dependencies,
|
||||
defn: definition,
|
||||
instance: undefined
|
||||
};
|
||||
};
|
||||
|
||||
var dem = function (id) {
|
||||
var actual = defs[id];
|
||||
if (actual === undefined)
|
||||
throw 'module [' + id + '] was undefined';
|
||||
else if (actual.instance === undefined)
|
||||
instantiate(id);
|
||||
return actual.instance;
|
||||
};
|
||||
|
||||
var req = function (ids, callback) {
|
||||
var len = ids.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances.push(dem(ids[i]));
|
||||
callback.apply(null, callback);
|
||||
};
|
||||
|
||||
var ephox = {};
|
||||
|
||||
ephox.bolt = {
|
||||
module: {
|
||||
api: {
|
||||
define: def,
|
||||
require: req,
|
||||
demand: dem
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var define = def;
|
||||
var require = req;
|
||||
var demand = dem;
|
||||
// this helps with minificiation when using a lot of global references
|
||||
var defineGlobal = function (id, ref) {
|
||||
define(id, [], function () { return ref; });
|
||||
};
|
||||
/*jsc
|
||||
["tinymce.plugins.fullscreen.Plugin","tinymce.core.dom.DOMUtils","tinymce.core.PluginManager","global!tinymce.util.Tools.resolve"]
|
||||
jsc*/
|
||||
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.dom.DOMUtils',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.dom.DOMUtils');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.PluginManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.PluginManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class contains all core logic for the fullscreen plugin.
|
||||
*
|
||||
* @class tinymce.fullscreen.Plugin
|
||||
* @private
|
||||
*/
|
||||
define(
|
||||
'tinymce.plugins.fullscreen.Plugin',
|
||||
[
|
||||
'tinymce.core.dom.DOMUtils',
|
||||
'tinymce.core.PluginManager'
|
||||
],
|
||||
function (DOMUtils, PluginManager) {
|
||||
var DOM = DOMUtils.DOM;
|
||||
|
||||
PluginManager.add('fullscreen', function (editor) {
|
||||
var fullscreenState = false, iframeWidth, iframeHeight, resizeHandler;
|
||||
var containerWidth, containerHeight, scrollPos;
|
||||
|
||||
if (editor.settings.inline) {
|
||||
return;
|
||||
}
|
||||
|
||||
function getWindowSize() {
|
||||
var w, h, win = window, doc = document;
|
||||
var body = doc.body;
|
||||
|
||||
// Old IE
|
||||
if (body.offsetWidth) {
|
||||
w = body.offsetWidth;
|
||||
h = body.offsetHeight;
|
||||
}
|
||||
|
||||
// Modern browsers
|
||||
if (win.innerWidth && win.innerHeight) {
|
||||
w = win.innerWidth;
|
||||
h = win.innerHeight;
|
||||
}
|
||||
|
||||
return { w: w, h: h };
|
||||
}
|
||||
|
||||
function getScrollPos() {
|
||||
var vp = DOM.getViewPort();
|
||||
|
||||
return {
|
||||
x: vp.x,
|
||||
y: vp.y
|
||||
};
|
||||
}
|
||||
|
||||
function setScrollPos(pos) {
|
||||
window.scrollTo(pos.x, pos.y);
|
||||
}
|
||||
|
||||
function toggleFullscreen() {
|
||||
var body = document.body, documentElement = document.documentElement, editorContainerStyle;
|
||||
var editorContainer, iframe, iframeStyle;
|
||||
|
||||
function resize() {
|
||||
DOM.setStyle(iframe, 'height', getWindowSize().h - (editorContainer.clientHeight - iframe.clientHeight));
|
||||
}
|
||||
|
||||
fullscreenState = !fullscreenState;
|
||||
|
||||
editorContainer = editor.getContainer();
|
||||
editorContainerStyle = editorContainer.style;
|
||||
iframe = editor.getContentAreaContainer().firstChild;
|
||||
iframeStyle = iframe.style;
|
||||
|
||||
if (fullscreenState) {
|
||||
scrollPos = getScrollPos();
|
||||
iframeWidth = iframeStyle.width;
|
||||
iframeHeight = iframeStyle.height;
|
||||
iframeStyle.width = iframeStyle.height = '100%';
|
||||
containerWidth = editorContainerStyle.width;
|
||||
containerHeight = editorContainerStyle.height;
|
||||
editorContainerStyle.width = editorContainerStyle.height = '';
|
||||
|
||||
DOM.addClass(body, 'mce-fullscreen');
|
||||
DOM.addClass(documentElement, 'mce-fullscreen');
|
||||
DOM.addClass(editorContainer, 'mce-fullscreen');
|
||||
|
||||
DOM.bind(window, 'resize', resize);
|
||||
resize();
|
||||
resizeHandler = resize;
|
||||
} else {
|
||||
iframeStyle.width = iframeWidth;
|
||||
iframeStyle.height = iframeHeight;
|
||||
|
||||
if (containerWidth) {
|
||||
editorContainerStyle.width = containerWidth;
|
||||
}
|
||||
|
||||
if (containerHeight) {
|
||||
editorContainerStyle.height = containerHeight;
|
||||
}
|
||||
|
||||
DOM.removeClass(body, 'mce-fullscreen');
|
||||
DOM.removeClass(documentElement, 'mce-fullscreen');
|
||||
DOM.removeClass(editorContainer, 'mce-fullscreen');
|
||||
DOM.unbind(window, 'resize', resizeHandler);
|
||||
setScrollPos(scrollPos);
|
||||
}
|
||||
|
||||
editor.fire('FullscreenStateChanged', { state: fullscreenState });
|
||||
}
|
||||
|
||||
editor.on('init', function () {
|
||||
editor.addShortcut('Ctrl+Shift+F', '', toggleFullscreen);
|
||||
});
|
||||
|
||||
editor.on('remove', function () {
|
||||
if (resizeHandler) {
|
||||
DOM.unbind(window, 'resize', resizeHandler);
|
||||
}
|
||||
});
|
||||
|
||||
editor.addCommand('mceFullScreen', toggleFullscreen);
|
||||
|
||||
editor.addMenuItem('fullscreen', {
|
||||
text: 'Fullscreen',
|
||||
shortcut: 'Ctrl+Shift+F',
|
||||
selectable: true,
|
||||
onClick: function () {
|
||||
toggleFullscreen();
|
||||
editor.focus();
|
||||
},
|
||||
onPostRender: function () {
|
||||
var self = this;
|
||||
|
||||
editor.on('FullscreenStateChanged', function (e) {
|
||||
self.active(e.state);
|
||||
});
|
||||
},
|
||||
context: 'view'
|
||||
});
|
||||
|
||||
editor.addButton('fullscreen', {
|
||||
tooltip: 'Fullscreen',
|
||||
shortcut: 'Ctrl+Shift+F',
|
||||
onClick: toggleFullscreen,
|
||||
onPostRender: function () {
|
||||
var self = this;
|
||||
|
||||
editor.on('FullscreenStateChanged', function (e) {
|
||||
self.active(e.state);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
isFullscreen: function () {
|
||||
return fullscreenState;
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
return function () { };
|
||||
}
|
||||
);
|
||||
dem('tinymce.plugins.fullscreen.Plugin')();
|
||||
})();
|
||||
1
public/storage/assets/vendors/tinymce/plugins/fullscreen/plugin.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.dom.DOMUtils")}),g("2",["3"],function(a){return a("tinymce.PluginManager")}),g("0",["1","2"],function(a,b){var c=a.DOM;return b.add("fullscreen",function(a){function b(){var a,b,c=window,d=document,e=d.body;return e.offsetWidth&&(a=e.offsetWidth,b=e.offsetHeight),c.innerWidth&&c.innerHeight&&(a=c.innerWidth,b=c.innerHeight),{w:a,h:b}}function d(){var a=c.getViewPort();return{x:a.x,y:a.y}}function e(a){window.scrollTo(a.x,a.y)}function f(){function f(){c.setStyle(p,"height",b().h-(o.clientHeight-p.clientHeight))}var n,o,p,q,r=document.body,s=document.documentElement;m=!m,o=a.getContainer(),n=o.style,p=a.getContentAreaContainer().firstChild,q=p.style,m?(l=d(),g=q.width,h=q.height,q.width=q.height="100%",j=n.width,k=n.height,n.width=n.height="",c.addClass(r,"mce-fullscreen"),c.addClass(s,"mce-fullscreen"),c.addClass(o,"mce-fullscreen"),c.bind(window,"resize",f),f(),i=f):(q.width=g,q.height=h,j&&(n.width=j),k&&(n.height=k),c.removeClass(r,"mce-fullscreen"),c.removeClass(s,"mce-fullscreen"),c.removeClass(o,"mce-fullscreen"),c.unbind(window,"resize",i),e(l)),a.fire("FullscreenStateChanged",{state:m})}var g,h,i,j,k,l,m=!1;if(!a.settings.inline)return a.on("init",function(){a.addShortcut("Ctrl+Shift+F","",f)}),a.on("remove",function(){i&&c.unbind(window,"resize",i)}),a.addCommand("mceFullScreen",f),a.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,onClick:function(){f(),a.focus()},onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})},context:"view"}),a.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Ctrl+Shift+F",onClick:f,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})}}),{isFullscreen:function(){return m}}}),function(){}}),d("0")()}();
|
||||
BIN
public/storage/assets/vendors/tinymce/plugins/help/img/logo.png
vendored
Normal file
|
After Width: | Height: | Size: 23 KiB |
7
public/storage/assets/vendors/tinymce/plugins/help/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "help" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/help')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/help'
|
||||
require('./plugin.js');
|
||||
1352
public/storage/assets/vendors/tinymce/plugins/help/plugin.js
vendored
Normal file
1
public/storage/assets/vendors/tinymce/plugins/help/plugin.min.js
vendored
Normal file
7
public/storage/assets/vendors/tinymce/plugins/hr/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "hr" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/hr')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/hr'
|
||||
require('./plugin.js');
|
||||
152
public/storage/assets/vendors/tinymce/plugins/hr/plugin.js
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
(function () {
|
||||
|
||||
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
||||
|
||||
// Used when there is no 'main' module.
|
||||
// The name is probably (hopefully) unique so minification removes for releases.
|
||||
var register_3795 = function (id) {
|
||||
var module = dem(id);
|
||||
var fragments = id.split('.');
|
||||
var target = Function('return this;')();
|
||||
for (var i = 0; i < fragments.length - 1; ++i) {
|
||||
if (target[fragments[i]] === undefined)
|
||||
target[fragments[i]] = {};
|
||||
target = target[fragments[i]];
|
||||
}
|
||||
target[fragments[fragments.length - 1]] = module;
|
||||
};
|
||||
|
||||
var instantiate = function (id) {
|
||||
var actual = defs[id];
|
||||
var dependencies = actual.deps;
|
||||
var definition = actual.defn;
|
||||
var len = dependencies.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(dependencies[i]);
|
||||
var defResult = definition.apply(null, instances);
|
||||
if (defResult === undefined)
|
||||
throw 'module [' + id + '] returned undefined';
|
||||
actual.instance = defResult;
|
||||
};
|
||||
|
||||
var def = function (id, dependencies, definition) {
|
||||
if (typeof id !== 'string')
|
||||
throw 'module id must be a string';
|
||||
else if (dependencies === undefined)
|
||||
throw 'no dependencies for ' + id;
|
||||
else if (definition === undefined)
|
||||
throw 'no definition function for ' + id;
|
||||
defs[id] = {
|
||||
deps: dependencies,
|
||||
defn: definition,
|
||||
instance: undefined
|
||||
};
|
||||
};
|
||||
|
||||
var dem = function (id) {
|
||||
var actual = defs[id];
|
||||
if (actual === undefined)
|
||||
throw 'module [' + id + '] was undefined';
|
||||
else if (actual.instance === undefined)
|
||||
instantiate(id);
|
||||
return actual.instance;
|
||||
};
|
||||
|
||||
var req = function (ids, callback) {
|
||||
var len = ids.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances.push(dem(ids[i]));
|
||||
callback.apply(null, callback);
|
||||
};
|
||||
|
||||
var ephox = {};
|
||||
|
||||
ephox.bolt = {
|
||||
module: {
|
||||
api: {
|
||||
define: def,
|
||||
require: req,
|
||||
demand: dem
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var define = def;
|
||||
var require = req;
|
||||
var demand = dem;
|
||||
// this helps with minificiation when using a lot of global references
|
||||
var defineGlobal = function (id, ref) {
|
||||
define(id, [], function () { return ref; });
|
||||
};
|
||||
/*jsc
|
||||
["tinymce.plugins.hr.Plugin","tinymce.core.PluginManager","global!tinymce.util.Tools.resolve"]
|
||||
jsc*/
|
||||
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.PluginManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.PluginManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class contains all core logic for the hr plugin.
|
||||
*
|
||||
* @class tinymce.hr.Plugin
|
||||
* @private
|
||||
*/
|
||||
define(
|
||||
'tinymce.plugins.hr.Plugin',
|
||||
[
|
||||
'tinymce.core.PluginManager'
|
||||
],
|
||||
function (PluginManager) {
|
||||
PluginManager.add('hr', function (editor) {
|
||||
editor.addCommand('InsertHorizontalRule', function () {
|
||||
editor.execCommand('mceInsertContent', false, '<hr />');
|
||||
});
|
||||
|
||||
editor.addButton('hr', {
|
||||
icon: 'hr',
|
||||
tooltip: 'Horizontal line',
|
||||
cmd: 'InsertHorizontalRule'
|
||||
});
|
||||
|
||||
editor.addMenuItem('hr', {
|
||||
icon: 'hr',
|
||||
text: 'Horizontal line',
|
||||
cmd: 'InsertHorizontalRule',
|
||||
context: 'insert'
|
||||
});
|
||||
});
|
||||
|
||||
return function () { };
|
||||
}
|
||||
);
|
||||
dem('tinymce.plugins.hr.Plugin')();
|
||||
})();
|
||||
1
public/storage/assets/vendors/tinymce/plugins/hr/plugin.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("2",tinymce.util.Tools.resolve),g("1",["2"],function(a){return a("tinymce.PluginManager")}),g("0",["1"],function(a){return a.add("hr",function(a){a.addCommand("InsertHorizontalRule",function(){a.execCommand("mceInsertContent",!1,"<hr />")}),a.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),a.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})}),function(){}}),d("0")()}();
|
||||
7
public/storage/assets/vendors/tinymce/plugins/image/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "image" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/image')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/image'
|
||||
require('./plugin.js');
|
||||
844
public/storage/assets/vendors/tinymce/plugins/image/plugin.js
vendored
Normal file
@@ -0,0 +1,844 @@
|
||||
(function () {
|
||||
|
||||
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
||||
|
||||
// Used when there is no 'main' module.
|
||||
// The name is probably (hopefully) unique so minification removes for releases.
|
||||
var register_3795 = function (id) {
|
||||
var module = dem(id);
|
||||
var fragments = id.split('.');
|
||||
var target = Function('return this;')();
|
||||
for (var i = 0; i < fragments.length - 1; ++i) {
|
||||
if (target[fragments[i]] === undefined)
|
||||
target[fragments[i]] = {};
|
||||
target = target[fragments[i]];
|
||||
}
|
||||
target[fragments[fragments.length - 1]] = module;
|
||||
};
|
||||
|
||||
var instantiate = function (id) {
|
||||
var actual = defs[id];
|
||||
var dependencies = actual.deps;
|
||||
var definition = actual.defn;
|
||||
var len = dependencies.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(dependencies[i]);
|
||||
var defResult = definition.apply(null, instances);
|
||||
if (defResult === undefined)
|
||||
throw 'module [' + id + '] returned undefined';
|
||||
actual.instance = defResult;
|
||||
};
|
||||
|
||||
var def = function (id, dependencies, definition) {
|
||||
if (typeof id !== 'string')
|
||||
throw 'module id must be a string';
|
||||
else if (dependencies === undefined)
|
||||
throw 'no dependencies for ' + id;
|
||||
else if (definition === undefined)
|
||||
throw 'no definition function for ' + id;
|
||||
defs[id] = {
|
||||
deps: dependencies,
|
||||
defn: definition,
|
||||
instance: undefined
|
||||
};
|
||||
};
|
||||
|
||||
var dem = function (id) {
|
||||
var actual = defs[id];
|
||||
if (actual === undefined)
|
||||
throw 'module [' + id + '] was undefined';
|
||||
else if (actual.instance === undefined)
|
||||
instantiate(id);
|
||||
return actual.instance;
|
||||
};
|
||||
|
||||
var req = function (ids, callback) {
|
||||
var len = ids.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances.push(dem(ids[i]));
|
||||
callback.apply(null, callback);
|
||||
};
|
||||
|
||||
var ephox = {};
|
||||
|
||||
ephox.bolt = {
|
||||
module: {
|
||||
api: {
|
||||
define: def,
|
||||
require: req,
|
||||
demand: dem
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var define = def;
|
||||
var require = req;
|
||||
var demand = dem;
|
||||
// this helps with minificiation when using a lot of global references
|
||||
var defineGlobal = function (id, ref) {
|
||||
define(id, [], function () { return ref; });
|
||||
};
|
||||
/*jsc
|
||||
["tinymce.plugins.image.Plugin","tinymce.core.Env","tinymce.core.PluginManager","tinymce.core.util.JSON","tinymce.core.util.Tools","tinymce.core.util.XHR","global!tinymce.util.Tools.resolve"]
|
||||
jsc*/
|
||||
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.Env',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.Env');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.PluginManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.PluginManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.util.JSON',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.util.JSON');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.util.Tools',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.util.Tools');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.util.XHR',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.util.XHR');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class contains all core logic for the image plugin.
|
||||
*
|
||||
* @class tinymce.image.Plugin
|
||||
* @private
|
||||
*/
|
||||
define(
|
||||
'tinymce.plugins.image.Plugin',
|
||||
[
|
||||
'tinymce.core.Env',
|
||||
'tinymce.core.PluginManager',
|
||||
'tinymce.core.util.JSON',
|
||||
'tinymce.core.util.Tools',
|
||||
'tinymce.core.util.XHR'
|
||||
],
|
||||
function (Env, PluginManager, JSON, Tools, XHR) {
|
||||
PluginManager.add('image', function (editor) {
|
||||
function getImageSize(url, callback) {
|
||||
var img = document.createElement('img');
|
||||
|
||||
function done(width, height) {
|
||||
if (img.parentNode) {
|
||||
img.parentNode.removeChild(img);
|
||||
}
|
||||
|
||||
callback({ width: width, height: height });
|
||||
}
|
||||
|
||||
img.onload = function () {
|
||||
done(Math.max(img.width, img.clientWidth), Math.max(img.height, img.clientHeight));
|
||||
};
|
||||
|
||||
img.onerror = function () {
|
||||
done();
|
||||
};
|
||||
|
||||
var style = img.style;
|
||||
style.visibility = 'hidden';
|
||||
style.position = 'fixed';
|
||||
style.bottom = style.left = 0;
|
||||
style.width = style.height = 'auto';
|
||||
|
||||
document.body.appendChild(img);
|
||||
img.src = url;
|
||||
}
|
||||
|
||||
function buildListItems(inputList, itemCallback, startItems) {
|
||||
function appendItems(values, output) {
|
||||
output = output || [];
|
||||
|
||||
Tools.each(values, function (item) {
|
||||
var menuItem = { text: item.text || item.title };
|
||||
|
||||
if (item.menu) {
|
||||
menuItem.menu = appendItems(item.menu);
|
||||
} else {
|
||||
menuItem.value = item.value;
|
||||
itemCallback(menuItem);
|
||||
}
|
||||
|
||||
output.push(menuItem);
|
||||
});
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
return appendItems(inputList, startItems || []);
|
||||
}
|
||||
|
||||
function createImageList(callback) {
|
||||
return function () {
|
||||
var imageList = editor.settings.image_list;
|
||||
|
||||
if (typeof imageList == "string") {
|
||||
XHR.send({
|
||||
url: imageList,
|
||||
success: function (text) {
|
||||
callback(JSON.parse(text));
|
||||
}
|
||||
});
|
||||
} else if (typeof imageList == "function") {
|
||||
imageList(callback);
|
||||
} else {
|
||||
callback(imageList);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function showDialog(imageList) {
|
||||
var win, data = {}, dom = editor.dom, imgElm, figureElm;
|
||||
var width, height, imageListCtrl, classListCtrl, imageDimensions = editor.settings.image_dimensions !== false;
|
||||
|
||||
function recalcSize() {
|
||||
var widthCtrl, heightCtrl, newWidth, newHeight;
|
||||
|
||||
widthCtrl = win.find('#width')[0];
|
||||
heightCtrl = win.find('#height')[0];
|
||||
|
||||
if (!widthCtrl || !heightCtrl) {
|
||||
return;
|
||||
}
|
||||
|
||||
newWidth = widthCtrl.value();
|
||||
newHeight = heightCtrl.value();
|
||||
|
||||
if (win.find('#constrain')[0].checked() && width && height && newWidth && newHeight) {
|
||||
if (width != newWidth) {
|
||||
newHeight = Math.round((newWidth / width) * newHeight);
|
||||
|
||||
if (!isNaN(newHeight)) {
|
||||
heightCtrl.value(newHeight);
|
||||
}
|
||||
} else {
|
||||
newWidth = Math.round((newHeight / height) * newWidth);
|
||||
|
||||
if (!isNaN(newWidth)) {
|
||||
widthCtrl.value(newWidth);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
width = newWidth;
|
||||
height = newHeight;
|
||||
}
|
||||
|
||||
function onSubmitForm() {
|
||||
var figureElm, oldImg;
|
||||
|
||||
function waitLoad(imgElm) {
|
||||
function selectImage() {
|
||||
imgElm.onload = imgElm.onerror = null;
|
||||
|
||||
if (editor.selection) {
|
||||
editor.selection.select(imgElm);
|
||||
editor.nodeChanged();
|
||||
}
|
||||
}
|
||||
|
||||
imgElm.onload = function () {
|
||||
if (!data.width && !data.height && imageDimensions) {
|
||||
dom.setAttribs(imgElm, {
|
||||
width: imgElm.clientWidth,
|
||||
height: imgElm.clientHeight
|
||||
});
|
||||
}
|
||||
|
||||
selectImage();
|
||||
};
|
||||
|
||||
imgElm.onerror = selectImage;
|
||||
}
|
||||
|
||||
updateStyle();
|
||||
recalcSize();
|
||||
|
||||
data = Tools.extend(data, win.toJSON());
|
||||
|
||||
if (!data.alt) {
|
||||
data.alt = '';
|
||||
}
|
||||
|
||||
if (!data.title) {
|
||||
data.title = '';
|
||||
}
|
||||
|
||||
if (data.width === '') {
|
||||
data.width = null;
|
||||
}
|
||||
|
||||
if (data.height === '') {
|
||||
data.height = null;
|
||||
}
|
||||
|
||||
if (!data.style) {
|
||||
data.style = null;
|
||||
}
|
||||
|
||||
// Setup new data excluding style properties
|
||||
/*eslint dot-notation: 0*/
|
||||
data = {
|
||||
src: data.src,
|
||||
alt: data.alt,
|
||||
title: data.title,
|
||||
width: data.width,
|
||||
height: data.height,
|
||||
style: data.style,
|
||||
caption: data.caption,
|
||||
"class": data["class"]
|
||||
};
|
||||
|
||||
editor.undoManager.transact(function () {
|
||||
if (!data.src) {
|
||||
if (imgElm) {
|
||||
dom.remove(imgElm);
|
||||
editor.focus();
|
||||
editor.nodeChanged();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.title === "") {
|
||||
data.title = null;
|
||||
}
|
||||
|
||||
if (!imgElm) {
|
||||
data.id = '__mcenew';
|
||||
editor.focus();
|
||||
editor.selection.setContent(dom.createHTML('img', data));
|
||||
imgElm = dom.get('__mcenew');
|
||||
dom.setAttrib(imgElm, 'id', null);
|
||||
} else {
|
||||
dom.setAttribs(imgElm, data);
|
||||
}
|
||||
|
||||
editor.editorUpload.uploadImagesAuto();
|
||||
|
||||
if (data.caption === false) {
|
||||
if (dom.is(imgElm.parentNode, 'figure.image')) {
|
||||
figureElm = imgElm.parentNode;
|
||||
dom.insertAfter(imgElm, figureElm);
|
||||
dom.remove(figureElm);
|
||||
}
|
||||
}
|
||||
|
||||
function isTextBlock(node) {
|
||||
return editor.schema.getTextBlockElements()[node.nodeName];
|
||||
}
|
||||
|
||||
if (data.caption === true) {
|
||||
if (!dom.is(imgElm.parentNode, 'figure.image')) {
|
||||
oldImg = imgElm;
|
||||
imgElm = imgElm.cloneNode(true);
|
||||
figureElm = dom.create('figure', { 'class': 'image' });
|
||||
figureElm.appendChild(imgElm);
|
||||
figureElm.appendChild(dom.create('figcaption', { contentEditable: true }, 'Caption'));
|
||||
figureElm.contentEditable = false;
|
||||
|
||||
var textBlock = dom.getParent(oldImg, isTextBlock);
|
||||
if (textBlock) {
|
||||
dom.split(textBlock, oldImg, figureElm);
|
||||
} else {
|
||||
dom.replace(figureElm, oldImg);
|
||||
}
|
||||
|
||||
editor.selection.select(figureElm);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
waitLoad(imgElm);
|
||||
});
|
||||
}
|
||||
|
||||
function removePixelSuffix(value) {
|
||||
if (value) {
|
||||
value = value.replace(/px$/, '');
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
function srcChange(e) {
|
||||
var srcURL, prependURL, absoluteURLPattern, meta = e.meta || {};
|
||||
|
||||
if (imageListCtrl) {
|
||||
imageListCtrl.value(editor.convertURL(this.value(), 'src'));
|
||||
}
|
||||
|
||||
Tools.each(meta, function (value, key) {
|
||||
win.find('#' + key).value(value);
|
||||
});
|
||||
|
||||
if (!meta.width && !meta.height) {
|
||||
srcURL = editor.convertURL(this.value(), 'src');
|
||||
|
||||
// Pattern test the src url and make sure we haven't already prepended the url
|
||||
prependURL = editor.settings.image_prepend_url;
|
||||
absoluteURLPattern = new RegExp('^(?:[a-z]+:)?//', 'i');
|
||||
if (prependURL && !absoluteURLPattern.test(srcURL) && srcURL.substring(0, prependURL.length) !== prependURL) {
|
||||
srcURL = prependURL + srcURL;
|
||||
}
|
||||
|
||||
this.value(srcURL);
|
||||
|
||||
getImageSize(editor.documentBaseURI.toAbsolute(this.value()), function (data) {
|
||||
if (data.width && data.height && imageDimensions) {
|
||||
width = data.width;
|
||||
height = data.height;
|
||||
|
||||
win.find('#width').value(width);
|
||||
win.find('#height').value(height);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function onBeforeCall(e) {
|
||||
e.meta = win.toJSON();
|
||||
}
|
||||
|
||||
imgElm = editor.selection.getNode();
|
||||
figureElm = dom.getParent(imgElm, 'figure.image');
|
||||
if (figureElm) {
|
||||
imgElm = dom.select('img', figureElm)[0];
|
||||
}
|
||||
|
||||
if (imgElm &&
|
||||
(imgElm.nodeName != 'IMG' ||
|
||||
imgElm.getAttribute('data-mce-object') ||
|
||||
imgElm.getAttribute('data-mce-placeholder'))) {
|
||||
imgElm = null;
|
||||
}
|
||||
|
||||
if (imgElm) {
|
||||
width = dom.getAttrib(imgElm, 'width');
|
||||
height = dom.getAttrib(imgElm, 'height');
|
||||
|
||||
data = {
|
||||
src: dom.getAttrib(imgElm, 'src'),
|
||||
alt: dom.getAttrib(imgElm, 'alt'),
|
||||
title: dom.getAttrib(imgElm, 'title'),
|
||||
"class": dom.getAttrib(imgElm, 'class'),
|
||||
width: width,
|
||||
height: height,
|
||||
caption: !!figureElm
|
||||
};
|
||||
}
|
||||
|
||||
if (imageList) {
|
||||
imageListCtrl = {
|
||||
type: 'listbox',
|
||||
label: 'Image list',
|
||||
values: buildListItems(
|
||||
imageList,
|
||||
function (item) {
|
||||
item.value = editor.convertURL(item.value || item.url, 'src');
|
||||
},
|
||||
[{ text: 'None', value: '' }]
|
||||
),
|
||||
value: data.src && editor.convertURL(data.src, 'src'),
|
||||
onselect: function (e) {
|
||||
var altCtrl = win.find('#alt');
|
||||
|
||||
if (!altCtrl.value() || (e.lastControl && altCtrl.value() == e.lastControl.text())) {
|
||||
altCtrl.value(e.control.text());
|
||||
}
|
||||
|
||||
win.find('#src').value(e.control.value()).fire('change');
|
||||
},
|
||||
onPostRender: function () {
|
||||
/*eslint consistent-this: 0*/
|
||||
imageListCtrl = this;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if (editor.settings.image_class_list) {
|
||||
classListCtrl = {
|
||||
name: 'class',
|
||||
type: 'listbox',
|
||||
label: 'Class',
|
||||
values: buildListItems(
|
||||
editor.settings.image_class_list,
|
||||
function (item) {
|
||||
if (item.value) {
|
||||
item.textStyle = function () {
|
||||
return editor.formatter.getCssText({ inline: 'img', classes: [item.value] });
|
||||
};
|
||||
}
|
||||
}
|
||||
)
|
||||
};
|
||||
}
|
||||
|
||||
// General settings shared between simple and advanced dialogs
|
||||
var generalFormItems = [
|
||||
{
|
||||
name: 'src',
|
||||
type: 'filepicker',
|
||||
filetype: 'image',
|
||||
label: 'Source',
|
||||
autofocus: true,
|
||||
onchange: srcChange,
|
||||
onbeforecall: onBeforeCall
|
||||
},
|
||||
imageListCtrl
|
||||
];
|
||||
|
||||
if (editor.settings.image_description !== false) {
|
||||
generalFormItems.push({ name: 'alt', type: 'textbox', label: 'Image description' });
|
||||
}
|
||||
|
||||
if (editor.settings.image_title) {
|
||||
generalFormItems.push({ name: 'title', type: 'textbox', label: 'Image Title' });
|
||||
}
|
||||
|
||||
if (imageDimensions) {
|
||||
generalFormItems.push({
|
||||
type: 'container',
|
||||
label: 'Dimensions',
|
||||
layout: 'flex',
|
||||
direction: 'row',
|
||||
align: 'center',
|
||||
spacing: 5,
|
||||
items: [
|
||||
{ name: 'width', type: 'textbox', maxLength: 5, size: 3, onchange: recalcSize, ariaLabel: 'Width' },
|
||||
{ type: 'label', text: 'x' },
|
||||
{ name: 'height', type: 'textbox', maxLength: 5, size: 3, onchange: recalcSize, ariaLabel: 'Height' },
|
||||
{ name: 'constrain', type: 'checkbox', checked: true, text: 'Constrain proportions' }
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
generalFormItems.push(classListCtrl);
|
||||
|
||||
if (editor.settings.image_caption && Env.ceFalse) {
|
||||
generalFormItems.push({ name: 'caption', type: 'checkbox', label: 'Caption' });
|
||||
}
|
||||
|
||||
function mergeMargins(css) {
|
||||
if (css.margin) {
|
||||
|
||||
var splitMargin = css.margin.split(" ");
|
||||
|
||||
switch (splitMargin.length) {
|
||||
case 1: //margin: toprightbottomleft;
|
||||
css['margin-top'] = css['margin-top'] || splitMargin[0];
|
||||
css['margin-right'] = css['margin-right'] || splitMargin[0];
|
||||
css['margin-bottom'] = css['margin-bottom'] || splitMargin[0];
|
||||
css['margin-left'] = css['margin-left'] || splitMargin[0];
|
||||
break;
|
||||
case 2: //margin: topbottom rightleft;
|
||||
css['margin-top'] = css['margin-top'] || splitMargin[0];
|
||||
css['margin-right'] = css['margin-right'] || splitMargin[1];
|
||||
css['margin-bottom'] = css['margin-bottom'] || splitMargin[0];
|
||||
css['margin-left'] = css['margin-left'] || splitMargin[1];
|
||||
break;
|
||||
case 3: //margin: top rightleft bottom;
|
||||
css['margin-top'] = css['margin-top'] || splitMargin[0];
|
||||
css['margin-right'] = css['margin-right'] || splitMargin[1];
|
||||
css['margin-bottom'] = css['margin-bottom'] || splitMargin[2];
|
||||
css['margin-left'] = css['margin-left'] || splitMargin[1];
|
||||
break;
|
||||
case 4: //margin: top right bottom left;
|
||||
css['margin-top'] = css['margin-top'] || splitMargin[0];
|
||||
css['margin-right'] = css['margin-right'] || splitMargin[1];
|
||||
css['margin-bottom'] = css['margin-bottom'] || splitMargin[2];
|
||||
css['margin-left'] = css['margin-left'] || splitMargin[3];
|
||||
}
|
||||
delete css.margin;
|
||||
}
|
||||
return css;
|
||||
}
|
||||
|
||||
function updateStyle() {
|
||||
function addPixelSuffix(value) {
|
||||
if (value.length > 0 && /^[0-9]+$/.test(value)) {
|
||||
value += 'px';
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
if (!editor.settings.image_advtab) {
|
||||
return;
|
||||
}
|
||||
|
||||
var data = win.toJSON(),
|
||||
css = dom.parseStyle(data.style);
|
||||
|
||||
css = mergeMargins(css);
|
||||
|
||||
if (data.vspace) {
|
||||
css['margin-top'] = css['margin-bottom'] = addPixelSuffix(data.vspace);
|
||||
}
|
||||
if (data.hspace) {
|
||||
css['margin-left'] = css['margin-right'] = addPixelSuffix(data.hspace);
|
||||
}
|
||||
if (data.border) {
|
||||
css['border-width'] = addPixelSuffix(data.border);
|
||||
}
|
||||
|
||||
win.find('#style').value(dom.serializeStyle(dom.parseStyle(dom.serializeStyle(css))));
|
||||
}
|
||||
|
||||
function updateVSpaceHSpaceBorder() {
|
||||
if (!editor.settings.image_advtab) {
|
||||
return;
|
||||
}
|
||||
|
||||
var data = win.toJSON(),
|
||||
css = dom.parseStyle(data.style);
|
||||
|
||||
win.find('#vspace').value("");
|
||||
win.find('#hspace').value("");
|
||||
|
||||
css = mergeMargins(css);
|
||||
|
||||
//Move opposite equal margins to vspace/hspace field
|
||||
if ((css['margin-top'] && css['margin-bottom']) || (css['margin-right'] && css['margin-left'])) {
|
||||
if (css['margin-top'] === css['margin-bottom']) {
|
||||
win.find('#vspace').value(removePixelSuffix(css['margin-top']));
|
||||
} else {
|
||||
win.find('#vspace').value('');
|
||||
}
|
||||
if (css['margin-right'] === css['margin-left']) {
|
||||
win.find('#hspace').value(removePixelSuffix(css['margin-right']));
|
||||
} else {
|
||||
win.find('#hspace').value('');
|
||||
}
|
||||
}
|
||||
|
||||
//Move border-width
|
||||
if (css['border-width']) {
|
||||
win.find('#border').value(removePixelSuffix(css['border-width']));
|
||||
}
|
||||
|
||||
win.find('#style').value(dom.serializeStyle(dom.parseStyle(dom.serializeStyle(css))));
|
||||
|
||||
}
|
||||
|
||||
if (editor.settings.image_advtab) {
|
||||
// Parse styles from img
|
||||
if (imgElm) {
|
||||
if (imgElm.style.marginLeft && imgElm.style.marginRight && imgElm.style.marginLeft === imgElm.style.marginRight) {
|
||||
data.hspace = removePixelSuffix(imgElm.style.marginLeft);
|
||||
}
|
||||
if (imgElm.style.marginTop && imgElm.style.marginBottom && imgElm.style.marginTop === imgElm.style.marginBottom) {
|
||||
data.vspace = removePixelSuffix(imgElm.style.marginTop);
|
||||
}
|
||||
if (imgElm.style.borderWidth) {
|
||||
data.border = removePixelSuffix(imgElm.style.borderWidth);
|
||||
}
|
||||
|
||||
data.style = editor.dom.serializeStyle(editor.dom.parseStyle(editor.dom.getAttrib(imgElm, 'style')));
|
||||
}
|
||||
|
||||
// Advanced dialog shows general+advanced tabs
|
||||
win = editor.windowManager.open({
|
||||
title: 'Insert/edit image',
|
||||
data: data,
|
||||
bodyType: 'tabpanel',
|
||||
body: [
|
||||
{
|
||||
title: 'General',
|
||||
type: 'form',
|
||||
items: generalFormItems
|
||||
},
|
||||
|
||||
{
|
||||
title: 'Advanced',
|
||||
type: 'form',
|
||||
pack: 'start',
|
||||
items: [
|
||||
{
|
||||
label: 'Style',
|
||||
name: 'style',
|
||||
type: 'textbox',
|
||||
onchange: updateVSpaceHSpaceBorder
|
||||
},
|
||||
{
|
||||
type: 'form',
|
||||
layout: 'grid',
|
||||
packV: 'start',
|
||||
columns: 2,
|
||||
padding: 0,
|
||||
alignH: ['left', 'right'],
|
||||
defaults: {
|
||||
type: 'textbox',
|
||||
maxWidth: 50,
|
||||
onchange: updateStyle
|
||||
},
|
||||
items: [
|
||||
{ label: 'Vertical space', name: 'vspace' },
|
||||
{ label: 'Horizontal space', name: 'hspace' },
|
||||
{ label: 'Border', name: 'border' }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
onSubmit: onSubmitForm
|
||||
});
|
||||
} else {
|
||||
// Simple default dialog
|
||||
win = editor.windowManager.open({
|
||||
title: 'Insert/edit image',
|
||||
data: data,
|
||||
body: generalFormItems,
|
||||
onSubmit: onSubmitForm
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
editor.on('preInit', function () {
|
||||
function hasImageClass(node) {
|
||||
var className = node.attr('class');
|
||||
return className && /\bimage\b/.test(className);
|
||||
}
|
||||
|
||||
function toggleContentEditableState(state) {
|
||||
return function (nodes) {
|
||||
var i = nodes.length, node;
|
||||
|
||||
function toggleContentEditable(node) {
|
||||
node.attr('contenteditable', state ? 'true' : null);
|
||||
}
|
||||
|
||||
while (i--) {
|
||||
node = nodes[i];
|
||||
|
||||
if (hasImageClass(node)) {
|
||||
node.attr('contenteditable', state ? 'false' : null);
|
||||
Tools.each(node.getAll('figcaption'), toggleContentEditable);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
editor.parser.addNodeFilter('figure', toggleContentEditableState(true));
|
||||
editor.serializer.addNodeFilter('figure', toggleContentEditableState(false));
|
||||
});
|
||||
|
||||
editor.addButton('image', {
|
||||
icon: 'image',
|
||||
tooltip: 'Insert/edit image',
|
||||
onclick: createImageList(showDialog),
|
||||
stateSelector: 'img:not([data-mce-object],[data-mce-placeholder]),figure.image'
|
||||
});
|
||||
|
||||
editor.addMenuItem('image', {
|
||||
icon: 'image',
|
||||
text: 'Image',
|
||||
onclick: createImageList(showDialog),
|
||||
context: 'insert',
|
||||
prependToContext: true
|
||||
});
|
||||
|
||||
editor.addCommand('mceImage', createImageList(showDialog));
|
||||
});
|
||||
|
||||
return function () { };
|
||||
}
|
||||
);
|
||||
dem('tinymce.plugins.image.Plugin')();
|
||||
})();
|
||||
1
public/storage/assets/vendors/tinymce/plugins/image/plugin.min.js
vendored
Normal file
7
public/storage/assets/vendors/tinymce/plugins/imagetools/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "imagetools" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/imagetools')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/imagetools'
|
||||
require('./plugin.js');
|
||||
3994
public/storage/assets/vendors/tinymce/plugins/imagetools/plugin.js
vendored
Normal file
2
public/storage/assets/vendors/tinymce/plugins/imagetools/plugin.min.js
vendored
Normal file
7
public/storage/assets/vendors/tinymce/plugins/importcss/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "importcss" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/importcss')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/importcss'
|
||||
require('./plugin.js');
|
||||
479
public/storage/assets/vendors/tinymce/plugins/importcss/plugin.js
vendored
Normal file
@@ -0,0 +1,479 @@
|
||||
(function () {
|
||||
|
||||
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
||||
|
||||
// Used when there is no 'main' module.
|
||||
// The name is probably (hopefully) unique so minification removes for releases.
|
||||
var register_3795 = function (id) {
|
||||
var module = dem(id);
|
||||
var fragments = id.split('.');
|
||||
var target = Function('return this;')();
|
||||
for (var i = 0; i < fragments.length - 1; ++i) {
|
||||
if (target[fragments[i]] === undefined)
|
||||
target[fragments[i]] = {};
|
||||
target = target[fragments[i]];
|
||||
}
|
||||
target[fragments[fragments.length - 1]] = module;
|
||||
};
|
||||
|
||||
var instantiate = function (id) {
|
||||
var actual = defs[id];
|
||||
var dependencies = actual.deps;
|
||||
var definition = actual.defn;
|
||||
var len = dependencies.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(dependencies[i]);
|
||||
var defResult = definition.apply(null, instances);
|
||||
if (defResult === undefined)
|
||||
throw 'module [' + id + '] returned undefined';
|
||||
actual.instance = defResult;
|
||||
};
|
||||
|
||||
var def = function (id, dependencies, definition) {
|
||||
if (typeof id !== 'string')
|
||||
throw 'module id must be a string';
|
||||
else if (dependencies === undefined)
|
||||
throw 'no dependencies for ' + id;
|
||||
else if (definition === undefined)
|
||||
throw 'no definition function for ' + id;
|
||||
defs[id] = {
|
||||
deps: dependencies,
|
||||
defn: definition,
|
||||
instance: undefined
|
||||
};
|
||||
};
|
||||
|
||||
var dem = function (id) {
|
||||
var actual = defs[id];
|
||||
if (actual === undefined)
|
||||
throw 'module [' + id + '] was undefined';
|
||||
else if (actual.instance === undefined)
|
||||
instantiate(id);
|
||||
return actual.instance;
|
||||
};
|
||||
|
||||
var req = function (ids, callback) {
|
||||
var len = ids.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances.push(dem(ids[i]));
|
||||
callback.apply(null, callback);
|
||||
};
|
||||
|
||||
var ephox = {};
|
||||
|
||||
ephox.bolt = {
|
||||
module: {
|
||||
api: {
|
||||
define: def,
|
||||
require: req,
|
||||
demand: dem
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var define = def;
|
||||
var require = req;
|
||||
var demand = dem;
|
||||
// this helps with minificiation when using a lot of global references
|
||||
var defineGlobal = function (id, ref) {
|
||||
define(id, [], function () { return ref; });
|
||||
};
|
||||
/*jsc
|
||||
["tinymce.plugins.importcss.Plugin","tinymce.core.EditorManager","tinymce.core.dom.DOMUtils","tinymce.core.Env","tinymce.core.PluginManager","tinymce.core.util.Tools","global!tinymce.util.Tools.resolve"]
|
||||
jsc*/
|
||||
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.EditorManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.EditorManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.dom.DOMUtils',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.dom.DOMUtils');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.Env',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.Env');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.PluginManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.PluginManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.util.Tools',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.util.Tools');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class contains all core logic for the importcss plugin.
|
||||
*
|
||||
* @class tinymce.importcss.Plugin
|
||||
* @private
|
||||
*/
|
||||
define(
|
||||
'tinymce.plugins.importcss.Plugin',
|
||||
[
|
||||
'tinymce.core.EditorManager',
|
||||
'tinymce.core.dom.DOMUtils',
|
||||
'tinymce.core.Env',
|
||||
'tinymce.core.PluginManager',
|
||||
'tinymce.core.util.Tools'
|
||||
],
|
||||
function (EditorManager, DOMUtils, Env, PluginManager, Tools) {
|
||||
PluginManager.add('importcss', function (editor) {
|
||||
var self = this, each = Tools.each;
|
||||
|
||||
function removeCacheSuffix(url) {
|
||||
var cacheSuffix = Env.cacheSuffix;
|
||||
|
||||
if (typeof url == 'string') {
|
||||
url = url.replace('?' + cacheSuffix, '').replace('&' + cacheSuffix, '');
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
function isSkinContentCss(href) {
|
||||
var settings = editor.settings, skin = settings.skin !== false ? settings.skin || 'lightgray' : false;
|
||||
|
||||
if (skin) {
|
||||
var skinUrl = settings.skin_url;
|
||||
|
||||
if (skinUrl) {
|
||||
skinUrl = editor.documentBaseURI.toAbsolute(skinUrl);
|
||||
} else {
|
||||
skinUrl = EditorManager.baseURL + '/skins/' + skin;
|
||||
}
|
||||
|
||||
return href === skinUrl + '/content' + (editor.inline ? '.inline' : '') + '.min.css';
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function compileFilter(filter) {
|
||||
if (typeof filter == "string") {
|
||||
return function (value) {
|
||||
return value.indexOf(filter) !== -1;
|
||||
};
|
||||
} else if (filter instanceof RegExp) {
|
||||
return function (value) {
|
||||
return filter.test(value);
|
||||
};
|
||||
}
|
||||
|
||||
return filter;
|
||||
}
|
||||
|
||||
function getSelectors(doc, fileFilter) {
|
||||
var selectors = [], contentCSSUrls = {};
|
||||
|
||||
function append(styleSheet, imported) {
|
||||
var href = styleSheet.href, rules;
|
||||
|
||||
href = removeCacheSuffix(href);
|
||||
|
||||
if (!href || !fileFilter(href, imported) || isSkinContentCss(href)) {
|
||||
return;
|
||||
}
|
||||
|
||||
each(styleSheet.imports, function (styleSheet) {
|
||||
append(styleSheet, true);
|
||||
});
|
||||
|
||||
try {
|
||||
rules = styleSheet.cssRules || styleSheet.rules;
|
||||
} catch (e) {
|
||||
// Firefox fails on rules to remote domain for example:
|
||||
// @import url(//fonts.googleapis.com/css?family=Pathway+Gothic+One);
|
||||
}
|
||||
|
||||
each(rules, function (cssRule) {
|
||||
if (cssRule.styleSheet) {
|
||||
append(cssRule.styleSheet, true);
|
||||
} else if (cssRule.selectorText) {
|
||||
each(cssRule.selectorText.split(','), function (selector) {
|
||||
selectors.push(Tools.trim(selector));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
each(editor.contentCSS, function (url) {
|
||||
contentCSSUrls[url] = true;
|
||||
});
|
||||
|
||||
if (!fileFilter) {
|
||||
fileFilter = function (href, imported) {
|
||||
return imported || contentCSSUrls[href];
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
each(doc.styleSheets, function (styleSheet) {
|
||||
append(styleSheet);
|
||||
});
|
||||
} catch (e) {
|
||||
// Ignore
|
||||
}
|
||||
|
||||
return selectors;
|
||||
}
|
||||
|
||||
function defaultConvertSelectorToFormat(selectorText) {
|
||||
var format;
|
||||
|
||||
// Parse simple element.class1, .class1
|
||||
var selector = /^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(selectorText);
|
||||
if (!selector) {
|
||||
return;
|
||||
}
|
||||
|
||||
var elementName = selector[1];
|
||||
var classes = selector[2].substr(1).split('.').join(' ');
|
||||
var inlineSelectorElements = Tools.makeMap('a,img');
|
||||
|
||||
// element.class - Produce block formats
|
||||
if (selector[1]) {
|
||||
format = {
|
||||
title: selectorText
|
||||
};
|
||||
|
||||
if (editor.schema.getTextBlockElements()[elementName]) {
|
||||
// Text block format ex: h1.class1
|
||||
format.block = elementName;
|
||||
} else if (editor.schema.getBlockElements()[elementName] || inlineSelectorElements[elementName.toLowerCase()]) {
|
||||
// Block elements such as table.class and special inline elements such as a.class or img.class
|
||||
format.selector = elementName;
|
||||
} else {
|
||||
// Inline format strong.class1
|
||||
format.inline = elementName;
|
||||
}
|
||||
} else if (selector[2]) {
|
||||
// .class - Produce inline span with classes
|
||||
format = {
|
||||
inline: 'span',
|
||||
title: selectorText.substr(1),
|
||||
classes: classes
|
||||
};
|
||||
}
|
||||
|
||||
// Append to or override class attribute
|
||||
if (editor.settings.importcss_merge_classes !== false) {
|
||||
format.classes = classes;
|
||||
} else {
|
||||
format.attributes = { "class": classes };
|
||||
}
|
||||
|
||||
return format;
|
||||
}
|
||||
|
||||
function getGroupsBySelector(groups, selector) {
|
||||
return Tools.grep(groups, function (group) {
|
||||
return !group.filter || group.filter(selector);
|
||||
});
|
||||
}
|
||||
|
||||
function compileUserDefinedGroups(groups) {
|
||||
return Tools.map(groups, function (group) {
|
||||
return Tools.extend({}, group, {
|
||||
original: group,
|
||||
selectors: {},
|
||||
filter: compileFilter(group.filter),
|
||||
item: {
|
||||
text: group.title,
|
||||
menu: []
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function isExclusiveMode(editor, group) {
|
||||
// Exclusive mode can only be disabled when there are groups allowing the same style to be present in multiple groups
|
||||
return group === null || editor.settings.importcss_exclusive !== false;
|
||||
}
|
||||
|
||||
function isUniqueSelector(selector, group, globallyUniqueSelectors) {
|
||||
return !(isExclusiveMode(editor, group) ? selector in globallyUniqueSelectors : selector in group.selectors);
|
||||
}
|
||||
|
||||
function markUniqueSelector(selector, group, globallyUniqueSelectors) {
|
||||
if (isExclusiveMode(editor, group)) {
|
||||
globallyUniqueSelectors[selector] = true;
|
||||
} else {
|
||||
group.selectors[selector] = true;
|
||||
}
|
||||
}
|
||||
|
||||
function convertSelectorToFormat(plugin, selector, group) {
|
||||
var selectorConverter, settings = editor.settings;
|
||||
|
||||
if (group && group.selector_converter) {
|
||||
selectorConverter = group.selector_converter;
|
||||
} else if (settings.importcss_selector_converter) {
|
||||
selectorConverter = settings.importcss_selector_converter;
|
||||
} else {
|
||||
selectorConverter = defaultConvertSelectorToFormat;
|
||||
}
|
||||
|
||||
return selectorConverter.call(plugin, selector, group);
|
||||
}
|
||||
|
||||
editor.on('renderFormatsMenu', function (e) {
|
||||
var settings = editor.settings, globallyUniqueSelectors = {};
|
||||
var selectorFilter = compileFilter(settings.importcss_selector_filter), ctrl = e.control;
|
||||
var groups = compileUserDefinedGroups(settings.importcss_groups);
|
||||
|
||||
var processSelector = function (selector, group) {
|
||||
if (isUniqueSelector(selector, group, globallyUniqueSelectors)) {
|
||||
markUniqueSelector(selector, group, globallyUniqueSelectors);
|
||||
|
||||
var format = convertSelectorToFormat(self, selector, group);
|
||||
if (format) {
|
||||
var formatName = format.name || DOMUtils.DOM.uniqueId();
|
||||
editor.formatter.register(formatName, format);
|
||||
|
||||
return Tools.extend({}, ctrl.settings.itemDefaults, {
|
||||
text: format.title,
|
||||
format: formatName
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
if (!editor.settings.importcss_append) {
|
||||
ctrl.items().remove();
|
||||
}
|
||||
|
||||
each(getSelectors(e.doc || editor.getDoc(), compileFilter(settings.importcss_file_filter)), function (selector) {
|
||||
if (selector.indexOf('.mce-') === -1) {
|
||||
if (!selectorFilter || selectorFilter(selector)) {
|
||||
var selectorGroups = getGroupsBySelector(groups, selector);
|
||||
|
||||
if (selectorGroups.length > 0) {
|
||||
Tools.each(selectorGroups, function (group) {
|
||||
var menuItem = processSelector(selector, group);
|
||||
if (menuItem) {
|
||||
group.item.menu.push(menuItem);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var menuItem = processSelector(selector, null);
|
||||
if (menuItem) {
|
||||
ctrl.add(menuItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
each(groups, function (group) {
|
||||
if (group.item.menu.length > 0) {
|
||||
ctrl.add(group.item);
|
||||
}
|
||||
});
|
||||
|
||||
e.control.renderNew();
|
||||
});
|
||||
|
||||
// Expose default convertSelectorToFormat implementation
|
||||
self.convertSelectorToFormat = defaultConvertSelectorToFormat;
|
||||
});
|
||||
|
||||
return function () { };
|
||||
}
|
||||
);
|
||||
dem('tinymce.plugins.importcss.Plugin')();
|
||||
})();
|
||||
1
public/storage/assets/vendors/tinymce/plugins/importcss/plugin.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("6",tinymce.util.Tools.resolve),g("1",["6"],function(a){return a("tinymce.EditorManager")}),g("2",["6"],function(a){return a("tinymce.dom.DOMUtils")}),g("3",["6"],function(a){return a("tinymce.Env")}),g("4",["6"],function(a){return a("tinymce.PluginManager")}),g("5",["6"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){return d.add("importcss",function(d){function f(a){var b=c.cacheSuffix;return"string"==typeof a&&(a=a.replace("?"+b,"").replace("&"+b,"")),a}function g(b){var c=d.settings,e=c.skin!==!1&&(c.skin||"lightgray");if(e){var f=c.skin_url;return f=f?d.documentBaseURI.toAbsolute(f):a.baseURL+"/skins/"+e,b===f+"/content"+(d.inline?".inline":"")+".min.css"}return!1}function h(a){return"string"==typeof a?function(b){return b.indexOf(a)!==-1}:a instanceof RegExp?function(b){return a.test(b)}:a}function i(a,b){function c(a,d){var i,j=a.href;if(j=f(j),j&&b(j,d)&&!g(j)){r(a.imports,function(a){c(a,!0)});try{i=a.cssRules||a.rules}catch(a){}r(i,function(a){a.styleSheet?c(a.styleSheet,!0):a.selectorText&&r(a.selectorText.split(","),function(a){h.push(e.trim(a))})})}}var h=[],i={};r(d.contentCSS,function(a){i[a]=!0}),b||(b=function(a,b){return b||i[a]});try{r(a.styleSheets,function(a){c(a)})}catch(a){}return h}function j(a){var b,c=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(a);if(c){var f=c[1],g=c[2].substr(1).split(".").join(" "),h=e.makeMap("a,img");return c[1]?(b={title:a},d.schema.getTextBlockElements()[f]?b.block=f:d.schema.getBlockElements()[f]||h[f.toLowerCase()]?b.selector=f:b.inline=f):c[2]&&(b={inline:"span",title:a.substr(1),classes:g}),d.settings.importcss_merge_classes!==!1?b.classes=g:b.attributes={"class":g},b}}function k(a,b){return e.grep(a,function(a){return!a.filter||a.filter(b)})}function l(a){return e.map(a,function(a){return e.extend({},a,{original:a,selectors:{},filter:h(a.filter),item:{text:a.title,menu:[]}})})}function m(a,b){return null===b||a.settings.importcss_exclusive!==!1}function n(a,b,c){return!(m(d,b)?a in c:a in b.selectors)}function o(a,b,c){m(d,b)?c[a]=!0:b.selectors[a]=!0}function p(a,b,c){var e,f=d.settings;return e=c&&c.selector_converter?c.selector_converter:f.importcss_selector_converter?f.importcss_selector_converter:j,e.call(a,b,c)}var q=this,r=e.each;d.on("renderFormatsMenu",function(a){var c=d.settings,f={},g=h(c.importcss_selector_filter),j=a.control,m=l(c.importcss_groups),s=function(a,c){if(n(a,c,f)){o(a,c,f);var g=p(q,a,c);if(g){var h=g.name||b.DOM.uniqueId();return d.formatter.register(h,g),e.extend({},j.settings.itemDefaults,{text:g.title,format:h})}}return null};d.settings.importcss_append||j.items().remove(),r(i(a.doc||d.getDoc(),h(c.importcss_file_filter)),function(a){if(a.indexOf(".mce-")===-1&&(!g||g(a))){var b=k(m,a);if(b.length>0)e.each(b,function(b){var c=s(a,b);c&&b.item.menu.push(c)});else{var c=s(a,null);c&&j.add(c)}}}),r(m,function(a){a.item.menu.length>0&&j.add(a.item)}),a.control.renderNew()}),q.convertSelectorToFormat=j}),function(){}}),d("0")()}();
|
||||
7
public/storage/assets/vendors/tinymce/plugins/insertdatetime/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "insertdatetime" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/insertdatetime')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/insertdatetime'
|
||||
require('./plugin.js');
|
||||
263
public/storage/assets/vendors/tinymce/plugins/insertdatetime/plugin.js
vendored
Normal file
@@ -0,0 +1,263 @@
|
||||
(function () {
|
||||
|
||||
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
||||
|
||||
// Used when there is no 'main' module.
|
||||
// The name is probably (hopefully) unique so minification removes for releases.
|
||||
var register_3795 = function (id) {
|
||||
var module = dem(id);
|
||||
var fragments = id.split('.');
|
||||
var target = Function('return this;')();
|
||||
for (var i = 0; i < fragments.length - 1; ++i) {
|
||||
if (target[fragments[i]] === undefined)
|
||||
target[fragments[i]] = {};
|
||||
target = target[fragments[i]];
|
||||
}
|
||||
target[fragments[fragments.length - 1]] = module;
|
||||
};
|
||||
|
||||
var instantiate = function (id) {
|
||||
var actual = defs[id];
|
||||
var dependencies = actual.deps;
|
||||
var definition = actual.defn;
|
||||
var len = dependencies.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(dependencies[i]);
|
||||
var defResult = definition.apply(null, instances);
|
||||
if (defResult === undefined)
|
||||
throw 'module [' + id + '] returned undefined';
|
||||
actual.instance = defResult;
|
||||
};
|
||||
|
||||
var def = function (id, dependencies, definition) {
|
||||
if (typeof id !== 'string')
|
||||
throw 'module id must be a string';
|
||||
else if (dependencies === undefined)
|
||||
throw 'no dependencies for ' + id;
|
||||
else if (definition === undefined)
|
||||
throw 'no definition function for ' + id;
|
||||
defs[id] = {
|
||||
deps: dependencies,
|
||||
defn: definition,
|
||||
instance: undefined
|
||||
};
|
||||
};
|
||||
|
||||
var dem = function (id) {
|
||||
var actual = defs[id];
|
||||
if (actual === undefined)
|
||||
throw 'module [' + id + '] was undefined';
|
||||
else if (actual.instance === undefined)
|
||||
instantiate(id);
|
||||
return actual.instance;
|
||||
};
|
||||
|
||||
var req = function (ids, callback) {
|
||||
var len = ids.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances.push(dem(ids[i]));
|
||||
callback.apply(null, callback);
|
||||
};
|
||||
|
||||
var ephox = {};
|
||||
|
||||
ephox.bolt = {
|
||||
module: {
|
||||
api: {
|
||||
define: def,
|
||||
require: req,
|
||||
demand: dem
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var define = def;
|
||||
var require = req;
|
||||
var demand = dem;
|
||||
// this helps with minificiation when using a lot of global references
|
||||
var defineGlobal = function (id, ref) {
|
||||
define(id, [], function () { return ref; });
|
||||
};
|
||||
/*jsc
|
||||
["tinymce.plugins.insertdatetime.Plugin","tinymce.core.PluginManager","tinymce.core.util.Tools","global!tinymce.util.Tools.resolve"]
|
||||
jsc*/
|
||||
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.PluginManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.PluginManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.util.Tools',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.util.Tools');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class contains all core logic for the insertdatetime plugin.
|
||||
*
|
||||
* @class tinymce.insertdatetime.Plugin
|
||||
* @private
|
||||
*/
|
||||
define(
|
||||
'tinymce.plugins.insertdatetime.Plugin',
|
||||
[
|
||||
'tinymce.core.PluginManager',
|
||||
'tinymce.core.util.Tools'
|
||||
],
|
||||
function (PluginManager, Tools) {
|
||||
PluginManager.add('insertdatetime', function (editor) {
|
||||
var daysShort = "Sun Mon Tue Wed Thu Fri Sat Sun".split(' ');
|
||||
var daysLong = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(' ');
|
||||
var monthsShort = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(' ');
|
||||
var monthsLong = "January February March April May June July August September October November December".split(' ');
|
||||
var menuItems = [], lastFormat, defaultButtonTimeFormat;
|
||||
|
||||
function getDateTime(fmt, date) {
|
||||
function addZeros(value, len) {
|
||||
value = "" + value;
|
||||
|
||||
if (value.length < len) {
|
||||
for (var i = 0; i < (len - value.length); i++) {
|
||||
value = "0" + value;
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
date = date || new Date();
|
||||
|
||||
fmt = fmt.replace("%D", "%m/%d/%Y");
|
||||
fmt = fmt.replace("%r", "%I:%M:%S %p");
|
||||
fmt = fmt.replace("%Y", "" + date.getFullYear());
|
||||
fmt = fmt.replace("%y", "" + date.getYear());
|
||||
fmt = fmt.replace("%m", addZeros(date.getMonth() + 1, 2));
|
||||
fmt = fmt.replace("%d", addZeros(date.getDate(), 2));
|
||||
fmt = fmt.replace("%H", "" + addZeros(date.getHours(), 2));
|
||||
fmt = fmt.replace("%M", "" + addZeros(date.getMinutes(), 2));
|
||||
fmt = fmt.replace("%S", "" + addZeros(date.getSeconds(), 2));
|
||||
fmt = fmt.replace("%I", "" + ((date.getHours() + 11) % 12 + 1));
|
||||
fmt = fmt.replace("%p", "" + (date.getHours() < 12 ? "AM" : "PM"));
|
||||
fmt = fmt.replace("%B", "" + editor.translate(monthsLong[date.getMonth()]));
|
||||
fmt = fmt.replace("%b", "" + editor.translate(monthsShort[date.getMonth()]));
|
||||
fmt = fmt.replace("%A", "" + editor.translate(daysLong[date.getDay()]));
|
||||
fmt = fmt.replace("%a", "" + editor.translate(daysShort[date.getDay()]));
|
||||
fmt = fmt.replace("%%", "%");
|
||||
|
||||
return fmt;
|
||||
}
|
||||
|
||||
function insertDateTime(format) {
|
||||
var html = getDateTime(format);
|
||||
|
||||
if (editor.settings.insertdatetime_element) {
|
||||
var computerTime;
|
||||
|
||||
if (/%[HMSIp]/.test(format)) {
|
||||
computerTime = getDateTime("%Y-%m-%dT%H:%M");
|
||||
} else {
|
||||
computerTime = getDateTime("%Y-%m-%d");
|
||||
}
|
||||
|
||||
html = '<time datetime="' + computerTime + '">' + html + '</time>';
|
||||
|
||||
var timeElm = editor.dom.getParent(editor.selection.getStart(), 'time');
|
||||
if (timeElm) {
|
||||
editor.dom.setOuterHTML(timeElm, html);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
editor.insertContent(html);
|
||||
}
|
||||
|
||||
editor.addCommand('mceInsertDate', function () {
|
||||
insertDateTime(editor.getParam("insertdatetime_dateformat", editor.translate("%Y-%m-%d")));
|
||||
});
|
||||
|
||||
editor.addCommand('mceInsertTime', function () {
|
||||
insertDateTime(editor.getParam("insertdatetime_timeformat", editor.translate('%H:%M:%S')));
|
||||
});
|
||||
|
||||
editor.addButton('insertdatetime', {
|
||||
type: 'splitbutton',
|
||||
title: 'Insert date/time',
|
||||
onclick: function () {
|
||||
insertDateTime(lastFormat || defaultButtonTimeFormat);
|
||||
},
|
||||
menu: menuItems
|
||||
});
|
||||
|
||||
Tools.each(editor.settings.insertdatetime_formats || [
|
||||
"%H:%M:%S",
|
||||
"%Y-%m-%d",
|
||||
"%I:%M:%S %p",
|
||||
"%D"
|
||||
], function (fmt) {
|
||||
if (!defaultButtonTimeFormat) {
|
||||
defaultButtonTimeFormat = fmt;
|
||||
}
|
||||
|
||||
menuItems.push({
|
||||
text: getDateTime(fmt),
|
||||
onclick: function () {
|
||||
lastFormat = fmt;
|
||||
insertDateTime(fmt);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
editor.addMenuItem('insertdatetime', {
|
||||
icon: 'date',
|
||||
text: 'Date/time',
|
||||
menu: menuItems,
|
||||
context: 'insert'
|
||||
});
|
||||
});
|
||||
return function () { };
|
||||
}
|
||||
);
|
||||
dem('tinymce.plugins.insertdatetime.Plugin')();
|
||||
})();
|
||||
1
public/storage/assets/vendors/tinymce/plugins/insertdatetime/plugin.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.PluginManager")}),g("2",["3"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2"],function(a,b){return a.add("insertdatetime",function(a){function c(b,c){function d(a,b){if(a=""+a,a.length<b)for(var c=0;c<b-a.length;c++)a="0"+a;return a}return c=c||new Date,b=b.replace("%D","%m/%d/%Y"),b=b.replace("%r","%I:%M:%S %p"),b=b.replace("%Y",""+c.getFullYear()),b=b.replace("%y",""+c.getYear()),b=b.replace("%m",d(c.getMonth()+1,2)),b=b.replace("%d",d(c.getDate(),2)),b=b.replace("%H",""+d(c.getHours(),2)),b=b.replace("%M",""+d(c.getMinutes(),2)),b=b.replace("%S",""+d(c.getSeconds(),2)),b=b.replace("%I",""+((c.getHours()+11)%12+1)),b=b.replace("%p",""+(c.getHours()<12?"AM":"PM")),b=b.replace("%B",""+a.translate(j[c.getMonth()])),b=b.replace("%b",""+a.translate(i[c.getMonth()])),b=b.replace("%A",""+a.translate(h[c.getDay()])),b=b.replace("%a",""+a.translate(g[c.getDay()])),b=b.replace("%%","%")}function d(b){var d=c(b);if(a.settings.insertdatetime_element){var e;e=c(/%[HMSIp]/.test(b)?"%Y-%m-%dT%H:%M":"%Y-%m-%d"),d='<time datetime="'+e+'">'+d+"</time>";var f=a.dom.getParent(a.selection.getStart(),"time");if(f)return void a.dom.setOuterHTML(f,d)}a.insertContent(d)}var e,f,g="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),h="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),i="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),j="January February March April May June July August September October November December".split(" "),k=[];a.addCommand("mceInsertDate",function(){d(a.getParam("insertdatetime_dateformat",a.translate("%Y-%m-%d")))}),a.addCommand("mceInsertTime",function(){d(a.getParam("insertdatetime_timeformat",a.translate("%H:%M:%S")))}),a.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",onclick:function(){d(e||f)},menu:k}),b.each(a.settings.insertdatetime_formats||["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(a){f||(f=a),k.push({text:c(a),onclick:function(){e=a,d(a)}})}),a.addMenuItem("insertdatetime",{icon:"date",text:"Date/time",menu:k,context:"insert"})}),function(){}}),d("0")()}();
|
||||
7
public/storage/assets/vendors/tinymce/plugins/legacyoutput/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "legacyoutput" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/legacyoutput')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/legacyoutput'
|
||||
require('./plugin.js');
|
||||
343
public/storage/assets/vendors/tinymce/plugins/legacyoutput/plugin.js
vendored
Normal file
@@ -0,0 +1,343 @@
|
||||
(function () {
|
||||
|
||||
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
||||
|
||||
// Used when there is no 'main' module.
|
||||
// The name is probably (hopefully) unique so minification removes for releases.
|
||||
var register_3795 = function (id) {
|
||||
var module = dem(id);
|
||||
var fragments = id.split('.');
|
||||
var target = Function('return this;')();
|
||||
for (var i = 0; i < fragments.length - 1; ++i) {
|
||||
if (target[fragments[i]] === undefined)
|
||||
target[fragments[i]] = {};
|
||||
target = target[fragments[i]];
|
||||
}
|
||||
target[fragments[fragments.length - 1]] = module;
|
||||
};
|
||||
|
||||
var instantiate = function (id) {
|
||||
var actual = defs[id];
|
||||
var dependencies = actual.deps;
|
||||
var definition = actual.defn;
|
||||
var len = dependencies.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(dependencies[i]);
|
||||
var defResult = definition.apply(null, instances);
|
||||
if (defResult === undefined)
|
||||
throw 'module [' + id + '] returned undefined';
|
||||
actual.instance = defResult;
|
||||
};
|
||||
|
||||
var def = function (id, dependencies, definition) {
|
||||
if (typeof id !== 'string')
|
||||
throw 'module id must be a string';
|
||||
else if (dependencies === undefined)
|
||||
throw 'no dependencies for ' + id;
|
||||
else if (definition === undefined)
|
||||
throw 'no definition function for ' + id;
|
||||
defs[id] = {
|
||||
deps: dependencies,
|
||||
defn: definition,
|
||||
instance: undefined
|
||||
};
|
||||
};
|
||||
|
||||
var dem = function (id) {
|
||||
var actual = defs[id];
|
||||
if (actual === undefined)
|
||||
throw 'module [' + id + '] was undefined';
|
||||
else if (actual.instance === undefined)
|
||||
instantiate(id);
|
||||
return actual.instance;
|
||||
};
|
||||
|
||||
var req = function (ids, callback) {
|
||||
var len = ids.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances.push(dem(ids[i]));
|
||||
callback.apply(null, callback);
|
||||
};
|
||||
|
||||
var ephox = {};
|
||||
|
||||
ephox.bolt = {
|
||||
module: {
|
||||
api: {
|
||||
define: def,
|
||||
require: req,
|
||||
demand: dem
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var define = def;
|
||||
var require = req;
|
||||
var demand = dem;
|
||||
// this helps with minificiation when using a lot of global references
|
||||
var defineGlobal = function (id, ref) {
|
||||
define(id, [], function () { return ref; });
|
||||
};
|
||||
/*jsc
|
||||
["tinymce.plugins.legacyoutput.Plugin","tinymce.core.PluginManager","tinymce.core.util.Tools","global!tinymce.util.Tools.resolve"]
|
||||
jsc*/
|
||||
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.PluginManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.PluginManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.util.Tools',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.util.Tools');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class contains all core logic for the legacyoutput plugin.
|
||||
*
|
||||
* @class tinymce.legacyoutput.Plugin
|
||||
* @private
|
||||
*/
|
||||
define(
|
||||
'tinymce.plugins.legacyoutput.Plugin',
|
||||
[
|
||||
'tinymce.core.PluginManager',
|
||||
'tinymce.core.util.Tools'
|
||||
],
|
||||
function (PluginManager, Tools) {
|
||||
PluginManager.add('legacyoutput', function (editor, url, $) {
|
||||
editor.settings.inline_styles = false;
|
||||
|
||||
editor.on('init', function () {
|
||||
var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img',
|
||||
fontSizes = Tools.explode(editor.settings.font_size_style_values),
|
||||
schema = editor.schema;
|
||||
|
||||
// Override some internal formats to produce legacy elements and attributes
|
||||
editor.formatter.register({
|
||||
// Change alignment formats to use the deprecated align attribute
|
||||
alignleft: { selector: alignElements, attributes: { align: 'left' } },
|
||||
aligncenter: { selector: alignElements, attributes: { align: 'center' } },
|
||||
alignright: { selector: alignElements, attributes: { align: 'right' } },
|
||||
alignjustify: { selector: alignElements, attributes: { align: 'justify' } },
|
||||
|
||||
// Change the basic formatting elements to use deprecated element types
|
||||
bold: [
|
||||
{ inline: 'b', remove: 'all' },
|
||||
{ inline: 'strong', remove: 'all' },
|
||||
{ inline: 'span', styles: { fontWeight: 'bold' } }
|
||||
],
|
||||
italic: [
|
||||
{ inline: 'i', remove: 'all' },
|
||||
{ inline: 'em', remove: 'all' },
|
||||
{ inline: 'span', styles: { fontStyle: 'italic' } }
|
||||
],
|
||||
underline: [
|
||||
{ inline: 'u', remove: 'all' },
|
||||
{ inline: 'span', styles: { textDecoration: 'underline' }, exact: true }
|
||||
],
|
||||
strikethrough: [
|
||||
{ inline: 'strike', remove: 'all' },
|
||||
{ inline: 'span', styles: { textDecoration: 'line-through' }, exact: true }
|
||||
],
|
||||
|
||||
// Change font size and font family to use the deprecated font element
|
||||
fontname: { inline: 'font', attributes: { face: '%value' } },
|
||||
fontsize: {
|
||||
inline: 'font',
|
||||
attributes: {
|
||||
size: function (vars) {
|
||||
return Tools.inArray(fontSizes, vars.value) + 1;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Setup font elements for colors as well
|
||||
forecolor: { inline: 'font', attributes: { color: '%value' } },
|
||||
hilitecolor: { inline: 'font', styles: { backgroundColor: '%value' } }
|
||||
});
|
||||
|
||||
// Check that deprecated elements are allowed if not add them
|
||||
Tools.each('b,i,u,strike'.split(','), function (name) {
|
||||
schema.addValidElements(name + '[*]');
|
||||
});
|
||||
|
||||
// Add font element if it's missing
|
||||
if (!schema.getElementRule("font")) {
|
||||
schema.addValidElements("font[face|size|color|style]");
|
||||
}
|
||||
|
||||
// Add the missing and depreacted align attribute for the serialization engine
|
||||
Tools.each(alignElements.split(','), function (name) {
|
||||
var rule = schema.getElementRule(name);
|
||||
|
||||
if (rule) {
|
||||
if (!rule.attributes.align) {
|
||||
rule.attributes.align = {};
|
||||
rule.attributesOrder.push('align');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
editor.addButton('fontsizeselect', function () {
|
||||
var items = [], defaultFontsizeFormats = '8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7';
|
||||
var fontsizeFormats = editor.settings.fontsizeFormats || defaultFontsizeFormats;
|
||||
|
||||
editor.$.each(fontsizeFormats.split(' '), function (i, item) {
|
||||
var text = item, value = item;
|
||||
var values = item.split('=');
|
||||
|
||||
if (values.length > 1) {
|
||||
text = values[0];
|
||||
value = values[1];
|
||||
}
|
||||
|
||||
items.push({ text: text, value: value });
|
||||
});
|
||||
|
||||
return {
|
||||
type: 'listbox',
|
||||
text: 'Font Sizes',
|
||||
tooltip: 'Font Sizes',
|
||||
values: items,
|
||||
fixedWidth: true,
|
||||
onPostRender: function () {
|
||||
var self = this;
|
||||
|
||||
editor.on('NodeChange', function () {
|
||||
var fontElm;
|
||||
|
||||
fontElm = editor.dom.getParent(editor.selection.getNode(), 'font');
|
||||
if (fontElm) {
|
||||
self.value(fontElm.size);
|
||||
} else {
|
||||
self.value('');
|
||||
}
|
||||
});
|
||||
},
|
||||
onclick: function (e) {
|
||||
if (e.control.settings.value) {
|
||||
editor.execCommand('FontSize', false, e.control.settings.value);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
editor.addButton('fontselect', function () {
|
||||
function createFormats(formats) {
|
||||
formats = formats.replace(/;$/, '').split(';');
|
||||
|
||||
var i = formats.length;
|
||||
while (i--) {
|
||||
formats[i] = formats[i].split('=');
|
||||
}
|
||||
|
||||
return formats;
|
||||
}
|
||||
|
||||
var defaultFontsFormats =
|
||||
'Andale Mono=andale mono,monospace;' +
|
||||
'Arial=arial,helvetica,sans-serif;' +
|
||||
'Arial Black=arial black,sans-serif;' +
|
||||
'Book Antiqua=book antiqua,palatino,serif;' +
|
||||
'Comic Sans MS=comic sans ms,sans-serif;' +
|
||||
'Courier New=courier new,courier,monospace;' +
|
||||
'Georgia=georgia,palatino,serif;' +
|
||||
'Helvetica=helvetica,arial,sans-serif;' +
|
||||
'Impact=impact,sans-serif;' +
|
||||
'Symbol=symbol;' +
|
||||
'Tahoma=tahoma,arial,helvetica,sans-serif;' +
|
||||
'Terminal=terminal,monaco,monospace;' +
|
||||
'Times New Roman=times new roman,times,serif;' +
|
||||
'Trebuchet MS=trebuchet ms,geneva,sans-serif;' +
|
||||
'Verdana=verdana,geneva,sans-serif;' +
|
||||
'Webdings=webdings;' +
|
||||
'Wingdings=wingdings,zapf dingbats';
|
||||
|
||||
var items = [], fonts = createFormats(editor.settings.font_formats || defaultFontsFormats);
|
||||
|
||||
$.each(fonts, function (i, font) {
|
||||
items.push({
|
||||
text: { raw: font[0] },
|
||||
value: font[1],
|
||||
textStyle: font[1].indexOf('dings') == -1 ? 'font-family:' + font[1] : ''
|
||||
});
|
||||
});
|
||||
|
||||
return {
|
||||
type: 'listbox',
|
||||
text: 'Font Family',
|
||||
tooltip: 'Font Family',
|
||||
values: items,
|
||||
fixedWidth: true,
|
||||
onPostRender: function () {
|
||||
var self = this;
|
||||
|
||||
editor.on('NodeChange', function () {
|
||||
var fontElm;
|
||||
|
||||
fontElm = editor.dom.getParent(editor.selection.getNode(), 'font');
|
||||
if (fontElm) {
|
||||
self.value(fontElm.face);
|
||||
} else {
|
||||
self.value('');
|
||||
}
|
||||
});
|
||||
},
|
||||
onselect: function (e) {
|
||||
if (e.control.settings.value) {
|
||||
editor.execCommand('FontName', false, e.control.settings.value);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
return function () { };
|
||||
}
|
||||
);
|
||||
dem('tinymce.plugins.legacyoutput.Plugin')();
|
||||
})();
|
||||
1
public/storage/assets/vendors/tinymce/plugins/legacyoutput/plugin.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.PluginManager")}),g("2",["3"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2"],function(a,b){return a.add("legacyoutput",function(a,c,d){a.settings.inline_styles=!1,a.on("init",function(){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",d=b.explode(a.settings.font_size_style_values),e=a.schema;a.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignjustify:{selector:c,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(a){return b.inArray(d,a.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),b.each("b,i,u,strike".split(","),function(a){e.addValidElements(a+"[*]")}),e.getElementRule("font")||e.addValidElements("font[face|size|color|style]"),b.each(c.split(","),function(a){var b=e.getElementRule(a);b&&(b.attributes.align||(b.attributes.align={},b.attributesOrder.push("align")))})}),a.addButton("fontsizeselect",function(){var b=[],c="8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7",d=a.settings.fontsizeFormats||c;return a.$.each(d.split(" "),function(a,c){var d=c,e=c,f=c.split("=");f.length>1&&(d=f[0],e=f[1]),b.push({text:d,value:e})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:b,fixedWidth:!0,onPostRender:function(){var b=this;a.on("NodeChange",function(){var c;c=a.dom.getParent(a.selection.getNode(),"font"),c?b.value(c.size):b.value("")})},onclick:function(b){b.control.settings.value&&a.execCommand("FontSize",!1,b.control.settings.value)}}}),a.addButton("fontselect",function(){function b(a){a=a.replace(/;$/,"").split(";");for(var b=a.length;b--;)a[b]=a[b].split("=");return a}var c="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",e=[],f=b(a.settings.font_formats||c);return d.each(f,function(a,b){e.push({text:{raw:b[0]},value:b[1],textStyle:b[1].indexOf("dings")==-1?"font-family:"+b[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:e,fixedWidth:!0,onPostRender:function(){var b=this;a.on("NodeChange",function(){var c;c=a.dom.getParent(a.selection.getNode(),"font"),c?b.value(c.face):b.value("")})},onselect:function(b){b.control.settings.value&&a.execCommand("FontName",!1,b.control.settings.value)}}})}),function(){}}),d("0")()}();
|
||||
7
public/storage/assets/vendors/tinymce/plugins/link/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "link" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/link')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/link'
|
||||
require('./plugin.js');
|
||||
1174
public/storage/assets/vendors/tinymce/plugins/link/plugin.js
vendored
Normal file
1
public/storage/assets/vendors/tinymce/plugins/link/plugin.min.js
vendored
Normal file
7
public/storage/assets/vendors/tinymce/plugins/lists/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "lists" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/lists')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/lists'
|
||||
require('./plugin.js');
|
||||
1660
public/storage/assets/vendors/tinymce/plugins/lists/plugin.js
vendored
Normal file
1
public/storage/assets/vendors/tinymce/plugins/lists/plugin.min.js
vendored
Normal file
7
public/storage/assets/vendors/tinymce/plugins/media/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "media" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/media')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/media'
|
||||
require('./plugin.js');
|
||||