Telerik Forums
KendoReact Forum
1 answer
252 views

Hi all,

 

I'm importing Kendo's Editor into a fresh react project and styling with default theme. There is a large white space area at the top of the editor content area that I cannot get rid of. Any idea what's causing this?

App created using npx create-react-app.

Editor: 5.3.0

Kendo-theme-default: 5.5.0


import '@progress/kendo-theme-default/dist/all.css';
import { Editor, EditorTools } from "@progress/kendo-react-editor";
const {
  Bold,
  Italic,
  Underline,
  AlignLeft,
  AlignRight,
  AlignCenter,
  Indent,
  Outdent,
  OrderedList,
  UnorderedList,
  Undo,
  Redo,
  Link,
  Unlink,
} = EditorTools;

const content = `<p>The KendoReact Editor allows your users to edit HTML in a familiar, user-friendly way.<br />The Editor provides the core HTML editing engine, which includes text formatting, hyperlinks, and lists. The component <strong>outputs identical HTML</strong> across all major browsers, follows accessibility standards, and provides API for content manipulation.</p><p>Features include:</p><ul><li><p>Text formatting</p></li><li><p>Bulleted and numbered lists</p></li><li><p>Hyperlinks</p></li><li><p>Cross-browser support</p></li><li><p>Identical HTML output across browsers</p></li></ul>`;

const App = () => {
  return (
    <Editor
      tools={[
        [Bold, Italic, Underline],
        [Undo, Redo],
        [Link, Unlink],
        [AlignLeft, AlignCenter, AlignRight],
        [OrderedList, UnorderedList, Indent, Outdent],
      ]}
      contentStyle={{
        height: 320,
      }}
      defaultContent={content}
    />
  );
};

export default App;

 

Vessy
Telerik team
 answered on 15 Jun 2022
1 answer
106 views

I have a function where I need to merge variables in to a document preferably in docx format and then place a PDF document as a background in to the document.  Can PDF Processing do this?

 

Thank you.

Konstantin Dikov
Telerik team
 answered on 13 Jun 2022
1 answer
331 views

Hi, I tried to use a RadioButton inside a telerik Form component but it seems not working.

I started from the example on

https://www.telerik.com/kendo-react-ui/components/form/get-started/

And I added a checkbox (it works fine) and 3 radiobutton, but it is not clear for me how use them: they doesn't load initial values and not falls on the submit json.

This is my example:

https://stackblitz.com/edit/react-oxhaws?file=src%2FApp.js

 

Are there some example on this case?

Vessy
Telerik team
 answered on 10 Jun 2022
1 answer
170 views

how to make a chart line with two different color conditions?

please give me sample code instructions

Vessy
Telerik team
 answered on 09 Jun 2022
1 answer
107 views

Currently, I have an issue when using Scheduler component. I try for the example in Scheduler Document and I realize that SchedulerItem will not show when data props of scheduler have the same start and end DateTime example like this screenshot

But in my case, I want to show when both start and end are equal. I've tried to find a solution with the document but I can't. Do you have any comments on my situation? Thank you so much

Konstantin Dikov
Telerik team
 answered on 09 Jun 2022
1 answer
176 views
Is the conversational UI something that can be used to implement a chat program between users of an app?  I do not need the chat bot functionality, at least not now...
Vessy
Telerik team
 answered on 09 Jun 2022
1 answer
392 views

Hi

I have a scenario to add onChange for custom Grid Cell the issue is that When I try to do that the cell loses focus on
any update of the grid parent component state

when I added useEffect to track the component lifecycle, the component unmounts and mounts with every change.
"The cell that loses focus here is the Discount 
cell"

Running Example stackblitz
Code


import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Grid, GridColumn } from '@progress/kendo-react-grid';
import { NumericTextBox } from '@progress/kendo-react-inputs';

const products = [
  {
    ProductID: 1,
    ProductName: 'Chai',
    Price: 18.0,
    Discount: 0,
  },
  {
    ProductID: 2,
    ProductName: 'Chang',
    Price: 19.0,
    Discount: 0,
  },
];

const CustomCell = (props) => {
  React.useEffect(() => {
    console.log('componet mount');
  }, []);

  return (
    <td style={{ padding: '1rem', textAlign: 'center' }}>
      <NumericTextBox
        onChange={(e) => props.onChange(e, props)}
        style={{ width: '100px' }}
        value={props.dataItem[props.field]}
      />
    </td>
  );
};

const App = () => {
  const [data, setData] = React.useState(products);

  const handleDiscountChange = (e, cellProps) => {
    setData((_data) => {
      return _data.map((item) => {
        if (item.ProductName === cellProps.dataItem.ProductName) {
          item.Discount = e.value || 0;
          item.Price -= item.Discount;
        }
        return item;
      });
    });
  };

  return (
    <>
      <Grid data={data} title={'title'} editField="inEdit">
        <GridColumn field="ProductName" title="Product Name" />
        <GridColumn
          field="Discount"
          cell={(props) => {
            return <CustomCell {...props} onChange={handleDiscountChange} />;
          }}
        />
        <GridColumn field="Price" title="Price" editor="numeric" />
      </Grid>
    </>
  );
};

ReactDOM.render(<App />, document.querySelector('my-app'));



Konstantin Dikov
Telerik team
 answered on 08 Jun 2022
1 answer
267 views
How can I style the Kendo React dialog box top right close button to dark?
Vessy
Telerik team
 updated answer on 08 Jun 2022
1 answer
126 views

Hello,

 

I am able to set the localization service to the message in english but when I change the dropdown value to spanish the message remains in english, do you have a workaround for this?

const DrawerContainer = (props: any) => {
 

constlocalizationService = useLocalization();

    const locales: LocaleInterface[] = [
        {
          language: "en-US",
          locale: "en",
          name: "English",
        },
        {
          language: "es-ES",
          locale: "es",
          name: "Spanish",
        },
        {
          language: "sv",
          locale: "sv",
          name: "Swedish",
        },
      ];
 const [currentLocale, setCurrentLocale] = React.useState(
        locales[0]
    );
  const [expanded, setExpanded] = React.useState(true);
  const [drawerExpanded, setDrawerExpanded] = React.useState(true);
  const [items, setItems] = React.useState([
    {
      text: localizationService.toLanguageString('custom.personalInfo', ''),
      route: '/profile'
    },
    {
      separator: true
    },
    {
      text: 'Sites',
      route: '/sites'
    },
    {
      separator: true
    },
    {
      text: 'My Compressed Air System',
      route: '/mycasystem'
    },
    {
      text: Array(25).fill('\xa0').join('') + 'Compressors',
      route: '/mypage'
    },
    /* {
      text: 'My Compressor',
      route: '/mycomp'
    }, {
      text: 'Compare',
      route: '/compare'
    },
    {
      text: 'Dashboard',
      route: '/dashboard'
    },
    {
      text: 'Customers',
      route: '/customers'
    } */

  ]);

 const selected = setSelectedItem(props.location.pathname);
 

return<div>

<LocalizationProvider language={currentLocale.language}>
            <IntlProvider locale={currentLocale.locale}>
<DropDownList
                                value={currentLocale}
                                textField="name"
                                onChange={(e) => {
                                    setCurrentLocale(e.target.value);
                                }}
                                data={locales}
                            />
          <div className="custom-toolbar">
        <Button icon="menu" onClick={handleClick}  />
        <span  className="title" id="burguer-menu">{localizationService.toLanguageString('custom.menu', '')}</span>
      </div>
    <Drawer expanded={expanded} position={'start'} mode={'push'} width={300} items={items.map(item => ({
      ...item,
      selected: item.text === selected
    }))} onSelect={onSelect}>
      <DrawerContent>
        {props.children}
      </DrawerContent>
   

</Drawer>

            </IntlProvider>
          </LocalizationProvider>
  </div >;
};
export default withRouter(DrawerContainer);
Konstantin Dikov
Telerik team
 answered on 07 Jun 2022
1 answer
224 views

Hi.

I have a question regarding the Splitter component working together with the Scheduler. I have created an example here:

https://stackblitz.com/edit/react-rfnb52?file=app%2Fmain.tsx

What I want to achieve is autosizing the scheduler depending on the splitter pane. So when I close the lower pane using the button above, the scheduler should resize filling the upper pane as much as possible and of course re-opening the lower pane should also resize the scheduler too.

Also: As you can see in my example, the Scheduler doesn't show completely when I scroll down. I had to hide the scroll bar in the outer div to not have 2 bars.

Any help would be appreciated.

Thanks,

Greetings,

Bernd

Konstantin Dikov
Telerik team
 answered on 02 Jun 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?