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

RadMarkupEditor custom tags

3 Answers 63 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
T
Top achievements
Rank 1
T asked on 17 Jul 2015, 01:23 PM

Hi,

The RadMarkupEditor has some issues with the usage of custom tags. I will provide you 2 cases which will describe the problems.

Case 1:

  1. Start the editor and make sure no content is displayed in the Design nor in the Markup view.
  2. Switch to the Markup view.
  3. Type in the following (xHtml) text: <person>tom</person>
  4. Switch to Design view and notice the content "tom" is displayed (which is good).
  5. Switch back to the Markup view and notice that only the content "tom" is displayed (which is not good). The custom tag <person> is somehow disappeared.

Case 2:

  1. Start the editor and type some normal text in the Design view.
  2. Switch to the Markup view.
  3. Verify that the text you entered in step 1 is displayed.
  4. Append the same(xHtml) text from case 1 to the existing text from step 1.
  5. Switch to Design view and notice that the text from step 1 and the content "tom" are displayed (which is good).
  6. Switch back to the Markup view and notice that the content from step 4 is not correctly displayed anymore. You should see something like this: <person></person>tom

For me this is not normal behavior, especially not the second case. Can you have a look at this?

Thanks,

Tom

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 21 Jul 2015, 01:25 PM
Hello Tom,

Thank you for contacting us.

This editor is using the default .NET WebBrowser internally and it can work with valid HTML only. This editor is suitable for editing formatted text and there is no way to parse custom tags with it. This is why I wanted to ask you what you exact requirement is? Perhaps we will be able to suggest you other solution.

I am looking forward to your reply.

Regards,
Dimitar
Telerik

0
T
Top achievements
Rank 1
answered on 22 Jul 2015, 08:09 AM

Hi Dimitar,

The exact requirement is very simple: an editor with build-in xHtml processing/capabilities:

  • Standard markup: bold, italic, underline, bullets, numbers, highlight, ... . In other words: no fancy stuff.
  • Copy/paste functionality for images coming from different sources: web, screen shots, Word, Outlook, ...
  • Support of custom tags, for example: <person>tom</person>

All this should result in xHtml code or at least in Html code.

For the moment we have such an editor (C1 component) but it's very slow at creation time (about 1,2 seconds) and it has focus problems (it "steals" the focus when it should not be supposed to do).

Therefore the possible substitute for our current control should not have those 2 problems listed above.

The RadMarkupEditor is fast (250 ms) and has no disturbing focus issues. Copy/pasting of images could be achieved by writing some custom code (which already exists for our C1 editor, so we could reuse that code). The set of markup functionality is sufficient for the moment. The only 2 problems we encounter for the moment is the lack of custom tag support and we cannot separate the ribbonbar from the editor. This is important for 2 reasons: it's taking a lot of space and we want to make the ribbonbar context depending (when the user enters the editor, the ribbonbar should become visible in our own ribbonbar). The latter could maybe achieved in code?

 

0
Dimitar
Telerik team
answered on 23 Jul 2015, 11:57 AM
Hi Tom,

Thank you for writing back.

The current implementation of RadMarkupDialog does not allow changing the default functionality and implementing custom properties. Unfortunately, we do not have other control that will help you to achieve the desired behavior.

If you have any questions, please do not hesitate to contact us.

Regards,
Dimitar
Telerik

Tags
General Discussions
Asked by
T
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
T
Top achievements
Rank 1
Share this question
or