I have recently took over a project from someone else and am experiencing some inconsistencies when it comes to getting/setting html in firefox.
When i use get_html i want to always have my content wrapped in HTML tags. So if i type a few words it should be wrapped a <p> tag when i use get_html. This works for hte most part but with a couple inconsistencies:
1) When i set my HTML using set_html , if my content is empty i must set "<p> </p>" or else setting it to empty text will just return straight text when i use get_html if i just type a few words without any styling/line breaks.
2) Setting it to <p> </p> when the content is empty works fine when i use get_html. Everything is wrapped in a <p> tag how i want it but if i highlight/delete the content then start again sometimes (but not always) the <p> tags disappear and i get straight text and no HTML.
3) If i use <p></p> in Firefox when i have no content to set the return results are "<p></p>" then my text, but in IE the text appears inside the <p> tag.
I really just want to enforce always having formatted HTML when i use get_html. No text should be coming back outside of html tags.
I have the following ContentFilters set up:
ContentFilters="ConvertCharactersToEntities,ConvertFontToSpan,ConvertToXhtml,FixUlBoldItalic,OptimizeSpans,RemoveScripts"
Also not sure if this is a big deal but the editor is in a jquery dialog and the content is set on button click like so:
i know there are some known issues with the version of firefox i am using (3.6.15) and the editor as you can tell by the focus trick needed to get it to work. I just want to see if there are any other ways to go about doing what i want. thanks
When i use get_html i want to always have my content wrapped in HTML tags. So if i type a few words it should be wrapped a <p> tag when i use get_html. This works for hte most part but with a couple inconsistencies:
1) When i set my HTML using set_html , if my content is empty i must set "<p> </p>" or else setting it to empty text will just return straight text when i use get_html if i just type a few words without any styling/line breaks.
2) Setting it to <p> </p> when the content is empty works fine when i use get_html. Everything is wrapped in a <p> tag how i want it but if i highlight/delete the content then start again sometimes (but not always) the <p> tags disappear and i get straight text and no HTML.
3) If i use <p></p> in Firefox when i have no content to set the return results are "<p></p>" then my text, but in IE the text appears inside the <p> tag.
I really just want to enforce always having formatted HTML when i use get_html. No text should be coming back outside of html tags.
I have the following ContentFilters set up:
ContentFilters="ConvertCharactersToEntities,ConvertFontToSpan,ConvertToXhtml,FixUlBoldItalic,OptimizeSpans,RemoveScripts"
Also not sure if this is a big deal but the editor is in a jquery dialog and the content is set on button click like so:
if (content == "" || content == null || jQuery.trim(content) == "") { content = "<p> </p>"; } $("#telerik-editor").dialog("option", "title", title);$("#telerik-editor").dialog("open");var editor = $find("<%= radEditor.ClientID %>"); editor.set_html(content);$('input:visible').eq(0).trigger('focus');setTimeout(function(){ editor.setFocus(); if ($telerik.isFirefox){ setTimeout(function(){ editor.pasteHtml(""); editor.undo(1); }, 200); }; },200);i know there are some known issues with the version of firefox i am using (3.6.15) and the editor as you can tell by the focus trick needed to get it to work. I just want to see if there are any other ways to go about doing what i want. thanks