Completed
Last Updated: 24 Jun 2016 15:07 by ADMIN
ADMIN
Ianko
Created on: 09 Sep 2013 10:05
Category: Editor
Type: Bug Report
0
Fix the set_text() method of the RadEditor's Client-side API
This method should change the text and the tooltip of a desired tool. 

Currently this functionality does not work and the set value is not applied to the UI of the button.

Possible workaround is using the following custom Client-side method, that changes both the button's text and its tooltip:

function changeToolsText(editor, toolName, newToolText) {
	var tool = editor.getToolByName(toolName);

	var toolElement = tool.get_element();
	var textElement = $telerik.getChildByClassName(toolElement, "reButton_text", 0);

	//Set the tooltip of the Anchor element
	toolElement.title = newToolText;
	//Set the text of the button
	textElement.innerHTML = newToolText;
}

This method accepts three overload arguments:
1. editor - the editor's Client-side object;
2. toolName - the name of the tool as string;
3. newToolText - the desired text as string;

Example:
function OnClientLoad(editor, args) {
	changeToolsText(editor, "CustomTool", "New text value");
}
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
1 comment
ADMIN
Misho
Posted on: 24 Jun 2016 15:07
Not reproducible with Q2 2016 SP1