ckeditor

CKEditor unwanted   characters

╄→尐↘猪︶ㄣ 提交于 2019-11-27 17:23:49
How can I disable CKEditor to get me every time   , when i don't want them? I'm using CKEditor with jQuery adapter. I don't want to have any   tags. Tapper After some research I might shed some light on this issue - unfortunately there is no out-of-the-box solution. In the CKEditor there are four ways a no-break space can occur (anybody know more?): Automatic filling of empty blocks . This can be disabled in the config: config.fillEmptyBlocks = false; Automatic insertion when pressing TAB-key . This can be disabled in the config: config.tabSpaces = 0; Converting double spaces to SPACE+NBSP.

Turn off enclosing <p> tags in CKEditor 3.0

最后都变了- 提交于 2019-11-27 17:06:19
Is there a possibility to turn off the automatic enclosing of all written content within <p></p> in CKEditor 3.x? I tried CKEDITOR.config.enterMode = CKEDITOR.ENTER_BR; but this just changes the inline linebreaks to <br /> while leaving the enclosing paragraph. Currently writing "Test" produces this output <p> Test</p> but I want it to be simply Test Is there a configuration property for this or would another inline editor to be better suited for this? CKEDITOR.config.enterMode = CKEDITOR.ENTER_BR; - this works perfectly for me. Have you tried clearing your browser cache - this is an issue

What toolbar buttons are available in CKEditor 4?

女生的网名这么多〃 提交于 2019-11-27 17:06:11
问题 The CKEditor docs mention item by item toolbar configuration here, but where is a list of the names of the buttons in the different groups? There is a similar question here, but the answer is for a previous version of CKEditor. Some of the button names do not work. 回答1: You can check the toolbar sample in your CKEditor package. There, you've got listed all buttons and all toolbar groups (since CKEditor 4 there are two ways of setting toolbar layout) that are enabled in your CKEditor build. If

CKEditor: Class or ID for editor body

℡╲_俬逩灬. 提交于 2019-11-27 15:06:06
I have an instance of CKEditor on a page. I am trying to give the CKEditor's body a class or ID so it matches some styles I have defined in a stylesheet. There is a API documentation that should give access to the respective DOM elements, but I can't seem to get it working. All objects I try to query that way turn out undefined. Does anybody know how to do this, or how to properly address CKEditor's dom elements? Edit : Thanks folks, nemisj's answer did it for me but for some reason, I don't get to set the "accepted" checkmark in this question. Although that part of the API wasn't ported from

Updating textarea value with CKEditor content in Angular JS

为君一笑 提交于 2019-11-27 14:59:37
问题 I am using latest CKEditor (Standard Version) and based on this question , I have implemented an angular directive like this, var cmsPlus = angular.module('cmsPlus', []); cmsPlus.directive('ckEditor', function() { return { require: '?ngModel', link: function(scope, elm, attr, ngModel) { var ck = CKEDITOR.replace(elm[0]); if (!ngModel) return; ck.on('pasteState', function() { scope.$apply(function() { ngModel.$setViewValue(ck.getData()); }); }); ngModel.$render = function(value) { ck.setData

我的网站搭建 (第十天) Ueditor编辑器

半城伤御伤魂 提交于 2019-11-27 14:57:16
之前说过,我的网站编辑器一开始是tinymce,然后才用的ckeditor。可是最近我发现,ckeditor的小图标不是很美观,看久了有点low的样子。我是不是应该换一个编辑器呢,一想到这里,马上打开谷歌搜索有没有更加美观的富文本编辑器。翻了几页,才发现百度Ueditor编辑器就很不错,其实之前我就了解过,但是并没有学习去怎么使用,这回好了,换个富文本编辑器顺便把Ueditor给学会了 安装及使用 1.Ueditor其实对python2和python3有一定的区别,在写程序时想通过Django的form表单顺便把评论框也改成Ueditor,但是没有将其实现却发现了错误提示为: from widgets import UEditorWidget,AdminUEditorWidget ImportError: No module named ‘widgets’ 经查发现,DjangoUeditor是基于Python 2.7的,对Python3的支持有问题。导致widgets.py文件出错,不能import,解决方法可以修改widgets.py或者采用网上修改好的版本DjangoUeditor3,github就有很多Ueditor的代码,有些不能直接使用,可能太久没更新了吧,然后才找到了: https://github.com/twz915/DjangoUeditor3 2

Getting non-html text from CKeditor

被刻印的时光 ゝ 提交于 2019-11-27 14:51:56
问题 In my application, in insert news section, i use a sub string of news content for news Summary. for getting news content text from users,i use CKEditor and for news summary i use substring method to get a certain length of news content.but when i'm working with CKEditor i get text with html tags and not plain text and when i use substring method, my news summary become messed! how do i get raw text from this control? i read this but i can't use getText() method 回答1: do it like this /

Copying rich text and images from one document to MIME in another document

狂风中的少年 提交于 2019-11-27 14:30:35
I have a solution for copying rich text content from one document to MIME in another document. See http://per.lausten.dk/blog/2012/12/xpages-dynamically-updating-rich-text-content-in-a-ckeditor.html . I use this in an application as a way for the user to insert content templates in a new document and have the content appear on-the-fly in the CKEditor. The problem is that inline images are not included in the copying - only a reference to temporary storage of the images. This means that the images are only visible for the current user in the current session. So not very useful. How can I

How do I programmatically set default table properties for CKEditor?

烂漫一生 提交于 2019-11-27 14:24:05
I am trying to set up the default properties of table that is created inside CKEditor. For example is there a way to make sure that the attribute border is 0 not 1, or the width is by default set to 100%. Here you go. dialogDefinition event solves the problem: CKEDITOR.on( 'dialogDefinition', function( ev ) { var dialogName = ev.data.name; var dialogDefinition = ev.data.definition; if ( dialogName == 'table' ) { var info = dialogDefinition.getContents( 'info' ); info.get( 'txtWidth' )[ 'default' ] = '100%'; // Set default width to 100% info.get( 'txtBorder' )[ 'default' ] = '0'; // Set default

kindeditor + syntaxhighlighter 使文章内的插入代码高亮显示

让人想犯罪 __ 提交于 2019-11-27 13:23:43
首先需要在页面中引入所需FE文件: 两个js和一个css文件是必须要引用的文件; shCore.js是syntaxhighlighter插件的基础代码; shAutoloader.js作用 是 syntaxhighlighter插件的代码高亮显示时自动加载所需文件;但是如果目录不正确的话,就会加载失败,解决方法如下SyntaxHighlighter.autoloader.apply()中给出js文件的位置, <?php //syntaxhighlighter代码高亮显示需要加载的js/css====================begin Yii::app()->clientScript->registerCssFile(Yii::app()->baseUrl . "/js/syntaxhighlighter/styles/shCoreDefault.css"); Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/syntaxhighlighter/scripts/shCore.js'); Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/syntaxhighlighter/scripts