Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/422.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript CKeditor显示JS范围_Javascript_Ckeditor - Fatal编程技术网

Javascript CKeditor显示JS范围

Javascript CKeditor显示JS范围,javascript,ckeditor,Javascript,Ckeditor,我在ckeditor JS中遇到了一个问题 var msg="hello world "; var editor = CKEDITOR.replace("editor"); editor.setData ('<p> msg <p>'); var msg=“你好世界”; var editor=CKEDITOR.replace(“编辑器”); editor.setData('msg'); 在html中,它只显示“msg”,但我只想显示“hello world”, 我能

我在ckeditor JS中遇到了一个问题

var msg="hello world ";

var editor = CKEDITOR.replace("editor");

editor.setData ('<p> msg <p>');
var msg=“你好世界”;
var editor=CKEDITOR.replace(“编辑器”);
editor.setData('msg');
在html中,它只显示“msg”,但我只想显示“hello world”, 我能做什么?

editor.setData(''+msg+'')

但实际上,我认为在学习如何使用像CKEditor这样的特定程序之前,您可能会从学习JavaScript基础知识中受益更多。这恐怕是非常基本的东西。

+1为“先学习JS”。否则,您将无法使用CKEditor API。