I am trying to use allowedContent in the main config file to allow the inclusion of the class attribute for divs when in source editor mode.
I have tried
config.allowedContent='div[class]';
And for some this has the effect of removing some but not all of the toolbar options and also does not allow the inclusion of the class attribute.
There are no errors found on the debug inspector.
If I do
config.allowedContent=true;
This works as expected but I don't want to allow all content.
The toolbar options left are, full screen, source and format. That is from a custom selection.
If you want to allow any class use the following: config.allowedContent='div(*)'.
More on that you'll find in CKEditor docs
config.extraAllowedContent='div(*)';
For whatever reason using this method works.
Related
We have a theme plugin which is encrypted with CodeIgniter. I only want to change the color of a button but the class does not exist. I assumed the theme pulled the button from the Bare or the Responsive Template. After searching for the button code I find it in the Bare ajax.checkout.tpl and add a class and even an inline style to the button. After clearing the Template cache, I still see no change. Am I wrong in thinking that the button is pulled from the Bare template file or have I simply missed a step?
You should have a look at the theme-inhertance: https://developers.shopware.com/designers-guide/smarty/#template-inheritance
Create a new theme with "injectbeforeplugins = false" and add an all.less to your individual theme. In this all.less you can override the class with your own styles.
Changing files in a custom plugin or the standard themes is considered bad practise. Since the Bare-Theme is loaded before the plugins, the plugin will override all changes in the bare theme. You need to change this in your own theme with "injectbeforeplugins = false" as described in the documentation.
My code is this:
When i toggle the editor I have:
Where have I got it wrong?
From your title, I am assuming any <link> tag is being stripped.
Link tags are only valid in the head of the page, and TinyMCE is set to use the HTML5 specification by default when it tidies code, so presumably it is removing them due to their invalidity in the body of the page.
You could probably configure the code of TinyMCE to do what you want (see: http://www.tinymce.com/wiki.php/Configuration:valid_children), but as that does not seem to be possible via Joomla's plug-in parameters, it would mean overriding a core file, which may then cause problems should you patch the site.
One alternative would be to turn off Tiny MCE, and add the code via the blank editor.
Ideally, it sounds like you should be creating a bespoke module in which the link element can go in the head of the page as it should be.
Is there any way of disabling the default snippet/autocomplete options in a file type? I'm currently using hayaku to speed up my sass/scss writing and I find that the default snippets keep getting in my way.
You can override the defaults by setting your own snippets with the same keyword. You can also set a file scope to affect only specific ones so the rest of your Sublime still works normally (If that's your thing).
Also from looking at their github page, you can set a few options in this file to suit your needs: Preferences.sublime-settings
Here's how you can make a snippet:
http://www.webtempest.com/sublime-text-2-how-to-create-snippets/
I'm setting up a site and I've run into a problem:
I've modified the component.php file in order to customize the printing of an article. Unfortunately i discovered that phocagallery uses the same file to display pictures.
Is it possible to indicate a file different from component.php as template view for phocagallery images?
That template file is what controls the look/output of ALL components. You're better off doing a template override for whatever component (like com_content) or doing this to customize the print view.
What is the best way to debug typoscript in the TYPO3 CMS?
Assuming I have a list, which is not displayed -
what is the strategy to look for the issue?
Debugging Typoscript is not the most comfortable task, but there are several possibilities. Here are the most common techniques:
Use the TS Object Browser in the backend: Choose the Web > Template module, then pick the page from the pagetree you need to debug. If there are any obvious syntax errors or redundant/missing brackets, an error message will be displayed. Switch between constants and setup and use the search field extensively. In your example, search for the myListview parameter if your TypoScript object is named myListview.
Use the Template Analyzer in the backend (also in Template module): It's similar to the Object Browser, but the Template Analyzer gives you valuable insights where in your setup the errors (or warnings) exactly are that have been spotted.
Outsource your Typoscript setup (+ constants) to files, then use a syntax highlighter in your favorite text editor. You get a better overview and the highlighting helps to avoid misspellings. For example:
PhpStorm TypoScript plugin (recommended combo)
Netbeans TypoScript plugin
Eclipse / Aptana: DEV3
Coda: ts4c
Textmate: Textmate Typoscript bundle
PSPad: sweeTS
jEdit: jEdit plugin
Sublime Text: Textmate Typoscript bundle
Activate the admin panel in the frontend and use the section "TypoScript". It shows you selected rendered (config) values, SQL queries, error messages and more. However, it's not complete and I'm not using it frequently so I am also keen on knowing more about it.
Wrap your Typoscript objects with the stdWrap.debugFunc Function or use the build-in debugItemConf method for all MENU objects. Debug output will be seen in the frontend. Read more in the TYPO3 Wiki
Most common errors (apart from typos) are wrong file paths, non-existing HTML-templates or missing subparts in modified templates. Also, forgetting to include static templates for an extension might leave the intermediate user puzzled. Just as a starting point :).
Hope that helps, please post any additions into the comments.
The most important thing is, not to rely on code you found via google. Have a look into TSref and check what is possible.
Just some little additions which are easy to overlook (IMHO):
The template analyser has an option: "View the complete TS Listing", so can search in the whole created typoscript! Including conditions.
TS Object Browser: you can check conditions to simulate different situations
If you need to debug TypoScript configuration in the backend, go to the "Info"-Modul, select a page in the page tree and then select "Page TSconfig" in the main window. There you will get a info about Page TS Config.
These system extensions are usually installed, but they can be deactivated:
tstemplate
tstemplate_ceditor
tstemplate_info
tstemplate_objbrowser
tstemplate_analyzer
info_pagetsconfig (info modul)
tsconfig_help (addition to the info modul)
It may happen, that someone else just deactivated them.
SIMPLE: use headerData in typoscript and view source code by this you can debug typoscript.