diff --git a/package-lock.json b/package-lock.json index b7f41f7b34c..ea3be01b703 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,12 +14,12 @@ "@babel/preset-env": "^7.10.2", "@babel/preset-react": "^7.10.1", "@fortawesome/fontawesome-free": "^6", + "@tinymce/tinymce-react": "^4.2", "assets-webpack-plugin": "3.9.7", "autoprefixer": "^8.5.0", "babel-loader": "^8.0.0", "bootstrap": "^3.4.1", "classnames": "^2.2.5", - "codemirror": "^5.34.0", "core-js": "^3.26.1", "cssnano": "^4.1", "d3": "^4.4.0", @@ -48,17 +48,14 @@ "redux-thunk": "^2.3.0", "reselect": "^4.0.0", "shelljs": "^0.5.3", - "svg4everybody": "^2.1.2", "swagger-ui-react": "3.51.2", "tinycolor2": "^1.4.1", - "tinymce": "^4.9.3", - "tinymce-codemirror": "git+https://github.com/christiaan/tinymce-codemirror.git#20c1bbe708", + "tinymce": "^6.3", "uuid": "^9.0.0", "video.js": "7.7.4", "wavesurfer.js": "2.2.1", "webpack": "^5.75.0", - "webpack-cli": "^5.0.1", - "whatwg-fetch": "^2.0.1" + "webpack-cli": "^5.0.1" }, "devDependencies": { "circular-dependency-plugin": "^5.2.2", @@ -1870,6 +1867,19 @@ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", "dev": true }, + "node_modules/@tinymce/tinymce-react": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@tinymce/tinymce-react/-/tinymce-react-4.3.0.tgz", + "integrity": "sha512-iB4cUsYfcJL4NGuKhqCGYuTmFTje3nPxyPv1HxprTsp/YMGuuiiSNWrv3zwI31QX5Cn8qeq9MrMDnbxuRugHyg==", + "dependencies": { + "prop-types": "^15.6.2", + "tinymce": "^6.3.1" + }, + "peerDependencies": { + "react": "^18.0.0 || ^17.0.1 || ^16.7.0", + "react-dom": "^18.0.0 || ^17.0.1 || ^16.7.0" + } + }, "node_modules/@types/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", @@ -3576,11 +3586,6 @@ "node": ">=0.10.0" } }, - "node_modules/codemirror": { - "version": "5.65.10", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.10.tgz", - "integrity": "sha512-IXAG5wlhbgcTJ6rZZcmi4+sjWIbJqIGfeg3tNa3yX84Jb3T4huS5qzQAo/cUisc1l3bI47WZodpyf7cYcocDKg==" - }, "node_modules/collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -12777,14 +12782,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/svg4everybody": { - "version": "2.1.9", - "resolved": "https://registry.npmjs.org/svg4everybody/-/svg4everybody-2.1.9.tgz", - "integrity": "sha512-AS9WORVV/vk520ZHxGTlQzyDBizp/h6WyAYUbKhze/kwvQr43DwJpkIIPBomsUyKqN7N+h1deF92N9PmW+o+9A==", - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/svgo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", @@ -13112,14 +13109,9 @@ } }, "node_modules/tinymce": { - "version": "4.9.11", - "resolved": "https://registry.npmjs.org/tinymce/-/tinymce-4.9.11.tgz", - "integrity": "sha512-nkSLsax+VY5DBRjMFnHFqPwTnlLEGHCco82FwJF2JNH6W+5/ClvNC1P4uhD5lXPDNiDykSHR0XJdEh7w/ICHzA==" - }, - "node_modules/tinymce-codemirror": { - "version": "1.0.0", - "resolved": "git+ssh://git@github.com/christiaan/tinymce-codemirror.git#20c1bbe7085d74ece681e960135d5cc368cd3937", - "license": "ISC" + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/tinymce/-/tinymce-6.4.1.tgz", + "integrity": "sha512-+/cS2AM9l6p72IBs2uolHbGsBUztLs0WslqNgFaTXtmMksTNUOhh8p08xtA/fa03UGlWEC6/EJoeV95/QDXa2A==" }, "node_modules/to-fast-properties": { "version": "2.0.0", @@ -14160,11 +14152,6 @@ "node": ">=0.8.0" } }, - "node_modules/whatwg-fetch": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", - "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" - }, "node_modules/whatwg-url": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-2.0.1.tgz", @@ -15685,6 +15672,15 @@ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", "dev": true }, + "@tinymce/tinymce-react": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@tinymce/tinymce-react/-/tinymce-react-4.3.0.tgz", + "integrity": "sha512-iB4cUsYfcJL4NGuKhqCGYuTmFTje3nPxyPv1HxprTsp/YMGuuiiSNWrv3zwI31QX5Cn8qeq9MrMDnbxuRugHyg==", + "requires": { + "prop-types": "^15.6.2", + "tinymce": "^6.3.1" + } + }, "@types/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", @@ -17053,11 +17049,6 @@ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==" }, - "codemirror": { - "version": "5.65.10", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.10.tgz", - "integrity": "sha512-IXAG5wlhbgcTJ6rZZcmi4+sjWIbJqIGfeg3tNa3yX84Jb3T4huS5qzQAo/cUisc1l3bI47WZodpyf7cYcocDKg==" - }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -24287,11 +24278,6 @@ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" }, - "svg4everybody": { - "version": "2.1.9", - "resolved": "https://registry.npmjs.org/svg4everybody/-/svg4everybody-2.1.9.tgz", - "integrity": "sha512-AS9WORVV/vk520ZHxGTlQzyDBizp/h6WyAYUbKhze/kwvQr43DwJpkIIPBomsUyKqN7N+h1deF92N9PmW+o+9A==" - }, "svgo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", @@ -24552,13 +24538,9 @@ "integrity": "sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA==" }, "tinymce": { - "version": "4.9.11", - "resolved": "https://registry.npmjs.org/tinymce/-/tinymce-4.9.11.tgz", - "integrity": "sha512-nkSLsax+VY5DBRjMFnHFqPwTnlLEGHCco82FwJF2JNH6W+5/ClvNC1P4uhD5lXPDNiDykSHR0XJdEh7w/ICHzA==" - }, - "tinymce-codemirror": { - "version": "git+ssh://git@github.com/christiaan/tinymce-codemirror.git#20c1bbe7085d74ece681e960135d5cc368cd3937", - "from": "tinymce-codemirror@git+https://github.com/christiaan/tinymce-codemirror.git#20c1bbe708" + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/tinymce/-/tinymce-6.4.1.tgz", + "integrity": "sha512-+/cS2AM9l6p72IBs2uolHbGsBUztLs0WslqNgFaTXtmMksTNUOhh8p08xtA/fa03UGlWEC6/EJoeV95/QDXa2A==" }, "to-fast-properties": { "version": "2.0.0", @@ -25330,11 +25312,6 @@ "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", "dev": true }, - "whatwg-fetch": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", - "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" - }, "whatwg-url": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-2.0.1.tgz", diff --git a/package.json b/package.json index 960f6cbde1e..533390ab7c4 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "babel-loader": "^8.0.0", "bootstrap": "^3.4.1", "classnames": "^2.2.5", - "codemirror": "^5.34.0", "core-js": "^3.26.1", "cssnano": "^4.1", "d3": "^4.4.0", @@ -53,17 +52,15 @@ "redux-thunk": "^2.3.0", "reselect": "^4.0.0", "shelljs": "^0.5.3", - "svg4everybody": "^2.1.2", "swagger-ui-react": "3.51.2", "tinycolor2": "^1.4.1", - "tinymce": "^4.9.3", - "tinymce-codemirror": "git+https://github.com/christiaan/tinymce-codemirror.git#20c1bbe708", + "tinymce": "^6.3", + "@tinymce/tinymce-react": "^4.2", "uuid": "^9.0.0", "video.js": "7.7.4", "wavesurfer.js": "2.2.1", "webpack": "^5.75.0", - "webpack-cli": "^5.0.1", - "whatwg-fetch": "^2.0.1" + "webpack-cli": "^5.0.1" }, "files": [ "package.json" diff --git a/src/main/app/Resources/modules/content/form/components/form.jsx b/src/main/app/Resources/modules/content/form/components/form.jsx index a9189b17667..00e1aad3a19 100644 --- a/src/main/app/Resources/modules/content/form/components/form.jsx +++ b/src/main/app/Resources/modules/content/form/components/form.jsx @@ -28,8 +28,6 @@ FormWrapper.defaultProps = { embedded: false } -// TODO : maybe manage ContentMeta display here - class Form extends Component { constructor(props) { super(props) diff --git a/src/main/app/Resources/modules/content/form/store/actions.js b/src/main/app/Resources/modules/content/form/store/actions.js index 637adbba82e..a5d33b9fdab 100644 --- a/src/main/app/Resources/modules/content/form/store/actions.js +++ b/src/main/app/Resources/modules/content/form/store/actions.js @@ -45,6 +45,7 @@ actions.getItemLock = (className, id) => (dispatch) => { dispatch({ [API_REQUEST]: { url: ['apiv2_object_lock_get', {class: className, id}], + silent: true, request: { method: 'GET' }, @@ -84,6 +85,7 @@ actions.validateLock = (lock) => (dispatch, getState) => { actions.lockItem = (className, id) => ({ [API_REQUEST]: { url: ['apiv2_object_lock', {class: className, id}], + silent: true, request: { method: 'PUT' } @@ -93,6 +95,7 @@ actions.lockItem = (className, id) => ({ actions.unlockItem = (className, id) => ({ [API_REQUEST]: { url: ['apiv2_object_unlock', {class: className, id}], + silent: true, request: { method: 'PUT' } diff --git a/src/main/app/Resources/modules/data/types/choice/index.js b/src/main/app/Resources/modules/data/types/choice/index.js index b13d9b248bc..4b4efab0a7a 100644 --- a/src/main/app/Resources/modules/data/types/choice/index.js +++ b/src/main/app/Resources/modules/data/types/choice/index.js @@ -1,9 +1,11 @@ import differenceBy from 'lodash/differenceBy' +import get from 'lodash/get' import {trans, tval} from '#/main/app/intl/translation' import {ChoiceInput} from '#/main/app/data/types/choice/components/input' import {ChoiceSearch} from '#/main/app/data/types/choice/components/search' +import {makeId} from '#/main/core/scaffolding/id' const dataType = { name: 'choice', @@ -28,12 +30,20 @@ const dataType = { label: trans('condensed_display') }, { name: 'choices', - type: 'enum', + type: 'collection', label: trans('choices_list'), + calculated: (data) => { + //get(data, 'options.choices', []) + console.log(data) + // data ? data.map(choice => choice.value) : [] + return get(data, 'options.choices', []).map(choice => choice.value) + }, options: { + type: 'string', placeholder: trans('no_choice'), - addButtonLabel: trans('add_a_choice'), - unique: true + button: trans('add_a_choice'), + unique: true, + defaultItem: {id: makeId(), value: ''} }, required: true } diff --git a/src/main/app/Resources/modules/data/types/html/components/input.jsx b/src/main/app/Resources/modules/data/types/html/components/input.jsx index 875b10e8e4f..3f8499ce70b 100644 --- a/src/main/app/Resources/modules/data/types/html/components/input.jsx +++ b/src/main/app/Resources/modules/data/types/html/components/input.jsx @@ -166,7 +166,7 @@ class HtmlInput extends Component { { + /!* Provide file and text for the link dialog *!/ + if (meta.filetype === 'file') { + callback('https://www.google.com/logos/google.jpg', { text: 'My text' }); + } + + /!* Provide image and alt text for the image dialog *!/ + if (meta.filetype === 'image') { + callback('https://www.google.com/logos/google.jpg', { alt: 'My alt text' }); + } + + /!* Provide alternative source and posted for the media dialog *!/ + if (meta.filetype === 'media') { + callback('movie.mp4', { source2: 'alt.ogg', poster: 'https://www.google.com/logos/google.jpg' }); + } + },*/ + templates: [ + { title: 'New Table', description: 'creates a new table', content: '
' }, + { title: 'Starting my story', description: 'A cure for writers block', content: 'Once upon a time...' }, + { title: 'New list with dates', description: 'New List with dates', content: '
cdate
mdate

My List

' } + ], + template_cdate_format: '[Date Created (CDATE): %m/%d/%Y : %H:%M:%S]', + template_mdate_format: '[Date Modified (MDATE): %m/%d/%Y : %H:%M:%S]', + image_caption: true, + quickbars_selection_toolbar: 'bold italic | quicklink h2 h3 blockquote quickimage quicktable', + noneditable_class: 'mceNonEditable', + toolbar_mode: 'sliding', + contextmenu: 'link image media table', + skin: 'oxide', + content_css: 'default', + /*skin: useDarkMode ? 'oxide-dark' : 'oxide', + content_css: useDarkMode ? 'dark' : 'default',*/ + //content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }', + statusbar: false, + branding: false, + promotion: false +} + +const normalConfig = { + language: locale(), + //skin: false, // we provide it through theme system + // plugin autoresize + autoresize_min_height: '160px',//`${props.minRows * 34}px`, + //autoresize_max_height: 500, + //height: `${props.minRows * 34}px`, + menubar: false, + statusbar: false, + branding: false, + plugins: [ + 'autoresize', 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'preview', + 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen', + 'insertdatetime', 'media', 'table', 'code', 'help' + ], + toolbar: 'undo redo | blocks | ' + + 'bold italic forecolor | alignleft aligncenter ' + + 'alignright alignjustify | bullist numlist outdent indent | ' + + 'removeformat | fullscreen preview code help', + //content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }' +} + +const Tinymce = (props) => { + const editorRef = useRef(null); + + return ( + editorRef.current = editor} + onEditorChange={props.onChange} + onSelectionChange={(args) => console.log(args)} + tinymceScriptSrc={asset('packages/tinymce/tinymce.min.js')} + /> + ) +} + +Tinymce.propTypes = { + id: T.string.isRequired, + disabled: T.bool, + mode: T.oneOf(['normal', 'full']), + value: T.string, + onChange: T.func, + inline: T.bool, + minRows: T.number +} + +Tinymce.defaultProps = { + inline: false, + mode: 'normal' +} + +export { + Tinymce +} diff --git a/src/main/app/Resources/modules/input/tinymce/components/editor.jsx b/src/main/app/Resources/modules/input/tinymce/components/editor.jsx new file mode 100644 index 00000000000..f6d3195d1a8 --- /dev/null +++ b/src/main/app/Resources/modules/input/tinymce/components/editor.jsx @@ -0,0 +1,177 @@ +import React, {useRef} from 'react' +import {PropTypes as T} from 'prop-types' +import {Editor} from '@tinymce/tinymce-react' +import merge from 'lodash/merge' + +import {asset} from '#/main/app/config' +import {theme} from '#/main/theme/config' +import {locale} from '#/main/app/intl' +import {withModal} from '#/main/app/overlays/modal' + +//import tinymce from 'tinymce/tinymce' +//import '#/main/app/input/tinymce/plugins' +import '#/main/app/input/tinymce/langs' + +import '#/main/core/tinymce/plugins/file-upload' +import '#/main/core/tinymce/plugins/resource-picker' +import {Workspace as WorkspaceTypes} from '#/main/core/workspace/prop-types' + +// disabled menubar : file table tools +// disabled plugins : importcss directionality autosave save pagebreak nonbreaking anchor codesample +// disabled buttons : ltr rtl save print | pagebreak anchor | fullscreen preview | charmap emoticons codesample +const fullConfig = { + height: '100%', + language: locale(), + base_url: asset('packages/tinymce'), + plugins: 'preview searchreplace autolink ' + + 'code visualblocks visualchars fullscreen image link media table ' + + 'charmap insertdatetime advlist lists wordcount help charmap quickbars emoticons template file-upload resource-picker', + //editimage_cors_hosts: ['picsum.photos'], + menubar: 'edit view insert format help', + menu: { + view: { + title: 'View', + items: 'code wordcount | visualaid visualchars visualblocks | spellchecker | preview fullscreen' + }, + insert: { + title: 'Insert', + items: 'resource-picker file-upload | image link media template inserttable | charmap emoticons hr | insertdatetime' + }, + }, + toolbar: 'undo redo | blocks fontfamily fontsize | bold italic underline strikethrough ' + + '| forecolor backcolor removeformat | alignleft aligncenter alignright alignjustify | outdent indent ' + + '| numlist bullist | resource-picker file-upload insertfile image media table link', + link_context_toolbar: true, + //toolbar_sticky: true, + //toolbar_sticky_offset: isSmallScreen ? 102 : 108, + /*autosave_ask_before_unload: true, + autosave_interval: '30s', + autosave_prefix: '{path}{query}-{id}-', + autosave_restore_when_empty: false, + autosave_retention: '2m',*/ + //image_advtab: true, + /*link_list: [ + { title: 'My page 1', value: 'https://www.tiny.cloud' }, + { title: 'My page 2', value: 'http://www.moxiecode.com' } + ],*/ + /*image_list: [ + { title: 'My page 1', value: 'https://www.tiny.cloud' }, + { title: 'My page 2', value: 'http://www.moxiecode.com' } + ], + image_class_list: [ + { title: 'None', value: '' }, + { title: 'Some class', value: 'class-name' } + ],*/ + /*file_picker_callback: (callback, value, meta) => { + /!* Provide file and text for the link dialog *!/ + if (meta.filetype === 'file') { + callback('https://www.google.com/logos/google.jpg', { text: 'My text' }); + } + + /!* Provide image and alt text for the image dialog *!/ + if (meta.filetype === 'image') { + callback('https://www.google.com/logos/google.jpg', { alt: 'My alt text' }); + } + + /!* Provide alternative source and posted for the media dialog *!/ + if (meta.filetype === 'media') { + callback('movie.mp4', { source2: 'alt.ogg', poster: 'https://www.google.com/logos/google.jpg' }); + } + },*/ + + templates: [ + { title: 'New Table', description: 'creates a new table', content: '
' }, + { title: 'Starting my story', description: 'A cure for writers block', content: 'Once upon a time...' }, + { title: 'New list with dates', description: 'New List with dates', content: '
cdate
mdate

My List

' } + ], + template_cdate_format: '[Date Created (CDATE): %m/%d/%Y : %H:%M:%S]', + template_mdate_format: '[Date Modified (MDATE): %m/%d/%Y : %H:%M:%S]', + image_caption: true, + quickbars_selection_toolbar: 'quicklink | blocks | bold italic underline ', // h2 h3 blockquote quickimage quicktable + quickbars_insert_toolbar: 'resource-picker file-upload | insertfile image media table link', + toolbar_mode: 'sliding', + contextmenu: 'resource-picker file-upload | link image media table', + //theme: 'modern', + skin: null, // we provide it through theme system + //skin_url: asset('packages/tinymce/skins/ui/oxide'), + content_css: theme('bootstrap'), + //content_style: , + /*skin: 'oxide',*/ + /*content_css: 'default',*/ + /*skin: useDarkMode ? 'oxide-dark' : 'oxide', + content_css: useDarkMode ? 'dark' : 'default',*/ + //content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }', + noneditable_class: 'mceNonEditable', + statusbar: false, + branding: false, + promotion: false +} + +const normalConfig = { + //skin: false, // we provide it through theme system + // plugin autoresize + autoresize_min_height: '160px',//`${props.minRows * 34}px`, + //autoresize_max_height: 500, + //height: `${props.minRows * 34}px`, + menubar: false, + statusbar: false, + branding: false, + plugins: [ + 'autoresize', 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'preview', + 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen', + 'insertdatetime', 'media', 'table', 'code', 'help' + ], + toolbar: 'undo redo | blocks | ' + + 'bold italic forecolor | alignleft aligncenter ' + + 'alignright alignjustify | bullist numlist outdent indent | ' + + 'removeformat | fullscreen preview code help', + //content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }' +} + +const Tinymce = (props) => { + //const editorRef = useRef(null); + + return ( + editorRef.current = editor} + onEditorChange={props.onChange} + onSelectionChange={(args) => true/*console.log(args)*/} + //tinymceScriptSrc={asset('packages/tinymce/tinymce.min.js')} + /> + ) +} + +Tinymce.propTypes = { + id: T.string.isRequired, + disabled: T.bool, + mode: T.oneOf(['normal', 'full']), + value: T.string, + onChange: T.func, + inline: T.bool, + minRows: T.number, + workspace: T.shape( + WorkspaceTypes.propTypes + ) +} + +Tinymce.defaultProps = { + inline: false, + mode: 'full' +} + +const TinymceEditor = withModal(Tinymce) + +export { + TinymceEditor +} diff --git a/src/main/app/Resources/modules/input/tinymce/langs/fr.js b/src/main/app/Resources/modules/input/tinymce/langs/fr.js new file mode 100644 index 00000000000..cae8411ebbf --- /dev/null +++ b/src/main/app/Resources/modules/input/tinymce/langs/fr.js @@ -0,0 +1,407 @@ +//import tinymce from 'tinymce/tinymce' + +window.tinymce.addI18n("fr",{"Redo":"R\xe9tablir", + "Undo":"Annuler", + "Cut":"Couper", + "Copy":"Copier", + "Paste":"Coller", + "Select all":"S\xe9lectionner tout", + "New document":"Nouveau document", + "Ok":"OK", + "Cancel":"Annuler", + "Visual aids":"Aides visuelles", + "Bold":"Gras", + "Italic":"Italique", + "Underline":"Soulign\xe9", + "Strikethrough":"Barr\xe9", + "Superscript":"Exposant", + "Subscript":"Indice", + "Clear formatting":"Effacer la mise en forme", + "Remove":"Retir\xe9", + "Align left":"Aligner \xe0 gauche", + "Align center":"Centrer", + "Align right":"Aligner \xe0 droite", + "No alignment":"Aucun alignement", + "Justify":"Justifier", + "Bullet list":"Liste \xe0 puces", + "Numbered list":"Liste num\xe9rot\xe9e", + "Decrease indent":"R\xe9duire le retrait", + "Increase indent":"Augmenter le retrait", + "Close":"Fermer", + "Formats":"Formats", + "Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.":"Votre navigateur ne supporte pas l\u2019acc\xe8s direct au presse-papiers. Merci d'utiliser les raccourcis clavier Ctrl+X/C/V.", + "Headings":"Titres", + "Heading 1":"Titre\xa01", + "Heading 2":"Titre\xa02", + "Heading 3":"Titre\xa03", + "Heading 4":"Titre\xa04", + "Heading 5":"Titre\xa05", + "Heading 6":"Titre\xa06", + "Preformatted":"Pr\xe9format\xe9", + "Div":"Div", + "Pre":"Pr\xe9format\xe9", + "Code":"Code", + "Paragraph":"Paragraphe", + "Blockquote":"Bloc de citation", + "Inline":"En ligne", + "Blocks":"Blocs", + "Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.":"Le collage est maintenant en mode texte brut. Les contenus seront coll\xe9s sans retenir les formatages jusqu'\xe0 ce que vous d\xe9sactivez cette option.", + "Fonts":"Polices", + "Font sizes":"Tailles de police", + "Class":"Classe", + "Browse for an image":"Rechercher une image", + "OR":"OU", + "Drop an image here":"D\xe9poser une image ici", + "Upload":"T\xe9l\xe9charger", + "Uploading image":"T\xe9l\xe9versement d'une image", + "Block":"Bloc", + "Align":"Aligner", + "Default":"Par d\xe9faut", + "Circle":"Cercle", + "Disc":"Disque", + "Square":"Carr\xe9", + "Lower Alpha":"Alphabet en minuscules", + "Lower Greek":"Alphabet grec en minuscules", + "Lower Roman":"Chiffre romain inf\xe9rieur", + "Upper Alpha":"Alphabet en majuscules", + "Upper Roman":"Chiffre romain sup\xe9rieur", + "Anchor...":"Ancre...", + "Anchor":"Ancre", + "Name":"Nom", + "ID":"ID", + "ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.":"L'ID doit commencer par une lettre, suivie uniquement par des lettres, num\xe9ros, tirets, points, deux-points et underscores.", + "You have unsaved changes are you sure you want to navigate away?":"Vous avez des modifications non enregistr\xe9es, \xeates-vous s\xfbr de vouloir quitter la page\xa0?", + "Restore last draft":"Restaurer le dernier brouillon", + "Special character...":"Caract\xe8re sp\xe9cial...", + "Special Character":"Caract\xe8re sp\xe9cial", + "Source code":"Code source", + "Insert/Edit code sample":"Ins\xe9rer / modifier une exemple de code", + "Language":"Langue", + "Code sample...":"Exemple de code...", + "Left to right":"De gauche \xe0 droite", + "Right to left":"De droite \xe0 gauche", + "Title":"Titre", + "Fullscreen":"Plein \xe9cran", + "Action":"Action", + "Shortcut":"Raccourci", + "Help":"Aide", + "Address":"Adresse", + "Focus to menubar":"Mettre le focus sur la barre de menu", + "Focus to toolbar":"Mettre le focus sur la barre d'outils", + "Focus to element path":"Mettre le focus sur le chemin vers l'\xe9l\xe9ment", + "Focus to contextual toolbar":"Mettre le focus sur la barre d'outils contextuelle", + "Insert link (if link plugin activated)":"Ins\xe9rer un lien (si le plug-in link est activ\xe9)", + "Save (if save plugin activated)":"Enregistrer (si le plug-in save est activ\xe9)", + "Find (if searchreplace plugin activated)":"Rechercher (si le plug-in searchreplace est activ\xe9)", + "Plugins installed ({0}):":"Plug-ins install\xe9s ({0})\xa0:", + "Premium plugins:":"Plug-ins premium\xa0:", + "Learn more...":"En savoir plus...", + "You are using {0}":"Vous utilisez {0}", + "Plugins":"Plug-ins", + "Handy Shortcuts":"Raccourcis utiles", + "Horizontal line":"Ligne horizontale", + "Insert/edit image":"Ins\xe9rer/modifier image", + "Alternative description":"Description alternative", + "Accessibility":"Accessibilit\xe9", + "Image is decorative":"L'image est d\xe9corative", + "Source":"Source", + "Dimensions":"Dimensions", + "Constrain proportions":"Limiter les proportions", + "General":"G\xe9n\xe9ral", + "Advanced":"Options avanc\xe9es", + "Style":"Style", + "Vertical space":"Espace vertical", + "Horizontal space":"Espace horizontal", + "Border":"Bordure", + "Insert image":"Ins\xe9rer une image", + "Image...":"Image...", + "Image list":"Liste des images", + "Resize":"Redimensionner", + "Insert date/time":"Ins\xe9rer date/heure", + "Date/time":"Date/heure", + "Insert/edit link":"Ins\xe9rer/modifier lien", + "Text to display":"Texte \xe0 afficher", + "Url":"URL", + "Open link in...":"Ouvrir le lien dans...", + "Current window":"Fen\xeatre active", + "None":"Aucun", + "New window":"Nouvelle fen\xeatre", + "Open link":"Ouvrir le lien", + "Remove link":"Enlever le lien", + "Anchors":"Ancres", + "Link...":"Lien...", + "Paste or type a link":"Coller ou taper un lien", + "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?":"L'URL que vous avez saisi semble \xeatre une adresse e-mail. Souhaitez-vous y ajouter le pr\xe9fixe requis mailto:\xa0?", + "The URL you entered seems to be an external link. Do you want to add the required http:// prefix?":"L'URL que vous avez saisi semble \xeatre un lien externe. Souhaitez-vous y ajouter le pr\xe9fixe requis mailto:\xa0?", + "The URL you entered seems to be an external link. Do you want to add the required https:// prefix?":"L'URL que vous avez saisie semble \xeatre un lien externe. Voulez-vous ajouter le pr\xe9fixe https:// requis\xa0?", + "Link list":"Liste des liens", + "Insert video":"Ins\xe9rer une vid\xe9o", + "Insert/edit video":"Ins\xe9rer/modifier une vid\xe9o", + "Insert/edit media":"Ins\xe9rer/modifier un m\xe9dia", + "Alternative source":"Source alternative", + "Alternative source URL":"URL de la source alternative", + "Media poster (Image URL)":"Affiche de m\xe9dia (URL de l'image)", + "Paste your embed code below:":"Collez votre code incorpor\xe9 ci-dessous :", + "Embed":"Incorporer", + "Media...":"M\xe9dia...", + "Nonbreaking space":"Espace ins\xe9cable", + "Page break":"Saut de page", + "Paste as text":"Coller comme texte", + "Preview":"Aper\xe7u", + "Print":"Imprimer", + "Print...":"Imprimer...", + "Save":"Enregistrer", + "Find":"Rechercher", + "Replace with":"Remplacer par", + "Replace":"Remplacer", + "Replace all":"Remplacer tout", + "Previous":"Pr\xe9c\xe9dente", + "Next":"Suivante", + "Find and Replace":"Rechercher et remplacer", + "Find and replace...":"Rechercher et remplacer...", + "Could not find the specified string.":"Impossible de trouver la cha\xeene sp\xe9cifi\xe9e.", + "Match case":"Respecter la casse", + "Find whole words only":"Mot entier", + "Find in selection":"Rechercher dans la s\xe9lection", + "Insert table":"Ins\xe9rer un tableau", + "Table properties":"Propri\xe9t\xe9s du tableau", + "Delete table":"Supprimer le tableau", + "Cell":"Cellule", + "Row":"Ligne", + "Column":"Colonne", + "Cell properties":"Propri\xe9t\xe9s de la cellule", + "Merge cells":"Fusionner les cellules", + "Split cell":"Diviser la cellule", + "Insert row before":"Ins\xe9rer une ligne avant", + "Insert row after":"Ins\xe9rer une ligne apr\xe8s", + "Delete row":"Supprimer la ligne", + "Row properties":"Propri\xe9t\xe9s de la ligne", + "Cut row":"Couper la ligne", + "Cut column":"Couper la colonne", + "Copy row":"Copier la ligne", + "Copy column":"Copier la colonne", + "Paste row before":"Coller la ligne avant", + "Paste column before":"Coller la colonne avant", + "Paste row after":"Coller la ligne apr\xe8s", + "Paste column after":"Coller la colonne apr\xe8s", + "Insert column before":"Ins\xe9rer une colonne avant", + "Insert column after":"Ins\xe9rer une colonne apr\xe8s", + "Delete column":"Supprimer la colonne", + "Cols":"Colonnes", + "Rows":"Lignes", + "Width":"Largeur", + "Height":"Hauteur", + "Cell spacing":"Espacement entre les cellules", + "Cell padding":"Marge int\xe9rieure des cellules", + "Row clipboard actions":"Actions du presse-papiers des lignes", + "Column clipboard actions":"Actions du presse-papiers des colonnes", + "Table styles":"Style tableau", + "Cell styles":"Type de cellule", + "Column header":"En-t\xeate de colonne", + "Row header":"En-t\xeate de ligne", + "Table caption":"L\xe9gende de tableau", + "Caption":"L\xe9gende", + "Show caption":"Afficher une l\xe9gende", + "Left":"Gauche", + "Center":"Centre", + "Right":"Droite", + "Cell type":"Type de cellule", + "Scope":"\xc9tendue", + "Alignment":"Alignement", + "Horizontal align":"Alignement horizontal", + "Vertical align":"Alignement vertical", + "Top":"En haut", + "Middle":"Au milieu", + "Bottom":"En bas", + "Header cell":"Cellule d'en-t\xeate", + "Row group":"Groupe de lignes", + "Column group":"Groupe de colonnes", + "Row type":"Type de ligne", + "Header":"En-t\xeate", + "Body":"Corps", + "Footer":"Pied de page", + "Border color":"Couleur de bordure", + "Solid":"Trait continu", + "Dotted":"Pointill\xe9", + "Dashed":"Tirets", + "Double":"Deux traits continus", + "Groove":"Sculpt\xe9", + "Ridge":"Extrud\xe9", + "Inset":"Incrust\xe9", + "Outset":"Relief", + "Hidden":"Masqu\xe9", + "Insert template...":"Ins\xe9rer un mod\xe8le...", + "Templates":"Mod\xe8les", + "Template":"Mod\xe8le", + "Insert Template":"Ins\xe9rer le mod\xe8le", + "Text color":"Couleur du texte", + "Background color":"Couleur d'arri\xe8re-plan", + "Custom...":"Personnalis\xe9e...", + "Custom color":"Couleur personnalis\xe9e", + "No color":"Aucune couleur", + "Remove color":"Supprimer la couleur", + "Show blocks":"Afficher les blocs", + "Show invisible characters":"Afficher les caract\xe8res invisibles", + "Word count":"Nombre de mots", + "Count":"Total", + "Document":"Document", + "Selection":"S\xe9lection", + "Words":"Mots", + "Words: {0}":"Mots\xa0: {0}", + "{0} words":"{0} mots", + "File":"Fichier", + "Edit":"Edition", + "Insert":"Insertion", + "View":"Affichage", + "Format":"Format", + "Table":"Tableau", + "Tools":"Outils", + "Powered by {0}":"Avec {0}", + "Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help":"Zone de Texte Riche. Appuyez sur ALT-F9 pour le menu. Appuyez sur ALT-F10 pour la barre d'outils. Appuyez sur ALT-0 pour l'aide", + "Image title":"Titre d'image", + "Border width":"\xc9paisseur de la bordure", + "Border style":"Style de la bordure", + "Error":"Erreur", + "Warn":"Avertir", + "Valid":"Valide", + "To open the popup, press Shift+Enter":"Pour ouvrir la popup, appuyez sur Maj+Entr\xe9e", + "Rich Text Area":"Zone de Texte Riche", + "Rich Text Area. Press ALT-0 for help.":"Zone de Texte Riche. Appuyez sur ALT-0 pour l'aide.", + "System Font":"Police syst\xe8me", + "Failed to upload image: {0}":"\xc9chec d'envoi de l'image\xa0: {0}", + "Failed to load plugin: {0} from url {1}":"\xc9chec de chargement du plug-in\xa0: {0} \xe0 partir de l\u2019URL {1}", + "Failed to load plugin url: {0}":"\xc9chec de chargement de l'URL du plug-in\xa0: {0}", + "Failed to initialize plugin: {0}":"\xc9chec d'initialisation du plug-in\xa0: {0}", + "example":"exemple", + "Search":"Rechercher", + "All":"Tout", + "Currency":"Devise", + "Text":"Texte", + "Quotations":"Citations", + "Mathematical":"Op\xe9rateurs math\xe9matiques", + "Extended Latin":"Latin \xe9tendu", + "Symbols":"Symboles", + "Arrows":"Fl\xe8ches", + "User Defined":"D\xe9fini par l'utilisateur", + "dollar sign":"Symbole dollar", + "currency sign":"Symbole devise", + "euro-currency sign":"Symbole euro", + "colon sign":"Symbole col\xf3n", + "cruzeiro sign":"Symbole cruzeiro", + "french franc sign":"Symbole franc fran\xe7ais", + "lira sign":"Symbole lire", + "mill sign":"Symbole milli\xe8me", + "naira sign":"Symbole naira", + "peseta sign":"Symbole peseta", + "rupee sign":"Symbole roupie", + "won sign":"Symbole won", + "new sheqel sign":"Symbole nouveau ch\xe9kel", + "dong sign":"Symbole dong", + "kip sign":"Symbole kip", + "tugrik sign":"Symbole tougrik", + "drachma sign":"Symbole drachme", + "german penny symbol":"Symbole pfennig", + "peso sign":"Symbole peso", + "guarani sign":"Symbole guarani", + "austral sign":"Symbole austral", + "hryvnia sign":"Symbole hryvnia", + "cedi sign":"Symbole cedi", + "livre tournois sign":"Symbole livre tournois", + "spesmilo sign":"Symbole spesmilo", + "tenge sign":"Symbole tenge", + "indian rupee sign":"Symbole roupie indienne", + "turkish lira sign":"Symbole lire turque", + "nordic mark sign":"Symbole du mark nordique", + "manat sign":"Symbole manat", + "ruble sign":"Symbole rouble", + "yen character":"Sinogramme Yen", + "yuan character":"Sinogramme Yuan", + "yuan character, in hong kong and taiwan":"Sinogramme Yuan, Hong Kong et Taiwan", + "yen/yuan character variant one":"Sinogramme Yen/Yuan, premi\xe8re variante", + "Emojis":"\xc9mojis", + "Emojis...":"\xc9mojis...", + "Loading emojis...":"Chargement des emojis...", + "Could not load emojis":"Impossible de charger les emojis", + "People":"Personnes", + "Animals and Nature":"Animaux & nature", + "Food and Drink":"Nourriture & boissons", + "Activity":"Activit\xe9", + "Travel and Places":"Voyages & lieux", + "Objects":"Objets", + "Flags":"Drapeaux", + "Characters":"Caract\xe8res", + "Characters (no spaces)":"Caract\xe8res (espaces non compris)", + "{0} characters":"{0}\xa0caract\xe8res", + "Error: Form submit field collision.":"Erreur\xa0: conflit de champs lors de la soumission du formulaire.", + "Error: No form element found.":"Erreur : aucun \xe9l\xe9ment de formulaire trouv\xe9.", + "Color swatch":"\xc9chantillon de couleurs", + "Color Picker":"S\xe9lecteur de couleurs", + "Invalid hex color code: {0}":"Code couleur hexad\xe9cimal invalide : {0}", + "Invalid input":"Entr\xe9e invalide", + "R":"R", + "Red component":"Composant rouge", + "G":"V", + "Green component":"Composant vert", + "B":"B", + "Blue component":"Composant bleu", + "#":"#", + "Hex color code":"Code couleur hexad\xe9cimal", + "Range 0 to 255":"Plage de 0 \xe0 255", + "Turquoise":"Turquoise", + "Green":"Vert", + "Blue":"Bleu", + "Purple":"Violet", + "Navy Blue":"Bleu marine", + "Dark Turquoise":"Turquoise fonc\xe9", + "Dark Green":"Vert fonc\xe9", + "Medium Blue":"Bleu moyen", + "Medium Purple":"Violet moyen", + "Midnight Blue":"Bleu de minuit", + "Yellow":"Jaune", + "Orange":"Orange", + "Red":"Rouge", + "Light Gray":"Gris clair", + "Gray":"Gris", + "Dark Yellow":"Jaune fonc\xe9", + "Dark Orange":"Orange fonc\xe9", + "Dark Red":"Rouge fonc\xe9", + "Medium Gray":"Gris moyen", + "Dark Gray":"Gris fonc\xe9", + "Light Green":"Vert clair", + "Light Yellow":"Jaune clair", + "Light Red":"Rouge clair", + "Light Purple":"Violet clair", + "Light Blue":"Bleu clair", + "Dark Purple":"Violet fonc\xe9", + "Dark Blue":"Bleu fonc\xe9", + "Black":"Noir", + "White":"Blanc", + "Switch to or from fullscreen mode":"Passer en ou quitter le mode plein \xe9cran", + "Open help dialog":"Ouvrir la bo\xeete de dialogue d'aide", + "history":"historique", + "styles":"styles", + "formatting":"mise en forme", + "alignment":"alignement", + "indentation":"retrait", + "Font":"Police", + "Size":"Taille", + "More...":"Plus...", + "Select...":"S\xe9lectionner...", + "Preferences":"Pr\xe9f\xe9rences", + "Yes":"Oui", + "No":"Non", + "Keyboard Navigation":"Navigation au clavier", + "Version":"Version", + "Code view":"Affichage du code", + "Open popup menu for split buttons":"Ouvrir le menu contextuel pour les boutons partag\xe9s", + "List Properties":"Propri\xe9t\xe9s de la liste", + "List properties...":"Lister les propri\xe9t\xe9s...", + "Start list at number":"Liste de d\xe9part au num\xe9ro", + "Line height":"Hauteur de la ligne", + "Dropped file type is not supported":"Le type de fichier d\xe9pos\xe9 n'est pas pris en charge", + "Loading...":"Chargement...", + "ImageProxy HTTP error: Rejected request":"Erreur HTTP d'ImageProxy : Requ\xeate rejet\xe9e", + "ImageProxy HTTP error: Could not find Image Proxy":"Erreur HTTP d'ImageProxy : Impossible de trouver ImageProxy", + "ImageProxy HTTP error: Incorrect Image Proxy URL":"Erreur HTTP d'ImageProxy : URL de ImageProxy incorrecte", + "ImageProxy HTTP error: Unknown ImageProxy error":"Erreur HTTP d'ImageProxy : Erreur ImageProxy inconnue" +}); \ No newline at end of file diff --git a/src/main/app/Resources/modules/input/tinymce/langs/index.js b/src/main/app/Resources/modules/input/tinymce/langs/index.js new file mode 100644 index 00000000000..fb3de0ca8fc --- /dev/null +++ b/src/main/app/Resources/modules/input/tinymce/langs/index.js @@ -0,0 +1 @@ +import '#/main/app/input/tinymce/langs/fr' diff --git a/src/main/app/Resources/modules/input/tinymce/plugins/index.js b/src/main/app/Resources/modules/input/tinymce/plugins/index.js new file mode 100644 index 00000000000..3a482c2eb96 --- /dev/null +++ b/src/main/app/Resources/modules/input/tinymce/plugins/index.js @@ -0,0 +1,108 @@ +/** + * Registers all plugins used by Claroline TinyMCE. + */ + +import 'tinymce/models/dom' +// Theme +import 'tinymce/themes/silver'; +// Toolbar icons +import 'tinymce/icons/default'; + +// importing the plugin js. +/*import 'tinymce/plugins/advlist' +import 'tinymce/plugins/anchor' +import 'tinymce/plugins/autolink' +import 'tinymce/plugins/autoresize' +import 'tinymce/plugins/autosave' +import 'tinymce/plugins/charmap' +import 'tinymce/plugins/code' +import 'tinymce/plugins/codesample' +import 'tinymce/plugins/directionality' +//import 'tinymce/plugins/emoticons' +import 'tinymce/plugins/fullscreen' +import 'tinymce/plugins/help'; +import 'tinymce/plugins/image' +import 'tinymce/plugins/importcss' +import 'tinymce/plugins/insertdatetime' +import 'tinymce/plugins/link' +import 'tinymce/plugins/lists' +import 'tinymce/plugins/media' +import 'tinymce/plugins/nonbreaking' +import 'tinymce/plugins/pagebreak' +import 'tinymce/plugins/preview' +import 'tinymce/plugins/quickbars' +import 'tinymce/plugins/save' +import 'tinymce/plugins/searchreplace' +import 'tinymce/plugins/table' +import 'tinymce/plugins/template' +import 'tinymce/plugins/visualblocks' +import 'tinymce/plugins/visualchars' +import 'tinymce/plugins/wordcount'*/ + + +// standard plugins +/*import 'tinymce/plugins/anchor' +import 'tinymce/plugins/advlist' +import 'tinymce/plugins/autolink' +import 'tinymce/plugins/autoresize' +import 'tinymce/plugins/charmap' +import 'tinymce/plugins/code' +//import 'tinymce/plugins/contextmenu' +import 'tinymce/plugins/fullscreen' +import 'tinymce/plugins/image' +import 'tinymce/plugins/insertdatetime' +import 'tinymce/plugins/link' +import 'tinymce/plugins/lists' +import 'tinymce/plugins/media' +//import 'tinymce/plugins/paste' +import 'tinymce/plugins/preview' +import 'tinymce/plugins/searchreplace' +import 'tinymce/plugins/table' +//import 'tinymce/plugins/textcolor' +import 'tinymce/plugins/visualblocks' +import 'tinymce/plugins/wordcount' + +// claroline +import '#/main/core/tinymce/plugins/advanced-fullscreen' +import '#/main/core/tinymce/plugins/advanced-toolbar' +//import '#/main/core/tinymce/plugins/codemirror' +import '#/main/core/tinymce/plugins/file-upload' +//import '#/main/core/tinymce/plugins/mentions' +import '#/main/core/tinymce/plugins/resource-picker'*/ + + +// Editor styles +//import 'tinymce/skins/ui/oxide/skin.min.css'; + +const plugins = [ + 'advanced-fullscreen', + 'advanced-toolbar', + 'anchor', + 'autolink', + 'autoresize', + 'advlist', + 'charmap', + 'code', + //'codemirror', + //'contextmenu', + 'file-upload', + 'fullscreen', + 'image', + 'insertdatetime', + 'link', + 'lists', + 'media', + //'mentions', + //'paste', + 'preview', + 'resource-picker', + 'searchreplace', + 'table', + //'textcolor', + 'visualblocks', + 'wordcount' +] + +export { + plugins +} diff --git a/src/main/app/Resources/views/index.html.twig b/src/main/app/Resources/views/index.html.twig index 765848626a5..7a29dfb1028 100644 --- a/src/main/app/Resources/views/index.html.twig +++ b/src/main/app/Resources/views/index.html.twig @@ -71,6 +71,8 @@ {# Claroline Plugins configuration #} + {# TinyMCE #} + {# Router #} diff --git a/src/main/core/API/Serializer/Platform/ClientSerializer.php b/src/main/core/API/Serializer/Platform/ClientSerializer.php index 16b5f7791b4..cb84f40eeb7 100644 --- a/src/main/core/API/Serializer/Platform/ClientSerializer.php +++ b/src/main/core/API/Serializer/Platform/ClientSerializer.php @@ -106,9 +106,6 @@ public function serialize() 'breadcrumb' => $this->config->getParameter('display.breadcrumb'), ], 'restrictions' => $this->config->getParameter('restrictions'), - 'openGraph' => [ - 'enabled' => $this->config->getParameter('enable_opengraph'), - ], 'richTextScript' => $this->config->getParameter('rich_text_script'), 'home' => $this->config->getParameter('home'), 'resources' => [ diff --git a/src/main/core/Configuration/LegacyParametersMapping.php b/src/main/core/Configuration/LegacyParametersMapping.php index 29bcb9ad45b..21d8c3f52a5 100644 --- a/src/main/core/Configuration/LegacyParametersMapping.php +++ b/src/main/core/Configuration/LegacyParametersMapping.php @@ -58,7 +58,6 @@ public function getMapping() 'default_workspace_tag' => 'workspace.default_tag', 'ssl_enabled' => 'ssl.enabled', 'ssl_version_value' => 'ssl.version', - 'enable_opengraph' => 'text.enable_opengraph', 'resource_icon_set' => 'display.resource_icon_set', 'direct_third_party_authentication' => 'authentication.direct_third_party', 'platform_log_enabled' => 'logs.enabled', diff --git a/src/main/core/Configuration/PlatformDefaults.php b/src/main/core/Configuration/PlatformDefaults.php index fc5c7ef67d9..b428684baf9 100644 --- a/src/main/core/Configuration/PlatformDefaults.php +++ b/src/main/core/Configuration/PlatformDefaults.php @@ -37,9 +37,6 @@ public function getDefaultParameters() 'show_email' => [PlatformRoles::USER], ], 'country' => '-', - 'text' => [ - 'enable_opengraph' => true, - ], 'logs' => [ 'enabled' => true, ], diff --git a/src/main/core/Resources/less/layout/components/charts.less b/src/main/core/Resources/less/layout/components/charts.less index 69fd5238df4..4cc3e7ff640 100644 --- a/src/main/core/Resources/less/layout/components/charts.less +++ b/src/main/core/Resources/less/layout/components/charts.less @@ -13,7 +13,7 @@ svg.chart { } .axis-label { - font-size: @font-size; + font-size: @font-size-base; font-weight: bold; } } diff --git a/src/main/core/Resources/less/layout/components/forms.less b/src/main/core/Resources/less/layout/components/forms.less index 790781476d9..ba195bc8440 100644 --- a/src/main/core/Resources/less/layout/components/forms.less +++ b/src/main/core/Resources/less/layout/components/forms.less @@ -4,6 +4,7 @@ // FIXME: this is ugly to do it like it // if there are additional containers, I'm fucked and it may be required by some other components too +/* .page-content > .data-form { &:first-child { margin-top: @component-margin-bottom; @@ -13,6 +14,11 @@ } } } +*/ + +.data-form { + flex: 1 0 auto; // to fill page if needed +} .form-mode { display: flex; @@ -307,4 +313,4 @@ input[type=checkbox] { .has-error .no-item-info { color: @state-danger-text; border-color: @state-danger-text; -} \ No newline at end of file +} diff --git a/src/main/core/Resources/less/layout/components/index.less b/src/main/core/Resources/less/layout/components/index.less index ba349947555..5cbfe279ca9 100644 --- a/src/main/core/Resources/less/layout/components/index.less +++ b/src/main/core/Resources/less/layout/components/index.less @@ -36,4 +36,5 @@ @import "tags"; @import "thumbnails"; @import "timer"; +@import "tinymce"; @import "tooltip"; diff --git a/src/main/core/Resources/less/layout/components/tinymce.less b/src/main/core/Resources/less/layout/components/tinymce.less new file mode 100644 index 00000000000..0adcf0a00fa --- /dev/null +++ b/src/main/core/Resources/less/layout/components/tinymce.less @@ -0,0 +1,30 @@ +// Full screen editor container +/* +.text-editor.editor-fullscreen{ + position: fixed; + top: 0; + left: 0; + width: 100%; + height: auto; + z-index: @zindex-fullscreen; +}*/ + +@import "@{vendor-path}/tinymce/skins/content/default/content.min.css"; +@import "@{vendor-path}/tinymce/skins/ui/oxide/content.min.css"; + +.tox-tinymce { + border-radius: 0 !important; + border: none !important; +} + +.tox .tox-throbber { + z-index: @zindex-modal-background - 1 !important; +} + +.tox-fullscreen { + z-index: @zindex-fullscreen; +} + +.mce-content-body { + padding: 0 floor(@grid-gutter-width / 2) !important; +} diff --git a/src/main/core/Resources/less/layout/pages.less b/src/main/core/Resources/less/layout/pages.less index 80cbfc46cf6..320487f4c1c 100644 --- a/src/main/core/Resources/less/layout/pages.less +++ b/src/main/core/Resources/less/layout/pages.less @@ -43,7 +43,7 @@ .page-header { // this is to make box shadow of page-header and footer appear over content with bg. I should find a better way to handle it (without z-index) - z-index: 2; + //z-index: 2; position: relative; display: flex; align-items: flex-end; @@ -179,7 +179,7 @@ .page-content { // this is to make box shadow of page-header and footer appear over content with bg. I should find a better way to handle it (without z-index) - z-index: 1; + //z-index: 1; position: relative; display: flex; flex-direction: column; diff --git a/src/main/core/Resources/less/main.less b/src/main/core/Resources/less/main.less index e5d1b1d1c23..f71170c9af6 100644 --- a/src/main/core/Resources/less/main.less +++ b/src/main/core/Resources/less/main.less @@ -10,7 +10,6 @@ @import "content/index"; @import "data/index"; @import "layout/index"; -@import "tinymce/index"; @import "users/index"; @import "widget/index"; @import "workspace/index"; diff --git a/src/main/core/Resources/less/tinymce/default/AbsoluteLayout.less b/src/main/core/Resources/less/tinymce/default/AbsoluteLayout.less deleted file mode 100644 index cdaf555f15d..00000000000 --- a/src/main/core/Resources/less/tinymce/default/AbsoluteLayout.less +++ /dev/null @@ -1,17 +0,0 @@ -// AbsoluteLayout - -.@{prefix}-abs-layout { - position: relative; -} - -body .@{prefix}-abs-layout-item, .@{prefix}-abs-end { - position: absolute; -} - -.@{prefix}-abs-end { - width: 1px; height: 1px; -} - -.@{prefix}-container-body.@{prefix}-abs-layout { - overflow: hidden; -} diff --git a/src/main/core/Resources/less/tinymce/default/Animations.less b/src/main/core/Resources/less/tinymce/default/Animations.less deleted file mode 100644 index ab9307dad88..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Animations.less +++ /dev/null @@ -1,10 +0,0 @@ -// Animations - -.@{prefix}-fade { - opacity: 0; - .transition(opacity .15s linear); - - &.@{prefix}-in { - opacity: 1; - } -} diff --git a/src/main/core/Resources/less/tinymce/default/Arrows.less b/src/main/core/Resources/less/tinymce/default/Arrows.less deleted file mode 100644 index 5b7bf4159c8..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Arrows.less +++ /dev/null @@ -1,115 +0,0 @@ -// Arrows - -.@{prefix}-arrow-up { - margin-top: 12px; -} - -.@{prefix}-arrow-down { - margin-top: -12px; -} - -.@{prefix}-arrow:before, -.@{prefix}-arrow:after { - position: absolute; - left: 50%; - display: block; - width: 0; - height: 0; - border-style: solid; - border-color: transparent; - content: ""; -} - -.@{prefix}-arrow.@{prefix}-arrow-up:before { - top: -9px; - border-bottom-color: @panel-border; - border-width: 0 9px 9px; - margin-left: -9px; -} - -.@{prefix}-arrow.@{prefix}-arrow-down:before { - bottom: -9px; - border-top-color: @panel-border; - border-width: 9px 9px 0; - margin-left: -9px; -} - -.@{prefix}-arrow.@{prefix}-arrow-up:after { - top: -8px; - border-bottom-color: @panel-bg; - border-width: 0 8px 8px; - margin-left: -8px; -} - -.@{prefix}-arrow.@{prefix}-arrow-down:after { - bottom: -8px; - border-top-color: @panel-bg; - border-width: 8px 8px 0; - margin-left: -8px; -} - -.@{prefix}-arrow.@{prefix}-arrow-left:before, -.@{prefix}-arrow.@{prefix}-arrow-left:after { - margin: 0; -} - -.@{prefix}-arrow.@{prefix}-arrow-left:before { - left: 8px; -} -.@{prefix}-arrow.@{prefix}-arrow-left:after { - left: 9px; -} - -.@{prefix}-arrow.@{prefix}-arrow-right:before, -.@{prefix}-arrow.@{prefix}-arrow-right:after { - left: auto; - margin: 0; -} - -.@{prefix}-arrow.@{prefix}-arrow-right:before { - right: 8px; -} - -.@{prefix}-arrow.@{prefix}-arrow-right:after { - right: 9px; -} - -.@{prefix}-arrow.@{prefix}-arrow-center.@{prefix}-arrow.@{prefix}-arrow-left:before { - left: -9px; - top: 50%; - border-right-color: @panel-border; - border-width: 9px 9px 9px 0; - margin-top: -9px; -} - -.@{prefix}-arrow.@{prefix}-arrow-center.@{prefix}-arrow.@{prefix}-arrow-left:after { - left: -8px; - top: 50%; - border-right-color: @panel-bg; - border-width: 8px 8px 8px 0; - margin-top: -8px; -} - -.@{prefix}-arrow.@{prefix}-arrow-center.@{prefix}-arrow.@{prefix}-arrow-left { - margin-left: 12px; -} - -.@{prefix}-arrow.@{prefix}-arrow-center.@{prefix}-arrow.@{prefix}-arrow-right:before { - right: -9px; - top: 50%; - border-left-color: @panel-border; - border-width: 9px 0 9px 9px; - margin-top: -9px; -} - -.@{prefix}-arrow.@{prefix}-arrow-center.@{prefix}-arrow.@{prefix}-arrow-right:after { - right: -8px; - top: 50%; - border-left-color: @panel-bg; - border-width: 8px 0 8px 8px; - margin-top: -8px; -} - -.@{prefix}-arrow.@{prefix}-arrow-center.@{prefix}-arrow.@{prefix}-arrow-right { - margin-left: -14px; -} diff --git a/src/main/core/Resources/less/tinymce/default/BrowseButton.less b/src/main/core/Resources/less/tinymce/default/BrowseButton.less deleted file mode 100644 index fde95bdc496..00000000000 --- a/src/main/core/Resources/less/tinymce/default/BrowseButton.less +++ /dev/null @@ -1,21 +0,0 @@ -// BrowseButton - -.@{prefix}-browsebutton { - position: relative; - overflow: hidden; - - & button { - position: relative; - z-index: 1; - } - - & input { - .opacity(0); - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 0; - } -} diff --git a/src/main/core/Resources/less/tinymce/default/Button.less b/src/main/core/Resources/less/tinymce/default/Button.less deleted file mode 100644 index 65fc63a4fc2..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Button.less +++ /dev/null @@ -1,191 +0,0 @@ -// Button - -.@{prefix}-btn { - border: 1px solid mix(rgb(red(@btn-border-right), green(@btn-border-right), blue(@btn-border-right)), @panel-bg, 30%); - border-color: @btn-border-top @btn-border-right @btn-border-bottom @btn-border-left; - position: relative; - text-shadow: @text-shadow; - background: @btn-bg; - - .inline-block(); - .border-radius(3px); - .box-shadow(@btn-box-shadow); - - &:hover, &:active { - background: @btn-bg-hover; - color: @btn-text-hover; - border-color: @btn-border-hover; - } - - &:focus { - background: @btn-bg-focus; - color: @btn-text-focus; - border-color: @btn-border-focus; - } - - &.@{prefix}-disabled button, &.@{prefix}-disabled:hover button { - cursor: default; - .box-shadow(none); - .opacity(@btn-box-disabled-opacity); - } - - &.@{prefix}-active, - &.@{prefix}-active:hover, - &.@{prefix}-active:focus, - &.@{prefix}-active:active { - .box-shadow(@btn-box-shadow-active); - background: @btn-bg-active; - color: @btn-text-active; - border-color: @btn-border-active; - } - - &.@{prefix}-active button, &.@{prefix}-active:hover button, - &.@{prefix}-active i, &.@{prefix}-active:hover i { - color: @btn-text-active; - } - - &:hover .@{prefix}-caret { - border-top-color: @btn-chevron-hover; - } - - &.@{prefix}-active .@{prefix}-caret, &.@{prefix}-active:hover .@{prefix}-caret { - border-top-color: @btn-chevron-active; - } -} - -.@{prefix}-btn button { - padding: @btn-padding; - font-size: @font-size; - line-height: @line-height; - *line-height: @line-height - 4px; - cursor: pointer; - color: @btn-text; - text-align: center; - - // Fixes for default inner padding of button - overflow: visible; // IE7 - -webkit-appearance: none; // WebKit - &::-moz-focus-inner { // Gecko - border: 0; - padding: 0; - } -} - -.@{prefix}-btn i { - text-shadow: 1px 1px @btn-text-shadow; -} - -.@{prefix}-primary.@{prefix}-btn-has-text { - min-width: 50px; -} - -.@{prefix}-primary { - color: @btn-primary-text; - border: 1px solid transparent; - border-color: @btn-primary-border; - background-color: @btn-primary-bg; - - &:hover, &:focus { - background-color: @btn-primary-bg-hover; - border-color: @btn-primary-border-hover; - } - - &.@{prefix}-disabled button, &.@{prefix}-disabled:hover button { - cursor: default; - .box-shadow(none); - .opacity(@btn-box-disabled-opacity); - } - - &.@{prefix}-active, &.@{prefix}-active:hover, &:not(.@{prefix}-disabled):active { - background-color: @btn-primary-bg-active; - .box-shadow(@btn-box-shadow-active); - } -} - -.@{prefix}-primary button, .@{prefix}-primary button i { - color: @btn-primary-text; - text-shadow: 1px 1px @btn-primary-text-shadow; -} - -.@{prefix}-btn .@{prefix}-txt { - font-size: inherit; - line-height: inherit; - color: inherit; -} - -.@{prefix}-btn-large button { - padding: 9px 14px; - font-size: @font-size + 2px; - line-height: normal; - .border-radius(5px); -} - -.@{prefix}-btn-large i { - margin-top: 2px; -} - -.@{prefix}-btn-small button { - padding: 1px 5px; - font-size: @font-size - 2px; - *padding-bottom: 2px; -} - -.@{prefix}-btn-small i { - line-height: 20px; - vertical-align: top; - *line-height: 18px; -} - -.@{prefix}-btn .@{prefix}-caret { - margin-top: 8px; - margin-left: 0; -} - -.@{prefix}-btn-small .@{prefix}-caret { - margin-top: 8px; - margin-left: 0; -} - -.@{prefix}-caret { - .inline-block(); - width: 0; height: 0; - vertical-align: top; - border-top: 4px solid @btn-chevron; - border-right: 4px solid transparent; - border-left: 4px solid transparent; - content: ""; -} - -.@{prefix}-disabled .@{prefix}-caret { - border-top-color: @text-disabled; -} - -.@{prefix}-caret.@{prefix}-up { - border-bottom: 4px solid @btn-chevron; - border-top: 0; -} - -.@{prefix}-btn-flat { - border: 0; - background: transparent; - .border-radius(0); - .box-shadow(none); - filter: none; -} - -.@{prefix}-btn-flat:hover, .@{prefix}-btn-flat.@{prefix}-active, .@{prefix}-btn-flat:focus, .@{prefix}-btn-flat:active { - border: 0; - background: @menubar-bg-active; - filter: none; - .box-shadow(none); -} - -.@{prefix}-btn-has-text .@{prefix}-ico { - padding-right: 5px; -} - -// RTL - -.@{prefix}-rtl .@{prefix}-btn button { - direction: rtl; -} diff --git a/src/main/core/Resources/less/tinymce/default/ButtonGroup.less b/src/main/core/Resources/less/tinymce/default/ButtonGroup.less deleted file mode 100644 index 9a7379bb031..00000000000 --- a/src/main/core/Resources/less/tinymce/default/ButtonGroup.less +++ /dev/null @@ -1,75 +0,0 @@ -// ButtonGroup - -.@{prefix}-toolbar .@{prefix}-btn-group { - margin: 0; - padding: 2px 0; -} - -.btn-group-border-left(@border-color) when (@has-button-borders = true) { - border-left: 1px solid @border-color; -} - -.btn-group-border-right(@border-color) when (@has-button-borders = true) { - border-right: 1px solid @border-color; -} - -.@{prefix}-btn-group .@{prefix}-btn { - border-width: @btn-group-border-width; - margin: 0; - .border-radius(0); - margin-left: @flow-layout-spacing; -} - -.@{prefix}-btn-group .@{prefix}-btn when (@has-button-borders = true) { - border-left-width: 0; - border-right-width: 0; - margin-left: 0; -} - -.@{prefix}-btn-group:not(:first-child) when (@has-button-borders = true) { - padding-left: 1px; - margin-left: 1px; -} - -.@{prefix}-btn-group:not(:first-child) when (@has-button-borders = false) { - border-left: 1px solid darken(@btn-bg, 15%); - padding-left: 0; - margin-left: @flow-layout-spacing; -} - -.@{prefix}-btn-group { - //.border-radius(3px 0 0 3px); - .btn-group-border-left(@btn-border-left); - margin-left: 2px; -} - -.@{prefix}-btn-group .@{prefix}-last { - //.border-radius(0 3px 3px 0); - .btn-group-border-right(@btn-border-right); -} - -.@{prefix}-btn-group .@{prefix}-first.@{prefix}-last { - //.border-radius(3px); -} - -.@{prefix}-btn-group .@{prefix}-btn.@{prefix}-flow-layout-item { - margin: 0; -} - -// RTL - -.@{prefix}-rtl .@{prefix}-btn-group .@{prefix}-btn { - margin-left: 0; - margin-right: @flow-layout-spacing; -} - -.@{prefix}-rtl .@{prefix}-btn-group .@{prefix}-first { - margin-right: 0; -} - -.@{prefix}-rtl .@{prefix}-btn-group:not(:first-child) { - border-left: none; - border-right:1px solid darken(@btn-bg, 15%); - padding-right: @flow-layout-spacing + 2px; - margin-right: @flow-layout-spacing + 2px; -} \ No newline at end of file diff --git a/src/main/core/Resources/less/tinymce/default/Checkbox.less b/src/main/core/Resources/less/tinymce/default/Checkbox.less deleted file mode 100644 index 9107dae8d4b..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Checkbox.less +++ /dev/null @@ -1,46 +0,0 @@ -// Checkbox - -.@{prefix}-checkbox { - cursor: pointer; -} - -i.@{prefix}-i-checkbox { - margin: 0 3px 0 0; - border: 1px solid @checkbox-border; - .border-radius(3px); - .box-shadow(@checkbox-box-shadow); - background-color: @checkbox-bg; - text-indent: -10em; - overflow: hidden; -} - -.@{prefix}-checked i.@{prefix}-i-checkbox { - color: @btn-text; - font-size: 16px; - line-height: 16px; - text-indent: 0; -} - -.@{prefix}-checkbox:focus i.@{prefix}-i-checkbox, .@{prefix}-checkbox.@{prefix}-focus i.@{prefix}-i-checkbox { - border: 1px solid @checkbox-border-focus; - .box-shadow(@checkbox-box-shadow-focus); -} - -.@{prefix}-checkbox.@{prefix}-disabled .@{prefix}-label, .@{prefix}-checkbox.@{prefix}-disabled i.@{prefix}-i-checkbox { - color: mix(@text, @panel-bg, 40%); -} - -.@{prefix}-checkbox .@{prefix}-label { - vertical-align: middle; -} - -// RTL - -.@{prefix}-rtl .@{prefix}-checkbox { - direction: rtl; - text-align: right; -} - -.@{prefix}-rtl i.@{prefix}-i-checkbox { - margin: 0 0 0 3px; -} diff --git a/src/main/core/Resources/less/tinymce/default/ColorBox.less b/src/main/core/Resources/less/tinymce/default/ColorBox.less deleted file mode 100644 index 356f0bb4ea5..00000000000 --- a/src/main/core/Resources/less/tinymce/default/ColorBox.less +++ /dev/null @@ -1,6 +0,0 @@ -// ColorBox - -.@{prefix}-colorbox i { - border: 1px solid @textbox-border; - width: 14px; height: 14px; -} diff --git a/src/main/core/Resources/less/tinymce/default/ColorButton.less b/src/main/core/Resources/less/tinymce/default/ColorButton.less deleted file mode 100644 index fc81a14c337..00000000000 --- a/src/main/core/Resources/less/tinymce/default/ColorButton.less +++ /dev/null @@ -1,72 +0,0 @@ -// ColorButton - -.@{prefix}-colorbutton .@{prefix}-ico { - position: relative; -} - -.@{prefix}-colorbutton-grid { - margin: 4px; -} -/* -.@{prefix}-colorbutton button { - padding-right: 6px; - padding-left: 6px; -} -*/ -.@{prefix}-colorbutton .@{prefix}-preview { - padding-right: 3px; - display: block; - position: absolute; - left: 50%; - top: 50%; - margin-left: -17px; - margin-top: 7px; - background: gray; - width: 13px; - height: 2px; - overflow: hidden; -} - -.@{prefix}-colorbutton.@{prefix}-btn-small .@{prefix}-preview { - margin-left: -16px; - padding-right: 0; - width: 16px; -} -/* -.@{prefix}-colorbutton .@{prefix}-open { - padding-left: 4px; - padding-right: 4px; - border-left: 1px solid transparent; -} - -.@{prefix}-colorbutton:hover .@{prefix}-open { - border-color: darken(@btn-bg, 20%); -} - -.@{prefix}-colorbutton.@{prefix}-btn-small .@{prefix}-open { - padding: 0 3px 0 3px; -} -*/ -// RTL - -.@{prefix}-rtl .@{prefix}-colorbutton { - direction: rtl; -} - -.@{prefix}-rtl .@{prefix}-colorbutton .@{prefix}-preview { - margin-left: 0; - padding-right: 0; - padding-left: 3px; -} - -.@{prefix}-rtl .@{prefix}-colorbutton.@{prefix}-btn-small .@{prefix}-preview { - margin-left: 0; - padding-right: 0; - padding-left: 2px; -} - -.@{prefix}-rtl .@{prefix}-colorbutton .@{prefix}-open { - padding-left: 4px; - padding-right: 4px; - border-left: 0; -} diff --git a/src/main/core/Resources/less/tinymce/default/ColorPicker.less b/src/main/core/Resources/less/tinymce/default/ColorPicker.less deleted file mode 100644 index 2a65ec098bf..00000000000 --- a/src/main/core/Resources/less/tinymce/default/ColorPicker.less +++ /dev/null @@ -1,80 +0,0 @@ -// ColorPicker - -.@{prefix}-colorpicker { - position: relative; - width: 250px; - height: 220px; -} - -.@{prefix}-colorpicker-sv { - position: absolute; - top: 0; left: 0; - width: 90%; - height: 100%; - border: 1px solid @colorpicker-border; - cursor: crosshair; - overflow: hidden; -} - -.@{prefix}-colorpicker-h-chunk { - width: 100%; -} - -.@{prefix}-colorpicker-overlay1, .@{prefix}-colorpicker-overlay2 { - width: 100%; - height: 100%; - position: absolute; - top: 0; - left: 0; -} - -.@{prefix}-colorpicker-overlay1 { - filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff'); - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff')"; - background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0)); -} - -.@{prefix}-colorpicker-overlay2 { - filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000'); - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000')"; - background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,1)); -} - -.@{prefix}-colorpicker-selector1 { - background: none; - position: absolute; - width: 12px; - height: 12px; - margin: -8px 0 0 -8px; - border: 1px solid black; - border-radius: 50%; -} - -.@{prefix}-colorpicker-selector2 { - position: absolute; - width: 10px; - height: 10px; - border: 1px solid white; - border-radius: 50%; -} - -.@{prefix}-colorpicker-h { - position: absolute; - top: 0; right: 0; - width: 6.5%; - height: 100%; - border: 1px solid @colorpicker-border; - cursor: crosshair; -} - -.@{prefix}-colorpicker-h-marker { - margin-top: -4px; - position: absolute; - top: 0; - left: -1px; - width: 100%; - border: 1px solid @colorpicker-hue-border; - background: @colorpicker-hue-bg; - height: 4px; - z-index: 100; -} diff --git a/src/main/core/Resources/less/tinymce/default/ComboBox.less b/src/main/core/Resources/less/tinymce/default/ComboBox.less deleted file mode 100644 index 12ec030a7d3..00000000000 --- a/src/main/core/Resources/less/tinymce/default/ComboBox.less +++ /dev/null @@ -1,97 +0,0 @@ -// ComboBox - -.@{prefix}-combobox { - position: relative; - .inline-block(); - .border-radius(3px); - .box-shadow(@textbox-box-shadow); - *height: 32px; -} - -.@{prefix}-combobox input { - border: 1px solid @textbox-border; - border-right-color: @combobox-border; - height: 28px; -} - -.@{prefix}-combobox.@{prefix}-disabled input { - color: mix(@text, @textbox-bg, 40%); -} - -.@{prefix}-combobox.@{prefix}-has-open input { - .border-radius(4px 0 0 4px); -} - -.@{prefix}-combobox .@{prefix}-btn { - border: 1px solid @textbox-border; - border-left: 0; - .border-radius(0 4px 4px 0); - margin: 0; -} - -.@{prefix}-combobox button { - padding-right: 8px; - padding-left: 8px; -} - -.@{prefix}-combobox.@{prefix}-disabled .@{prefix}-btn button { - cursor: default; - .box-shadow(none); - .opacity(@btn-box-disabled-opacity); -} - -.@{prefix}-combobox .@{prefix}-status { - position: absolute; - right: 2px; - top: 50%; - line-height: 16px; - margin-top: -8px; - font-size: 12px; - width: 15px; - height: 15px; - text-align: center; - cursor: pointer; -} - -.@{prefix}-combobox.@{prefix}-has-status input { - padding-right: 20px; -} - -.@{prefix}-combobox.@{prefix}-has-open .@{prefix}-status { - right: 37px; -} - -.@{prefix}-combobox .@{prefix}-status.@{prefix}-i-warning { - color: @combobox-warning-text; -} - -.@{prefix}-combobox .@{prefix}-status.@{prefix}-i-checkmark { - color: @combobox-success-text; -} - -.@{prefix}-menu.@{prefix}-combobox-menu { - border-top: 0; - margin-top: 0; - max-height: 200px; - - .@{prefix}-menu-item { - padding: 4px 6px 4px 4px; - font-size: 11px; - } - - .@{prefix}-menu-item-sep { - padding: 0; - } - - .@{prefix}-text { - font-size: 11px; - } - - .@{prefix}-menu-item-link, .@{prefix}-menu-item-link b { - font-size: 11px; - } - - .@{prefix}-text b { - font-size: 11px; - } -} diff --git a/src/main/core/Resources/less/tinymce/default/Container.less b/src/main/core/Resources/less/tinymce/default/Container.less deleted file mode 100644 index 0a17c1534e0..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Container.less +++ /dev/null @@ -1,9 +0,0 @@ -// Container - -.@{prefix}-container, .@{prefix}-container-body { - display: block; -} - -.@{prefix}-autoscroll { - overflow: hidden; -} diff --git a/src/main/core/Resources/less/tinymce/default/Content.Inline.less b/src/main/core/Resources/less/tinymce/default/Content.Inline.less deleted file mode 100644 index 47c2d3ffe73..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Content.Inline.less +++ /dev/null @@ -1,9 +0,0 @@ -/* Content.Inline.less */ - -@import "Variables.less"; -@import "Mixins.less"; -@import "Content.Objects.less"; - -.mce-content-body { - line-height: @content-line-height; -} diff --git a/src/main/core/Resources/less/tinymce/default/Content.Objects.less b/src/main/core/Resources/less/tinymce/default/Content.Objects.less deleted file mode 100644 index fe78a95ca32..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Content.Objects.less +++ /dev/null @@ -1,212 +0,0 @@ -/* Content.Objects.less */ - -.mce-content-body .mce-reset { - margin: 0; padding: 0; border: 0; outline: 0; - vertical-align: top; background: transparent; - text-decoration: none; color: black; - font-family: Arial; - font-size: 11px; text-shadow: none; float: none; - position: static; width: auto; height: auto; - white-space: nowrap; cursor: inherit; - line-height: normal; font-weight: normal; - text-align: left; - -webkit-tap-highlight-color: transparent; - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; - box-sizing: content-box; - direction: ltr; - max-width: none; -} - -.mce-object { - border: 1px dotted #3A3A3A; - background: #D5D5D5 url(images/tinymce/object.gif) no-repeat center; -} - -.mce-preview-object { - display: inline-block; - position: relative; - margin: 0 2px 0 2px; - line-height: 0; - border: 1px solid gray; -} - -.mce-preview-object[data-mce-selected="2"] .mce-shim { - display: none; -} - -.mce-preview-object .mce-shim { - position: absolute; - top: 0; left: 0; - width: 100%; height: 100%; - background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); -} - -figure.align-left { - float: left; -} - -figure.align-right { - float: right; -} - -figure.image.align-center { - display: table; - margin-left: auto; - margin-right: auto; -} - -figure.image { - display: inline-block; - border: 1px solid gray; - margin: 0 2px 0 1px; - background: #f5f2f0; -} - -figure.image img { - margin: 8px 8px 0 8px; -} - -figure.image figcaption { - margin: 6px 8px 6px 8px; - text-align: center; -} - -.mce-toc { - border: 1px solid gray; -} - -.mce-toc h2 { - margin: 4px; -} - -.mce-toc li { - list-style-type: none; -} - -.mce-pagebreak { - cursor: default; - display: block; - width: 100%; - height: 5px; - border: 1px dashed #666; - margin-top: 15px; - page-break-before: always; -} - -@media print { - .mce-pagebreak { - border: 0px; - } -} - -.mce-item-anchor { - cursor: default; - display: inline-block; - -webkit-user-select: all; - -webkit-user-modify: read-only; - -moz-user-select: all; - -moz-user-modify: read-only; - user-select: all; - user-modify: read-only; - width: 10px !important; - height: 10px !important; - border: 1px dotted #3A3A3A; - background: #D5D5D5; - - vertical-align: middle; - text-align: center; - font-size: 8px; - .fa-icon; - .fas; - &:before { - content: @fa-var-anchor; - } -} - -.mce-nbsp, .mce-shy { - background: #AAA; -} - -.mce-shy::after { - content: '-'; -} - -.mce-match-marker { - background: #AAA; - color: #fff; -} - -.mce-match-marker-selected { - background: #3399ff; - color: #fff; -} - -.mce-spellchecker-word { - border-bottom: 2px solid rgba(208, 2, 27, 0.5); - cursor: default; -} - -.mce-spellchecker-grammar { - border-bottom: 2px solid #008000; - cursor: default; -} - -.mce-item-table, .mce-item-table td, .mce-item-table th, .mce-item-table caption { - border: 1px dashed #BBB; -} - -td[data-mce-selected], th[data-mce-selected] { - background-color: @content-selection-bg !important; -} - -.mce-edit-focus { - outline: 1px dotted #333; -} - -.mce-content-body { - padding: @edit-area-padding !important; // overrides the one added in JS (original : 0 1px 50px 1px) - - *[contentEditable=false] *[contentEditable=true]:focus { - outline: 2px solid @content-block-focus; - } - - *[contentEditable=false] *[contentEditable=true]:hover { - outline: 2px solid @content-block-hover; - } - - *[contentEditable=false][data-mce-selected] { - outline: 2px solid @content-block-selected; - } - - *[data-mce-selected="inline-boundary"] { - background: @content-boundary-bg; - } - - img { - max-width: 100%; - } - - hr { - cursor: default; - } -} - - -/* Table Resizing */ -.ephox-snooker-resizer-bar { - background-color: @content-selection-bg; - opacity: 0.0; -} - -.ephox-snooker-resizer-cols { - cursor: col-resize; -} - -.ephox-snooker-resizer-rows { - cursor: row-resize; -} - -.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging { - opacity: 0.2; -} \ No newline at end of file diff --git a/src/main/core/Resources/less/tinymce/default/Content.less b/src/main/core/Resources/less/tinymce/default/Content.less deleted file mode 100644 index 27e54264199..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Content.less +++ /dev/null @@ -1,27 +0,0 @@ -/* Content.less */ - -@import "Variables.less"; - -.mce-content-body { - background-color: #FFFFFF; - color: @text-color; - font-family: @content-font-family; - font-size: @content-font-size; - line-height: @content-line-height; - scrollbar-3dlight-color: #F0F0EE; - scrollbar-arrow-color: #676662; - scrollbar-base-color: #F0F0EE; - scrollbar-darkshadow-color: #DDDDDD; - scrollbar-face-color: #E0E0DD; - scrollbar-highlight-color: #F0F0EE; - scrollbar-shadow-color: #F0F0EE; - scrollbar-track-color: #F5F5F5; - - td, th { - font-family: @content-font-family; - font-size: @content-font-size; - } -} - -@import "Mixins.less"; -@import "Content.Objects.less"; diff --git a/src/main/core/Resources/less/tinymce/default/CropRect.less b/src/main/core/Resources/less/tinymce/default/CropRect.less deleted file mode 100644 index 8d8d3f73199..00000000000 --- a/src/main/core/Resources/less/tinymce/default/CropRect.less +++ /dev/null @@ -1,62 +0,0 @@ -// CropRect - -.@{prefix}-croprect-container { - position: absolute; - top: 0; - left: 0; -} - -.@{prefix}-croprect-handle { - position: absolute; - top: 0; left: 0; - width: 20px; height: 20px; - border: 2px solid white; -} - -.@{prefix}-croprect-handle-nw { - border-width: 2px 0 0 2px; - margin: -2px 0 0 -2px; - cursor: nw-resize; - top: 100px; left: 100px; -} - -.@{prefix}-croprect-handle-ne { - border-width: 2px 2px 0 0; - margin: -2px 0 0 -20px; - cursor: ne-resize; - top: 100px; left: 200px; -} - -.@{prefix}-croprect-handle-sw { - border-width: 0 0 2px 2px; - margin: -20px 2px 0 -2px; - cursor: sw-resize; - top: 200px; left: 100px; -} - -.@{prefix}-croprect-handle-se { - border-width: 0 2px 2px 0; - margin: -20px 0 0 -20px; - cursor: se-resize; - top: 200px; left: 200px; -} - -.@{prefix}-croprect-handle-move { - position: absolute; - cursor: move; - border: 0; -} - -.@{prefix}-croprect-block { - .opacity(@window-modalblock-opacity); - position: absolute; - background: black; -} - -.@{prefix}-croprect-handle:focus { - border-color: @textbox-border-focus; -} - -.@{prefix}-croprect-handle-move:focus { - outline: 1px solid @textbox-border-focus; -} diff --git a/src/main/core/Resources/less/tinymce/default/DropZone.less b/src/main/core/Resources/less/tinymce/default/DropZone.less deleted file mode 100644 index c115e51423c..00000000000 --- a/src/main/core/Resources/less/tinymce/default/DropZone.less +++ /dev/null @@ -1,27 +0,0 @@ -// DropZone - -.@{prefix}-dropzone { - border: 3px dashed gray; - text-align: center; - - & span { - text-transform: uppercase; - display: inline-block; - vertical-align: middle; - } - - &:after { - content:""; - height: 100%; - display: inline-block; - vertical-align: middle; - } - - &.@{prefix}-disabled { - .opacity(@btn-box-disabled-opacity); - - &.@{prefix}-dragenter { - cursor: not-allowed; - } - } -} diff --git a/src/main/core/Resources/less/tinymce/default/FieldSet.less b/src/main/core/Resources/less/tinymce/default/FieldSet.less deleted file mode 100644 index 38b9f6051bb..00000000000 --- a/src/main/core/Resources/less/tinymce/default/FieldSet.less +++ /dev/null @@ -1,15 +0,0 @@ -// FieldSet - -.@{prefix}-fieldset { - border: 0 solid #9E9E9E; - .border-radius(3px); -} - -.@{prefix}-fieldset > .@{prefix}-container-body { - margin-top: -15px; -} - -.@{prefix}-fieldset-title { - margin-left: 5px; - padding: 0 5px 0 5px; -} \ No newline at end of file diff --git a/src/main/core/Resources/less/tinymce/default/FilePicker.less b/src/main/core/Resources/less/tinymce/default/FilePicker.less deleted file mode 100644 index cb5c510eae1..00000000000 --- a/src/main/core/Resources/less/tinymce/default/FilePicker.less +++ /dev/null @@ -1,5 +0,0 @@ -// RTL - -.@{prefix}-rtl .@{prefix}-filepicker input { - direction: ltr; -} \ No newline at end of file diff --git a/src/main/core/Resources/less/tinymce/default/FitLayout.less b/src/main/core/Resources/less/tinymce/default/FitLayout.less deleted file mode 100644 index cc3da479a86..00000000000 --- a/src/main/core/Resources/less/tinymce/default/FitLayout.less +++ /dev/null @@ -1,9 +0,0 @@ -// FitLayout - -.@{prefix}-fit-layout { - .inline-block(); -} - -.@{prefix}-fit-layout-item { - position: absolute; -} diff --git a/src/main/core/Resources/less/tinymce/default/FloatPanel.less b/src/main/core/Resources/less/tinymce/default/FloatPanel.less deleted file mode 100644 index aff708dea48..00000000000 --- a/src/main/core/Resources/less/tinymce/default/FloatPanel.less +++ /dev/null @@ -1,69 +0,0 @@ -// FloatPanel - -.@{prefix}-floatpanel { - position: absolute; - .box-shadow(@floatpanel-box-shadow); -} - -.@{prefix}-floatpanel.@{prefix}-fixed { - position: fixed; -} - -// Popover panel - -.@{prefix}-floatpanel .@{prefix}-arrow, -.@{prefix}-floatpanel .@{prefix}-arrow:after { - position: absolute; - display: block; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} - -.@{prefix}-floatpanel .@{prefix}-arrow { - border-width: @popover-arrow-outer-width; -} - -.@{prefix}-floatpanel .@{prefix}-arrow:after { - border-width: @popover-arrow-width; - content: ""; -} - -.@{prefix}-floatpanel.@{prefix}-popover { - .reset-gradient(); - .border-radius(6px); - .box-shadow(@floatpanel-box-shadow); - top: 0; - left: 0; - background: @popover-bg; - border: 1px solid @panel-border; - border: 1px solid @popover-arrow-outer; - - &.@{prefix}-bottom { - margin-top: @popover-arrow-width; - *margin-top: 0; - - & > .@{prefix}-arrow { - left: 50%; - margin-left: -@popover-arrow-outer-width; - border-top-width: 0; - border-bottom-color: @panel-border; - border-bottom-color: @popover-arrow-outer; - top: -@popover-arrow-outer-width; - - &:after { - top: 1px; - margin-left: -@popover-arrow-width; - border-top-width: 0; - border-bottom-color: @popover-arrow; - } - } - - &.@{prefix}-start { margin-left: -22px; } - &.@{prefix}-start > .@{prefix}-arrow { left: 20px; } - - &.@{prefix}-end { margin-left: 22px; } - &.@{prefix}-end > .@{prefix}-arrow { right: 10px; left: auto; } - } -} \ No newline at end of file diff --git a/src/main/core/Resources/less/tinymce/default/FlowLayout.less b/src/main/core/Resources/less/tinymce/default/FlowLayout.less deleted file mode 100644 index f27b4f1892b..00000000000 --- a/src/main/core/Resources/less/tinymce/default/FlowLayout.less +++ /dev/null @@ -1,36 +0,0 @@ -// FlowLayout - -.@{prefix}-flow-layout-item { - .inline-block(); -} - -.@{prefix}-flow-layout-item { - margin: @flow-layout-spacing 0 @flow-layout-spacing @flow-layout-spacing; -} - -.@{prefix}-flow-layout-item.@{prefix}-last { - margin-right: @flow-layout-spacing; -} - -.@{prefix}-flow-layout { - white-space: normal; -} - -.@{prefix}-tinymce-inline .@{prefix}-flow-layout { - white-space: nowrap; -} - -// RTL - -.@{prefix}-rtl .@{prefix}-flow-layout { - text-align: right; - direction: rtl; -} - -.@{prefix}-rtl .@{prefix}-flow-layout-item { - margin: @flow-layout-spacing @flow-layout-spacing @flow-layout-spacing 0; -} - -.@{prefix}-rtl .@{prefix}-flow-layout-item.@{prefix}-last { - margin-left: @flow-layout-spacing; -} diff --git a/src/main/core/Resources/less/tinymce/default/Icons.less b/src/main/core/Resources/less/tinymce/default/Icons.less deleted file mode 100644 index 0aa00dd07e6..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Icons.less +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Icons - * - * Uses platform FontAwesome library. - */ - -.@{prefix}-ico { - .fa-icon; - .fas; - - speak: none; - text-shadow: none !important; - vertical-align: middle; - height: @icon-box; - color: @btn-text; - background: transparent center center; - background-size: cover; - - // mimic fa-fw - text-align: center; - width: (20em / 16); -} - -.@{prefix}-btn-small .@{prefix}-ico { - font-size: @icon-size * .75; -} - -.@{prefix}-i-save:before { content: @fa-var-save; } -.@{prefix}-i-newdocument:before { content: @fa-var-plus; } -.@{prefix}-i-fullpage:before { content: @fa-var-expand; } -.@{prefix}-i-alignleft:before { content: @fa-var-align-left; } -.@{prefix}-i-aligncenter:before { content: @fa-var-align-center; } -.@{prefix}-i-alignright:before { content: @fa-var-align-right; } -.@{prefix}-i-alignjustify:before { content: @fa-var-align-justify; } -.@{prefix}-i-alignnone:before { content: @fa-var-align-justify; } // todo : find better -.@{prefix}-i-cut:before { content: @fa-var-cut; } -.@{prefix}-i-paste:before { content: @fa-var-clipboard; } -.@{prefix}-i-searchreplace:before { content: @fa-var-search; } -.@{prefix}-i-bullist:before { content: @fa-var-list-ul; } -.@{prefix}-i-numlist:before { content: @fa-var-list-ol; } -.@{prefix}-i-indent:before { content: @fa-var-indent; } -.@{prefix}-i-outdent:before { content: @fa-var-outdent; } -.@{prefix}-i-blockquote:before { content: @fa-var-quote-left; } -.@{prefix}-i-undo:before { content: @fa-var-undo; } -.@{prefix}-i-redo:before { content: @fa-var-redo; } -.@{prefix}-i-link:before { content: @fa-var-link; } -.@{prefix}-i-unlink:before { content: @fa-var-unlink; } -.@{prefix}-i-anchor:before { content: @fa-var-anchor; } -.@{prefix}-i-image:before { content: @fa-var-image; } -.@{prefix}-i-media:before { content: @fa-var-film; } -.@{prefix}-i-help:before { content: @fa-var-question-circle; } -.@{prefix}-i-code:before { content: @fa-var-code; } -.@{prefix}-i-insertdatetime:before { content: @fa-var-calendar; } -.@{prefix}-i-preview:before { content: @fa-var-eye; } -.@{prefix}-i-forecolor:before { content: @fa-var-font; } -.@{prefix}-i-backcolor:before { content: @fa-var-font; } -.@{prefix}-i-table:before { content: @fa-var-table; } -.@{prefix}-i-hr:before { content: @fa-var-window-minimize; } -.@{prefix}-i-removeformat:before { content: @fa-var-eraser; } -.@{prefix}-i-subscript:before { content: @fa-var-subscript; } -.@{prefix}-i-superscript:before { content: @fa-var-superscript; } -.@{prefix}-i-charmap:before { content: @fa-var-euro-sign; } -.@{prefix}-i-emoticons:before { content: @fa-var-smile; } -.@{prefix}-i-print:before { content: @fa-var-print; } -.@{prefix}-i-fullscreen:before { content: @fa-var-expand; } -.@{prefix}-i-spellchecker:before { content: @fa-var-sort-alpha-down; } // todo : find better -.@{prefix}-i-nonbreaking:before { content: "\e025"; } -.@{prefix}-i-template:before { content: @fa-var-list-alt; } // todo : find better -.@{prefix}-i-pagebreak:before { content: "\e027"; } -.@{prefix}-i-restoredraft:before { content: "\e028"; } -.@{prefix}-i-bold:before { content: @fa-var-bold; } -.@{prefix}-i-italic:before { content: @fa-var-italic; } -.@{prefix}-i-underline:before { content: @fa-var-underline; } -.@{prefix}-i-strikethrough:before { content: @fa-var-strikethrough; } -.@{prefix}-i-visualchars:before { content: @fa-var-i-cursor; } -.@{prefix}-i-visualblocks:before { content: @fa-var-paragraph; } -.@{prefix}-i-ltr:before { content: "\e02f"; } -.@{prefix}-i-rtl:before { content: "\e030"; } -.@{prefix}-i-copy:before { content: @fa-var-copy; } -.@{prefix}-i-browse:before { content: @fa-var-search; } -.@{prefix}-i-pastetext:before { content: @fa-var-clipboard; } -.@{prefix}-i-rotateleft:before { content: "\eaa8"; } -.@{prefix}-i-rotateright:before { content: "\eaa9"; } -.@{prefix}-i-crop:before { content: @fa-var-crop; } -.@{prefix}-i-editimage:before { content: "\e915"; } -.@{prefix}-i-options:before { content: "\ec6a"; } -.@{prefix}-i-flipv:before { content: "\eaaa"; } -.@{prefix}-i-fliph:before { content: "\eaac"; } -.@{prefix}-i-zoomin:before { content: @fa-var-search-plus; } -.@{prefix}-i-zoomout:before { content: @fa-var-search-minus; } -.@{prefix}-i-sun:before { content: @fa-var-sun; } -.@{prefix}-i-moon:before { content: @fa-var-moon; } -.@{prefix}-i-arrowleft:before { content: @fa-var-arrow-left; } -.@{prefix}-i-arrowright:before { content: @fa-var-arrow-right; } -.@{prefix}-i-drop:before { content: "\e935"; } -.@{prefix}-i-contrast:before { content: @fa-var-adjust; } -.@{prefix}-i-sharpen:before { content: "\eba7"; } -.@{prefix}-i-resize2:before { content: @fa-var-expand-arrows-alt; } -.@{prefix}-i-orientation:before { content: "\e601"; } -.@{prefix}-i-invert:before { content: "\e602"; } -.@{prefix}-i-gamma:before { content: "\e600"; } -.@{prefix}-i-remove:before { content: @fa-var-times; } -.@{prefix}-i-tablerowprops:before { content: "\e604"; } -.@{prefix}-i-tablecellprops:before { content: "\e605"; } -.@{prefix}-i-table2:before { content: "\e606"; } -.@{prefix}-i-tablemergecells:before { content: "\e607"; } -.@{prefix}-i-tableinsertcolbefore:before { content: "\e608"; } -.@{prefix}-i-tableinsertcolafter:before { content: "\e609"; } -.@{prefix}-i-tableinsertrowbefore:before { content: "\e60a"; } -.@{prefix}-i-tableinsertrowafter:before { content: "\e60b"; } -.@{prefix}-i-tablesplitcells:before { content: "\e60d"; } -.@{prefix}-i-tabledelete:before { content: @fa-var-trash-alt; } -.@{prefix}-i-tableleftheader:before { content: "\e62a"; } -.@{prefix}-i-tabletopheader:before { content: "\e62b"; } -.@{prefix}-i-tabledeleterow:before { content: "\e800"; } -.@{prefix}-i-tabledeletecol:before { content: "\e801"; } -.@{prefix}-i-codesample:before { content: @fa-var-code; } -.@{prefix}-i-fill:before { content: @fa-var-fill; } -.@{prefix}-i-borderwidth:before { content: "\e903"; } -.@{prefix}-i-line:before { content: "\e904"; } -.@{prefix}-i-count:before { content: "\e905"; } -.@{prefix}-i-translate:before { content: @fa-var-language; } -.@{prefix}-i-drag:before { content: "\e908"; } -.@{prefix}-i-home:before { content: @fa-var-home; } -.@{prefix}-i-upload:before { content: @fa-var-upload; } -.@{prefix}-i-bubble:before { content: "\e91c"; } -.@{prefix}-i-user:before { content: @fa-var-user; } -.@{prefix}-i-lock:before { content: @fa-var-lock; } -.@{prefix}-i-unlock:before { content: @fa-var-unlock; } -.@{prefix}-i-settings:before { content: @fa-var-cog; } -.@{prefix}-i-remove2:before { content: @fa-var-trash; } -.@{prefix}-i-menu:before { content: "\e92d"; } -.@{prefix}-i-warning:before { content: "\e930"; } -.@{prefix}-i-question:before { content: @fa-var-question; } -.@{prefix}-i-pluscircle:before { content: @fa-var-plus-circle; } -.@{prefix}-i-info:before { content: @fa-var-info; } -.@{prefix}-i-notice:before { content: "\e934"; } -.@{prefix}-i-arrowup:before { content: @fa-var-arrow-up; } -.@{prefix}-i-arrowdown:before { content: @fa-var-arrow-down; } -.@{prefix}-i-arrowup2:before { content: @fa-var-arrow-circle-up; } -.@{prefix}-i-arrowdown2:before { content: @fa-var-arrow-circle-down; } -.@{prefix}-i-menu2:before { content: "\e941"; } -.@{prefix}-i-newtab:before { content: "\e961"; } -.@{prefix}-i-a11y:before { content: "\e900"; } -.@{prefix}-i-plus:before { content: @fa-var-plus; } -.@{prefix}-i-insert:before { content: @fa-var-plus; } -.@{prefix}-i-minus:before { content: @fa-var-minus; } -.@{prefix}-i-books:before { content: @fa-var-book; } -.@{prefix}-i-reload:before { content: @fa-var-sync; } -.@{prefix}-i-toc:before { content: "\e901"; } -.@{prefix}-i-checkmark:before { content: @fa-var-check; } -.@{prefix}-i-checkbox:before { content: @fa-var-check-square; } -.@{prefix}-i-selected:before { content: @fa-var-check; } - -.@{prefix}-i-inserttime:before { content: @fa-var-clock; } -.@{prefix}-i-date:before { content: @fa-var-calendar; } -.@{prefix}-i-percent:before { content: @fa-var-percent; } - -// we don't have the correct icon in FontAwesome (no corner resize icon) -// so we just draw a small triangle in CSS -.@{prefix}-i-resize:before { - content: " "; - display: block; - width: 0; - height: 0; - border-style: solid; - border-width: 0 0 14px 14px; - border-color: transparent transparent fade(@btn-text, 40%) transparent; -} - -.@{prefix}-i-insert { font-size: 14px; } -.@{prefix}-i-selected { visibility: hidden; } -i.@{prefix}-i-backcolor { text-shadow: none; background: @colorbtn-backcolor-bg; } diff --git a/src/main/core/Resources/less/tinymce/default/Iframe.less b/src/main/core/Resources/less/tinymce/default/Iframe.less deleted file mode 100644 index 80c84dc0d88..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Iframe.less +++ /dev/null @@ -1,6 +0,0 @@ -// Iframe - -.@{prefix}-iframe { - border: 0 solid @iframe-border; - width: 100%; height: 100%; -} diff --git a/src/main/core/Resources/less/tinymce/default/ImagePanel.less b/src/main/core/Resources/less/tinymce/default/ImagePanel.less deleted file mode 100644 index 7f1a175fcc3..00000000000 --- a/src/main/core/Resources/less/tinymce/default/ImagePanel.less +++ /dev/null @@ -1,25 +0,0 @@ -// ImagePanel - -.@{prefix}-imagepanel { - overflow: auto; - background: black; -} - -.@{prefix}-imagepanel-bg { - position: absolute; - background: url('data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw=='); -} - -.@{prefix}-imagepanel img { - position: absolute; -} - -.@{prefix}-imagetool.@{prefix}-btn .@{prefix}-ico { - display: block; - width: 20px; - height: 20px; - text-align: center; - line-height: 20px; - font-size: 20px; - padding: 5px; -} diff --git a/src/main/core/Resources/less/tinymce/default/InfoBox.less b/src/main/core/Resources/less/tinymce/default/InfoBox.less deleted file mode 100644 index 2fbcee3a80a..00000000000 --- a/src/main/core/Resources/less/tinymce/default/InfoBox.less +++ /dev/null @@ -1,71 +0,0 @@ -// InfoBox - -.@{prefix}-infobox { - .inline-block(); - text-shadow: @text-shadow; - overflow: hidden; - border: 1px solid red; - - div { - display: block; - margin: 5px; - - button { - position: absolute; - top: 50%; right: 4px; - cursor: pointer; - margin-top: -8px; - display: none; - } - - button:focus { - outline: 2px solid @btn-border-hover; - } - } -} - -.@{prefix}-infobox.@{prefix}-has-help { - div { - margin-right: 25px; - } - - button { - display: block; - } -} - -.@{prefix}-infobox.@{prefix}-success { - background: @infobox-success-bg; - border-color: @infobox-success-border; - - div { - color: @infobox-success-text; - } -} - -.@{prefix}-infobox.@{prefix}-warning { - background: @infobox-warning-bg; - border-color: @infobox-warning-border; - - div { - color: @infobox-warning-text; - } -} - -.@{prefix}-infobox.@{prefix}-error { - background: @infobox-error-bg; - border-color: @infobox-error-border; - - div { - color: @infobox-error-text; - } -} - -// RTL - -.@{prefix}-rtl .@{prefix}-infobox { - div { - text-align: right; - direction: rtl; - } -} diff --git a/src/main/core/Resources/less/tinymce/default/Label.less b/src/main/core/Resources/less/tinymce/default/Label.less deleted file mode 100644 index 9bc26e49d59..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Label.less +++ /dev/null @@ -1,38 +0,0 @@ -// Label - -.@{prefix}-label { - .inline-block(); - text-shadow: @text-shadow; - overflow: hidden; -} - -.@{prefix}-label.@{prefix}-autoscroll { - overflow: auto; -} - -.@{prefix}-label.@{prefix}-disabled { - color: @text-disabled; -} - -.@{prefix}-label.@{prefix}-multiline { - white-space: pre-wrap; -} - -.@{prefix}-label.@{prefix}-success { - color: @text-success; -} - -.@{prefix}-label.@{prefix}-warning { - color: @text-warning; -} - -.@{prefix}-label.@{prefix}-error { - color: @text-error; -} - -// RTL - -.@{prefix}-rtl .@{prefix}-label { - text-align: right; - direction: rtl; -} diff --git a/src/main/core/Resources/less/tinymce/default/ListBox.less b/src/main/core/Resources/less/tinymce/default/ListBox.less deleted file mode 100644 index 538b79cbe36..00000000000 --- a/src/main/core/Resources/less/tinymce/default/ListBox.less +++ /dev/null @@ -1,26 +0,0 @@ -// ListBox - -.@{prefix}-listbox button { - text-align: left; - padding-right: 20px; - position: relative; -} - -.@{prefix}-listbox .@{prefix}-caret { - position: absolute; - margin-top: -2px; - right: 8px; - top: 50%; -} - -// RTL - -.@{prefix}-rtl .@{prefix}-listbox .@{prefix}-caret { - right: auto; - left: 8px; -} - -.@{prefix}-rtl .@{prefix}-listbox button { - padding-right: 10px; - padding-left: 20px; -} diff --git a/src/main/core/Resources/less/tinymce/default/Menu.less b/src/main/core/Resources/less/tinymce/default/Menu.less deleted file mode 100644 index fe34717712b..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Menu.less +++ /dev/null @@ -1,69 +0,0 @@ -// Menu - -.@{prefix}-menu { - position: absolute; - left: 0; top: 0; - .reset-gradient(); - z-index: 1000; - padding: 5px 0 5px 0; - margin: @menu-margin; - min-width: @menu-min-width; - background: @menu-bg; - background-clip: padding-box; - border: 1px solid mix(rgb(red(@menu-border), green(@menu-border), blue(@menu-border)), @panel-bg, round(alpha(@menu-border) * 200)); - border: 1px solid @menu-border; - z-index: 1002; - .border-radius(@menu-border-radius); - .box-shadow(@menu-box-shadow); - max-height: @menu-max-height; - overflow: auto; - overflow-x: hidden; - - &.@{prefix}-animate { - opacity: 0.01; - transform: rotateY(10deg) rotateX(-10deg); - transform-origin: left top; - } - - &.@{prefix}-menu-align { - .@{prefix}-menu-shortcut, .@{prefix}-caret { - position: absolute; - right: 0; - } - } -} - -.@{prefix}-menu i { - display: none; -} - -.@{prefix}-menu-has-icons i { - display: inline-block; -} - -.@{prefix}-menu.@{prefix}-in { - &.@{prefix}-animate { - opacity: 1; - transform: rotateY(0) rotateX(0); - transition: opacity .075s ease, transform .1s ease; - } -} - -.@{prefix}-menu-sub-tr-tl { margin: -6px 0 0 -1px; } -.@{prefix}-menu-sub-br-bl { margin: 6px 0 0 -1px; } -.@{prefix}-menu-sub-tl-tr { margin: -6px 0 0 1px; } -.@{prefix}-menu-sub-bl-br { margin: 6px 0 0 1px; } - -// RTL - -.@{prefix}-rtl { - .@{prefix}-menu-item .@{prefix}-ico { - padding-right: 0; - padding-left: 4px; - } - - &.@{prefix}-menu-align .@{prefix}-caret, .@{prefix}-menu-shortcut { - right: auto; - left: 0; - } -} diff --git a/src/main/core/Resources/less/tinymce/default/MenuBar.less b/src/main/core/Resources/less/tinymce/default/MenuBar.less deleted file mode 100644 index b0bdc3a1b6e..00000000000 --- a/src/main/core/Resources/less/tinymce/default/MenuBar.less +++ /dev/null @@ -1,39 +0,0 @@ -/* MenuBar */ - -.@{prefix}-menubar { - border: 1px solid @menubar-border; -} - -.@{prefix}-menubar .@{prefix}-menubtn { - border-color: transparent; - background: transparent; - .border-radius(0); - .box-shadow(none); - filter: none; -} - -.@{prefix}-menubar .@{prefix}-menubtn button span { - color: @text; -} - -.@{prefix}-menubar .@{prefix}-caret { - border-top-color: @menubar-chevron; -} - -.@{prefix}-menubar .@{prefix}-active, .@{prefix}-menubar .@{prefix}-menubtn:hover { - .@{prefix}-caret { - border-top-color: @menubar-chevron-active; - } -} - -.@{prefix}-menubar .@{prefix}-menubtn:hover, .@{prefix}-menubar .@{prefix}-menubtn.@{prefix}-active, .@{prefix}-menubar .@{prefix}-menubtn:focus { - border-color: @btn-border-hover; - background: @menu-bg; - filter: none; - .box-shadow(none); -} - -.@{prefix}-menubar .@{prefix}-menubtn.@{prefix}-active { - border-bottom: none; - z-index: 65537; -} diff --git a/src/main/core/Resources/less/tinymce/default/MenuButton.less b/src/main/core/Resources/less/tinymce/default/MenuButton.less deleted file mode 100644 index ba78b22eee6..00000000000 --- a/src/main/core/Resources/less/tinymce/default/MenuButton.less +++ /dev/null @@ -1,45 +0,0 @@ -/* MenuButton */ - -div.@{prefix}-menubtn.@{prefix}-opened { - border-bottom-color: @btn-bg; - z-index: 65537; -} - -.@{prefix}-menubtn button { - color: @btn-text; -} - -.@{prefix}-menubtn.@{prefix}-btn-small span { - font-size: @font-size - 2px; -} - -.@{prefix}-menubtn.@{prefix}-fixed-width span { - display: inline-block; - overflow-x: hidden; - text-overflow: ellipsis; - width: 90px; -} - -.@{prefix}-menubtn.@{prefix}-fixed-width.@{prefix}-btn-small span { - width: 70px; -} - -.@{prefix}-menubtn .@{prefix}-caret { - *margin-top: 6px; -} - -// RTL - -.@{prefix}-rtl { - .@{prefix}-menubtn button { - direction: rtl; - text-align: right; - } - - .@{prefix}-menubtn.@{prefix}-fixed-width span { - direction: rtl; - text-align: right; - } -} - - diff --git a/src/main/core/Resources/less/tinymce/default/MenuItem.less b/src/main/core/Resources/less/tinymce/default/MenuItem.less deleted file mode 100644 index bab62e163ba..00000000000 --- a/src/main/core/Resources/less/tinymce/default/MenuItem.less +++ /dev/null @@ -1,169 +0,0 @@ -// MenuItem - -.@{prefix}-menu-item { - display: block; - padding: 6px 4px 6px 4px; - clear: both; - font-weight: normal; - line-height: 20px; - color: @menuitem-text; - white-space: nowrap; - cursor: pointer; - line-height: normal; - border-left: 4px solid transparent; - margin-bottom: 1px; - - .@{prefix}-caret { - margin-top: 4px; - margin-right: 6px; - border-top: 4px solid transparent; - border-bottom: 4px solid transparent; - border-left: 4px solid @menuitem-chevron; - } - - .@{prefix}-menu-shortcut { - display: inline-block; - padding: 0 10px 0 20px; - color: @menuitem-shortcut; - } - - .@{prefix}-ico { - padding-right: 4px; - } - - &:hover, &:focus { - background: @menuitem-bg-hover; - - .@{prefix}-menu-shortcut { - color: @menuitem-shortcut; - } - - .@{prefix}-text, .@{prefix}-ico { - color: @menuitem-text-hover; - } - } - - &.@{prefix}-selected { - background: @menuitem-bg-selected; - - .@{prefix}-text, .@{prefix}-ico { - color: @menuitem-text-selected; - } - } - - &.@{prefix}-active.@{prefix}-menu-item-normal { - background: @menuitem-bg-active; - - .@{prefix}-text, .@{prefix}-ico { - color: @menuitem-text-active; - } - } - - &.@{prefix}-active.@{prefix}-menu-item-checkbox { - .@{prefix}-ico { - visibility: visible; - } - } - - &.@{prefix}-disabled, &.@{prefix}-disabled:hover { - background: @menuitem-bg-disabled; - - &:focus { - background: @menuitem-bg-hover; - } - - .@{prefix}-text, .@{prefix}-ico { - color: @menuitem-text-disabled; - } - } - - &.@{prefix}-menu-item-preview.@{prefix}-active { - border-left: 5px solid @menuitem-preview-border-active; - background: @menuitem-bg; - - .@{prefix}-text, .@{prefix}-ico { - color: @menuitem-text; - } - - &:hover { - background: @menuitem-bg-hover; - } - } -} - -.@{prefix}-menu-item-link { - color: #093; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - - b { - color: #093; - } -} - -.@{prefix}-menu-item-ellipsis { - display: block; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; -} - -.@{prefix}-menu-item:hover *, .@{prefix}-menu-item.@{prefix}-selected *, .@{prefix}-menu-item:focus * { - color: @menuitem-text-inverse; -} - -div.@{prefix}-menu .@{prefix}-menu-item-sep, .@{prefix}-menu-item-sep:hover { - border: 0; - padding: 0; - height: 1px; - margin: 9px 1px; - overflow: hidden; - background: @menuitem-separator-top; - border-bottom: 1px solid @menuitem-separator-bottom; - cursor: default; - filter: none; -} - -div.@{prefix}-menu .@{prefix}-menu-item b { - font-weight: bold; -} - -.@{prefix}-menu-item-indent-1 { padding-left: 20px; } -.@{prefix}-menu-item-indent-2 { padding-left: 35px; } -.@{prefix}-menu-item-indent-2 { padding-left: 35px; } -.@{prefix}-menu-item-indent-3 { padding-left: 40px; } -.@{prefix}-menu-item-indent-4 { padding-left: 45px; } -.@{prefix}-menu-item-indent-5 { padding-left: 50px; } -.@{prefix}-menu-item-indent-6 { padding-left: 55px; } - -// RTL - -.@{prefix}-menu.@{prefix}-rtl { - direction: rtl; -} - -.@{prefix}-rtl .@{prefix}-menu-item { - text-align: right; - direction: rtl; - padding: 6px 12px 6px 15px; -} - -.@{prefix}-rtl .@{prefix}-menu-item .@{prefix}-caret { - margin-left: 6px; - margin-right: 0; - border-right: 4px solid @menuitem-chevron; - border-left: 0; -} - -.@{prefix}-rtl .@{prefix}-menu-item.@{prefix}-selected .@{prefix}-caret, .@{prefix}-rtl .@{prefix}-menu-item:focus .@{prefix}-caret, .@{prefix}-rtl .@{prefix}-menu-item:hover .@{prefix}-caret { - border-left-color: transparent; - border-right-color: @menuitem-chevron-selected; -} - -.@{prefix}-rtl { - .@{prefix}-menu-item .@{prefix}-ico { - padding-right: 0; - padding-left: 4px; - } -} diff --git a/src/main/core/Resources/less/tinymce/default/Mixins.less b/src/main/core/Resources/less/tinymce/default/Mixins.less deleted file mode 100644 index a95357a1c1d..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Mixins.less +++ /dev/null @@ -1,58 +0,0 @@ -// Mixins - -.vertical-gradient(@startColor, @endColor) when (@has-gradients = true) { - background-color: mix(@startColor, @endColor, 60%); - background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+ - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ - background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+ - background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10 - background-image: linear-gradient(to bottom, @startColor, @endColor); // Standard, IE10 - background-repeat: repeat-x; - filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)", argb(@startColor), argb(@endColor))); - zoom: 1; -} - -.vertical-gradient(@startColor, @endColor) when (@has-gradients = false) { - background-color: mix(@startColor, @endColor, 60%); -} - -/*.border-radius(@radius) when (@has-radius = true) { - -webkit-border-radius: @radius; - -moz-border-radius: @radius; - border-radius: @radius; -}*/ - -/*.box-shadow(@shadowA, @shadowB:X, ...) when (@has-boxshadow = true) { - // Multiple shadow solution from http://toekneestuck.com/blog/2012/05/15/less-css-arguments-variable/ - @props: ~`"@{arguments}".replace(/[\[\]]|\,\sX/g, '')`; - -webkit-box-shadow: @props; - -moz-box-shadow: @props; - box-shadow: @props; -}*/ - -/*.transition(@transition) { - -webkit-transition: @transition; - transition: @transition; -}*/ - -.inline-block() { - display: inline-block; - *display: inline; - *zoom: 1; -} - -.reset-gradient() { - filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)")); - background: transparent; -} - -.word-wrap { - word-wrap: break-word; - -ms-word-break: break-all; - word-break: break-all; - word-break: break-word; - -ms-hyphens: auto; - -moz-hyphens: auto; - -webkit-hyphens: auto; - hyphens: auto; -} diff --git a/src/main/core/Resources/less/tinymce/default/Notification.less b/src/main/core/Resources/less/tinymce/default/Notification.less deleted file mode 100644 index 75f777118ca..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Notification.less +++ /dev/null @@ -1,140 +0,0 @@ -// notification - -.@{prefix}-notification { - position: absolute; - background-color: @notification-bg; - padding: 5px; - margin-top: 5px; - border-width: 1px; - border-style: solid; - border-color: @notification-border; - transition: transform 100ms ease-in, opacity 150ms ease-in; - opacity: 0; - box-sizing: border-box; -} - -.@{prefix}-notification.@{prefix}-in { - opacity: 1; -} - -.@{prefix}-notification-success { - background-color: @notification-success-bg; - border-color: @notification-success-border; -} - -.@{prefix}-notification-info { - background-color: @notification-info-bg; - border-color: @notification-info-border; -} - -.@{prefix}-notification-warning { - background-color: @notification-warning-bg; - border-color: @notification-warning-border; -} - -.@{prefix}-notification-error { - background-color: @notification-error-bg; - border-color: @notification-error-border; -} - -.@{prefix}-notification.@{prefix}-has-close { - padding-right: 15px; -} - -.@{prefix}-notification .@{prefix}-ico { - margin-top: 5px; -} - -.@{prefix}-notification-inner { - .word-wrap(); - display: inline-block; - font-size: @notification-font-size; - margin: 5px 8px 4px 8px; - text-align: center; - white-space: normal; - color: @notification-info-text; -} - -.@{prefix}-notification-inner a { - text-decoration: underline; - cursor: pointer; -} - -.@{prefix}-notification .@{prefix}-progress { - margin-right: 8px; -} - -.@{prefix}-notification .@{prefix}-progress .@{prefix}-text { - margin-top: 5px; -} - -.@{prefix}-notification *, .@{prefix}-notification .@{prefix}-progress .@{prefix}-text { - color: @notification-text; -} - -.@{prefix}-notification .@{prefix}-progress .@{prefix}-bar-container { - border-color: @notification-border; -} - -.@{prefix}-notification .@{prefix}-progress .@{prefix}-bar-container .@{prefix}-bar { - background-color: @notification-text; -} - -.@{prefix}-notification-success *, .@{prefix}-notification-success .@{prefix}-progress .@{prefix}-text { - color: @notification-success-text; -} - -.@{prefix}-notification-success .@{prefix}-progress .@{prefix}-bar-container { - border-color: @notification-success-border; -} - -.@{prefix}-notification-success .@{prefix}-progress .@{prefix}-bar-container .@{prefix}-bar { - background-color: @notification-success-text; -} - -.@{prefix}-notification-info *, .@{prefix}-notification-info .@{prefix}-progress .@{prefix}-text { - color: @notification-info-text; -} - -.@{prefix}-notification-info .@{prefix}-progress .@{prefix}-bar-container { - border-color: @notification-info-border; -} - -.@{prefix}-notification-info .@{prefix}-progress .@{prefix}-bar-container .@{prefix}-bar { - background-color: @notification-info-text; -} - -.@{prefix}-notification-warning *, .@{prefix}-notification-warning .@{prefix}-progress .@{prefix}-text { - color: @notification-warning-text; -} - -.@{prefix}-notification-warning .@{prefix}-progress .@{prefix}-bar-container { - border-color: @notification-warning-border; -} - -.@{prefix}-notification-warning .@{prefix}-progress .@{prefix}-bar-container .@{prefix}-bar { - background-color: @notification-warning-text; -} - -.@{prefix}-notification-error *, .@{prefix}-notification-error .@{prefix}-progress .@{prefix}-text { - color: @notification-error-text; -} - -.@{prefix}-notification-error .@{prefix}-progress .@{prefix}-bar-container { - border-color: @notification-error-border; -} - -.@{prefix}-notification-error .@{prefix}-progress .@{prefix}-bar-container .@{prefix}-bar { - background-color: @notification-error-text; -} - -.@{prefix}-notification .@{prefix}-close { - position: absolute; - top: 6px; - right: 8px; - font-size: 20px; - font-weight: bold; - line-height: 20px; - color: @window-head-close; - cursor: pointer; -} \ No newline at end of file diff --git a/src/main/core/Resources/less/tinymce/default/Panel.less b/src/main/core/Resources/less/tinymce/default/Panel.less deleted file mode 100644 index bade34d3751..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Panel.less +++ /dev/null @@ -1,7 +0,0 @@ -// Panel - -.@{prefix}-panel { - border: 0 solid mix(rgb(red(@panel-border), green(@panel-border), blue(@panel-border)), @panel-bg, 20%); - border: 0 solid @panel-border; - background-color: @panel-bg; -} diff --git a/src/main/core/Resources/less/tinymce/default/Path.less b/src/main/core/Resources/less/tinymce/default/Path.less deleted file mode 100644 index 37f0afebfb0..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Path.less +++ /dev/null @@ -1,49 +0,0 @@ -// Path - -.@{prefix}-path { - .inline-block(); - padding: 8px; - white-space: normal; - font-size: inherit; -} - -.@{prefix}-path .@{prefix}-txt { - display: inline-block; - padding-right: 3px; -} - -.@{prefix}-path .@{prefix}-path-body { - display: inline-block; -} - -.@{prefix}-path-item { - .inline-block(); - cursor: pointer; - color: @path-text; - font-size: inherit; - text-transform: uppercase; -} - -.@{prefix}-path-item:hover { - text-decoration: underline; -} - -.@{prefix}-path-item:focus { - background: @path-bg-focus; - color: @path-text-focus; -} - -.@{prefix}-path .@{prefix}-divider { - display: inline; - font-size: inherit; -} - -.@{prefix}-disabled .@{prefix}-path-item { - color: @text-disabled; -} - -// RTL - -.@{prefix}-rtl .@{prefix}-path { - direction: rtl; -} diff --git a/src/main/core/Resources/less/tinymce/default/Progress.less b/src/main/core/Resources/less/tinymce/default/Progress.less deleted file mode 100644 index e48871dd21c..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Progress.less +++ /dev/null @@ -1,34 +0,0 @@ -// Progress - -.@{prefix}-progress { - display: inline-block; - position: relative; - height: 20px; -} - -.@{prefix}-progress .@{prefix}-bar-container { - display: inline-block; - width: 100px; - height: 100%; - margin-right: 8px; - border: 1px solid @progress-border; - overflow: hidden; - .border-radius(4px); -} - -.@{prefix}-progress .@{prefix}-text { - display: inline-block; - margin-top: auto; - margin-bottom: auto; - font-size: 14px; - width: 40px; - color: @progress-text; -} - -.@{prefix}-bar { - display: block; - width: 0%; - height: 100%; - background-color: @progress-bar-bg; - .transition(width .2s ease); -} diff --git a/src/main/core/Resources/less/tinymce/default/Radio.less b/src/main/core/Resources/less/tinymce/default/Radio.less deleted file mode 100644 index c32d8aa6557..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Radio.less +++ /dev/null @@ -1 +0,0 @@ -// Radio - not implemented yet diff --git a/src/main/core/Resources/less/tinymce/default/Reset.less b/src/main/core/Resources/less/tinymce/default/Reset.less deleted file mode 100644 index 8caac119eec..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Reset.less +++ /dev/null @@ -1,32 +0,0 @@ -// Reset - -.@{prefix}-container, .@{prefix}-container *, .@{prefix}-widget, .@{prefix}-widget *, .@{prefix}-reset { - margin: 0; padding: 0; border: 0; outline: 0; - vertical-align: top; background: transparent; - text-decoration: none; color: @text; - font-family: @font-family; - font-size: @font-size; text-shadow: none; float: none; - position: static; width: auto; height: auto; - white-space: nowrap; cursor: inherit; - -webkit-tap-highlight-color: transparent; - line-height: normal; font-weight: normal; - text-align: left; - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; - box-sizing: content-box; - direction: ltr; - max-width: none; -} - -.@{prefix}-widget button { - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -.@{prefix}-container *[unselectable] { - -moz-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - user-select: none; -} diff --git a/src/main/core/Resources/less/tinymce/default/ResizeHandle.less b/src/main/core/Resources/less/tinymce/default/ResizeHandle.less deleted file mode 100644 index e1bf100d538..00000000000 --- a/src/main/core/Resources/less/tinymce/default/ResizeHandle.less +++ /dev/null @@ -1,18 +0,0 @@ -.@{prefix}-container-body .@{prefix}-resizehandle { - position: absolute; - right: 0; - bottom: 0; - width: 16px; - height: 16px; - visibility: visible; - cursor: s-resize; - margin: 0; -} - -.@{prefix}-container-body .@{prefix}-resizehandle-both { - cursor: se-resize; -} - -i.@{prefix}-i-resize { - color: @text; -} diff --git a/src/main/core/Resources/less/tinymce/default/Scrollable.less b/src/main/core/Resources/less/tinymce/default/Scrollable.less deleted file mode 100644 index f0b4ce3cf04..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Scrollable.less +++ /dev/null @@ -1,44 +0,0 @@ -// Scrollbar - -.@{prefix}-scrollbar { - position: absolute; - width: 7px; - height: 100%; - top: 2px; - right: 2px; - .opacity(0.4); -} - -.@{prefix}-scrollbar-h { - top: auto; - right: auto; - left: 2px; - bottom: 2px; - width: 100%; - height: 7px; -} - -.@{prefix}-scrollbar-thumb { - position: absolute; - background-color: #000; - border: 1px solid #888; - border-color: rgba(85, 85, 85, .6); - width: 5px; - height: 100%; - .border-radius(7px); -} - -.@{prefix}-scrollbar-h .@{prefix}-scrollbar-thumb { - width: 100%; - height: 5px; -} - -.@{prefix}-scrollbar:hover, .@{prefix}-scrollbar.@{prefix}-active { - background-color: #AAA; - .opacity(0.6); - .border-radius(7px); -} - -.@{prefix}-scroll { - position: relative; -} diff --git a/src/main/core/Resources/less/tinymce/default/SelectBox.less b/src/main/core/Resources/less/tinymce/default/SelectBox.less deleted file mode 100644 index 60265781f5b..00000000000 --- a/src/main/core/Resources/less/tinymce/default/SelectBox.less +++ /dev/null @@ -1,6 +0,0 @@ -// SelectBox - -.@{prefix}-selectbox { - background: @selectbox-bg; - border: 1px solid @selectbox-border; -} diff --git a/src/main/core/Resources/less/tinymce/default/Sidebar.less b/src/main/core/Resources/less/tinymce/default/Sidebar.less deleted file mode 100644 index 80c1ab50b1a..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Sidebar.less +++ /dev/null @@ -1,52 +0,0 @@ -// Sidebar - -.@{prefix}-edit-aria-container > .@{prefix}-container-body { - display: flex; - - .@{prefix}-edit-area { - flex: 1; - } - - .@{prefix}-sidebar > .@{prefix}-container-body { - display: flex; - align-items: stretch; - height: 100%; - } - - .@{prefix}-sidebar-panel { - min-width: 250px; - max-width: 250px; - position: relative; - - > .@{prefix}-container-body { - position: absolute; - width: 100%; height: 100%; - overflow: auto; - top: 0; left: 0; - } - } -} - -.@{prefix}-sidebar-toolbar { - border: 0 solid @panel-border; - border-left-width: 1px; - - .@{prefix}-btn { - border-left: 0; - border-right: 0; - } - - .@{prefix}-btn.@{prefix}-active, .@{prefix}-btn.@{prefix}-active:hover { - background-color: @btn-bg-active; - - button, button i { - color: @btn-primary-text; - text-shadow: 1px 1px @btn-primary-text-shadow; - } - } -} - -.@{prefix}-sidebar-panel { - border: 0 solid @panel-border; - border-left-width: 1px; -} diff --git a/src/main/core/Resources/less/tinymce/default/Skin.less b/src/main/core/Resources/less/tinymce/default/Skin.less deleted file mode 100644 index b1e2326cbb8..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Skin.less +++ /dev/null @@ -1,52 +0,0 @@ -@import "Variables.less"; -@import "Reset.less"; -@import "Mixins.less"; -@import "Animations.less"; -@import "TinyMCE.less"; -@import "CropRect.less"; -@import "ImagePanel.less"; -@import "Arrows.less"; -@import "Sidebar.less"; -@import "Container.less"; -@import "Scrollable.less"; -@import "Panel.less"; -@import "FloatPanel.less"; -@import "Window.less"; -@import "ToolTip.less"; -@import "Progress.less"; -@import "Notification.less"; -@import "AbsoluteLayout.less"; -@import "Button.less"; -@import "ButtonGroup.less"; -@import "Checkbox.less"; -@import "ComboBox.less"; -@import "ColorBox.less"; -@import "ColorButton.less"; -@import "ColorPicker.less"; -@import "Path.less"; -@import "FieldSet.less"; -@import "FitLayout.less"; -@import "FlowLayout.less"; -@import "Iframe.less"; -@import "InfoBox.less"; -@import "Label.less"; -@import "MenuBar.less"; -@import "MenuButton.less"; -@import "MenuItem.less"; -@import "Toolbar.less"; -@import "Throbber.less"; -@import "Menu.less"; -@import "ListBox.less"; -@import "Radio.less"; -@import "ResizeHandle.less"; -@import "SelectBox.less"; -@import "Slider.less"; -@import "Spacer.less"; -@import "SplitButton.less"; -@import "StackLayout.less"; -@import "TabPanel.less"; -@import "TextBox.less"; -@import "DropZone.less"; -@import "BrowseButton.less"; -@import "Icons.less"; -@import "FilePicker.less"; diff --git a/src/main/core/Resources/less/tinymce/default/Slider.less b/src/main/core/Resources/less/tinymce/default/Slider.less deleted file mode 100644 index 15f17b9f019..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Slider.less +++ /dev/null @@ -1,33 +0,0 @@ -// Slider - -.@{prefix}-slider { - .border-radius(3px); - border: 1px solid @slider-border; - background: @slider-bg; - width: 100px; - height: 10px; - position: relative; - display: block; -} - -.@{prefix}-slider.@{prefix}-vertical { - width: 10px; - height: 100px; -} - -.@{prefix}-slider-handle { - .border-radius(3px); - border: 1px solid @slider-handle-border; - background: @slider-handle-bg; - display: block; - width: 13px; - height: 13px; - position: absolute; - top: 0; left: 0; - margin-left: -1px; - margin-top: -2px; -} - -.@{prefix}-slider-handle:focus { - border-color: @slider-handle-border-focus; -} diff --git a/src/main/core/Resources/less/tinymce/default/Spacer.less b/src/main/core/Resources/less/tinymce/default/Spacer.less deleted file mode 100644 index 0aa17200213..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Spacer.less +++ /dev/null @@ -1,5 +0,0 @@ -// Spacer - -.@{prefix}-spacer { - visibility: hidden; -} diff --git a/src/main/core/Resources/less/tinymce/default/SplitButton.less b/src/main/core/Resources/less/tinymce/default/SplitButton.less deleted file mode 100644 index e024e2d635b..00000000000 --- a/src/main/core/Resources/less/tinymce/default/SplitButton.less +++ /dev/null @@ -1,49 +0,0 @@ -// SplitButton - -.@{prefix}-splitbtn { - &:hover .@{prefix}-open { - border-left: 1px solid @splitbtn-delimiter-hover; - } - - .@{prefix}-open { - border-left: 1px solid @splitbtn-delimiter; - padding-right: 4px; - padding-left: 4px; - } - - .@{prefix}-open:focus { - border-left: 1px solid @splitbtn-delimiter-focus; - } - - .@{prefix}-open:hover, .@{prefix}-open:active { - border-left: 1px solid @splitbtn-delimiter-hover; - } - - &.@{prefix}-active:hover .@{prefix}-open { - border-left: 1px solid @splitbtn-delimiter-active; - } - - &.@{prefix}-opened { - border-color: @btn-border-hover; - } -} - -.@{prefix}-splitbtn.@{prefix}-btn-small .@{prefix}-open { - padding: 0 3px 0 3px; -} - -// RTL - -.@{prefix}-rtl .@{prefix}-splitbtn { - direction: rtl; - text-align: right; -} - -.@{prefix}-rtl .@{prefix}-splitbtn button { - padding-right: 4px; - padding-left: 4px; -} - -.@{prefix}-rtl .@{prefix}-splitbtn .@{prefix}-open { - border-left: 0; -} diff --git a/src/main/core/Resources/less/tinymce/default/StackLayout.less b/src/main/core/Resources/less/tinymce/default/StackLayout.less deleted file mode 100644 index 5df4fd27ead..00000000000 --- a/src/main/core/Resources/less/tinymce/default/StackLayout.less +++ /dev/null @@ -1,5 +0,0 @@ -// StackLayout - -.@{prefix}-stack-layout-item { - display: block; -} diff --git a/src/main/core/Resources/less/tinymce/default/TabPanel.less b/src/main/core/Resources/less/tinymce/default/TabPanel.less deleted file mode 100644 index 55ddac995be..00000000000 --- a/src/main/core/Resources/less/tinymce/default/TabPanel.less +++ /dev/null @@ -1,49 +0,0 @@ -// TabPanel - -.@{prefix}-tabs { - display: block; - border-bottom: 1px solid @tab-border; -} - -.@{prefix}-tabs, -.@{prefix}-tabs + .@{prefix}-container-body { - background: @tabs-bg; -} - -.@{prefix}-tab { - .inline-block(); - border: 1px solid @tab-border; - border-width: 0 1px 0 0; - background: @tab-bg; - padding: 8px 15px; - text-shadow: @text-shadow; - height: 13px; - cursor: pointer; -} - -.@{prefix}-tab:hover { - background: @tab-bg-hover; -} - -.@{prefix}-tab.@{prefix}-active { - background: @tab-bg-active; - border-bottom-color: transparent; - margin-bottom: -1px; - height: 14px; - -} - -.@{prefix}-tab:focus { - color: #2276d2; -} - -// RTL - -.@{prefix}-rtl .@{prefix}-tabs { - text-align: right; - direction: rtl; -} - -.@{prefix}-rtl .@{prefix}-tab { - border-width: 0 0 0 1px; -} diff --git a/src/main/core/Resources/less/tinymce/default/TextBox.less b/src/main/core/Resources/less/tinymce/default/TextBox.less deleted file mode 100644 index 54ff5e19e9a..00000000000 --- a/src/main/core/Resources/less/tinymce/default/TextBox.less +++ /dev/null @@ -1,41 +0,0 @@ -// TextBox - -.@{prefix}-textbox { - background: @textbox-bg; - border: 1px solid @textbox-border; - .border-radius(3px); - .box-shadow(@textbox-box-shadow); - display: inline-block; - .transition(~"border linear .2s, box-shadow linear .2s"); - height: 28px; - resize: none; - padding: 0 4px 0 4px; - white-space: pre-wrap; - *white-space: pre; - color: @text; -} - -.@{prefix}-textbox:focus, .@{prefix}-textbox.@{prefix}-focus { - border-color: @textbox-border-focus; - .box-shadow(@textbox-box-shadow-focus); -} - -.@{prefix}-placeholder .@{prefix}-textbox { - color: @textbox-text-placeholder; -} - -.@{prefix}-textbox.@{prefix}-multiline { - padding: 4px; - height: auto; -} - -.@{prefix}-textbox.@{prefix}-disabled { - color: mix(@text, @textbox-bg, 40%); -} - -// RTL - -.@{prefix}-rtl .@{prefix}-textbox { - text-align: right; - direction: rtl; -} diff --git a/src/main/core/Resources/less/tinymce/default/Throbber.less b/src/main/core/Resources/less/tinymce/default/Throbber.less deleted file mode 100644 index 879fa945724..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Throbber.less +++ /dev/null @@ -1,19 +0,0 @@ -// Throbber - -.@{prefix}-throbber { - position: absolute; - top: 0; left: 0; - width: 100%; height: 100%; - .opacity(0.6); - background: @throbber-bg; -} - -.@{prefix}-throbber-inline { - position: static; - height: 50px; -} - -.@{prefix}-menu .@{prefix}-throbber-inline { - height: 25px; - background-size: contain; -} diff --git a/src/main/core/Resources/less/tinymce/default/TinyMCE.less b/src/main/core/Resources/less/tinymce/default/TinyMCE.less deleted file mode 100644 index 60b8897a38a..00000000000 --- a/src/main/core/Resources/less/tinymce/default/TinyMCE.less +++ /dev/null @@ -1,260 +0,0 @@ -.@{prefix}-tinymce { - // Avoid FOUC - visibility: inherit !important; - position: relative; - overflow: hidden; // permits to have proper border-radius (children bg is automatically hidden) -} - -.@{prefix}-fullscreen { - border: 0; - padding: 0; - margin: 0; - overflow: hidden; - height: 100%; - z-index: 100; - - .@{prefix}-tinymce { - .border-radius(0); - .box-shadow(none); - } -} - -div.@{prefix}-fullscreen { - position: fixed; - top: 0; left: 0; - width: 100%; - height: auto; -} - -.@{prefix}-tinymce { - display: block; - .border-radius(@tinymce-border-radius); - .box-shadow(@tinymce-box-shadow); -} - -.@{prefix}-statusbar > .@{prefix}-container-body { - display: flex; - padding-right: 16px; - - .@{prefix}-path { - flex: 1; - } -} - -.@{prefix}-wordcount { - font-size: inherit; - text-transform: uppercase; - padding: 8px 0; -} - -div.@{prefix}-edit-area { - background: @edit-area-bg; - filter: none; -} - -.@{prefix}-statusbar { - position: relative; -} - -.@{prefix}-statusbar .@{prefix}-container-body { - position: relative; - font-size: 11px; -} - -.@{prefix}-fullscreen .@{prefix}-resizehandle { - display: none; -} - -.@{prefix}-statusbar .@{prefix}-flow-layout-item { - margin: 0; -} - -// Charmap - -.@{prefix}-charmap { - border-collapse: collapse; -} - -.@{prefix}-charmap td { - cursor: default; - border: 1px solid @panel-border; - width: 20px; - height: 20px; - line-height: 20px; - text-align: center; - vertical-align: middle; - padding: 2px; -} - -.@{prefix}-charmap td div { - text-align: center; -} - -.@{prefix}-charmap td:hover { - background: @btn-bg-hover; -} - -.@{prefix}-grid td.@{prefix}-grid-cell div { - border: 1px solid @grid-border; - width: 15px; height: 15px; - margin: 0px; - cursor: pointer; - - &:focus { - border-color: @grid-border-active; - } - - &[disabled] { - cursor: not-allowed; - } -} - -.@{prefix}-grid { - border-spacing: 2px; - border-collapse: separate; - - a { - display: block; - border: 1px solid transparent; - - &:hover, &:focus { - border-color: @grid-border-active; - } - } -} - -.@{prefix}-grid-border { - margin: 0 4px 0 4px; - - a { - border-color: @grid-border; - width: 13px; height: 13px; - } - - a:hover, a.@{prefix}-active { - border-color: @grid-border-active; - background: @grid-bg-active; - } -} - -.@{prefix}-text-center { - text-align: center; -} - -div.@{prefix}-tinymce-inline { - width: 100%; -} - -.@{prefix}-colorbtn-trans div { - text-align: center; - vertical-align: middle; - font-weight: bold; - font-size: 20px; - line-height: 16px; - color: mix(@text, #fff, 70%); -} - -.@{prefix}-monospace { - font-family: "Courier New", Courier, monospace; -} - -// Reduce double margins between toolbar rows - -.@{prefix}-toolbar-grp when (@has-button-borders = true) { - padding-bottom: 2px; -} - -.@{prefix}-toolbar-grp .@{prefix}-flow-layout-item { - margin-bottom: 0; -} - -// Styles for inline dialog elements - -.@{prefix}-container b { - font-weight: bold; -} - -.@{prefix}-container p { - margin-bottom: 5px; -} - -.@{prefix}-container a { - cursor: pointer; - color: @text-link; - &:hover { - text-decoration: underline; - } -} - -.@{prefix}-container ul { - margin-left: 15px; -} - -.@{prefix}-container .@{prefix}-table-striped { - border-collapse: collapse; - margin: 10px; - thead > tr { - background-color: @table-row-even; - th { - font-weight: bold; - } - } - td, th { - padding: 5px; - } - tr:nth-child(even) { - background-color: @table-row-even; - } - tbody > tr:hover { - background-color: @table-row-hover; - } -} - -.@{prefix}-branding { - font-size: inherit; - text-transform: uppercase; - white-space: pre; - padding: 8px 0; - - a { - font-size: inherit; - color: inherit; - } -} - -.@{prefix}-top-part { - position: relative; -} - -.@{prefix}-top-part::before { - //background-color: red; - content: ''; - position: absolute; - .box-shadow(@top-part-box-shadow); - top: 0; - right: 0; - bottom: 0; - left: 0; - pointer-events: none; -} - -// RTL - -.@{prefix}-rtl .@{prefix}-wordcount { - left: 0; - right: auto; -} - -.@{prefix}-rtl { - .@{prefix}-statusbar > .@{prefix}-container-body { - > *:last-child { - padding-right: 0; - padding-left: 10px; - } - } - - .@{prefix}-path { - text-align: right; - padding-right: 16px; - } -} diff --git a/src/main/core/Resources/less/tinymce/default/ToolTip.less b/src/main/core/Resources/less/tinymce/default/ToolTip.less deleted file mode 100644 index 5e3350d18c0..00000000000 --- a/src/main/core/Resources/less/tinymce/default/ToolTip.less +++ /dev/null @@ -1,130 +0,0 @@ -// Tooltip - -.@{prefix}-tooltip { - position: absolute; - padding: 5px; - .opacity(@tooltip-opacity); - margin-top: 1px; -} - -.@{prefix}-tooltip-inner { - font-size: @tooltip-font-size; - background-color: @tooltip-bg; - color: @tooltip-text; - min-width: 180px; - max-width: none !important; - padding: @tooltip-padding; - text-align: center; - white-space: normal; - - .box-shadow(@tooltip-box-shadow); - .border-radius(@tooltip-border-radius); -} - -.@{prefix}-tooltip-arrow { - position: absolute; - width: 0; - height: 0; - line-height: 0; - border: 5px dashed @tooltip-bg; -} - -.@{prefix}-tooltip-arrow-n { - border-bottom-color: @tooltip-bg; -} - -.@{prefix}-tooltip-arrow-s { - border-top-color: @tooltip-bg; -} - -.@{prefix}-tooltip-arrow-e { - border-left-color: @tooltip-bg; -} - -.@{prefix}-tooltip-arrow-w { - border-right-color: @tooltip-bg; -} - -.@{prefix}-tooltip-nw, .@{prefix}-tooltip-sw { - margin-left: -14px; -} - -.@{prefix}-tooltip-ne, .@{prefix}-tooltip-se { - margin-left: 14px; -} - -.@{prefix}-tooltip-n .@{prefix}-tooltip-arrow { - top: 0px; - left: 50%; - margin-left: -5px; - border-bottom-style: solid; - border-top: none; - border-left-color: transparent; - border-right-color: transparent; -} - -.@{prefix}-tooltip-nw .@{prefix}-tooltip-arrow { - top: 0; - left: 10px; - border-bottom-style: solid; - border-top: none; - border-left-color: transparent; - border-right-color: transparent; -} - -.@{prefix}-tooltip-ne .@{prefix}-tooltip-arrow { - top: 0; - right: 10px; - border-bottom-style: solid; - border-top: none; - border-left-color: transparent; - border-right-color: transparent; -} - -.@{prefix}-tooltip-s .@{prefix}-tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-top-style: solid; - border-bottom: none; - border-left-color: transparent; - border-right-color: transparent; -} - -.@{prefix}-tooltip-sw .@{prefix}-tooltip-arrow { - bottom: 0; - left: 10px; - border-top-style: solid; - border-bottom: none; - border-left-color: transparent; - border-right-color: transparent; -} - -.@{prefix}-tooltip-se .@{prefix}-tooltip-arrow { - bottom: 0; - right: 10px; - border-top-style: solid; - border-bottom: none; - border-left-color: transparent; - border-right-color: transparent; -} - -.@{prefix}-tooltip-e .@{prefix}-tooltip-arrow { - right: 0; - top: 50%; - margin-top: -5px; - border-left-style: solid; - border-right: none; - border-top-color: transparent; - border-bottom-color: transparent; -} - -.@{prefix}-tooltip-w .@{prefix}-tooltip-arrow { - left: 0; - top: 50%; - margin-top: -5px; - border-right-style: solid; - border-left: none; - border-top-color: transparent; - border-bottom-color: transparent; -} diff --git a/src/main/core/Resources/less/tinymce/default/Toolbar.less b/src/main/core/Resources/less/tinymce/default/Toolbar.less deleted file mode 100644 index 875491e8966..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Toolbar.less +++ /dev/null @@ -1,7 +0,0 @@ -// Toolbar - -.@{prefix}-toolbar { - + .@{prefix}-toolbar { - border-top: 1px solid @panel-border; - } -} diff --git a/src/main/core/Resources/less/tinymce/default/Variables.less b/src/main/core/Resources/less/tinymce/default/Variables.less deleted file mode 100644 index 06990a40593..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Variables.less +++ /dev/null @@ -1,314 +0,0 @@ -// Variables -// Syntax: -()--()-(); -// Example: @btn-primary-bg-hover; - -@prefix: mce; -@has-gradients: false; -//@has-radius: false; -//@has-boxshadow: true; -@has-button-borders: false; -@focus-border: #2276d2; - -// Box shadows -@box-shadow-thin: 0 1px 2px rgba(0, 0, 0, .2); -@box-shadow-bold: 0 3px 7px rgba(0, 0, 0, .3); - -// Default font -@font-family: @font-family-base; -@font-size: @font-size-base; -@line-height: @line-height-computed; - -// Edit area -@edit-area-bg: white; -@edit-area-padding: @padding-base-vertical @padding-base-horizontal; - -// Button icons -@icon-size: 16px; -@icon-box: 16px; - -// Text colors -@text: @text-color; -@text-inverse: white; -@text-disabled: @text-muted; -@text-shadow: none; -@text-error: @state-danger-text; -@text-warning: @state-warning-text; -@text-success: @state-success-text; -@text-link: @link-color; - -// Button:default -@btn-text: @text; -@btn-text-shadow: none; -@btn-text-disabled: @text-disabled; -@btn-bg: white; -@btn-border-top: transparent; -@btn-border-right: transparent; -@btn-border-bottom: transparent; -@btn-border-left: transparent; -@btn-box-shadow: none; -@btn-box-shadow-active: none; -@btn-box-disabled-opacity: 0.4; -@btn-padding: 4px 6px; -@btn-chevron: #b5bcc2; - -// Button:hover -@btn-bg-hover: @btn-bg; -@btn-text-hover: @text; -@btn-border-hover: #e2e4e7; -@btn-chevron-hover: @btn-chevron; - -// Button:focus -@btn-bg-focus: @btn-bg; -@btn-text-focus: @text; -@btn-border-focus: @btn-border-hover; -@btn-chevron-focus: @btn-chevron; - -// Button:active -@btn-bg-active: #555c66; -@btn-text-active: white; -@btn-border-active: transparent; -@btn-chevron-active: white; - -// Button primary -//@btn-primary-bg: @brand-primary; -@btn-primary-bg-hover: darken(@btn-primary-bg, 5%); -@btn-primary-bg-active: @btn-primary-bg-hover; -@btn-primary-text: @btn-primary-color; -@btn-primary-text-shadow: none; -@btn-primary-border-top: none; -@btn-primary-border-right: none; -@btn-primary-border-bottom: none; -@btn-primary-border-left: none; -//@btn-primary-border: @btn-primary-border; -@btn-primary-border-hover: darken(@btn-primary-border, 5%); - -// SplitButton -@splitbtn-delimiter: transparent; -@splitbtn-delimiter-focus: @btn-border-hover; -@splitbtn-delimiter-hover: @splitbtn-delimiter-focus; -@splitbtn-delimiter-active: @btn-bg; - -// Button group -@btn-group-border-width: 1px; - -// Menu -@menu-bg: @dropdown-bg; -@menu-margin: 2px 0 0; -@menu-border: @dropdown-border; -@menu-border-radius: @dropdown-menu-border-radius; -@menu-box-shadow: @dropdown-menu-box-shadow; -@menu-min-width: 180px; -@menu-max-height: 500px; - -@menubar-border: @btn-border-hover; -@menubar-bg-active: darken(@btn-bg, 10%); -@menubar-chevron: @btn-chevron; -@menubar-chevron-active: @btn-chevron; - -// Menu item:default -@menuitem-text: @text; -@menuitem-text-inverse: @text; -@menuitem-chevron: @menuitem-text; -@menuitem-separator-top: transparent; -@menuitem-separator-bottom: rgba(0,0,0,0.1); -@menuitem-bg-active: @btn-bg-active; -@menuitem-text-active: @text-inverse; -@menuitem-preview-border-active: @btn-bg-active; -@menuitem-bg: @menu-bg; -@menuitem-shortcut: @text-disabled; - -// Menu item:focus -@menuitem-border-focus: darken(@btn-bg, 20%); - -// Menu item:hover -@menuitem-bg-hover: #ededee; -@menuitem-text-hover: @menuitem-text; - -// Menu item:active -@menuitem-bg-active: @btn-bg-active; -@menuitem-text-active: @text-inverse; -@menuitem-chevron-active: @menuitem-text-inverse; - -// Menu item:selected -@menuitem-bg-selected: @menuitem-bg-hover; -@menuitem-text-selected: @menuitem-text; -@menuitem-chevron-selected: @menuitem-text-inverse; - -// Menu item:disabled -@menuitem-text-disabled: @text-disabled; -@menuitem-chevron-disabled: @text-disabled; -@menuitem-bg-disabled: @menuitem-bg; - -// Panel -@panel-border: @panel-default-border; -//@panel-bg: @panel-bg; - -// Tabs -@tab-border: @panel-border; -@tab-bg: @panel-bg; -@tab-bg-hover: #FDFDFD; -@tab-bg-active: #FDFDFD; -@tabs-bg: @panel-bg; - -// Tooltip -//@tooltip-bg: @tooltip-bg; -@tooltip-text: @tooltip-color; -//@tooltip-font-size: 11px; -//@tooltip-box-shadow: none; - -// Notification -@notification-font-size: @font-size-base; - -@notification-bg: @panel-bg; -@notification-border: @panel-border; -@notification-text: @text; - -@notification-success-bg: @state-success-bg; -@notification-success-border: @state-success-border; -@notification-success-text: @state-success-text; - -@notification-info-bg: @state-info-bg; -@notification-info-border: @state-info-border; -@notification-info-text: @state-info-text; - -@notification-warning-bg: @state-warning-bg; -@notification-warning-border: @state-warning-border; -@notification-warning-text: @state-warning-text; - -@notification-error-bg: @state-danger-bg; -@notification-error-border: @state-danger-border; -@notification-error-text: @state-danger-text; - -// Infobox -@infobox-bg: @notification-bg; -@infobox-border: @notification-border; -@infobox-text: @notification-text; - -@infobox-success-bg: @notification-success-bg; -@infobox-success-border: @notification-success-border; -@infobox-success-text: @notification-success-text; - -@infobox-info-bg: @notification-info-bg; -@infobox-info-border: @notification-info-border; -@infobox-info-text: @notification-info-text; - -@infobox-warning-bg: @notification-warning-bg; -@infobox-warning-border: @notification-warning-border; -@infobox-warning-text: @notification-warning-text; - -@infobox-error-bg: @notification-error-bg; -@infobox-error-border: @notification-error-border; -@infobox-error-text: @notification-error-text; - -// Window -@window-border: @modal-content-border-color; -@window-head-border: @modal-header-border-color; -@window-head-padding: @modal-title-padding; -@window-head-close: fade(@close-color, 20%); -@window-head-close-hover: fade(@close-color, 50%); -@window-foot-border: @modal-footer-border-color; -@window-foot-bg: @modal-footer-bg; -@window-fullscreen-bg: @modal-content-bg; -@window-modalblock-bg: @modal-backdrop-bg; -@window-modalblock-opacity: @modal-backdrop-opacity; -@window-box-shadow: @modal-content-box-shadow; -@window-bg: @modal-content-bg; -@window-title-font-size: @font-size-h4; -@window-btn-border: @panel-border; -@window-btn-border-hover: @window-btn-border; -@window-btn-border-focus: @focus-border; -@window-border-radius: @modal-content-border-radius; - -// Popover -@popover-bg: @window-bg; -@popover-arrow-width: 10px; -@popover-arrow: @window-bg; -@popover-arrow-outer-width: @popover-arrow-width + 1; -@popover-arrow-outer: rgba(0, 0, 0, 0.25); - -// Floatpanel -@floatpanel-box-shadow: @box-shadow-thin; - -// Checkbox -@checkbox-bg: @btn-bg; -@checkbox-box-shadow: none; -@checkbox-box-shadow-focus: none; -@checkbox-border: @panel-border; -@checkbox-border-focus: @window-btn-border-focus; - -// Path -@path-text: @text; -@path-bg-focus: @menuitem-bg-active; -@path-text-focus: @menuitem-text-active; - -// Textbox -@textbox-text-placeholder: @text-disabled; -@textbox-box-shadow: none; -@textbox-bg: @panel-bg; -@textbox-border: @panel-border; -@textbox-border-focus: @focus-border; -@textbox-box-shadow-focus: none; - -// Selectbox -@selectbox-bg: @textbox-bg; -@selectbox-border: @textbox-border; - -// Throbber -@throbber-bg: @panel-bg url('images/tinymce/loader.gif') no-repeat center center; - -// Combobox -@combobox-border: @textbox-border; -@combobox-error-text: @text-error; -@combobox-warning-text: @text-warning; -@combobox-success-text: @text-success; - -// Colorpicker -@colorpicker-border: @textbox-border; -@colorpicker-hue-bg: white; -@colorpicker-hue-border: black; - -// Grid -@grid-bg-active: mix(#2276d2, @panel-bg, 30%); -@grid-border-active: mix(#2276d2, @panel-bg, 50%); -@grid-border: @panel-border; - -// Misc -@colorbtn-backcolor-bg: #BBB; -@iframe-border: @panel-border; - -// Slider -@slider-border: @panel-border; -@slider-bg: @panel-bg; -@slider-handle-border: @panel-border; -@slider-handle-bg: darken(@panel-bg, 10%); -@slider-handle-border-focus: @focus-border; - -// Progress -@progress-border: #ccc; -@progress-bar-bg: @brand-primary; -@progress-text: @text; - -// Flow layout -@flow-layout-spacing: 2px; - -// Table -@table-row-even: @table-bg-accent; -@table-row-hover: darken(@table-row-even, 10%); - -// Keeps Edge/Gecko from jumping up/down when the NBZWSP gets added/removed on Windows in particular. -// The documented default seem to be around 1.2 but depending on the font family/browser/os being used. -// However by comparing the rendering of adding/removing a forced line height 1.3 seems closer to the truth for -// the default font in tinymce and having a slightly higher value probably improves readability anyway. -@content-line-height: 1.3; -@content-font-family: @font-family-base; -@content-font-size: @font-size-base; -@content-selection-bg: @brand-info; -@content-block-focus: @content-selection-bg; -@content-block-hover: @content-selection-bg; -@content-block-selected: @content-selection-bg; -@content-boundary-bg: #bfe6ff; - -// Main tinymce ui -@top-part-box-shadow: @box-shadow-thin; -@tinymce-box-shadow: @input-box-shadow; -@tinymce-border-radius: @input-border-radius; diff --git a/src/main/core/Resources/less/tinymce/default/Window.less b/src/main/core/Resources/less/tinymce/default/Window.less deleted file mode 100644 index 64523c909b5..00000000000 --- a/src/main/core/Resources/less/tinymce/default/Window.less +++ /dev/null @@ -1,148 +0,0 @@ -// Window - -.@{prefix}-fullscreen { - border: 0; padding: 0; margin: 0; - overflow: hidden; - height: 100%; -} - -div.@{prefix}-fullscreen { - position: fixed; - top: 0; left: 0; -} - -#@{prefix}-modal-block { - .opacity(0); - position: fixed; - left: 0; top: 0; - width: 100%; height: 100%; - background: @window-modalblock-bg; -} - -#@{prefix}-modal-block.@{prefix}-in { - .opacity(@window-modalblock-opacity); -} - -.@{prefix}-window-move { - cursor: move; -} - -.@{prefix}-window { - .border-radius(@window-border-radius); - .box-shadow(@window-box-shadow); - .reset-gradient(); - background: @window-bg; - position: fixed; - top: 0; left: 0; - opacity: 0; - transform: scale(0.1); - transition: transform 100ms ease-in, opacity 150ms ease-in; -} - -.@{prefix}-window.@{prefix}-in { - transform: scale(1); - opacity: 1; -} - -.@{prefix}-window-head { - padding: @window-head-padding; - border-bottom: 1px solid @window-head-border; - position: relative; -} - -.@{prefix}-window-head .@{prefix}-close { - position: absolute; - right: 0; - top: 0; - height: 50px; // cheat : calculated with line-height and padding - width: 50px; // cheat : calculated with line-height and padding - text-align: center; - cursor: pointer; - - i { - color: @window-head-close; - } -} - -.@{prefix}-close:hover i { - color: @window-head-close-hover; -} - -.@{prefix}-window-head .@{prefix}-title { - line-height: 20px; - font-size: @window-title-font-size; - font-weight: normal; - font-family: @headings-font-family; - text-rendering: optimizelegibility; - padding-right: 20px; -} - -.@{prefix}-window .@{prefix}-container-body { - display: block; -} - -.@{prefix}-foot { - display: block; - background-color: @window-foot-bg; - border-top: 1px solid @window-foot-border; - .border-radius(0 0 @window-border-radius @window-border-radius); -} - -.@{prefix}-window-head .@{prefix}-dragh { - position: absolute; - top: 0; left: 0; - cursor: move; - width: 90%; - height: 100%; -} - -.@{prefix}-window iframe { - width: 100%; - height: 100%; -} - -.@{prefix}-window.@{prefix}-fullscreen, .@{prefix}-window.@{prefix}-fullscreen .@{prefix}-foot { - .border-radius(0); -} - -.@{prefix}-window-body .@{prefix}-listbox { - border-color: @btn-border-hover; -} - -.@{prefix}-window { - .@{prefix}-btn:hover { - border-color: @window-btn-border-hover; - } - - .@{prefix}-btn:focus { - border-color: @window-btn-border-focus; - } -} - -.@{prefix}-window-body .@{prefix}-btn, .@{prefix}-foot .@{prefix}-btn { - border-color: @window-btn-border; -} - -.@{prefix}-foot .@{prefix}-btn.@{prefix}-primary { - border-color: transparent; -} - -// RTL - -.@{prefix}-rtl .@{prefix}-window-head .@{prefix}-close { - position: absolute; - right: auto; - left: 0; -} - -.@{prefix}-rtl .@{prefix}-window-head .@{prefix}-dragh { - left: auto; - right: 0; -} - -.@{prefix}-rtl .@{prefix}-window-head .@{prefix}-title { - direction: rtl; - text-align: right; - padding-right: 0; - padding-left: 20px; -} diff --git a/src/main/core/Resources/less/tinymce/default/plugins/AdvancedToolbar.less b/src/main/core/Resources/less/tinymce/default/plugins/AdvancedToolbar.less deleted file mode 100644 index 4439f8098fc..00000000000 --- a/src/main/core/Resources/less/tinymce/default/plugins/AdvancedToolbar.less +++ /dev/null @@ -1,2 +0,0 @@ - -.@{prefix}-i-advanced-toolbar:before { content: @fa-var-ellipsis-v; } diff --git a/src/main/core/Resources/less/tinymce/default/plugins/FileUpload.less b/src/main/core/Resources/less/tinymce/default/plugins/FileUpload.less deleted file mode 100644 index 113145cb0c6..00000000000 --- a/src/main/core/Resources/less/tinymce/default/plugins/FileUpload.less +++ /dev/null @@ -1,2 +0,0 @@ - -.@{prefix}-i-file-upload:before { content: @fa-var-file; } diff --git a/src/main/core/Resources/less/tinymce/default/plugins/Fullscreen.less b/src/main/core/Resources/less/tinymce/default/plugins/Fullscreen.less deleted file mode 100644 index 1f09804720f..00000000000 --- a/src/main/core/Resources/less/tinymce/default/plugins/Fullscreen.less +++ /dev/null @@ -1,30 +0,0 @@ - -.@{prefix}-i-fullscreen:before { content: @fa-var-expand; } - -.@{prefix}-fullscreen { - // overlaps claroline top bar - &.@{prefix}-container { - z-index: (@zindex-navbar-fixed + 1) !important; - } - - // fixes Fullscreen mode when TinyMCE is embed inside a Bootstrap modal. - // todo : find a way to avoid blinking. it's getting the full modal height, then the full page - .modal-dialog { - -webkit-transform: none !important; - -ms-transform: none !important; - -o-transform: none !important; - transform: none !important; - } - - .@{prefix}-i-fullscreen:before { content: @fa-var-compress; } -} - -// Full screen editor container -.text-editor.editor-fullscreen{ - position: fixed; - top: 0; - left: 0; - width: 100%; - height: auto; - z-index: @zindex-fullscreen; -} \ No newline at end of file diff --git a/src/main/core/Resources/less/tinymce/default/plugins/Mentions.less b/src/main/core/Resources/less/tinymce/default/plugins/Mentions.less deleted file mode 100644 index 1cf3763ad17..00000000000 --- a/src/main/core/Resources/less/tinymce/default/plugins/Mentions.less +++ /dev/null @@ -1,40 +0,0 @@ -.user-mention { - color: @text-color; - font-weight: bold; -} - -.user-mentions-menu { - .user-mention-item { - display: flex; - flex-direction: row; - align-items: center; - - .highlight-search { - text-decoration: underline; - } - - .user-avatar { - margin-right: @icon-dropdown-spacer; - - // same values than .user-micro - // for picture - max-height: 30px; - // for .fa when no picture - font-size: 30px; - } - - small { - color: @text-muted; - } - } - - .active .user-mention-item { - .user-avatar { - color: fadeOut(#fff, 50%); // only affect .fa - } - - small { - color: fadeOut(#fff, 25%); - } - } -} diff --git a/src/main/core/Resources/less/tinymce/default/plugins/ResourcePicker.less b/src/main/core/Resources/less/tinymce/default/plugins/ResourcePicker.less deleted file mode 100644 index a8e393798a2..00000000000 --- a/src/main/core/Resources/less/tinymce/default/plugins/ResourcePicker.less +++ /dev/null @@ -1,2 +0,0 @@ - -.@{prefix}-i-resource-picker:before { content: @fa-var-folder; } diff --git a/src/main/core/Resources/less/tinymce/index.less b/src/main/core/Resources/less/tinymce/index.less deleted file mode 100644 index 80b482c7983..00000000000 --- a/src/main/core/Resources/less/tinymce/index.less +++ /dev/null @@ -1,17 +0,0 @@ -/** - * TinyMCE styles. - */ - -// import custom claroline skin -@import "default/Skin"; - -// import default editor styles -// TODO : find a way to also have Inline styles -@import "default/Content"; - -// import custom plugins styles -@import "default/plugins/AdvancedToolbar"; -@import "default/plugins/FileUpload"; -@import "default/plugins/Fullscreen"; -@import "default/plugins/Mentions"; -@import "default/plugins/ResourcePicker"; diff --git a/src/main/core/Resources/modules/layout/form/components/field/select-input.jsx b/src/main/core/Resources/modules/layout/form/components/field/select-input.jsx index ac7025137f0..4f105607347 100644 --- a/src/main/core/Resources/modules/layout/form/components/field/select-input.jsx +++ b/src/main/core/Resources/modules/layout/form/components/field/select-input.jsx @@ -35,6 +35,9 @@ ChoicesTypeAhead.propTypes = { onSelect: T.func } +/** + * @deprecated + */ class SelectInput extends Component { constructor(props) { super(props) diff --git a/src/main/core/Resources/modules/resources/text/components/resource.jsx b/src/main/core/Resources/modules/resources/text/components/resource.jsx index 89d455bdb3a..d283e6dccce 100644 --- a/src/main/core/Resources/modules/resources/text/components/resource.jsx +++ b/src/main/core/Resources/modules/resources/text/components/resource.jsx @@ -7,7 +7,7 @@ import {ResourcePage} from '#/main/core/resource/containers/page' import {Text as TextTypes} from '#/main/core/resources/text/prop-types' import {Player} from '#/main/core/resources/text/player/components/player' -import {Editor} from '#/main/core/resources/text/editor/components/editor' +import {Editor} from '#/main/core/resources/text/editor/containers/editor' const TextResource = (props) => - +
className: 'Claroline\\CoreBundle\\Entity\\Resource\\Text', autoUnlock: true }} - sections={[ - { - title: trans('general', {}, 'platform'), - primary: true, - fields: [ - { - name: 'raw', - type: 'html', - label: trans('text'), - hideLabel: true, - required: true, - options: { - workspace: props.workspace, - minRows: 3 - } - } - ] - } - ]} > - - -
- {trans('placeholders_info', {}, 'template')} -
- - - - - - - - - - - {props.availablePlaceholders.map((placeholder) => - - - - - )} - -
{trans('parameter')}{trans('description')}
{`%${placeholder}%`}{trans(`${placeholder}_desc`, {}, 'template')}
-
-
- - -EditorComponent.propTypes = { + props.updateProp('raw', newValue)} + /> + {false && + + } + + + +Editor.propTypes = { path: T.string.isRequired, workspace: T.object, text: T.shape( TextTypes.propTypes ).isRequired, - availablePlaceholders: T.arrayOf(T.string) + availablePlaceholders: T.arrayOf(T.string), + updateProp: T.func.isRequired } -const Editor = connect( - state => ({ - path: resourceSelectors.path(state), - workspace: resourceSelectors.workspace(state), - text: selectors.text(state), - availablePlaceholders: selectors.availablePlaceholders(state) - }) -)(EditorComponent) - export { Editor } diff --git a/src/main/core/Resources/modules/resources/text/editor/components/placeholders.jsx b/src/main/core/Resources/modules/resources/text/editor/components/placeholders.jsx new file mode 100644 index 00000000000..f3655ab28b7 --- /dev/null +++ b/src/main/core/Resources/modules/resources/text/editor/components/placeholders.jsx @@ -0,0 +1,43 @@ +import React from 'react' +import {PropTypes as T} from 'prop-types' + +import {trans} from '#/main/app/intl' +import {FormSection, FormSections} from '#/main/app/content/form/components/sections' + +const EditorPlaceholders = (props) => + + +
+ {trans('placeholders_info', {}, 'template')} +
+ + + + + + + + + + + {props.availablePlaceholders.map((placeholder) => + + + + + )} + +
{trans('parameter')}{trans('description')}
{`%${placeholder}%`}{trans(`${placeholder}_desc`, {}, 'template')}
+
+
+ +EditorPlaceholders.propTypes = { + availablePlaceholders: T.arrayOf(T.string) +} + +export { + EditorPlaceholders +} diff --git a/src/main/core/Resources/modules/resources/text/editor/containers/editor.jsx b/src/main/core/Resources/modules/resources/text/editor/containers/editor.jsx new file mode 100644 index 00000000000..371beda2d92 --- /dev/null +++ b/src/main/core/Resources/modules/resources/text/editor/containers/editor.jsx @@ -0,0 +1,27 @@ +import React from 'react' +import {connect} from 'react-redux' + +import {actions as formActions, selectors as formSelectors} from '#/main/app/content/form/store' +import {selectors as resourceSelectors} from '#/main/core/resource/store' +import {selectors} from '#/main/core/resources/text/editor/store' + +import {Editor as EditorComponent} from '#/main/core/resources/text/editor/components/editor' + +const Editor = connect( + state => ({ + path: resourceSelectors.path(state), + workspace: resourceSelectors.workspace(state), + text: selectors.text(state), + availablePlaceholders: selectors.availablePlaceholders(state), + value: formSelectors.data(formSelectors.form(state, selectors.FORM_NAME)).raw + }), + (dispatch) => ({ + updateProp(prop, value) { + dispatch(formActions.updateProp(selectors.FORM_NAME, prop, value)) + } + }) +)(EditorComponent) + +export { + Editor +} diff --git a/src/main/core/Resources/modules/resources/text/prop-types.js b/src/main/core/Resources/modules/resources/text/prop-types.js index 6026194f4af..a81d91a608d 100644 --- a/src/main/core/Resources/modules/resources/text/prop-types.js +++ b/src/main/core/Resources/modules/resources/text/prop-types.js @@ -2,7 +2,7 @@ import {PropTypes as T} from 'prop-types' const Text = { propTypes: { - id: T.number, + id: T.string, content: T.string, meta: T.shape({ version: T.number diff --git a/src/main/core/Resources/modules/tinymce/mock.js b/src/main/core/Resources/modules/tinymce/mock.js deleted file mode 100644 index 164646a6088..00000000000 --- a/src/main/core/Resources/modules/tinymce/mock.js +++ /dev/null @@ -1,14 +0,0 @@ - -function mock() { - window.tinymce = { - get: () => ({ - on: () => {}, - setContent: () => {}, - destroy: () => {} - }) - } -} - -export { - mock -} diff --git a/src/main/core/Resources/modules/tinymce/plugins/file-upload.js b/src/main/core/Resources/modules/tinymce/plugins/file-upload.js index 4af9255f8f3..3ca3b7d34f1 100644 --- a/src/main/core/Resources/modules/tinymce/plugins/file-upload.js +++ b/src/main/core/Resources/modules/tinymce/plugins/file-upload.js @@ -1,4 +1,4 @@ -import tinymce from 'tinymce/tinymce' +//import tinymce from 'tinymce/tinymce' import invariant from 'invariant' import {makeId} from '#/main/core/scaffolding/id' @@ -14,17 +14,18 @@ import {MODAL_TINYMCE_UPLOAD} from '#/main/core/tinymce/modals/upload' * Open a file upload form from a TinyMCE editor. */ function openFileUpload(editor) { + const showModal = editor.options.get('showModal'); + // We need to generate an anchor in the content to know where to put the file we will upload. // For now, the resource picker will unmount the TinyMCE editor when shown in a modal // so we will loose the cursor position. const placeholder = `` editor.insertContent(placeholder) - editor.setProgressState(true) - - editor.settings.showModal(MODAL_TINYMCE_UPLOAD, { - workspace: editor.settings.workspace, + showModal(MODAL_TINYMCE_UPLOAD, { + workspace: editor.options.get('workspace'), add: (newResourceNode) => { + editor.setProgressState(true) fetch( url(['claro_resource_embed', {type: newResourceNode.meta.type, id: newResourceNode.id}]), { credentials: 'include' @@ -43,7 +44,7 @@ function openFileUpload(editor) { // retrieve the editor which have requested the picker // ATTENTION : we don't reuse instance from func params because it could have been removed // when tinyMCE is rendered in a modal - const initiator = tinymce.activeEditor || tinymce.get(editor.id) + const initiator = editor //tinymce.activeEditor || tinymce.get(editor.id) if (initiator) { let content = initiator.getContent() content = content.replace(placeholder, responseText) @@ -59,7 +60,7 @@ function openFileUpload(editor) { // creates log error invariant(false, error.message) - const initiator = tinymce.activeEditor || tinymce.get(editor.id) + const initiator = editor // tinymce.activeEditor || tinymce.get(editor.id) if (initiator) { // displays generic error in ui initiator.notificationManager.open({type: 'error', text: trans('error_occurred')}) @@ -71,19 +72,26 @@ function openFileUpload(editor) { } // Register new plugin -tinymce.PluginManager.add('file-upload', (editor) => { +window.tinymce.PluginManager.add('file-upload', (editor) => { + editor.options.register('workspace', { + processor: 'object' + }) + editor.options.register('showModal', { + processor: 'function' + }) + // provides an insert menu item - editor.addMenuItem('file-upload', { - icon: 'file-upload', + editor.ui.registry.addMenuItem('file-upload', { + icon: 'new-document', text: trans('file'), - context: 'insert', - onclick: () => openFileUpload(editor) + //context: 'insert', + onAction: () => openFileUpload(editor) }) // provides a toolbar button - editor.addButton('file-upload', { - icon: 'file-upload', + editor.ui.registry.addButton('file-upload', { + icon: 'new-document', tooltip: trans('upload'), - onclick: () => openFileUpload(editor) + onAction: () => openFileUpload(editor) }) }) diff --git a/src/main/core/Resources/modules/tinymce/plugins/index.js b/src/main/core/Resources/modules/tinymce/plugins/index.js index ecb22d577d6..4da4ff21ecd 100644 --- a/src/main/core/Resources/modules/tinymce/plugins/index.js +++ b/src/main/core/Resources/modules/tinymce/plugins/index.js @@ -3,34 +3,34 @@ */ // standard plugins -import 'tinymce/plugins/anchor' +/*import 'tinymce/plugins/anchor' import 'tinymce/plugins/advlist' import 'tinymce/plugins/autolink' import 'tinymce/plugins/autoresize' import 'tinymce/plugins/charmap' import 'tinymce/plugins/code' -import 'tinymce/plugins/contextmenu' +//import 'tinymce/plugins/contextmenu' import 'tinymce/plugins/fullscreen' import 'tinymce/plugins/image' import 'tinymce/plugins/insertdatetime' import 'tinymce/plugins/link' import 'tinymce/plugins/lists' import 'tinymce/plugins/media' -import 'tinymce/plugins/paste' +//import 'tinymce/plugins/paste' import 'tinymce/plugins/preview' import 'tinymce/plugins/searchreplace' import 'tinymce/plugins/table' -import 'tinymce/plugins/textcolor' +//import 'tinymce/plugins/textcolor' import 'tinymce/plugins/visualblocks' import 'tinymce/plugins/wordcount' // claroline import '#/main/core/tinymce/plugins/advanced-fullscreen' import '#/main/core/tinymce/plugins/advanced-toolbar' -import '#/main/core/tinymce/plugins/codemirror' +//import '#/main/core/tinymce/plugins/codemirror' import '#/main/core/tinymce/plugins/file-upload' -import '#/main/core/tinymce/plugins/mentions' -import '#/main/core/tinymce/plugins/resource-picker' +//import '#/main/core/tinymce/plugins/mentions' +import '#/main/core/tinymce/plugins/resource-picker'*/ const plugins = [ 'advanced-fullscreen', @@ -41,8 +41,8 @@ const plugins = [ 'advlist', 'charmap', 'code', - 'codemirror', - 'contextmenu', + //'codemirror', + //'contextmenu', 'file-upload', 'fullscreen', 'image', @@ -50,13 +50,13 @@ const plugins = [ 'link', 'lists', 'media', - 'mentions', - 'paste', + //'mentions', + //'paste', 'preview', 'resource-picker', 'searchreplace', 'table', - 'textcolor', + //'textcolor', 'visualblocks', 'wordcount' ] diff --git a/src/main/core/Resources/modules/tinymce/plugins/resource-picker.js b/src/main/core/Resources/modules/tinymce/plugins/resource-picker.js index b63e7972e39..428f552a7d4 100644 --- a/src/main/core/Resources/modules/tinymce/plugins/resource-picker.js +++ b/src/main/core/Resources/modules/tinymce/plugins/resource-picker.js @@ -1,4 +1,4 @@ -import tinymce from 'tinymce/tinymce' +//import tinymce from 'tinymce/tinymce' import invariant from 'invariant' import {makeId} from '#/main/core/scaffolding/id' @@ -15,19 +15,21 @@ import {MODAL_RESOURCES} from '#/main/core/modals/resources' * Opens a resource picker from a TinyMCE editor. */ function openResourcePicker(editor) { + const showModal = editor.options.get('showModal'); + // We need to generate an anchor in the content to know where to put the resource we will pick. // For now, the resource picker will unmount the TinyMCE editor when shown in a modal // so we will loose the cursor position. const placeholder = `` editor.insertContent(placeholder) - editor.setProgressState(true) - - editor.settings.showModal(MODAL_RESOURCES, { + showModal(MODAL_RESOURCES, { selectAction: (selected) => ({ type: CALLBACK_BUTTON, label: trans('select', {}, 'actions'), callback: () => { + editor.setProgressState(true) + selected.map((resourceNode, index) => { fetch( url(['claro_resource_embed', {type: resourceNode.meta.type, id: resourceNode.id}]), { @@ -47,7 +49,7 @@ function openResourcePicker(editor) { // retrieve the editor which have requested the picker // ATTENTION : we don't reuse instance from func params because it could have been removed // when tinyMCE is rendered in a modal - const initiator = tinymce.activeEditor || tinymce.get(editor.id) + const initiator = editor //tinymce.activeEditor || tinymce.get(editor.id) if (initiator) { let content = initiator.getContent() @@ -73,7 +75,7 @@ function openResourcePicker(editor) { // creates log error invariant(false, error.message) - const initiator = tinymce.activeEditor || tinymce.get(editor.id) + const initiator = editor //tinymce.activeEditor || tinymce.get(editor.id) if (initiator) { // displays generic error in ui initiator.notificationManager.open({type: 'error', text: trans('error_occurred')}) @@ -87,19 +89,23 @@ function openResourcePicker(editor) { } // Register new plugin -tinymce.PluginManager.add('resource-picker', (editor) => { +window.tinymce.PluginManager.add('resource-picker', (editor) => { + editor.options.register('showModal', { + processor: 'function' + }) + // provides an insert menu item - editor.addMenuItem('resource-picker', { + editor.ui.registry.addButton('resource-picker', { icon: 'resource-picker', text: trans('resource'), - context: 'insert', - onclick: () => openResourcePicker(editor) + //context: 'insert', + onAction: () => openResourcePicker(editor) }) // provides a toolbar button - editor.addButton('resource-picker', { + editor.ui.registry.addMenuItem('resource-picker', { icon: 'resource-picker', tooltip: trans('resource'), - onclick: () => openResourcePicker(editor) + onAction: () => openResourcePicker(editor) }) }) diff --git a/src/main/core/Resources/modules/tinymce/themes/index.js b/src/main/core/Resources/modules/tinymce/themes/index.js index 43cd4ec4895..81819bb822b 100644 --- a/src/main/core/Resources/modules/tinymce/themes/index.js +++ b/src/main/core/Resources/modules/tinymce/themes/index.js @@ -1,2 +1,2 @@ -import 'tinymce/themes/modern/theme' +//import 'tinymce/themes/modern/theme' diff --git a/webpack/libraries.js b/webpack/libraries.js deleted file mode 100644 index 6913299c49f..00000000000 --- a/webpack/libraries.js +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = { - 'scaffolding_dll': [ - 'classnames', - 'invariant', - 'lodash', - 'moment', - 'reselect', - 'tinymce' - ], - 'react_dll': [ - 'react', - 'redux', - 'react-bootstrap', - 'react-dom', - 'react-redux', - 'react-router-dom', - 'prop-types' - ] -}