I am using the jquery.i18n.properties-1.0.9.js for internationalization. In the fr culture file i have a entity
TaskString = tâche
in my html i have a code like this.
j
$.i18n.properties( {
name: 'Strings',
path: 'bundle/',
mode: 'both',
language: 'fr',
} );
$( document ).ready( function ()
{
$( '#Div1' ).html( TaskString );
} );
what i need is want to display the "task" in french like 'tâche'
but it displaying like this
How to display a text in french like that?
Try to change from tâche to tâche in your FR properties file.
Related
I am trying to insert small pieces of text in the CKEditor5, like
{{ variable name }}
These variables shall not be edited by user. I tried to insert
content = '<span contenteditable="false">' + content + '</span>';
Using the following code, content is the non-editable string
content = '<span contenteditable="false">' + content + '</span>';
const viewFragment = this.editor.data.processor.toView( content );
const modelFragment = this.editor.data.toModel( viewFragment );
this.editor.model.insertContent( modelFragment );
It does not work. The wrapping part is always removed by CKEditor. What should I do to achieve this?
you should configure editor to allow for other tags
and you need html Editing plugin (sorry I forgot the real name of it)
public config = {
placeholder: 'content here',
htmlSupport: {
allow: [
{
name: /.*/,
attributes: true,
classes: true,
styles: true
}
]
}
}
I would like to see HTML in the Kendo UI Editor like
<h1>Hello World</h1>
How can i do these?
My sample show on: https://dojo.telerik.com/ezOPAz/3
$("#editor").kendoEditor({
value: "<h1>Hello World</h1>",
encoded: false,
tools: [
"viewHtml"
],
deserialization: {
custom: function(html) {
var encodedStr = html.replace(/[\u00A0-\u9999<>\&]/gim, function(i) {
return '&#'+i.charCodeAt(0)+';';
});
return encodedStr;
}
}
});
first of all, thank you for your support.
I've tried to create my first plugin for CKEditor.
I used the official Tutorial: http://docs.ckeditor.com/#!/guide/plugin_sdk_sample
The Button appears in the Toolbar. But if I click on this, nothing happens.
Here is my Code of plugin.js
CKEDITOR.plugins.add( 'drmail', {
icons: 'drmail',
init: function( editor ) {
editor.addCommand( 'drmailCommand', {
exec: function( editor ) {
var now = new Date();
editor.insertHtml( 'The current date and time is: <em>' + now.toString() + '</em>' );
}
});
editor.ui.addButton( 'DRmail', {
label: "E-Mail Adresse hinzufügen",
command: 'drmailCommand',
toolbar: 'insert'
});
}
});
thanks for your Help.
I found it. (The Hint to the JS-Debugger was very good)
I had an old not functional version of the Script in Cache.
Dean
I have noticed a problem with Kendo ui editot when posting (via ajax) editor.value() rich html text to the server.
when posting a few lines with html design -> in the server I get only the first line until the first ' '.
$("#emailTxtEditor").kendoEditor({
//encoded: false,
resizable: true
});
for instance I take This Sample and after designing some text the post missing lot's of the html content...
ps, in the server there is no model becuase i don't save this content.
How can resolve this issue ?
You can do something like this:
$("#emailTxtEditor").kendoEditor(
{
tools:
[
"bold",
"italic",
.....
],
messages: {
bold: "Bold",
italic: "Italic",
underline: "Underline",
....
},
encoded: false,
keyup: function () {
$("#YourTextbox").val(encodeURIComponent($("#emailTxtEditor").data("kendoEditor").value())),
$("#YourTextbox").focusin()
},
change: function () {
$("#YourTextbox").val(encodeURIComponent($("#emailTxtEditor").data("kendoEditor").value())),
$("#YourTextbox").focusin()
}
})
And in controller:
var emailContent = HttpUtility.UrlDecode(Email.EmailContent);//Email is model (for ex)
I have a MVC project. I am new to jsrender and try to render it.
I have a js file which contains all the jquery function. so i have put my template in there as well. The code for that looks like:-
function doSomething(){
var movies = [
{ name: "The Red Violin", releaseYear: "1998" },
{ name: "Eyes Wide Shut", releaseYear: "1999" },
{ name: "The Inheritance", releaseYear: "1976" }
];
$.when($.get('../Views/Hr/Templates/_mytemplates.tmpl.html'))
.done(function (tmplData) {
alert(tmplData);
$.templates({ tmpl: tmplData });
$('#divload').html(
$.render.tmpl(movies)
);
});
}
The js file is located in the Scripts/myScripts folder.
I am not able to render this template.
Can anybody explain why i am having the issue?
Thanks in advance