This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided “as is” with no warranties.
When copying / pasting text like the below from Microsoft Word into the K2 Smartforms Rich Text control we will see the formatting is different after pasting into the control.
Formatting in Word:
1. Comic Sans 12 text (numbering)
2. Comic Sans 12 text (numbering)
2.1 Comic Sans 12 text (numbering)
3. Comic Sans 12 text (numbering)
Formatting after pasting into the control:
- We can backspace the last element for # 3 up a line and then press enter again to have it add that item to the list. However, there is still a space in between item 2.1 and item 3 in the list. So it will look like the following:
- Checking the HTML within our control shows that the inline styling for the margin on the # 2 item is in fact margin-bottom: 8pt which leads to our space between 2.1 and 3. If we set this to 0pt we will remove this spacing.
It is recommended that users build out the list within the control instead of copy and pasting from word to K2 Rich Text Control. For more technical users, they can manually update the Inline Styling within HTML mode of the control to get a more precise control on the styling and make it similar to what was present within MS Word.
This is an issue even on the latest version of the Telerik control which K2 uses.
The formatting of the subnumber 2.1, is an atypical formatting which can only be done after modifying the word doc (https://shaunakelly.com/word/numbering/numbering20072010.html
). The control was not built to handle this customized styling as it requires more in depth configuration within word and is not as common. As with any transfer of styling between applications there is going to be a margin of difference during the translation process. K2 is interacting with how the browser and then the control will interpret what is on the clipboard to be pasted.