How to add custom text when JCE 2.3.1 is loaded? - joomla

I have a Joomla 2.5 site with K2 and I have installed JCE Editor 2.3.
How can I add custom text by default so that when I open a new article in my editor, some text is preloaded?
The custom text is my ads3ns3 script and some other divs. If I can get this to automatically appear, then I can bypass the tedious copy/paste step every time.
I searched all the JSE files, but I didn't find any input field that would hold my custom text.
I've open all the .php files but still nothing.

You could use JCE Template Manager plugin to achieve this without need to rewrite JCE core files .. JCE is known as a target for Joomla hacks and needs to be updated regularly, and if you edit JCE core files you would have to apply described change all over again with every new update.

Related

Modifying Drupal 8 administration theme

I've recently added the faqfield module - but when reviewing this in the content editor the fields are spewing over the container.
I fixed the issue by adjusting the textarea.form-textarea css to min-width:100% in chrome console -- but I am not sure how to apply this fix to the site itself. Is there a way of adding into the db level an override css for the admin theme? Or do I create an overriding change in the theme folder - and if so how?
before quick fix
after quick fix
You can create a new custom admin theme and have it use the contributed admin theme you're using as a base.
You can then just override stuff as needed:
In your my_theme.info.yml in the top section add:
base theme: contrib_admin_theme_name
You then use your own custom theme as the admin theme, but it well use everything from the contributed admin theme, except for the stuff you overwrite.
The best way is to go to Drupal.org and submit it as a patch (you'd be doing it in the Drupal core issue queue since Seven is a core theme). If you don't want to do that then you'd create a subtheme based on the Seven theme, and add your CSS in there. You don't wan to update the theme directly as anytime you update the Drupal core it'll overwrite your changes.

What is the best way to update default CKEditor plugin code to add custom features?

I need to add custom functionality to default CKEditor features, for example:
Add a new option in "Link Type" picklist in Link overlay in addition to existing "URL" and "E-mail" options. This new option will be used to generate links specific to an organization using an ID.
How can I achieve above goal while keeping the CKEditor code maintainable? i.e I should be able to upgrade CKEditor to newer versions without having to reapply all custom code changes again.
I am using CKEditor version 4.5.10 (dev)

Adding a popup to com_users in joomla

I want to add a popup and a trigger for that popup in com_users( i.e Users page) and load a external link into that popup. I have added a button next to the "Add a note" button but i am new to Joomla so i don't know how to add popup functionality to it. I have read that it is not recommended to change the core files in Joomla, is this also a core file ? What is the best way to do it.
Any file that comes with Joomla's default installation is a core file. We do sometimes modify core files (especially for optimization purposes), but that creates overhead in the website's maintenance.
As for your case, the best way to do this is to create a copy of the administrator template that you're using, use that copy instead, and, modify the administrator/templates/[new-template]/com_users/users/default.php file. This way your changes will not be overwritten by a Joomla update.

Making TinyMCE image pick dialog point to a default folder on Plone

Plone 4.1.
What would be the easiest way to make TinyMCE image picker dialog point to a site default folder (/image-bank) instead of current folder?
This + folder display as album would provide a rudimentary image bank support for Plone easily.
I'd hope to achieve this feature for
All Plone out of the box content types (ATContentTypes)
My custom AT content types
MY custom Dexterity content types
Portlet editor WYSIWYG (is it zope.formlib?)
If it's difficult to edit Python code all over the places, it's accetable just to a Javascript snippet patching TinyMCE settings on the client side.
Mikko: What a coincidence. I'm just trying to achieve the same thing. I managed to create a more specific adapter than `Products/TinyMCE/adapters/Upload/Upload`.
This new adapter changes the upload folder (by setting self.context) to the central-images-folder and then updates radio button listing (and image preview) with the central-folder images (and just uploaded image). This is done by defining an uploadOk method inside the new adapter.
However, to change the initial folder, I think the only way is to customize ploneimage.html.pt or ploneimage.js inside the skins/tinymce/plugins/ploneimage folder. But changing any of these two large files (which might change in the future), could make new releases of TinyMCE not to work with your changes. So you will be forced to re-customize them again.
My idea (which I already emailed this morning to Four Digits) is to provide this feature with TinyMCE out-of-the-box, via a configuration option. This way the package files would be always aware of this feature and future changes won't harm this new functionality.

replace tiny mce with ckeditor in joomla

I have a joomla project. In this the text editor is tiny mace. But there is no option to upload a pdf file. So I want to implement Ck editor or fck editor instead of tiny mce. I have downloaded ck editor and install as usual way (admin side ->extension->install- uninstall section) and disabled the tiny mce in Plugin Manager. But I can't show the editor; I think I am in wrong way.
Does any one have any idea? Please help me.
Got to Site > Global Configuration, make sure you're on the Site tab (usually comes up by default), then select CK Editor from the dropdown for Default WYSIWYG Editor.

Resources