ckeditor

Save Data From Multiple CKEditor Inline Editor Fields Like A Template

▼魔方 西西 提交于 2020-01-03 17:26:08
问题 I'm setting up a template system where designers can submit HTML5 designs and allow users to add their own content. I'm using CKEditor 4.2 and Rails 3 for the app. I would like users to be able to load the template page and then edit the various inline editors directly, then save via JS and Ajax. I had everything working but when adding iFrame plugin I ran into some formatting issues because I was simply saving the raw HTML from the inline editors to my templates. See this question for more

How can I add a keyboard shortcut for my command in CKEditor 3?

左心房为你撑大大i 提交于 2020-01-03 17:07:51
问题 My plugin defines a command to paste some data and generate a link from it. Is there any way to make a keyboard shortcut for it? I can't find anything that works. I cannot get this to work. Running this from my plugin definition doesn't work either CKEDITOR.config.keystrokes.append([CKEDITOR.CTRL + CKEDITOR.SHIFT + 108, 'pasteLotusLink']); Nor trying to get at least bold to work from c-q: editor.keystrokeHandler.keystrokes[CKEDITOR.CTRL + 113, 'bold']; 回答1: For 4.x, use editor.setKeystroke:

PHP RegEx remove empty paragraph tags

两盒软妹~` 提交于 2020-01-03 08:44:11
问题 I'm trying to remove all empty <p> tags CKEditor is inserting in to a description box but they all seem to vary. The possibilities seem to be: <p></p> <p>(WHITESPACE)</p> <p> </p> <p><br /></p> <p>(NEWLINE) </p> <p>(NEWLINE)<br /><br />(NEWLINE) </p> With these possibilities, there could be any amount of whitespace,   and <br /> tags in between the paragraphs, and there could be some of each kind in one paragraph. I'm also not sure about the <br /> tag, from what I've seen it could be <br />

Ck editor is not working after putting it in innerHTML to replace a div with the Ckeditor textarea

谁说我不能喝 提交于 2020-01-03 04:52:05
问题 today i have been assigned a work where i have an input text and if someone will click on it then it will replace it with a textaread which has ckeditor enabled on it. I already enabled the ckeditor with the textarea but when i am going trying to replace a div with the ckeditor enabled textarea then it is just showing me a simple textarea not with ckeditor enabled on it.Below is the coding for it:- <script type="text/javascript"> function myJDFunction1() { document.getElementById("Hide1")

Write HTML content to word document using C#

雨燕双飞 提交于 2020-01-02 14:31:38
问题 I am dynamically generating a word document and need to replace my special tags using a html content which is generated using CKeditor control. Here the word document i am using is a template which contains pre entered texts and for generating document i am using Microsoft.Office.Interop.Word. Now i can find my special tag using interop's doc.range.Find methord. But when i want to replace this tag with a HTML content without losing its style. how can i do this? using doc.range.Find

CKEditor allow <span> inside <a> tag

一曲冷凌霜 提交于 2020-01-02 10:33:45
问题 I want to add <span> tag inside of an <a> tag in the CKEditor source: <a href="http://google.com"><span>Link here</span></a> But when I add the HTML in CKEditor in source mode, it converts it to: <a href="http://google.com">Link Here</a> How can I allow HTML tags inside a href ? 回答1: Do u really need to put the <span> tags in there? Isn't it better to add a class to your link and edit it(the css I guess u want) from there. What u can do: Try doing it the other way: <span><a href="http:/

CKEditor allow <span> inside <a> tag

元气小坏坏 提交于 2020-01-02 10:32:47
问题 I want to add <span> tag inside of an <a> tag in the CKEditor source: <a href="http://google.com"><span>Link here</span></a> But when I add the HTML in CKEditor in source mode, it converts it to: <a href="http://google.com">Link Here</a> How can I allow HTML tags inside a href ? 回答1: Do u really need to put the <span> tags in there? Isn't it better to add a class to your link and edit it(the css I guess u want) from there. What u can do: Try doing it the other way: <span><a href="http:/

HTMLPurifier Breaking Images

不打扰是莪最后的温柔 提交于 2020-01-02 08:03:35
问题 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? 回答1: I have a suspicion that magic_quotes could be a reason..? Also did you try $config-

HTMLPurifier Breaking Images

时光总嘲笑我的痴心妄想 提交于 2020-01-02 08:03:35
问题 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? 回答1: I have a suspicion that magic_quotes could be a reason..? Also did you try $config-

HTMLPurifier Breaking Images

瘦欲@ 提交于 2020-01-02 08:02:35
问题 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? 回答1: I have a suspicion that magic_quotes could be a reason..? Also did you try $config-