缺少图像OpenWYSIWYG编辑器,代码点火器结构 [英] missing images OpenWYSIWYG editor , Code igniter Structure

查看:139
本文介绍了缺少图像OpenWYSIWYG编辑器,代码点火器结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

>

文件夹结构如下

app_name
-application
-assets
--js
---openwysiwyg
----addons
----docs
----images
----scripts

是我的视图文件:

<script src="<?php echo base_url('assets/js/jquery.js');?>"></script>
<script type="text/javascript" src="<?php echo base_url('assets/js/openwysiwyg/scripts/wysiwyg.js');?>"></script>
<script type="text/javascript" src="<?php echo base_url('assets/js/openwysiwyg/scripts/wysiwyg-settings.js');?>"></script>

查看:

<script type="text/javascript">
    WYSIWYG.attach('body_input', full); 

</script>

我真的不知道缺少什么。

I don't really know what is missing.

推荐答案

问题出现在 wysiwyg-settings.js 文件中。此文件位于 openwysiwyg / scripts / 文件夹中。您必须更改图像和CSS目录的设置。检查这些行:

The problem is in the wysiwyg-settings.js file. This file is located in the openwysiwyg/scripts/ folder. You have to change the settings for the image and CSS directory. Check for these lines:

//full.ImagesDir = "images/";
//full.PopupsDir = "popups/";
//full.CSSFile = "styles/wysiwyg.css";

请根据您的目录结构更改这些行:

Change these line with this (based upon your directory structure):

full.ImagesDir = "app_name/assets/js/openwysiwyg/images/";
full.PopupsDir = "app_name/assets/js/openwysiwyg/popups/";
full.CSSFile = "app_name/assets/js/openwysiwyg/styles/wysiwyg.css";

现在它应该按照预期的方式工作。

Now it should work the way it is supposed to.

您可能遇到的另一个问题是,它不会在Chrome中工作。 (我刚才发生了。)解决方案是这里

Another problem that you may run into is that it will not work in Chrome. (That happened to me just now.) The solution is here.

这篇关于缺少图像OpenWYSIWYG编辑器,代码点火器结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆