ckeditor

How to set CKEditor 5 height

安稳与你 提交于 2019-12-05 20:50:10
Using CKeditor angular component How to set the editor height? According to the docs, it can be done by setting the editor style to: min-height: 500px !important; But it doesn't work! Maciej Bukowski If you add it to the global stylesheet the following should work: .ck-editor__editable_inline { min-height: 500px !important; } But if you want to style through the component.css you need to type this: :host ::ng-deep .ck-editor__editable_inline { min-height: 500px !important; } 来源: https://stackoverflow.com/questions/52485000/how-to-set-ckeditor-5-height

How to make the inline ckeditor toolbar fixed at the top and not float

醉酒当歌 提交于 2019-12-05 20:32:59
问题 I am using inline CKEditor in my page. I want to make it fixed on the top of the contenteditable div. Currently it is floating whenever i scroll the page. How to make the toolbar position fixed at the top? 回答1: Use the combination of inline editor and the Shared Space plugin. Check the Inline Editor with Shared Toolbar and Bottom Bar demo on the CKEditor SDK page for an example. Note that you can view and download the source code of each SDK example - just scroll down to "Get Sample Source

CkEditor Doesn't post value

↘锁芯ラ 提交于 2019-12-05 20:00:54
When a form with a textarea using CkEditor is submitted using ajax the post is empty on the server side. If I remove CkEditor, the value is posted. Any ideas? Wick On submit, run this code: for (instance in CKEDITOR.instances) { CKEDITOR.instances[instance].updateElement(); } .. basically for AJAX, you need to force CKEditor to update your textareas so they contain the data you see in the CKEditor windows. See this question for more details. You don't really need to update anything with JS. All you have to do is to make sure your textarea (the one you replace with CKEDITOR.replace() on $

HTMLPurifier Breaking Images

拜拜、爱过 提交于 2019-12-05 19:23:03
I'm trying to run HTMLPurifier on user input from a WYSIWYG (CK Editor) and the images are breaking. Unfiltered Input: <img alt="laugh" src="/lib/ckeditor/plugins/smiley/images/teeth_smile.gif" title="laugh"> After running through purifier with default settings: <img alt=""laugh"" src="%5C" title=""laugh""> I have tried changing the configuration settings; but I the src is never preserved. Any thoughts? I have a suspicion that magic_quotes could be a reason..? Also did you try $config->set('Core.RemoveInvalidImg',true); . Which version are you using? (Try older or newer) Had the same problem.

CKEditor dialog select box dynamic population

浪尽此生 提交于 2019-12-05 19:10:06
I have two select boxes in a dialog..I was wondering if i can set the contents of the second select box based on the selection of the first box..i.e if select box1 has x selected, then select box2 contents are a, b, c..if select box1 has y selected, then select box2 contents are d, e, f.. Is this possible to implement? Thanks I'm guessing that the dialog with two select boxes you mentioned is part of a custom plugin you are creating. So my answer shows code you could use in the dialog file that's being created as part of the plugin. The onChange function of Selector One creates a reference to

项目3

人走茶凉 提交于 2019-12-05 19:08:14
课程详情页 CKEditor富文本编辑器 富文本即具备丰富样式格式的文本。在运营后台,运营人员需要录入课程的相关描述,可以是包含了HTML语法格式的字符串。为了快速简单的让用户能够在页面中编辑带html格式的文本,我们引入富文本编辑器。 富文本编辑器:ueditor、ckeditor、kindeditor 1. 安装 pip install django-ckeditor 2. 添加应用 在INSTALLED_APPS中添加 INSTALLED_APPS = [ ... 'ckeditor', # 富文本编辑器 'ckeditor_uploader', # 富文本编辑器上传图片模块 ... ] 3. 添加CKEditor设置 在settings/dev.py中添加 # 富文本编辑器ckeditor配置 CKEDITOR_CONFIGS = { 'default': { 'toolbar': 'full', # 工具条功能 'height': 300, # 编辑器高度 # 'width': 300, # 编辑器宽 }, } CKEDITOR_UPLOAD_PATH = '' # 上传图片保存路径,留空则调用django的文件上传功能 View Code 4. 添加ckeditor路由 在总路由中添加 path(r'^ckeditor/', include('ckeditor

How to add buttons on ckeditor widgets that have some functionality built in?

冷暖自知 提交于 2019-12-05 19:01:24
I have modified the simplebox widget given in this widget tutorial to include these three buttons on hover. I want to enable some functionality in these buttons, i.e. run some javascript on their click event. E.g. With delete button the widget instance gets destroyed (looking through doc I found the destroy method for widget). But how I should go about attaching that method on this button's click event. Also wanted to know, how to stop event bubbling (event.stopPropagation) in CKEditor to stop further events from happening on the click event. Any advice will be helpful. Have been struggling

Using ckEditor on selective text areas in django admin forms

天大地大妈咪最大 提交于 2019-12-05 18:43:29
I want to apply ckeditor on specific textarea in django admin form not on all the text areas. Like snippet below will apply ckeditor on every textarea present on django form: class ProjectAdmin(admin.ModelAdmin): formfield_overrides = {models.TextField: {'widget': forms.Textarea(attrs={'class':'ckeditor'})}, } class Media: js = ('ckeditor/ckeditor.js',) but i want it on a specific textarea not on every textarea. You have couple of options. I think the simplest is if you use Django 1.2, then you have to create custom form for your admin and use 'widgets' option: ProjectForm(forms.ModelForm)

CkEditor - Template loaded from AJAX

荒凉一梦 提交于 2019-12-05 18:07:08
I am using CkEditor and would like to define a custom template, that uses an AJAX function to load a HTML string. I have been able to define custom templates, but if I use a function for the html property of the template object the function is never exectuted. Is it possible to load a template using AJAX with the default template plugin or do I need to write my own? config.js CKEDITOR.editorConfig = function (config) { config.templates_files = ['/pathtomyfile/custom.js']; }; custom.js (defining my custom templates) CKEDITOR.addTemplates('default', { imagesPath: CKEDITOR.getUrl(CKEDITOR.plugins

HOWTO - trigger source button in ckeditor by another button which is outside the editor

♀尐吖头ヾ 提交于 2019-12-05 17:19:20
I have a textarea which is behaving like a ckeditor. In the editor there is a button to view the content as source/html. I have a input button above the textarea to preview the textarea content as html Means on click of my preview button it will trigger the ckeditor button click. Can anybody help me please..? Shortest answer ever: editor.execCommand( 'source' ); 来源: https://stackoverflow.com/questions/18830715/howto-trigger-source-button-in-ckeditor-by-another-button-which-is-outside-the