Robert Strazzarino
Top achievements
Rank 1
Robert Strazzarino
asked on 18 Jan 2010, 07:25 PM
Is there an easy way to change some of the tool functionality in how it generates html tags?
For instance, instead of wrapping text in <strong> </strong> it would wrap the text in <b></b> instead. Any ideas? There is limited support for html in sql reporting and we are restricting all the tools to work with this limitation.
For instance, instead of wrapping text in <strong> </strong> it would wrap the text in <b></b> instead. Any ideas? There is limited support for html in sql reporting and we are restricting all the tools to work with this limitation.
3 Answers, 1 is accepted
0
Hi Robert,
RadEditor has a number of built-in content filters whose main purpose is to provide XHTML1.0 compliant content. You can disable some of the filters in order to provide the required output - for your scenario MozEmStrong, FixUlBoldItalic. You can find more Information about built-in content filters in the following help article and live demo:
Content Filters
Built-in Content Filters
If this approach does not fully resolves the problem for your scenario, RadEditor offers the functionality to create a custom content filter to replace unsupported HTML tags. In the help article mentioned above you can find an example of how to create a custom content filter.
I hope this information helps.
All the best,
Dobromir
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
RadEditor has a number of built-in content filters whose main purpose is to provide XHTML1.0 compliant content. You can disable some of the filters in order to provide the required output - for your scenario MozEmStrong, FixUlBoldItalic. You can find more Information about built-in content filters in the following help article and live demo:
Content Filters
Built-in Content Filters
If this approach does not fully resolves the problem for your scenario, RadEditor offers the functionality to create a custom content filter to replace unsupported HTML tags. In the help article mentioned above you can find an example of how to create a custom content filter.
I hope this information helps.
All the best,
Dobromir
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Robert Strazzarino
Top achievements
Rank 1
answered on 19 Jan 2010, 06:36 PM
Can we set these custom content filters at a global level like with skins?
0
Accepted
Hi Robert,
The RadEditor's custom content filters are designed and registered on the client-side while ASP.NET Themes provide server-side controls styling.
In addition, it is possible to register some custom content filters in an external JS file and link this file after RadEditor declaration in multiple pages. For example:
customfilter.js content
aspx file snippet
Sincerely yours,
Dobromir
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
The RadEditor's custom content filters are designed and registered on the client-side while ASP.NET Themes provide server-side controls styling.
In addition, it is possible to register some custom content filters in an external JS file and link this file after RadEditor declaration in multiple pages. For example:
customfilter.js content
//function that needs to be executed OnClientLoad event for each editor
function
registerMyFilter(editor) {
editor.get_filtersManager().add(
new
MyFilter());
}
//content filter 'MyFilter'
MyFilter =
function
() {
MyFilter.initializeBase(
this
);
this
.set_isDom(
false
);
this
.set_enabled(
true
);
this
.set_name(
"RadEditor filter"
);
this
.set_description(
"RadEditor filter description"
);
}
MyFilter.prototype =
{
getHtmlContent:
function
(content) {
var
newContent = content;
//Make changes to the content and return it
newContent = newContent.toUpperCase();
return
newContent;
},
getDesignContent:
function
(content) {
var
newContent = content;
//Make changes to the content and return it
newContent = newContent.toUpperCase();
return
newContent;
}
}
MyFilter.registerClass(
'MyFilter'
, Telerik.Web.UI.Editor.Filter);
aspx file snippet
<
telerik:RadEditor
ID
=
"RadEditor1"
runat
=
"server"
OnClientLoad
=
"FirstEditorLoad"
>
</
telerik:RadEditor
>
<
telerik:RadEditor
ID
=
"RadEditor2"
runat
=
"server"
OnClientLoad
=
"SecondEditorLoad"
>
</
telerik:RadEditor
>
<
script
type
=
"text/javascript"
src
=
"js/customfilters.js"
></
script
>
<
script
type
=
"text/javascript"
>
function FirstEditorLoad(editor, args) {
...
addMyFilter(editor);
...
}
function SecondEditorLoad(editor, args) {
...
addMyFilter(editor);
...
}
</
script
>
Sincerely yours,
Dobromir
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.