CKEditor: Customizing the Table Dialog Window - ckeditor

I am using the CKEditor module for Drupal7.
I want to customize the Table dialog window.
I saw this thread, But I am not clear where to add the code that #oleq added.
Here is the URL: Set default table properties for CKEditor?
In what file should I add the code?
Thanks.

If you're using the regular ckeditor module (ie not through wysiwyg module), then you can just add it to the bottom of:
sites/all/modules/contrib/ckeditor/ckeditor.config.js
If you're using wysiwyg module and ckeditor library, then it's more complicated, and I'll post it as a separate question since a few people have asked this.

Related

Invoke dialog and fill its content dynamically in CKEditor

I'm new to CKEditor development. I have written a plugin to insert custom tag element ( pre ) and update its attributes.
I want to open the plugin dialog( dialog name is snippet ) once user clicks the pre tag element, And i want to fill the textarea with clicked element innerHTML in dialog.
I have two questions.
How to invoke the plugin dialog dynamically?
How to access the elements inside the dialog?
Enjoy the official plugin development tutorial – there you'll find all the answers. You'll not be able to re-use another plugin's dialog easily though. You need another dialog.
But don't worry, you can copy&paste the source code of Source Dialog plugin's dialog, which is very simple, and use it for your plugin. Code Snippet dialog is also pretty straightforward.
Also
You may find Developer Tools plugin useful.
You can observe various events with the API of the editor easily (including click).

Adding an Accordion within Joomla Component Options Screen

Is it possible to add an accordion to a Joomla 3.x component's options screen, similar to what is presented in Joomla's menu or template parameters screens?
If so, how does would one structure the config.xml file?
Example illustration of what I am trying to achieve:
Com_config manages that view and it pretty much expects a standard structure. You might be able to do a layout override for it as long as you don't break the other extensions. You could for example make it conditional on the option being your extension.

Add Custom Button to TinyMCE in Joomla 2.5

I am currently creating a component for Joomla 2.5.
I would like to add a custom button to the TinyMCE editor, but being in the context of a Joomla component, I can not add files or code inside the TinyMCE editor plugin...
Is someone able to tell me what I am suppose to use to do so?
Thank you
Editor buttons are built as editors-xtd plugins. You may look at the readmore button, which is only added in article context.

What is the easiest way to add a code snippet to third party Joomla theme?

Completely new to Joomla. Hope that what I'm asking is simple and quick.
I thought it was module (the easiest way that is). So I created it, made it to properly include required scripts and styles, made it show up only on home page. But now that it shows, it appears in a default module structure, with a title and module content container. Can't I simply inject my snippet without extra markup? Simply a div with id and a script tag?
You can create a System Plugin for Joomla and use the onAfterFilter event to add your script's and style's to the document.
$doc = JFactory::getDocument();
$doc->addScript("http://www.example.com/js/myscript.js");
$doc->addStyleSheet("http://www.example.com/css/mystylesheet.css");
A documentation on how you can create plugins can be found here: http://docs.joomla.org/Plugin

CKEditor plugin rendering different in WYSIWYG and source mode

I'm starting to develop a plugin for CKEditor that needs to be used to insert some HTML snippets in a web page. This is done. Nonetheless I also need to include some special items when switching to WYSIWYG mode (e.g. something more or less similar to Show Blocks plugin, but not just using styles since I need some elements included in there). So my question is :
How could I include extra items or styles (e.g. to hide parts of the contents in WYSIWYG mode) in WYSIWYG view without altering HTML output ?
If someone could provide some information about a working (maybe simple) example, I'd also appreciate your help.
PS: If you need to know further details please ask, but for instance assume inserted raw HTML code is
<div class="xxx">Hello world !</div>
... but in WYSIWYG mode need to display a link on top of it that pops up an alert and toggles dotted border.
About injecting CSS classes in WYSIWYG mode, use addCss function.
About creating fake elements in WYSIWYG mode ... I think I can solve the problem using context menu instead.

Resources