ckeditor

how to stop changing the code?

社会主义新天地 提交于 2019-12-25 05:30:57
问题 Good day. I have this code: <div class="align-center"> <a href="#" class="client"> <div><img src="./client0.png" alt="" /></div> <p class="italic comm"> Test Test Test Test</p> </a> </div> I paste this code in a textarea ckeditor , but after pressing the tab "source" and back to view page I get changed code: <div class="align-center"> <div> <a class="client" href="#"><img alt="" src="./client0.png" /></a> </div> <p class="italic comm"><a class="client" href="#"> Test Test Test Test</a></p> <

ckeditor-ckfinder default attributes (width and height) to uploaded images

非 Y 不嫁゛ 提交于 2019-12-25 04:22:14
问题 When I upload images using ckfinder in the ckeditor the image displays nicely using css width & height. I would like images to have default width and height attributes. How can I accomplish that? 回答1: If I'm not mistaken, CKFinder just uploads the file to the server, and does not changes its resolution! You can however, use/create a plugin for CKEditor to change the image width & height when using the image dialog of CKEditor! Btw: That dialog allows you to change the width and height of the

how to disable tag validation in ckeditor?

我的未来我决定 提交于 2019-12-25 04:13:18
问题 CKeditor apparently automatically creates matching end tags when you enter a start tag. Is there a way to turn this behavior off? I have a situation where I am creating two blocks of text in an admin program using CKeditor, then I'm using these to paint a page with the first block, some static content, and then the second block. Now I've got a case where I want to wrap the static content in a table. I was thinking, No problem, I'll just put the <table> tag in the first block and the </table>

CKEditor 'save' is different than submit

我与影子孤独终老i 提交于 2019-12-25 04:13:18
问题 I use this, to submit the form if you hit ctrl+enter: $(function() { CKEDITOR.on('instanceReady', function(evt) { evt.editor.setKeystroke(CKEDITOR.CTRL + 13, 'save'); }) }) Unfortunately this seems to be a bit different to pressing the submit button. If I hit ctrl+enter I get a popup with a warning that there is changed data in the form, and that this data would get lost. If I choose "leave the page", then everything works fine (not data gets lost). How can I make ctrl+enter work like

Customize CKFinder paths dynamically with JS, can it be done?

柔情痞子 提交于 2019-12-25 03:24:48
问题 I'm doing an administrative function to work with CKEditor v4.x and need a file/folder view, upload and selection tool. For the time being I'm using CKFinder as I'd like to avoid writing a complete plugin by myself. However for the purpose I need to be able to switch baseDir and baseUrl dynamically. I tried older code examples like CKFinder.setupCKEditor( editor, { basePath: '/ckfinder/', baseUrl: 'http://www.example.com/mydirectory/', baseDir: '/mydirectory/' } ); But this doesn't work.

Cannot convert dynamically loaded teaxtarea into ckeditor

只谈情不闲聊 提交于 2019-12-25 03:17:08
问题 calling this get_content function after clicking a link. function get_content(n) { var hr=new XMLHttpRequest(); var url="./updatecontent.php"; var vars="id="+n; hr.open("POST",url,true); hr.setRequestHeader("Content-type","application/x-www-form-urlencoded"); hr.onreadystatechange=function() { if(hr.readyState==4 && hr.status==200) { var return_data=hr.responseText; document.getElementById("content").innerHTML=return_data; } } hr.send(vars); document.getElementById("content").innerHTML='<img

resize CKEditor4 by windows.resize events

无人久伴 提交于 2019-12-25 02:26:04
问题 I not need the "user ability to resize", but an automatic resize triggered by windows.resize events. Translating my necessity into an hipothetical/intentional code (it not works!), for my applicartion: $( window ).resize(function() { editor = CKEDITOR.instances.editor1; editor.height = window.innerHeight - 106; editor.width = window.innerWidth - 253; }); How to implement this kind of resize with CKEditor4? I am using standard editor at textarea. PS: the name of the behaviour is perhaps

Correct use of non-stupid-digest-assets gem

我的梦境 提交于 2019-12-25 01:54:21
问题 Even though it is a very, very simple gem, I believe I don't understand the idea behind non-stupid-digest-assets (https://github.com/alexspeller/non-stupid-digest-assets) since it isn`t working on my app. I need to use CKEDITOR on my app, but the rails digest is messing everything up. I added this to config/initializers/non_digest_assets.rb: NonStupidDigestAssets.whitelist = [/ckeditor\/.*/] But my ckeditor files still don't show up. Could someone help me? 回答1: As a starting point of

PasteFromOffice option in classic ckeditor 5

こ雲淡風輕ζ 提交于 2019-12-25 01:38:04
问题 I am trying to setup classic ckeditor in my angularjs application. I have installed via npm and classic ckeditor 5 is up. I am trying to copy paste contents to ckeditor but it is failing with the error saying filerepository-no-upload-adapter: Upload adapter is not defined. Does this error mean the final classic ck editor build(12.3.1) doesnt have this plugin? Below is the code which I am trying. ClassicEditor.create( document.querySelector( '#editor' ) ) .catch( error => { console.error(

ASP CKEditorControl's content length on client-side

南笙酒味 提交于 2019-12-25 00:29:43
问题 I'm using CKEditor in my ASP.NET webforms application. I'm using CKEditor control to put it to my page: <CKEditor:CKEditorControl ID="CKEditorControl" runat="server" /> But I'd like to get the editor's content length on client-side. I'm trying to do it this way: CKEDITOR.instances['<%= CKEditorControl.ClientID %>'].getData().length; Though it's not working because: "Uncaught TypeError: Cannot call method 'getData' of undefined" So my question is. What am I doing wrong? And is it possible to