Telerik Forums
KendoReact Forum
2 answers
827 views
In our react project we have used @progress/kendo-react-grid module and set content security policy as style-src 'self'.  
Kendo-react-grid 
has dependency on Kendo-react-popup and that package is using inline style which violates content security policy. What is the best solution to overcome this issue or is there any version available for the same package without inline style.

Have attached screen shot of that function and We are getting below console error:


util.js:97 Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-Y+wsDh+eE='), or a nonce ('nonce-...') is required to enable inline execution.

hasRelativeStackingContext @ util.js:97
../../node_modules/@progress/kendo-react-dateinputs/node_modules/@progress/kendo-react-popup/dist/es/util.js @ util.js:106
__webpack_require__ @ bootstrap:19
../../node_modules/@progress/kendo-react-dateinputs/node_modules/@progress/kendo-react-popup/dist/es/Popup.js @ Popup.js:1
__webpack_require__ @ bootstrap:19
../../node_modules/@progress/kendo-react-dateinputs/node_modules/@progress/kendo-react-popup/dist/es/main.js @ main.js:1
__webpack_require__ @ bootstrap:19
../../node_modules/@progress/kendo-react-dateinputs/dist/es/datepicker/DatePicker.js @ DatePicker.js:1
__webpack_require__ @ bootstrap:19
../../node_modules/@progress/kendo-react-dateinputs/dist/es/main.js @ main.js:1
__webpack_require__ @ bootstrap:19
../../node_modules/@progress/kendo-react-data-tools/dist/es/filteringCells/DateFilter.js @ DateFilter.js:1
__webpack_require__ @ bootstrap:19
../../node_modules/@progress/kendo-react-data-tools/dist/es/filteringCells/index.js @ index.js:1
__webpack_require__ @ bootstrap:19
../../node_modules/@progress/kendo-react-data-tools/dist/es/main.js @ main.js:1
__webpack_require__ @ bootstrap:19
../../node_modules/@progress/kendo-react-grid/dist/es/Grid.js @ Grid.js:1
__webpack_require__ @ bootstrap:19
../../node_modules/@progress/kendo-react-grid/dist/es/main.js
Adam
Top achievements
Rank 1
Iron
 answered on 04 May 2022
1 answer
146 views

Hello, i'm trying to use kendo react pdf for my chrome extension, im using :

"@progress/kendo-drawing": "^1.16.3",
"@progress/kendo-licensing": "^1.2.2",
"@progress/kendo-react-pdf": "^5.2.0",

When i try to export like this:

const PDFtester = () => {
const pdfExportComponent = React.useRef(null);

const exportPDFWithComponent = () => {
if (pdfExportComponent.current) {
pdfExportComponent.current.save();
}
};

return (
<div>
<div style={styles.switchButton}>
<div className="setting-button justify-content-center">
<input onClick={exportPDFWithComponent} id="check-light-dark" className="ml-2"
type="button" value="Download stats" style={styles.font4}/>
</div>
</div>
<div style={stylesHide.visuallyhidden}>
<PDFExport
ref={pdfExportComponent}
paperSize="A4"
fileName="Narval Report"
title="Narval Report"
>
<img src={ReactLogo} style={styles.img}/>
<h2 style={styles.font}>
Narval
</h2>
</PDFExport>
</div>
</div>
)
}

All the metadata of my saved document is weird characters: "þÿ"

i dont know why... so is u have a solution..

 

Filip
Telerik team
 answered on 03 May 2022
1 answer
149 views

I would like to be able to pass props other than view to custom toolbar components. Here is an example of a custom title tip I would like to add to the button. Any idea how I would do something like this?

https://stackblitz.com/edit/react-nmy4tg?file=app/backgroundColorTool.jsx

 

Shane
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 03 May 2022
1 answer
170 views

Is it possible to add the character counter or do some kind of character count with the React Editor?

 

Konstantin Dikov
Telerik team
 answered on 03 May 2022
1 answer
236 views
Hi there. When I use a mouse or trackpad to scroll the TimePicker, it scrolls too fast, is there a way to slow it down?
Konstantin Dikov
Telerik team
 answered on 02 May 2022
0 answers
160 views

when adding a hyperlink it is not showing cursor: pointer and the link is not opening when clicking on it. Happening here in this editor.

test

 

Shane
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 29 Apr 2022
1 answer
195 views

I am losing underline and strikethrough when I change font size, foreColor or backColor. I am changing the default font and font size in onMount.

const styles = `p {font-family: EYInterstate; font-size: 14px;}`;

const onMount = (event) => {
const iframeDocument = event.dom.ownerDocument;
const style = iframeDocument.createElement('style');
style.appendChild(iframeDocument.createTextNode(styles));
iframeDocument.head.appendChild(style);
};

 

Not sure if that is causing this. Any ideas?

 

Filip
Telerik team
 answered on 29 Apr 2022
1 answer
136 views

when I use the align buttons the spaces in my text is getting removed. I'm not sure why. I have changed the default font in onMount. I don't think that should matter.

before

after

 

 

Filip
Telerik team
 answered on 29 Apr 2022
1 answer
995 views

i am logging and saving the text with onChange and it seems to be missing the last character.

 

any idea what I'm doing wrong?

Konstantin Dikov
Telerik team
 answered on 28 Apr 2022
1 answer
1.2K+ views


                  <DropDownList
                    style={{ height: "30px" }}
                    defaultValue="Select unit..."
                    textField='name'
                    value={unitsPressureSelected}
                    dataItemKey='id'
                    onChange={(e) => {
                      console.log("here")
                      setUnitsPressureSelected(e.target.value);
                    }}
                    data={unitsPressure}
                  />

Hello! I'm trying to implement the following dropdown but the default value is not visible and I don't understand what's wrong. Could you give me a hint? Thanks! 

 

Rebeca.

Rebeca
Top achievements
Rank 1
Iron
 answered on 28 Apr 2022
Narrow your results
Selected tags
Tags
General Discussions
Grid
Wrappers for React
Charts
Scheduler
Filter 
DropDownList
Form
DatePicker
Styling / Themes
Editor
TreeList
Styling
PDF Processing
ComboBox
Excel Export
Dialog
Input
TreeView
Upload
Drawer
Button
Drag and Drop
MultiSelect
Tooltip
Accessibility
NumericTextBox
Checkbox
Menu
Gantt
DateTimePicker
PDF Viewer
Popup
Window
AutoComplete
DateInput
Sortable
Data Query
Licensing
TabStrip
Drawing
Calendar
Pager 
Labels 
Localization
TimePicker
GridLayout
FontIcon
Animation
PanelBar
TaskBoard
PivotGrid
Card
DropDownButton
Conversational UI 
DateRangePicker
Splitter
Badge 
Security
Slider
Spreadsheet
ContextMenu
MultiViewCalendar
Stepper
MultiColumnComboBox
MultiSelectTree
TextBox
AppBar
File Saver
ListView
MaskedTextBox
RadioButton
Switch
TextArea
Toolbar
DropDownTree
TileLayout
Map
Avatar
Date Math
Gauge
RadioGroup
RangeSlider
Rating
Loader
ExpansionPanel
SvgIcon
Typography
ProgressBar
ScrollView
Popover
StockChart
RadialGauge
Server Components
AIPrompt
Page Templates / Building Blocks
AI Coding Assistant
Chat
ColorGradient
ColorPalette
ColorPicker
Notification
Ripple
Skeleton
ButtonGroup
Chip
ChipList
FloatingActionButton
SplitButton
ActionSheet
Barcode
QR Code
FlatColorPicker
Signature
BottomNavigation
BreadCrumb
StackLayout
Timeline
ListBox
ChunkProgressBar
Sparkline
FileManager
ArcGauge
CircularGauge
LinearGauge
ExternalDropZone
OrgChart
Sankey
VS Code Extension
InlineAIPrompt
SpeechToTextButton
Chart Wizard
Agentic UI Generator
SmartPasteButton
PromptBox
SegmentedControl
LLM Kit
OTP Input
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?