ckeditor

ckeditor add <iframe> tag in editor

泄露秘密 提交于 2019-12-04 17:21:30
I am using ckeditor in a drupal 7 site. I want to put iframe tag inside the editor. Currently what happen when we put iframe in ckeditor. <iframe src="http://www.lipsum.com/"></iframe> It convert that iframe tag with a img tag with some special attribute and URL. <img class="cke_iframe" data-cke-realelement="%3Ciframe%20src%3D%22http%3A%2F%2Fwww.lipsum.com%2F%22%20class%3D%22placeholder-tool%20helpTool-placeholder%22%20scrolling%3D%22no%22%20frameborder%3D%220%22%3E%3C%2Fiframe%3E" data-cke-real-node-type="1" alt="IFrame" title="IFrame" align="" src="http://testsite.com/sites/all/libraries

Multiple 4.2 CKEditor instances on one page with AngularJS

家住魔仙堡 提交于 2019-12-04 16:41:18
I am using CKEditor with angularJS. I have two editor windows as below: {{ modal.data.text }} <textarea id="Textarea1" data-ck-editor data-ng-disabled="modal.action=='delete'" data-ng-model="modal.data.text"></textarea> {{ modal.data.notes }} <textarea id="Textarea2" data-ck-editor data-ng-disabled="modal.action=='delete'" data-ng-model="modal.data.notes"></textarea> The application allows a user to select rows in a grid and then the following is executed to populate new data in the modal object. Note that the editor instances are created on start up and not each time a new row is selected.

PHPWord read word documents preserving the styles

 ̄綄美尐妖づ 提交于 2019-12-04 15:38:03
I have successfully extracted the text content in a word file using phpWord and the following code: <?php require_once 'vendor/autoload.php'; // Read contents $name = 'linux'; $source = "{$name}.docx"; echo date('H:i:s'), " Reading contents from {$source} <hr>"; $phpWord = \PhpOffice\PhpWord\IOFactory::load($source); $sections = $phpWord->getSections(); foreach ($sections as $key => $value) { $sectionElement = $value->getElements(); foreach ($sectionElement as $elementKey => $elementValue) { if ($elementValue instanceof \PhpOffice\PhpWord\Element\TextRun) { $secondSectionElement =

Rails 3.1 ckeditor

坚强是说给别人听的谎言 提交于 2019-12-04 14:14:26
问题 So I just tried to install ckeditor in rails, however it doesn't look like its working. Here is what I did added these lines to my gemfile gem "ckeditor", "~> 3.6.0" gem "paperclip" Then bundled installed and ran rails generate ckeditor:install rails generate ckeditor:models --orm=active_record Added this file tom config/application.rb config.autoload_paths += %W(#{config.root}/app/models/ckeditor) And then I tried out this code: <%= javascript_include_tag :ckeditor %> cktext_area_tag("test

TYPO3: CKEditor strips data-attributes in <span>-Tags

女生的网名这么多〃 提交于 2019-12-04 12:36:33
I want to use a data-attribute in a span-Tag. The CKEditor removes this attribute. If I add it in a p-Tag it will not removed and this is OK. processing: allowAttributes: [data-count] is added in the YAML-file. I've tried this and other combinations, nothing works. config extraAllowedContent: '*(*)[data-*]' What do I have to do, to keep the data-attribute in a span-Tag? I have done this for iframe tag with attribbuts, no allowAttributes used for this: processing: allowTags: - iframe editor: config: extraAllowedContent: - iframe[*] for you this should do the trick: editor: config:

Turning CKEditor 4 inline editing on and off with JavaScript

自作多情 提交于 2019-12-04 12:14:30
问题 I need to be able to toggle inline editing on/off with a button. See here for example of inline editing: http://nightly-v4.ckeditor.com/3559/samples/inlineall.html My markup is as so: <div contenteditable='true'>Mycontent</div> Using jQuery I want to be able to turn on/off the editor. I have tried setting contenteditable to false, but this does not work. The editor is not loading back into the page on toggling the contenteditable setting. Addendum: I also needed to destroy all CKEditor inline

Controlling save button enabled/disabled state programmatically

允我心安 提交于 2019-12-04 12:08:46
问题 How would I enable/disable the save button of CKEditor using external JS? I don't want to remove it completely, just change the appearance between gray and colored icon so that it's more user friendly. My save button is generated like so: CKEDITOR.plugins.registered['save'] = { init : function( editor ) { var command = editor.addCommand( 'save', { modes : { wysiwyg:1, source:1 }, exec : function( editor ) { if(My.Own.CheckDirty()) My.Own.Save(); else alert("No changes."); } }); editor.ui

CKEditor - remove script tag with data processor

故事扮演 提交于 2019-12-04 11:40:00
I am quite new with CKEditor (starting to use it 2 days ago) and I am still fighting with some configuration like removing the tag from editor. So for example, if a user type in source mode the following: <script type="text/javascript">alert('hello');</script> I would like to remove it. Looking the documentation, I found that this can be done using an HTML filter. I so defined it but it does not work. var editor = ev.editor; var dataProcessor = editor.dataProcessor; var htmlFilter = dataProcessor && dataProcessor.htmlFilter; htmlFilter.addRules( { elements : { script : function(element) {

CKEditor: Allow video embed code

人盡茶涼 提交于 2019-12-04 11:35:10
I am using CKEditor and want to allow the insertion of embed code from YouTube, Vimeo etc. CKEditor turns all tags into HTML Chars equivalent, which is good, but I want it to make exceptions for this kind of content. iFrames seem to be how it's done nowadays, so how can I tell CKEditor to leave iFrame tags alone? Thank you. Just found your question while searching for the same solution. Here is what I found. Basically, it adds a button to your toolbar like the Image button, but it pops up a box for you to paste the embed code from YouTube, Vimeo etc. into. Seems to work pretty well. http://www

How do I install django-ckeditor?

倖福魔咒の 提交于 2019-12-04 10:58:47
In Stack Overflow there's two questions about this editor , and nobody answers!!! So I'm asking how to install this Django package to my project?? I've followed these steps already, have no errors, nothing, and still the form stays the same. Why?? Edit: heres model from datetime import datetime from django.db import models from django.utils.translation import ugettext_lazy as _, ugettext from ckeditor.fields import RichTextField class Newsletter(models.Model): title = models.CharField( _(u'Title'), max_length=200, help_text=_(u'Newsletter title'), ) body = RichTextField() date = models