I would like to know how to add background color to a div through the tool bar using color picker.
I would like to know how to add background color to a div through the tool bar using color picker.
myapp.ScreenName.textArea_PostRender = function (element, contentItem) { //This is genereated by VS
$(element).htmlarea();
};
All that I get is the element rendered with a red box over it, indicating an error, the error text is "CustomControl error: textArea_postRender() method error: TypeError: undefined is not a function"Although this post is 7 months old and I am sure by now you would have achieved the same. Initially I had the same issue but after including the Color Picker Scripts and CSS, it will work...see below
```
<link rel="Stylesheet" type="text/css" href="jhtml5/style/jHtmlArea.css" />
<link rel="stylesheet" type="text/css" href="jhtml5/style/jHtmlArea.ColorPickerMenu.css" />
<script type="text/javascript" src="jhtml5/scripts/jHtmlArea-0.8.js"></script>
<script type="text/javascript" src="jhtml5/scripts/jHtmlArea.ColorPickerMenu-0.8.js"></script>
```
@nyc_alex, did you manage to find the solution to it as I am also facing the same issue.
True, this is really needed and useful.
Looks like it is the web browser that insists on removing the end tags from the value of textarea. I'll just have to make selected tags self-closing on the server side before I save them.