how can I add colorpicker on the default rich text editor of grapesjs to change font colors? - rich-text-editor

I'm going to change the font color using a color picker and I added it like this. but it's not working now. I think It's because the'rte.exec()' please help me how to change the font color. Thank you.enter image description here

Inside init methodstrong text
grapesjs.init({
colorPicker: {
appendTo: 'parent',
offset: { top: 26, left: -166, },
},
});

Related

AmCharts v4 - How do i change the color of this tooltop?

In AmCharts v4, is it possible to change the color of the tooltip pointed by the arrow? I just want to change the color of the tooltip and not the guide line.
I am using the JSON approach to build the chart is that's relevant.
Thanks!
I've finally found a solution to this.
"chartCursor": {
"enabled": true,
"animationDuration": 0,
"color":"#000000",
"cursorColor": "#DDEAFB"
},
The key is the cursorColor property inside chartCursor. Also, the color property will let you change the font color inside the tooltip.

AlloyUI Ace-Editor Theme Change

I am not able to find a way to change the Ace-Editor that is built into the AllouUI widget. The example below is what I would like to achieve with the theme attribute.
YUI().use(
'aui-ace-autocomplete-base',
function(Y) {
var editor = new Y.AceEditor(
{
boundingBox: '#myEditor',
height: '200',
mode: 'python',
value: 'print("Hello there!!!")',
width: '700',
theme: 'chaos'
}
).render();
Sadly, there in the code there are no predefined ways I saw to change the theme.
Is there a way change the theme to ace editor for alloyui's widget?
Not sure if Y.AceEditor component exposes the required api, but you can try to get the real ace editor object, which allows to change the theme dynamically
document.getElementById('#myEditor').env.editor.setTheme("ace/theme/chtome")
You should be able to call AceEditor.getEditor().setTheme():
editor.getEditor().setTheme('ace/theme/twilight');

Kendo ui editor body background picker

Is there a way to create a custom color picker to change the editor's body background color? I looked at the documentation and it seems that the palette is just available for font color and text background color, not body background color.
You can change the background color of the editor using:
$("#editor").data("kendoEditor").body.style.backgroundColor = 'red'
All you need is to hook the select option on the color picker to set the editor's background color with the selected value.
$("#picker").kendoColorPicker({
value: "#ffffff",
buttons: false,
select: function(e) {
$("#editor").data("kendoEditor").body.style.backgroundColor = e.value;
}
});
See here for a sample: http://dojo.telerik.com/EYusEQ/2

How do I change the size of a kendo popup edit screen and have all of the items in it resize to the new size?

This is what the popup looks like now:
I want to make the actual popup bigger as well as all of the text boxes inside.
Apparently, this changes the size of the actual popup and then centers it on the screen, the problem now is that I don't know how to resize the text boxes inside. It is executed on the EDIT event of the grid:
window.setTimeout(function () {
$(".k-edit-form-container").parent().width(800).height(400).data("kendoWindow").center();
}, 100);
Does anyone know how to do this?
Can you just use regular CSS? Like:
.k-edit-form-container .k-textbox,
.k-edit-form-container .k-widget
{
width: 600px;
}
You just have to make the selectors be a bit more specific that Kendo's built-in ones.
You can just delete the "parent"
window.setTimeout(function () {
$(".k-edit-form-container")
.width(800)
.height(400)
.data("kendoWindow")
.center();
}, 100);

Titanium Text field border style to none for Android

I need to remove the border for my text field.
Default border style for Titanium Text field is Titanium.UI.INPUT_BORDERSTYLE_NONE . But It is default only to iPhone.
I have also turned the borderColor = 'white' ,which was my backgroundColor. But doesn't work.
Any solutions ?
You can do it simply by setting the backgroundColor property of your textField. You can set it to either white or transparent
Here is an example
var txtSome = Ti.UI.createTextField({
hintText : 'My hint text',
width : '75%',
top : '5%',
backgroundColor : 'transparent'//or backgroundColor : 'white'
});
I know it's too late. But will help some one else.

Resources