ckeditor

CKEDITOR.setData prevents attaching of events with .on function

北城以北 提交于 2019-12-29 07:36:08
问题 I have build a few custom plugins, but only one is listening to key events of the keyboard. Below in the code you can see the set-up to set the events. (and it's kinda basic) Now i have the following problem that if i set my data with editor.setData in a instanceReady listener.that the .on functions aren't set. I did try to replace the contentDom with the instanceReady event, but that doesn't fix it either. if i set the data manualy with: editor.document.getBody().setHtml(html), there are no

CKEditor format class

这一生的挚爱 提交于 2019-12-28 13:56:25
问题 I am writing a CKEditor plugin to apply a specific class to an element. Basically this class is setting the text colour to a specific redish colour. Anyways, I am not getting how to define a class for the wrapped text. Please look at my plugin code: CKEDITOR.plugins.add( 'red', { init: function( editor ) { editor.addCommand( 'red', { exec : function( editor ) { var format = { element : 'span' }; var style = new CKEDITOR.style(format); style.apply(editor.document); } }); editor.ui.addButton(

CKEditor and ASP.Net MVC 3 RequiredAttribute

我与影子孤独终老i 提交于 2019-12-28 11:54:11
问题 I've integrated CKEditor 3 (formerly FCKEditor) into my asp.net MVC (v3 to be specific) application. I have a RequiredAttribute in my model for the field that needs the editor but the client side validation doesn't work correctly with CKEditor. When I try to submit and I've entered data into CKEditor the required validation doesn't see the data. If I try resubmitting again, then it works. I've looked around online and can't find a solution. I am also using Jquery and using the Jquery adapter

adding @font-face to CKEditor

寵の児 提交于 2019-12-28 10:39:05
问题 I would like to add a font to the CKEditor font combo box. This in itself is easy enough. However the font I would like to add is a custom font that I use with the @font-face CSS3 attribute. I managed to do that but the editor itself does not show the custom font. If I just take the html created by CKEditor and show it in a div on the page, the custom font show nicely. I would also like to somehow add the @font-face attribute to the text area of CKEditor, so my users can see the custom font

CKEditor automatically strips classes from div

与世无争的帅哥 提交于 2019-12-27 09:56:23
问题 I am using CKEditor as a back end editor on my website. It is driving me round the bend though as it seems to want to change the code to how it sees fit whenever I press the source button. For example if I hit source and create a <div> ... <div class="myclass">some content</div> It then for no apparent reason strips the class from the <div> , so when I hit source again it has been changed to... <div>some content</div> I presume this irritating behaviour can be turned off in the config.js ,

CKEditor automatically strips classes from div

 ̄綄美尐妖づ 提交于 2019-12-27 09:55:03
问题 I am using CKEditor as a back end editor on my website. It is driving me round the bend though as it seems to want to change the code to how it sees fit whenever I press the source button. For example if I hit source and create a <div> ... <div class="myclass">some content</div> It then for no apparent reason strips the class from the <div> , so when I hit source again it has been changed to... <div>some content</div> I presume this irritating behaviour can be turned off in the config.js ,

NET中FCKeditor使用方法

不打扰是莪最后的温柔 提交于 2019-12-26 17:23:01
FCKeditor是目前最好的html文本编辑器,如果还不明白的话看了下图就知道了 效果图: 那么为什么说是FCKeditor的冰冷之心呢?这不是哗众取宠,主要是说它使用起来有点麻烦,下文就详细说明如何搞定这玩意儿。 1.FCKeditor的官方网站是: http://www.fckeditor.net/download 目前最新的FCKeditor 2.4.2版本。 请在 此页 下载: http://sourceforge.net/project/showfiles.php?group_id=75348 如图所示: 要下载FCKeditor2.4.2.zip和 FCKeditor.NET版的2个zip包。 说明: FCKeditor2.4.2.zip是其最新的Javas cript文件和图片什么的; FCKeditor.NET.zip是ASP.NET调用的 DLL 在里面。 2. 分别解压后把FCKeditor2.4.2.zip里的 fckeditor目录 整个复制到网站中。 3. 解压FCKeditor.NET.zip包后在FCKeditor.Net_2.2\bin\Debug目录里找到 FredCK.FCKeditorV2.dll 。其他文件没用,把 FredCK.FCKeditorV2.dll 复制到我们的网站,建立一个 Bin目录 。 4. 引用 FredCK

.NET中FCKeditor使用方法

偶尔善良 提交于 2019-12-26 17:22:47
.NET中FCKeditor使用方法 FCKeditor是目前最好的html文本编辑器,如果还不明白的话看了下图就知道了 效果图: 那么为什么说是FCKeditor的冰冷之心呢?这不是哗众取宠,主要是说它使用起来有点麻烦,下文就详细说明如何搞定这玩意儿。 1.FCKeditor的官方网站是: http://www.fckeditor.net/download 目前最新的FCKeditor 2.4.2版本。 请在 此页 下载: http://sourceforge.net/project/showfiles.php?group_id=75348 如图所示: 要下载FCKeditor2.4.2.zip和 FCKeditor.NET版的2个zip包。 说明: FCKeditor2.4.2.zip是其最新的Javas cript文件和图片什么的; FCKeditor.NET.zip是ASP.NET调用的 DLL 在里面。 2. 分别解压后把FCKeditor2.4.2.zip里的 fckeditor目录 整个复制到网站中。 3. 解压FCKeditor.NET.zip包后在FCKeditor.Net_2.2\bin\Debug目录里找到 FredCK.FCKeditorV2.dll 。其他文件没用,把 FredCK.FCKeditorV2.dll 复制到我们的网站,建立一个 Bin目录 。

文本编辑器FCKeditor

我怕爱的太早我们不能终老 提交于 2019-12-26 17:22:29
FCKeditor是目前最好的html文本编辑器, 1.FCKeditor的官方网站是: http://www.fckeditor.net/download 目前最新的FCKeditor 2.4.2版本。 请在 此页 下载: http://sourceforge.net/project/showfiles.php?group_id=75348 要下载FCKeditor2.4.2.zip和 FCKeditor.NET版的2个zip包。 说明: FCKeditor2.4.2.zip是其最新的Javascript文件和图片什么的; FCKeditor.NET.zip是ASP.NET调用的 DLL 在里面。 2. 分别解压后把FCKeditor2.4.2.zip里的 fckeditor目录 整个复制到网站中。 3. 解压FCKeditor.NET.zip包后在FCKeditor.Net_2.2\bin\Debug目录里找到 FredCK.FCKeditorV2.dll 。其他文件没用,把 FredCK.FCKeditorV2.dll 复制到我们的网站,建立一个 Bin目录 。 4. 引用 FredCK.FCKeditorV2.dll。 5.导入工具箱。 在“工具箱”下 右键, 点击“选择项”。点击 浏览,找到dll所在目录。 这时发现工具箱里多出FCKeditor控件。 6.拖拽

使用FCKEditor

僤鯓⒐⒋嵵緔 提交于 2019-12-26 17:22:17
fcdeditor文件夹里如下图: 对于FckEditor_Net这个文件夹我们用到了里面Bin\Debug\2.0\ FredCK.FCKeditorV2.dll。如果你是.Net1.0的用户,则要用到Bin\Debug\1.0\ FredCK.FCKeditorV2.dll。把这个DLL引用到你的网站根目录Bin 下面,再添加引用就行了。 对于FckEditor2.5.1,由于FckEditor是支持多语言、多平台的,我们现在要用的是Asp.Net 所以我们只找出我们要用的东西,其它的我们可以除掉。 首先带“_”的文件和文件夹可以不要,它们是一些示例。 接下来我们继续给这瘦身。在 fckeditor 文件夹里我们只留下editor、 fckconfig.js 、 fckeditor.js 、 fckstyles.xml 、 fcktemplates.xml 这五个文件,其它的都除掉。在Css里是这个组件用到的样式,我们可以不动它。 Dialog里是一些弹出对话框不要动它,Dta也不要动。editor\file manager\connectors下面我们只要Aspx这一个就够了。这里提供的是我们对上传文件的管理。 Lang我们只要Zh-cn.js这个是简体中文,它里面就是所能支持的所有的语言。 Js里面是这个组件的核心,我们更是不能动, P lugins里面是一些插件