CKEditor use forcePasteAsPlainText unless copied from CKEditor - ckeditor

I'm using CKEditor and am setting
config.forcePasteAsPlainText = true;
so I don't get any goofy formatting coming in from the outside. However, I would like to be able to copy and paste from the same (or other) CKEditor instances and retain the formatting. How do I go about doing that? I didn't see any settings like that. Is it possible?
Thanks for any help, I really appreciate it.

#Smamatti is right. That would not be possible to determine the origin of the content. However, if you have the Advanced Content Filter configured correctly (e.g. left to defaults), then CKEditor will limit data pasted from all sources to the features which are enabled in its configuration.

Related

Work in 'source mode' but enable toolbar buttons

I am building a simple forum on my website using CKEditor as a BBCode editor. I managed to make CKEditor output BBCode just fine by following the example.
However, I do not want to use the 'WYSIWYG' interface. I just want a plain "bbcode source" editor. The WYSIWYG output is not exactly the same as how the output will look on my forum (because I translate the bbcode to html myself and then apply some additional styling) and I don't really like the difference. More importantly, I have a couple "custom bbcode" tags that make no sense outside of my forum and obviously CKEditor doesn't know what to do with them, so I get a mix of bbcode and WYSIWYG output which looks odd.
I can force the CKEditor into 'source mode' by setting the startupMode and removing the source button, but when I do that it disables the entire toolbar!
I want to work in source mode, but still use the various buttons like B, I, etc. When such a button is pressed I just want it to insert the [b] [/b] tags for example around the selected text.
This is pretty much how every forum I've ever seen works, but I can't figure out how to configure CKEditor to do this.
Unfortunately it's impossible. Most of the plugins require WYSIWYG mode and don't work without it.
However you could try to control the output of the editor and change it according to your needs by adjusting editor's filter or implementing custom data processor.

CkEditor - how to change the look

I'm a pretty newbe at html, css, etc. etc.
I just downloaded the CkEditor and it works perfect. I use the inline editor replacing a textarea. Now I would like to change the look a bit
a) I would like to have the editable area with a different background color
b) I would like to have a thin line around the area
How can I do this? As far as I understood I need to manually change that in one of the css files - but where, and what do I need to put in there?
ALso I tried to configure the toolbar using the configuration tool and although I opted for the button "source-code" it won't show up? How can I manually include this in the toolbar?
Sorry, I know that these are very basic questions and I tried to search for answers on the forum (but the only things I found where some years old, and trying to duplicate what was posted didn't work... - guess it changed with the new version of ckeditor).

Why won't Joomla render my PHP/Javascript tags on the front page?

This is my first project on website development using Joomla. I am trying to make a dashboard implementation. My problem is that whenever I edit my script in article using source tags, the changes are not reflected on my site immediately. I have even tried restarting my Wamp server, but in vain. Any tips that I should follow?
Thanks.
Depending on your Joomla-Version there are different options to check to suppress stripping or filtering of tags like <script> for the frontend. Here are some hints:
First of all your tags could be filtered out client-sided depending on the editor you selected. If you use the standard TinyMCE e.g. go to Extensions - Plugins - TinyMCE where you will find a list of prohibited Elements which may include script. Be exactly sure what you do though, always check who should be allowed to enter script tags in an article, this is almost always a major security risk if anybody else like you as an administrator has the right to use them. So another option could be to just set the editor for your administrator/author accout to plain text and leave TinyMCE untouched.
Another filtering is done server-sided by joomla itself which can be controlled in "Global Configuration" -> "Text filter". After a standard installation all groups will use Default Black List filtering which includes removing script tags. Here you could define "No Filtering" for the Super User group e.g.
Again, all this depends on your Joomla-Version (my examples are referring to 2.5) and are hints to get around the issue but without knowing your security concept.

ckeditor image plugin fine configuration

It is possible to configure image plugin dialog to change defaults (for example, change alignment from to right, HSpace to some value, etc) without actually changing javascript code of the plugin?
The cmbAlign select is in the image.js and seems to be in some long and nested object structure, specifying UI.
What is the right place to introduce the change?
You should take a look at the CKEditor Javascript API which allows you to modify the editor without having to change the original javascript code, see
http://docs.cksource.com/ckeditor_api/index.html

How to disable the "auto format" feature of VisualStudio2008 editor?

When writing the HTML part of a page in a VS2008 Web App, the editor keeps formatting the HTML with linebreaks that break the readability of the code (to my eyes).
Can this feature be disabled?
Thanks
Have you tried Tools/Options/Text Editor/HTML ?
Tool/Options/
[Show all settings]
Text Editor/HTML
Wrap tags when exceeding specified lenght
If any interested.
You're probably looking at the Tag Wrapping option inside the Text Editor -> HTML options under the text editor settings. You can either disable it altogether or extend it beyond the 80 character default.
However, there is still some level of code reformatting that happens behind the scenes when you drag new controls into the page that I haven't found any solution to other than just staying in the text editor as much as possible.
Two good things to note: 1. VS2K8 does a MUCH better job that VS2K5 when it comes to formatting HTML. 2. With the new intellisense built into VS2K8, it makes it really easy to stay in the text editor while adding tags. I think I do most of my HTML stuff there now. You can keep your display in "split view" and just refresh every now and then to see how your controls are coming up.

Resources