ckeditor4.x

Ckeditor 4.5.7 strips HTML tags despite config.allowedContent = true

风格不统一 提交于 2019-12-25 08:04:09
问题 I am using ckeditor 4.5.7 and I want the user to insert arbitrary HTML code into the page. For now the users cannot even insert tags like <h3>test</h3> - the <h3> tags are automatically converted to <p> after the data is saved (this is occurring in a SharePoint page). As per docs here - http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent - and multiple topics here on StackOverflow, I have set this option in config.js to disable content filtering but it seems it has no effect:

Custom plugin with DOM manipulation CKEditor 4.x

ぐ巨炮叔叔 提交于 2019-12-24 02:16:13
问题 I am developing one custom plugin for the CKEditor 4.7 which do a simple think take in case user select some stuff it will put it in a div with specific class, else it will put a div with same class just with text like 'Add content here' I try to use some functions according to CKEditor docs but have something really wrong. here is the code for the plugin folder name=> customdiv , file=> plugin.js CKEDITOR.plugins.add('customdiv', { icons: 'smile', init: function (editor) { editor.addCommand(

Disable sorting of element attributes

偶尔善良 提交于 2019-12-20 03:43:06
问题 Is there a way to disable the sorting of element attributes so that checkDirty() will work correctly when allowedContent is set to true? Example of the sorting of attributes here <div zattribute='z' attribute='a'>simple</div gets changed to <div attribute="a" zattribute="z">simple</div> causing the checkDirty() call to always return true even though the user didn't actually change anything within the ckeditor user interface. 回答1: CKEDITOR.on( 'instanceReady', function( ev ) { ev.editor

How to use multiple upload image in ckeditor image2 plugin?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-14 03:32:59
问题 Is it some configuration rule for multiple upload image in CKEditor image2 plugin? My current configuration is: editor.ckeditor({ forcePasteAsPlainText: true, extraPlugins: 'embed,autoembed,image2', image2_alignClasses: [ 'image-align-left', 'image-align-center','image-align-right' ], image2_disableResizer: true, filebrowserImageBrowseUrl: '/laravel-filemanager?type=Images', filebrowserImageUploadUrl: '/laravel-filemanager/upload?type=Images&_token=' + editor.attr('data-token'),

How do I pass custom values to CKFinder3 when instantiating a CKEditor4 instance?

拈花ヽ惹草 提交于 2019-12-14 03:18:23
问题 I'm having some trouble using pass to pass variables to my CKFinder3 (ASP) connector when using CKEditor4. I create my editor instance with: CKFinder.setupCKEditor( myEditor, { pass: 'testVar', testVar: 'nooice', ... }); but the variable just doesn't seem to make it over to CKFinder. If I add this code to the CKFinder config directly it does work though: config.pass = 'testVar'; config.testVar = 'nooice'; That's great, but the values I want to pass will be dynamic, so I need to pass them in

How to implement CKEditor in Angular app?

强颜欢笑 提交于 2019-12-13 16:31:08
问题 I am trying to setup CKEditor in my Angular application by following the steps in https://github.com/chymz/ng2-ckeditor#angular---ckeditor-component Getting error 'Cannot find module '@angular/core' in the following files: ckbutton.directive.d.ts, ckeditor.component.d.ts, ckgroup.directive.d.ts Dependencies "dependencies": { "@angular/common": "~5.2.4", "@angular/compiler": "~5.2.4", "@angular/core": "~5.2.4", "@angular/forms": "~5.2.4", "@angular/http": "~5.2.4", "@angular/platform-browser":

TYPO3: Data-attributes of tags in ckeditor configuration of my plugin are striped

陌路散爱 提交于 2019-12-13 03:10:14
问题 I wrote a small plugin to add a button to ckeditor, so that the user can add a tooltip-codesnippet into the editor. This works perfect. After closing the dialog the code is correctly inserted. When I save afterward the text my site is reloading and my data-attributes are gone. In my plugin I added: CKEDITOR.plugins.add('tooltip', { lang: [ 'en', 'de'], init: function (editor) { editor.addCommand('tooltip', new CKEDITOR.dialogCommand('tooltip', { allowedContent: 'span[data-hint-content]; sup'

CK Editor font-size, font-style, font-type dropdown take a while to appear

笑着哭i 提交于 2019-12-13 02:51:32
问题 I'm working on a CMS where we have a lot of elements with pre-loaded CK Editors everything works fine including the drop downs for text-color etc but the drop downs for font-size, font-style, font-type takes a while before appearing, See attached: PS: I am using CkEditor.inline to fire Ck Editor on it Can someone please help with why is it happening? 来源: https://stackoverflow.com/questions/51060669/ck-editor-font-size-font-style-font-type-dropdown-take-a-while-to-appear

set plugin toolbar icon using class names in CK Editor

。_饼干妹妹 提交于 2019-12-12 02:14:42
问题 How do I set plugin and/or widget toolbar button icon using class names (instead of using image URL)? 回答1: I've found a hack for this seemingly obvious missing feature: editor.ui.addButton('MyButton', { //className: '...' // this only adds the classes to the parent container, not the icon span icon: '_ fa fa-scissors _' // this hacks the existing classes and injects extra classes to the icon span }); Tested with CK Editor v4.6.2 来源: https://stackoverflow.com/questions/41620593/set-plugin

CKEditor4 EnhancedImage Plugin Image added event or: How to add custom class to image

三世轮回 提交于 2019-12-11 15:43:48
问题 I'm playing around with CKEditor4 and I want to add a custom class to all images that I inserted. Unfortunately it seems as the dataFilter rule which works for adding classes on inserted <p> does not work on <img> -images. Image plugin I use is enhancedImage ("image2") and I do not upload the image, I pick it from a fileBrowser instance. My code: $(function(){ var editor = CKEDITOR.replace( 'article-ckeditor', { customConfig: '/vendor/ckeditor/ckeditor.config.js', filebrowserImageBrowseUrl: '