This is a migrated thread and some comments may be shown as answers.

How to insert single characters (or string) in editor.

3 Answers 290 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Mikkel
Top achievements
Rank 1
Mikkel asked on 24 Oct 2013, 01:45 PM
Hi,

I need to insert single characters programmatically into an editor (use case symbol selector for special characters).

Using the insertHTML API I can insert the right character, but the character/string is inserted outside the existing text-span's in the editor.
Same result when using the 'paste' API.

Since the character is *not* inserted inside the span of the existing text, it will be using the default formatting, and not the formatting of the text next to it.

Example: "ABC" is entered into the editor, the font-size is set to a non-default size.  If a character is inserted using insertHTML or paste after the "ABC", it will be using the default font-size, not the size of the text next to it.

Is there a way to insert a character or string into the current text-span so formatting can be preserved ?

Thanks.

3 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 25 Oct 2013, 03:24 PM
Hello Mikkel,

Unfortunately the functionality that you are looking for is not supported with the Kendo UI Editor. If you think that this is useful and should be added with a subsequent release, please visit our feedback section, and submit your feature request.
 
Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Kiril Nikolov
Telerik team
answered on 25 Oct 2013, 03:54 PM
Hi Mikkel,

We have played a bit with the Kendo UI Editor and managed to achieve the functionality that you are looking for. Please check the following example:

http://jsbin.com/uyaCaGE/1/edit
 
Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Accepted
Mikkel
Top achievements
Rank 1
answered on 28 Oct 2013, 09:18 PM
Thanks a lot.

Adding "split: false" to the insertHTML call made the difference.
Tags
Editor
Asked by
Mikkel
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Mikkel
Top achievements
Rank 1
Share this question
or