ckeditor

CKeditor Html 5 <figure> tag issue

浪子不回头ぞ 提交于 2019-12-24 05:50:35
问题 I using CKeditor version 4. And I facing issue related HTML 5 tag. Input Html Code: <div class="col-md-4 col-sm-4"> <div class="item-cont"> <a href="contents/view/home"> <figure> <img src="img/1468996695_img-1.jpg" /> </figure> <div class="item-content"> <div class="align-content"> <div class="text-cont"> <h1>Text</h1> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry.</p> </div> </div> </div> </a> </div> </div> Output return from

CKEditor 4: How to get and set the cursor / caret position?

感情迁移 提交于 2019-12-24 05:39:26
问题 I am looking for a way to do 2 very basic things. I just want to retrieve the position of the caret in the text. Then I want to position the caret in a specific position in the text. The purpose is to be able to programmatically modify the text. I have found many people who were trying to do various similar things but not quite what I wanted. In fact, most solutions are looking into the HTML, finding ranges and DOM elements. Maybe that is the way to go but I haven't found a working solution.

Inline CKEditor toolbar has no alignment buttons for h2 elements

左心房为你撑大大i 提交于 2019-12-24 05:26:15
问题 (also on their demo page http://ckeditor.com/demo#inline) Why is this the case? Even if I take their inline sample (http://nightly.ckeditor.com/13-02-08-08-51/standard/samples/inlineall.html) and remove the js code for separate toolbars for heading blocks, I still don't get the alignment option. I'd like to give users the option to align headings. What am I missing? I'm also not getting other "block" options like BulletedList, but that's less of an issue. UPDATE: To repeat the issue you need

CKEditor on focus remove default value

萝らか妹 提交于 2019-12-24 05:23:14
问题 For a normal input field i can write something like the below code, which will remove the default value of an input field when i click, and if i dont write anything in the input field, than the default value will return when i leave the input field. jQuery('input[type="text"]').focus(function() { if (this.value == this.defaultValue) { this.value = ''; } if(this.value != this.defaultValue) { this.select(); } }); jQuery('input[type="text"]').blur(function() { if (this.value == '') { this.value

Is CKeditor safe for letting end-users submit content?

两盒软妹~` 提交于 2019-12-24 04:47:05
问题 I am about to let some users publish articles on my site. To make it easier for them, I was thinking of using a CKeditor, let them have links, images, formating, etc ... However I was thinking of javascript. Can someone inject javascript or will CKeditor clean it up? Do I need my own filtering? 回答1: Content submitted by the user should always be checked, even if an application like CKeditor generates valid code. You can use HTMLPurifier for serverside sanitizing. 来源: https://stackoverflow.com

how to remove form tools in ckeditor and also make size adjustable

十年热恋 提交于 2019-12-24 03:18:41
问题 I am using CKE Editor in my project. My requirement is to remove " FORM TOOLS " and make size of the CKE Editor ADJUSTABLE . So far I have displayed editor in web page successfully. I have searched google but unluckily i have got nothing. kindly help me on this. 回答1: just try this CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.language = 'fr'; // config.uiColor = '#AADC6E'; config.removePlugins = 'forms'; }; 回答2: Found one

Configure the toolbar when the editor is configured through jQuery

旧街凉风 提交于 2019-12-24 03:09:44
问题 I'v followed the following example, and it works like charm: CKeditor for jquery To create editor instances, other than the usual CKEditor core script, you need to load the jQuery Adapter file in the page, in the following order: At this point, any textarea, p or div element can be transformed into a rich text editor by simply using the ckeditor() method: $( 'textarea.editor' ).ckeditor(); I use Struts 2 and the ajax validation support there (the struts2-jquery plugin), so uses the plugin's

CKEditor editor1.insertHtml() not working for me

安稳与你 提交于 2019-12-24 02:49:05
问题 I am using CKEditor to be able to edit comments to posts. I am also using JQuery. Because there can be multiple comments per post I'm trying to keep it all class based. The following function is supposed to hide the display area of the comment, insert the text form the display area into the editor, and finally display the editor. function fnCommentControl_edit(divEditBtn){ divEditBtn = $(divEditBtn); var divSaveBtn = divEditBtn.parent().find('.save'); var divCancelBtn = divEditBtn.parent()

Pass textarea value from WYSIWYG CKEditor

筅森魡賤 提交于 2019-12-24 02:43:07
问题 I'm trying to pass the input I made in a WYSIWYG editor (CK Editor) to JQuery. Currently it's blank no matter what I input. HTML: <textarea type='text' class="ckeditor reply" name='reply'></textarea> <button type="button" STYLE="align: right;" class="btn btn-info reply_button yGreenButton">Submit Reply</button> JS: <script> $(function() { $('.reply_button').click(function(){ var reply=$(this).siblings('.reply').val(); }); }); </script> The textarea shows up as CKeditor. The current value

CKEditor changing all my HTML

删除回忆录丶 提交于 2019-12-24 02:23:56
问题 I have been struggling with CKEditor the whole day long. All because it is re-formatting all my HTML. For some reason, it replaces tags like <dl> for <div> or <p> . So, I took this plugin and changed the HTML output of one of the predefined buttons into: <dl class="accordion" data-accordion> <dd class="accordion-navigation"> <a href="#panel1">Redigera sidor</a> <div id="panel1" class="content"> <a href="edit_index.php" title="Redigera startsidan">Redigera startsidan</a> </div> </dd> </dl>