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

RadEditor Alignment options

1 Answer 118 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Misha
Top achievements
Rank 1
Misha asked on 26 Oct 2011, 11:01 AM
First, we remove ShowOnFocus option from Radeditor because there were a lot of bugs, and i had no ideas how to fix it.
Second, even with static radeditor without any floating toolbars bugs presented.
1. If I add RadToolTip for radeditor, and move mouse on toolbar there are two tooltips - one from radeditor, second - radtooltip with custom message. How to add radTooltip ONLY for CONTENT of radeditor< not fow whole radeditor - i don't know.
2. Alignment options in FF. Under different browsers, radeditor generates different content tegs. Under firefox it generates <div align="center"></div> - if at first click on some align, but if I click for example on 'bold' it generates <b></b> and after that align apply to parent teg reContentArea reContentAreaToggle - how to fix it I don't know. 
Is any way to unify generating content of radeditor, in order to have the same content under all browsers?

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 28 Oct 2011, 11:12 AM
Hello Misha,

1) The code below demonstrates how to show the tooltip in the content area of RadEditor only:

<telerik:RadEditor ID="RadEditor1" runat="server" OnClientLoad="OnClientLoad"></telerik:RadEditor>
<telerik:RadToolTip ID="RadToolTip1" runat="server" Text="Tooltipified content area" RelativeTo="Element" Position="Center" AutoCloseDelay="5000"></telerik:RadToolTip>
<script type="text/javascript">
    function OnClientLoad(editor, args) {
        var element = document.all ? editor.get_document().body : editor.get_document();
        $telerik.addExternalHandler(element, "click", function (e) {
            var contentAreaIframe = editor.get_contentAreaElement();
            var tooltip = $find("<%=RadToolTip1.ClientID%>");
            tooltip.set_targetControl(contentAreaIframe);
            setTimeout(function () {
                tooltip.show();
            }, 20);
        });
    
</script>

2) Are you able to reproduce the problem in the live demos of Q3 2011 beta version of RadEditor? If so, could you please record your test using Jing or another screen capture tool and send a video to reproduce the problem on our end.

The content area of RadEditor is a standard IFRAME / DIV element and for the basic functions we use the provided by the browsers' developers built-in commands for bold, italic, underline, justifyleft, justifyright etc. They work with the different tags and produces different HTML under the different browsers.
The purpose of the built-in content filters of RadEditor is to unify the content under the different browsers for example the FixUlBoldItalic filter which converts the <b> tags to <strong>, the <i> tag to <em>, etc.
Despite our efforts to handle more and more browsers differences it is not always possible to convert all tags, because this could break the built-in commands and produces multiple nested tags and other side effects.

RadEditor also offers the ability to write your own custom content filters which help the developer to modify the content according to the project requirements.

All the best,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Editor
Asked by
Misha
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or