Displaying TinyMCE plugins the correct way - tinymce

I have a problem with the tinyMCE editor thats included with Joomla! 1.5 . I want to have the editor displayed in Simple mode, but I want to include the hyperlink button and I do not want the Format and Styles dropdown list to be included, I tried to switch from Advanced and Extended and adjusted every option included but I just could not get it to display the hyperlink button without displaying the Format and the Styles dropdown menu? Is there anything I can do about this, maybe hacking and modifying the code etc? Any advise is accepted. Thanks!!

When you think you all you need to do is to configure tinymce the right way - that is not the case.
You can use a slightly stripped down version of the advanced theme (maybe coming close to what you want); id do not know joomla that well, but it might be that you need to set the config variables in another way:
tinyMCE.init({
mode : "textareas",
theme : "advanced",
theme_advanced_buttons1 : "bold,italic,underline,link,unlink,bullist,blockquote,undo",
});
For sure you can code it yourself to make it work with the simple plugin (you would need to search through the core code in order to find the important parts in the code), but i would try to take the easier way.

Related

Way to view opening tag when closing tag selected in VSCode?

Looking into using VS Code over PHP Storm and there's one major feature I haven't been able to replicate. Not sure if the community knows of any available plugins or a native way to enable this.
I'm hoping this is the best place to ask, since the VS Code doesn't really have a community section besides recommending asking questions on here.
In PHPStorm when you have your cursor on a closing tag it'll have a little floating line showing you where the opening tag is. Great for knowing exactly what closing tag you're viewing, and it's attributes.
Also, when you're in a tag you can see this down at the bottom, basically the entire tree of where you are.
These are the last few major PHP Storm features I don't think I could live without. If anyone knows of a way to replicate either of them I'd be very grateful.
Thanks!
The HTML End Tag Labels extension could help you. It shows the id or class, depending on what is given after the closing tag.
End Tag Labels on VSCode Marketplace
[I tested this in an html and js file but not a php file.]
// Controls whether the editor should highlight the active indent guide
"editor.highlightActiveIndentGuide": true,
// Controls whether the editor should render indent guides
"editor.renderIndentGuides": true,
These are the defaults and then I suggest the following colorCustomizations:
"editorIndentGuide.activeBackground": "#fff8",
"editorIndentGuide.background": "#fff0",
The second one above makes all the inactive guides transparent and the first makes the active guide middle grayish.
To highlight the matching tags, see match tag extension
With that extension, try this setting:
"highlight-matching-tag.style": {
"borderWidth": "2px",
"borderStyle": "solid",
"borderColor": "red",
"borderRadius": "5px"
},
You will need to reload vscode when you make changes to this extension's settings for them to take effect.

VS Code customize sidebar

Is there any way to customize sidebar in VS Code? In particular, I want to change the font size. Is there a user setting for that? Or, maybe, I can edit it somehow via stylesheet since it's an Electron app, like in Atom?
There are no user-defined stylesheets for vscode.
The only ways to scale various parts of the UI currently are through the overall zoom level (window.zoomLevel) and the editor's font size (editor.fontSize).
I created a feature request for this on the repo.
As mentioned in other answers there are extensions which allow injecting custom CSS, you should be careful using these as they directly manipulate the source code of VS Code which could lead to problems elsewhere and any modifications could break when you update.
I Found a way to change the font of Visual Studio Code Window.
First, open command Pallete, and type "Toggle Developer Tools"
This will open "Chrome Inspector".
Select any text of sidebar of app.
Search .monaco-shell class in "styles" tab at right side inspector ( Where show every styles of the current document ), then the font-family attribute.This is tab and stylesheets.
In workbrench.main.css hit right click and click in "Open Soruce Panel" Show like this
Format the css Code with this icon.
ctrl+f for found font-family attribute again, 'cause the format redirect to end of css document, and get .monaco-shell class like this in ~6371 line.
Change this font ( I have change to Droid sans Mono font ), but you change to you want.
Why i'm not change in the real document css
'Cause, when i changed the font family in the real document css ( C:\Users\${user}\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\workbrench.main.css) generate a error saying "Vscode have a error, please reinstall the program" or similar
When generate a actualization of application, the font family declareated will deleted, and the document css is´t a pretty code.
This process change every fonts of visual studio code application (not include the editor font )
I found it very effective to use the general zoom settings (it's somewhere in that huge settings window). This adjusts the zoom level of the entire app. Tweak it till you like the size of your explorer window, then adjust the settable editor font to be readable with that zoom level. I three parallel code windows of 80 columns plus the explorer on a good 17" laptop monitor, readable if you are OK with 8pt code font (which is actually 11 point font zoomed two notches down).
Although there is no direct way of customize the sidebar from settings as #Daniel Imms mentioned in his answer, but I found 2 plugins which helped to resolve this issue. You can either one of them if you want.
1. Custom CSS and JS Loader
In Custom CSS and JS Loader plugin, you need to create a custom css and then this plugin will inject that code directly in electron-browser/index.html(as VS Code is an electron based editor). I use this CSS in my Mac:
".explorer-viewlet .mac": "font-size: 1.2em !important",
2. CustomizeUI
CustomizeUI relies on the Monkey Patch Extension to inject custom javascript in VSCode. Here is the settings I use (in settings.json) for my Mac:
"customizeUI.stylesheet": {
".explorer-viewlet .mac": "font-size: 1.2em !important; overflow: auto; border-left:none!important",
},

Tinymce selects code

On the tinymce editor there is this code
// Theme options
"styleselect,formatselect,fontselect,fontsizeselect",
Are this select boxes
styleselect,formatselect,fontselect,fontsizeselect
part of a plugin or are they in a separate .js file.
I solved it this way.I opened
/var/www/tinymce/jscripts/tiny_mce/themes/advanced/editor_template.js
and i knew what advanced control was named for instance theme_advanced_blockformats:
This is the control with the block formats.To change their display names i put in this code
theme_advanced_blockformats : "Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1",
and it worked.
There is that topic on tinymce website on theme_advanced_styles which serves as an excellent example http://www.tinymce.com/wiki.php/Configuration:theme_advanced_styles

Sigplus and Aidanews2

I have problem with Aidanews2 and Sigplus gallery plugin.
My problem is that, in article there are sigplus gallery added like {gallery}mygallery{/gallery}. So the aidanews only shows the plain text {gallery}mygallery{/gallery}, but not gallery link.
I have set "Strip Plugins" in aidanews setting to "no", but it still wont work. Any options to get it work?
The problem is that Joomla does not automatically run plugins within a module. The "Strip Plugins" option is supposed to be used to strip out plugin code so it doesn't show up like it is in your case.
In order to make it work, you are going to have to change the the view for the module and have it run any plugins before outputting the content. You can get a pretty good idea of the code you need to add here - http://www.alltogetherasawhole.org/group/developers/forum/topics/running-joomla-content-plugins

Creating Code Blocks <code> or <pre> in CKEditor

Is there a plugin to allow users to create <code/> or <pre/> blocks?
If I pass in some html that includes <code> </code> blocks the contents shows up, but with no visual indication that it is different from any other text. Thats inconvenient, but I can't seem to find a way that a user could select a block of code they typed that they want to appear literally and click a button to indicate that.
I'm still pretty new to the CKEditor, but I know Telerik has a pretty graceful implementation of this. (just click the upper right toolbar button titled "Format Code Block").
Does this editor support that? Are their any plugins that add this functionality?
As for pre-elements, there is this plugin by wwalc: http://ckeditor.com/addon/insertpre
It is also available in GitHub: https://github.com/wwalc/insertpre
The only issue is that it hasn't been updated in a while - It officially only supports CKE up to version 4.1 - so there might be some ACF problems at least. You can search for alternatives at http://ckeditor.com/addons/plugins/all using keywords like code and pre, this will always show the most up to date results.
For code blocks you can also use the Text Formats feature - by default it is available in the Standard and Full presets, though you can also add it to your custom build.
When the Format plugin is enabled, it adds the Format drop-down list to your toolbar. Check the Formatted text format - it wraps the active text block with <pre> tags. Note that it works on block-level, so you don't even need to perform any text selection. However, this also means it's not appropriate for inline formatting.
You can also add some custom styling to the Formatted format by adjusting the config.format_pre definition. See the Applying Block-Level Text Formats sample for demos of both the default implementation and custom format definition (scroll down the sample page to get the complete source code for both solutions).
As for inline code formatting, the Styles drop-down list contains the inline Computer Code style that wraps a text selection with <code> tags. Likewise, you can (and actually should) customize the styling that is applied with this feature.
Additionally, for some really fancy code formatting, see the optional Code Snippet plugin. It lets you insert code snippets with syntax highlighting into the editor. These snippets look great (you can also choose a theme that you like) and since they are implemented as widgets, they have all advantages of CKEditor widgets: a code snippet is treated as a single entity inside the editor, you can select it as a whole, delete, change its position with drag&drop etc. See the documentation and sample for more information and examples.