Remove ckeditor5 fix html creation

pull/3346/head
Julio Montoya 4 years ago
parent 291d6e3c10
commit 51d971d2a8
  1. 77
      assets/vue/components/documents/FormNewDocument.vue
  2. 4
      assets/vue/main.js
  3. 5
      assets/vue/mixins/CreateMixin.js
  4. 3
      assets/vue/views/documents/CreateFile.vue
  5. 5
      package.json
  6. 70
      yarn.lock

@ -11,15 +11,18 @@
@input="$v.item.title.$touch()"
@blur="$v.item.title.$touch()"
/>
<editor
:error-messages="contentErrors"
required
v-model="item.content"
:init="{
skin_url: '/build/libs/tinymce/skins/ui/oxide',
content_css: '/build/libs/tinymce/skins/content/default/content.css',
branding:false,
height: 500,
file_picker_callback: function(callback, value, meta) {
toolbar_mode: 'sliding',
file_picker_callback : browser,
/*file_picker_callback: function(callback, value, meta) {
// Provide file and text for the link dialog
if (meta.filetype == 'file') {
callback('mypage.html', {text: 'My text'});
@ -34,7 +37,7 @@
if (meta.filetype == 'media') {
callback('movie.mp4', {source2: 'alt.ogg', poster: 'image.jpg'});
}
},
},*/
images_upload_handler: (blobInfo, success, failure) => {
console.log(blobInfo);
console.log(success);
@ -46,41 +49,27 @@
},
//menubar: true,
plugins: [
'advlist autolink lists link image charmap print preview anchor',
'fullpage advlist autolink lists link image charmap print preview anchor',
'searchreplace visualblocks code bbcode fullscreen',
'insertdatetime media table paste code help wordcount'
'insertdatetime media table paste code wordcount'
],
toolbar: 'undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | pagebreak | charmap emoticons | fullscreen preview save print | insertfile image media template link anchor code codesample | ltr rtl',
/*toolbar:
'undo redo | formatselect | bold italic backcolor | \
alignleft aligncenter alignright alignjustify | \
bullist numlist outdent indent | removeformat'*/
}
"
/>
</v-col>
</v-row>
</v-container>
</v-form>
</template>
<style>
.ck-editor__editable {
min-height: 400px;
}
</style>
<script>
import has from 'lodash/has';
import { validationMixin } from 'vuelidate';
import { required } from 'vuelidate/lib/validators';
import { mapActions } from 'vuex';
import { mapFields } from 'vuex-map-fields';
//import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
//import UploadAdapter from './UploadAdapter';
//import CKFinder from '@ckeditor/ckeditor5-ckfinder/src/ckfinder';
import Editor from '@tinymce/tinymce-vue'
import 'tinymce/tinymce'
@ -159,17 +148,6 @@ export default {
title: null,
content: null,
parentResourceNodeId: null,
// editor: ClassicEditor,
// editorData: '',
// editorConfig: {
// allowedContent: true,
// extraPlugins: [this.uploader],
// // ckfinder: {
// // //uploadUrl: '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files&responseType=json',
// // //openerMethod: 'popup'
// // }
// // The configuration of the rich-text editor.
// }
};
},
computed: {
@ -200,11 +178,40 @@ export default {
}
},
methods: {
uploader(editor)
{
editor.plugins.get( 'FileRepository' ).createUploadAdapter = ( loader ) => {
return new UploadAdapter( loader );
};
browser (callback, value, meta) {
tinymce.activeEditor.windowManager.openUrl({
url: '/',// use an absolute path!
title: 'file manager',
/*width: 900,
height: 450,
resizable: 'yes'*/
}, {
oninsert: function (file, fm) {
var url, reg, info;
// URL normalization
url = fm.convAbsUrl(file.url);
// Make file info
info = file.name + ' (' + fm.formatSize(file.size) + ')';
// Provide file and text for the link dialog
if (meta.filetype == 'file') {
callback(url, {text: info, title: info});
}
// Provide image and alt text for the image dialog
if (meta.filetype == 'image') {
callback(url, {alt: info});
}
// Provide alternative source and posted for the media dialog
if (meta.filetype == 'media') {
callback(url);
}
}
});
return false;
},
},
validations: {

@ -25,10 +25,6 @@ Vue.use(Vuelidate);
Vue.use(VueApollo);
Vue.use(require('vue-moment'));
//import CKEditor from '@ckeditor/ckeditor5-vue';
//Vue.use(CKEditor);
const apolloProvider = new VueApollo({
defaultClient: apolloClient,
});

@ -9,8 +9,11 @@ export default {
this.showMessage(`${item['@id']} created`);
let folderParams = this.$route.query;
console.log(folderParams);
console.log(item['parentResourceNode']);
this.$router.push({
name: `${this.$options.servicePrefix}Update`,
name: `${this.$options.servicePrefix}List`,
params: { id: item['@id'] },
query: folderParams
});

@ -35,7 +35,8 @@ export default {
item: {
filetype: 'file',
parentResourceNodeId: null,
resourceLinkList: null
resourceLinkList: null,
content: null
},
};
},

@ -6,10 +6,6 @@
"dependencies": {
"@babel/plugin-transform-runtime": "^7.9.6",
"@babel/runtime": "^7.9.6",
"@ckeditor/ckeditor5-adapter-ckfinder": "^19.0.1",
"@ckeditor/ckeditor5-build-classic": "^19.0.2",
"@ckeditor/ckeditor5-upload": "^19.0.1",
"@ckeditor/ckeditor5-vue": "^1.0.1",
"@fancyapps/fancybox": "^3.5.7",
"@tinymce/tinymce-vue": "^3.2.2",
"@vue/cli": "^4.4.5",
@ -24,6 +20,7 @@
"bootstrap-select": "^1.13.17",
"chart.js": "^2.9.3",
"chosen-js": "^1.8.7",
"ckeditor": "^4.0.0",
"core-js": "^3.0",
"cropper": "^4.0",
"datepair.js": "^0.4.16",

@ -977,66 +977,6 @@
lodash "^4.17.13"
to-fast-properties "^2.0.0"
"@ckeditor/ckeditor5-adapter-ckfinder@^19.0.1":
version "19.0.1"
resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-adapter-ckfinder/-/ckeditor5-adapter-ckfinder-19.0.1.tgz#862bd38db15e4d8ccb5e3483c4d9f08cf53e49d4"
integrity sha512-dEzMzRhh20TQ1t0LaTa+xSGk+mgjlW73cbz4wlJe/lM9DYGEAjJTHlwo2rrOY/HJ0OfdP6H8R0TDpReE4CcqoA==
dependencies:
"@ckeditor/ckeditor5-core" "^19.0.1"
"@ckeditor/ckeditor5-upload" "^19.0.1"
"@ckeditor/ckeditor5-build-classic@^19.0.2":
version "19.0.2"
resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-build-classic/-/ckeditor5-build-classic-19.0.2.tgz#ecab0e38d3f6fa7560f6937d18f711243b20b978"
integrity sha512-yz2M9Q6jMy9zF+JiQiSoaG/m7Eu48H+Yi3FgtVGDFpLDqGUJntNsW26g3qZld5Pa4pgVPRmDcfKHzLTWAo3iRg==
"@ckeditor/ckeditor5-core@^19.0.1":
version "19.0.1"
resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-core/-/ckeditor5-core-19.0.1.tgz#becf3723c69f96bcaf35880530a5cc986e145020"
integrity sha512-HKuJp7XEmg8q6o8T2pIUCQDxLlgx2vtweJeDpgreLrX4IqreE0UQtz+TUyxvtlay55UhVpBP4zrnROxrq4Prng==
dependencies:
"@ckeditor/ckeditor5-engine" "^19.0.1"
"@ckeditor/ckeditor5-utils" "^19.0.1"
lodash-es "^4.17.10"
"@ckeditor/ckeditor5-engine@^19.0.1":
version "19.0.1"
resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-engine/-/ckeditor5-engine-19.0.1.tgz#0c23e0d52e1468c14e66a4bcdfb3bde6d12dccf6"
integrity sha512-dBE4bSpQzGhoyZaWdDaUJyWG0ltCmpXVkv5YG/x+4s+n3vJf9KKEQcXvj/XPCrMqLaWGKTNugKYfQIEJdOzTZA==
dependencies:
"@ckeditor/ckeditor5-utils" "^19.0.1"
lodash-es "^4.17.10"
"@ckeditor/ckeditor5-ui@^19.0.1":
version "19.0.1"
resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-ui/-/ckeditor5-ui-19.0.1.tgz#2c1ce11e1fda5acd726cb492ffeca4dc030d82c4"
integrity sha512-b5WpNmR75NeZ/5CxXWarYUAaomcoflQVjD8M0JHppJKMrBpfuaogRXIRiqsCq+d4mUKzkrEzBcGElI2MObE5dw==
dependencies:
"@ckeditor/ckeditor5-core" "^19.0.1"
"@ckeditor/ckeditor5-utils" "^19.0.1"
lodash-es "^4.17.10"
"@ckeditor/ckeditor5-upload@^19.0.1":
version "19.0.1"
resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-upload/-/ckeditor5-upload-19.0.1.tgz#6a8dcd8783a8824f1d7398216a98cc0a177c9ff7"
integrity sha512-MqxP/KENO8fNUNuK5dXpfk8BSRHYi8OaNS7TYtffX6e2mhlY/Dv15zJWY7XibHEx6+UeRyhZsZ3e4nJM69faAA==
dependencies:
"@ckeditor/ckeditor5-core" "^19.0.1"
"@ckeditor/ckeditor5-ui" "^19.0.1"
"@ckeditor/ckeditor5-utils" "^19.0.1"
"@ckeditor/ckeditor5-utils@^19.0.1":
version "19.0.2"
resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-utils/-/ckeditor5-utils-19.0.2.tgz#72e0abf31352b74f659d29972030f89d09334e9e"
integrity sha512-ZpoCbuyzujERC5WIjT5obrUyo9m4IoAEOgTxiKOyv9Cy8IGrcW1mG01111iwY/j2pWio0rY0kGRIsQaxqcZ+Ag==
dependencies:
lodash-es "^4.17.10"
"@ckeditor/ckeditor5-vue@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-vue/-/ckeditor5-vue-1.0.1.tgz#cddb99609f61b647214b704656c08a15b6a53865"
integrity sha512-4MaQwZ04cWwqYW0732sg2aqx9ILeHIP0LSLKUuLCLR21qYONZPvxY/V/czh1DH99toaL/iwPvEoJtO2ldriPaA==
"@coreui/coreui-plugin-npm-postinstall@^1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@coreui/coreui-plugin-npm-postinstall/-/coreui-plugin-npm-postinstall-1.0.2.tgz#6daeb2ec786580d9c0849b05bc3e8d0222d5c463"
@ -4487,6 +4427,11 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3:
inherits "^2.0.1"
safe-buffer "^5.0.1"
ckeditor@^4.0.0:
version "4.12.1"
resolved "https://registry.yarnpkg.com/ckeditor/-/ckeditor-4.12.1.tgz#954a7b028dd611e44ba51cc7c2fe051cf1052186"
integrity sha512-pH2Su4oi0D4iN/3U8nUcwI7/lXHoOJi0aiN8e2zxnm4Ow5kq8eZP2ZGmpYyuqRyKZ2tHaU8+OyYi7laXcjiq9Q==
class-utils@^0.3.5:
version "0.3.6"
resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
@ -9118,11 +9063,6 @@ locate-path@^5.0.0:
dependencies:
p-locate "^4.1.0"
lodash-es@^4.17.10:
version "4.17.15"
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78"
integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ==
lodash._reinterpolate@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"

Loading…
Cancel
Save