how to use tinyMCE as a automatic spell checker in django? - django

Is there any option for automatic spell checker( while typing) in tinymce?.

Try adding a javascript code that sets the spellcheck value to "true" after the TinyMCE editor loads.

This looks like it:
http://www.tinymce.com/wiki.php/Plugin:spellchecker
These look less useful:
http://www.tinymce.com/wiki.php/Configuration:gecko_spellcheck
http://www.tinymce.com/wiki.php/Plugin:iespell

Assuming you're using django-tinymce, it should be a matter of turning the plugin on in TINYMCE_DEFAULT_CONFIG. Then you can place the button where you want it. For example:
'theme_advanced_buttons2': "allmystuff,...,spellchecker",
'plugins': "abunchofplugins,...,spellchecker",
This assumes a folder named "spellchecker" under /tinymce/plugins which is available in your static files somewhere.

Related

How can I read a CSS Variable in NativeScript using JavaScript

I use CSS Variables in my NativeScript-Vue App, as described in the official documentation. I am looking for a way to read the value of a variable using JavaScript. Since there is no real browser engine, the established way doesn't work.
There is not much documentation, but there actually is a method mentioned in the API documentation: Style.getCssVariable(name). Using this method you can read CSS Variables, defined in the app.[s]css like this:
const color = this.$root.nativeView.style.getCssVariable('--color-primary')
console.log(color); // e.g. '#FF0000'
I would have expected this to also work on this.$el, but for some reason, this will only return null in my setup, allthough the variables are in the global scope and available in the style of the very same component. Maybe someone else can clarify, why this is.
in app.css
.main{
--primary: #02AC46;
--secondary: #ED7200;
}
in any .css
background-color: var(--primary);

TYPO3templating and html tag

I made site package, on TYPO3, by by official documentations, everything ok,
but only one small problem,
when I watch the pages on the browser, I see the HTML TAGs,
I have not answer,
I tried already done package,
same problem....
what to do??
This always happens when you prepare HTML into a fluid-variable and output that variable directly.
In your case you do not assign to a variable, but you output the result from the viewhelper, which contains HTML-markup, directly.
To avoid that the HTML-markup is shown (escaped) you need to use an additional viewhelper: f:format.raw
either:
<f:format.raw><f:cObject typoscriptObjectPath="..." data="..."/></f:format.raw>
or:
{f:cObject(typoscriptObjectpath:'...', data:'...')->f:format.raw()}

Customising the Quick Info Section in the Content Editor of Sitecore

Is it possible to customise the quick info section in the content editor to show additional information about the item?
Thanks
I think this would be quite tricky. If you look at Sitecore.Shell.Applications.ContentManager.Editor (in Sitecore.Client.dll), you'll see there is a RenderQuickInfo method. The HTML gets pieced together manually and is added to an EditorFormatter object as a literal control. All the classes involved are tightly integrated in to the application - there's no easily identifiable customisation point.
There are some pipelines associated with the rendering of the Content Editor,
renderContentEditor
getContentEditorFields
getContentEditorSkin
But I don't think these will provide an easy way in.
In general, I always think that if Sitecore haven't made part of the application easily customizable, then they probably did it on purpose.
One option could be a more js approach. The whole of the content editor is in the dom, albeit rather nested. It's slightly different but highlights the concept (http://blog.boro2g.co.uk/ever-edited-sitecore-web-db-mistake/).
I'd suggest if you use the example below in anger you make the xpath better - this was simply stolen from chrome dev tools.
As an example: with the following script pasted into the content manager.aspx file you can access some of the elements:
<script type="text/javascript">
window.onload=function(){
var text = getElementByXpath('//*[#id="EditorPanel"]/table/tbody/tr/td/table/tbody/tr[2]/td[1]');
if (text) {
text.innerText = "hi";
} else {
}
};
function getElementByXpath(path) {
return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
}
</script>
Which then allows you to update text (see screenshot):
quickinfo says hi

Inkscape inx param defaults

I am developing a extension for Inkscape and would like to set a param value based on a value that is set on a object. For example if the ID of the selected object is set to "myRect" how would I display that value in the extension dialog? Seems to me that there should be a way to tell Inkscape that I want a value displayed here from attribute "id", I have read through the documentation on Inkscapes wiki and searched the web but couldn't find any answers.
I don't think it's possible.
The extension UI is built from the static .inx file. There's no way for your extension code to modify that AFAIK.
It might be possible to have your extension rewrite the .inx file all the time. But I imagine that this would be a horrible horrible approach. Also I'm not sure how frequently inkscape reloads the .inx file.

drupal 7 custom content type and templates

... ok ... so ... i just needed to "clear cache" after all that. i thought because i don't have caching on (site is in development) i wouldn't need to clear it. wrong.
the solution was:
add the file node--my-content-type.tpl.php and go to Administration » Configuration » Development then click the clear cache button.
i hope this helps someone not spend hours on end solving this same problem!
Using Drupal 7.2, I have created a custom content type 'my_custom_type and I can't for the life of me figure out how to create a custom template for my custom type. My template file at the moment just prints "hello world", but no luck displaying it. I've tried these combos of things:
putting node--my-custom-type.tpl.php in the my theme's templates directory. That didn't work. So I, after researching, added this to my THEME_preprocess_page() function in templates.php:
if (isset($variables['node'])) {
$variables['template_files'][] = 'node--'.
str_replace('_',
'-',
$variables['node']->type);
}
putting that same code in THEME_preprocess_node() without the if, so:
$variables['template_files'][] = 'node--'.
str_replace('_',
'-',
$variables['node']->type);
both of the above but with my tpl.php file in the base template directory: /modules/node/
Any help would be tremendously appreciated. I'm at a complete loss.
Also, I added print "what the what" in /modules/node/node.tpl.php and it printed.. maybe this is because the content-type isn't a node? but then how to create a default template for a content type?
It's not advisable to modify core files. See http://drupal.org/best-practices/do-not-hack-core. I'm not sure if this is what you're doing, but if you are...
What you should do instead is create a subtheme. See guides at http://drupal.org/node/225125 and http://drupal.org/node/171194
Usually you would put your custom theme files in /sites/all/themes/custom/subtheme_name/ node--my-custom-type.tpl.php.
Remember to clear your cache at http://yoursite.com/admin/config/development/performance so that your new template files are recognized.
If you want to avoid having to clear your cache all the time, you can install http://drupal.org/project/devel and choose to rebuild the theme registry on every request.
Be sure to turn it off before your site goes live, as leaving it enabled incurs a huge performance it.