【问题标题】:The problem of adding the code to the program程序添加代码的问题
【发布时间】:2019-05-15 06:52:59
【问题描述】:

我想在我的 ASP.NET Core MVC 项目中添加 ckeditor 4.11.4 和 bundle。 我使用 ASP.NET Core 2.2,并且引导捆绑正在运行。

这是我的 package.json :

{
  "version": "1.0.0",
  "name": "asp.net",
  "private": true,
  "devDependencies": { },
  "dependencies": {
    "bootstrap": "4.3.1",
    "font-awesome": "4.7.0",
    "jquery": "3.4.1",
    "popper.js": "2.0.0-next.4",
    "ckeditor": "4.11.4"
  }
}

这是我的 bundleconfig.json 文件:

[
  {
    "outputFileName": "wwwroot/vendor.min.css",
    "inputFiles": [
      "node_modules/bootstrap/dist/css/bootstrap.min.css",
      "node_modules/font-awesome/css/font-awesome.css",
      "node_modules/font-awesome/css/font-awesome.min.css",
      "node_modules/ckeditor/contents.css"

    ],
    "minify": { "enabled": false }
  },
  {
    "outputFileName": "wwwroot/vendor.min.js",
    "inputFiles": [
      "node_modules/jquery/dist/jquery.min.js",
      "node_modules/popper.js/dist/umd/popper.min.js",
      "node_modules/bootstrap/dist/js/bootstrap.min.js",
      "node_modules/ckeditor/ckeditor.js"

    ],
    "minify": { "enabled": false }
  }
]

但这不起作用。有什么问题?

【问题讨论】:

    标签: asp.net-core ckeditor bundler


    【解决方案1】:

    字体很棒的 css 引用使用 sprites 和 webfonts 文件夹! 将 font-awesome 文件夹复制到 wwwroot/lib 文件夹。

    在头部使用

    <link rel="stylesheet" href="~/lib/font-awesome/css/fontawesome.min.css" />
    <link rel="stylesheet" href="~/lib/font-awesome/css/regular.min.css" />
    <link rel="stylesheet" href="~/lib/font-awesome/css/solid.min.css" />
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-18
      • 1970-01-01
      • 1970-01-01
      • 2011-07-21
      • 1970-01-01
      相关资源
      最近更新 更多