How to using ckeditor in Odoo - ckeditor

I expected integration CKEditor use for fields.Text() into Odoo application instead using default text field of Odoo.

You Can define by just fields.html , but make sure you are developing in only V8, because CKEditor is removed from V9.

You must have the ckeditor module installed and the field should be html fields:
body_html = fields.Html('Rich-text Contents')
You can also use a widget. Check the documentation of the module:
In your view definition, use widget="text_html" if you need just html
display. In the unlikely case you need specific features of ckeditor,
use widget="text_ckeditor4".

Related

Use Nativescript Core plugin in Nativescript Angular project

I am using in my Nativescript Angular app the nativescript-google-maps-sdk plugin which works great.
My issue is that I want to use cached images to display in a custom InfoWindow. For this purpose I am using the nativescript-web-image-cache plugin app-wide. When I use the regular <WebImage> tag in the infoWindow it complains that it is not a registered component:
Module 'ui/web-image' not found for element 'WebImage'
Everywhere else in the app it works just fine. In this issue is it suggested that:
that InfoWindowTemplate content is parsed as Vanilla NativeScript XML, not as Angular XML thus it is not able to find custom Angular Component you created
So the question is how can I still use this plugin? Is there a way I can somehow register the <WebImage> component so it will work in the custom InfoWindow?
Just to make sure there is not another issue, I added the nativescript-web-image-cache plugin to the plain NativesScript nativescript-google-maps-sdk demo project and then the <WebImage> tag works just fine.
Any pointers are highly appreciated!
Anything registered in Angular is not available in Core the same way; so if you have to create a core template; you must also pass in the xmlns:blah="ns-blah" as part of the core template, so that it is registered properly in that core template. The angular registerElement does not do anything for Core. Now you can easily do <IC:WebImage xmlns:IC="nativescript-web-image-cache" ...> and then it is valid in the template. However, I would recommend you put the xmlns:IC on the topmost element you can; as it makes reading the code a lot simpler. But in cases you don't have a parent wrapping element around the item, this is valid code to register it on the same element using it.
NS-Core templates are different than NS-Angular templates; if you attempt to use things that work in Angular like <IC:WebImage [param]="value" (param)="value"/> both the [param] and (param) will totally break template parsing in core. NS-Core's parser is like HTML, nothing is supposed to surround the param and the value should be in quotes. The value can have {{ boundvalue }} to bind a dynamic value into the template.
Normally when passing a NS-Core template into whatever function you need; you want to pass in just the minimal parts; you rarely need to use things like <Page>, <Frame> or any other top level elements. In fact this can cause problems. You normally need just the piece of the layout you are going to have it view. So in this case <StackLayout xmlns:IC=...><IC:WebImage...></StackLayout>
Finally when troubleshooting using Core features in Angular; I highly recommend you put fixed Width/Height and Background colors on each element. This can sometimes show you what is failing.
As InfoWindowTemplate content is parsed as Vanilla NativeScript XML, you could add xmlns:IC="nativescript-web-image-cache" to the root / parent element of your component. Also use <IC:WebImage> instead of WebImage.

How to add custom style to a word document?

How to add a custom style to a word document using the word javascript API. I tried adding the styles by insertOoxml. It is not working. I want some of my custom styles to be available for use in the word javascript API so that I can change style of documents via my add-in. Also, is it possible to create new styles programmatically?
This is currently not supported but its a capability that we definitely will add in the future.
You can use a custom style if already present in the document, you just do range.font.style = "Name of the style".

How to implement summernote using jquery

Steps-in-Detail
Where to Declare the pluggin.
How to customize the options.
Working Examples.
This is the concept which can replace a regular text-area
Please refer to Summernote api for customization.
Changes made in js pluggin will reflect the changes in UI.
We can Create Many things under one roof.
MarkitDown Api
summernote api
There are other replacements too, try to use markitdown editor, which gives to variegated themes and custom styles.

Internationalization in Liferay 6.2 Alloy UI

we are developing a site in which we have to use internationalization concept for describing the web in different languages(18). I already translate my labels of text box and etc but I am fail to translate the label of buttons and also we have one navigation bar in which seven different pages links are present. How to change this navigation links.
Here how to translate these into different languages. I am using Liferay 6.2 Alloy UI.
Thanks and regards
asif aftab
Liferay provides a built in internationalization integration with Alloy UI.So for Internationalization in <aui> tag you simply have to do :
<aui:input name="helloWorld" value="anyThing"/>
And it automatically internationalize name field of <aui> tag converting it as Hello World <label>.And if you want to provide custom for tag you need to use
<aui:input name="helloWorld" value="anyThing" label="edit-button"/>
and define edit-button in Language.properties.
However for normal <html> tag this method doesn't work.And I assume that your are using <a> tag for your navigation. For providing internationalization in such tag liferay has provided a method.
<liferay-ui:message key="title-home-navigation"/>
and define the key in Language.properties.
So you could use it like :
<h1><liferay-ui:message key="title-manage-organization"/></h1>
<a href="${homeButton}" ><liferay-ui:message key="title-home-navigation"/></a>
for achieving internationalization feature in such tags.
I hope this help your cause.

Joomla - Displaying an article inside my component

I have a component for Joomla which I need to add an admin editable field to in order to display custom html. This needs to be multi-lingual and my idea is to display and article in the component so that it is easily maintainable.
How would I do that without external plugins? Or, what is a better way of doing it?
The best way, if you want to avoid php-programming, would be to use Joom!Fish. This way you will have full multi-lingual support.

Resources