1

是否有可能将自定义工具提示字符串传递给TextAngular编辑器(http://textangular.com/)?在非英语应用程序中使用英语工具提示看起来不成熟且不专业。

4

1 回答 1

1

如果您正在谈论将鼠标悬停在工具栏中的项目上时出现的工具提示,那么您可以修改 textAngularSetup.js 以提供您想要使用的翻译。

@line 81 该文件有一个部分为每个按钮的工具提示提供文本。

.value('taTranslations', {
// moved to sub-elements
//toggleHTML: "Toggle HTML",
//insertImage: "Please enter a image URL to insert",
//insertLink: "Please enter a URL to insert",
//insertVideo: "Please enter a youtube URL to embed",
html: {
    tooltip: 'Toggle html / Rich Text'
},
// tooltip for heading - might be worth splitting
heading: {
    tooltip: 'Heading '
},
p: {
    tooltip: 'Paragraph'
},
pre: {
    tooltip: 'Preformatted text'
},
ul: {
    tooltip: 'Unordered List'
},
ol: {
    tooltip: 'Ordered List'
},
quote: {
    tooltip: 'Quote/unquote selection or paragraph'
},
undo: {
    tooltip: 'Undo'
},
redo: {
    tooltip: 'Redo'
},
bold: {
    tooltip: 'Bold'
},
italic: {
    tooltip: 'Italic'
},
underline: {
    tooltip: 'Underline'
},
strikeThrough:{
    tooltip: 'Strikethrough'
},
justifyLeft: {
    tooltip: 'Align text left'
},
justifyRight: {
    tooltip: 'Align text right'
},
justifyCenter: {
    tooltip: 'Center'
},
indent: {
    tooltip: 'Increase indent'
},
outdent: {
    tooltip: 'Decrease indent'
},
clear: {
    tooltip: 'Clear formatting'
},
insertImage: {
    dialogPrompt: 'Please enter an image URL to insert',
    tooltip: 'Insert image',
    hotkey: 'the - possibly language dependent hotkey ... for some future implementation'
},
insertVideo: {
    tooltip: 'Insert video',
    dialogPrompt: 'Please enter a youtube URL to embed'
},
insertLink: {
    tooltip: 'Insert / edit link',
    dialogPrompt: "Please enter a URL to insert"
},
editLink: {
    reLinkButton: {
        tooltip: "Relink"
    },
    unLinkButton: {
        tooltip: "Unlink"
    },
    targetToggle: {
        buttontext: "Open in New Window"
    }
},
wordcount: {
    tooltip: 'Display words Count'
},
    charcount: {
    tooltip: 'Display characters Count'
}
})

编辑每一个,你应该很高兴。

于 2015-07-31T11:26:14.753 回答