- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这是我的选择器(我使用的是tinyMCE 4.2.8)
$(document).ready(function () {
tinymce.init({
selector: "textarea",
});
});
我想将折叠内的每页 1-10 个文本区域转换为 TinyMCE 编辑器
出于某种原因,只有第一个被转换,其他只是普通的文本区域。
我使用 MVC 将折叠渲染为布局设置为 null 的 View
可能出了什么问题?
HTML 代码
<div class="table-responsive">
<table class="table table-bordered table-striped">
<tr>
<th>Huvudkategori</th>
<th>ID</th>
<th>Antal subkategorier</th>
<th>
@using (Html.BeginForm())
{
<div class="row">
<div class=" col-lg-12 col-md-12 col-sm-12 col-xs-12">
<input id="searchString" name="searchString" class="form-control float-left" style="width: 75%" type="text" placeholder="Sök">
<input value="Sök" type="submit" class="btn btn-info float-left" style="width: 25%" />
</div>
</div>
}
</th>
</tr>
<tbody>
@foreach (var item in (IEnumerable<Categories>)ViewBag.Categorys)
{
<tr>
<td>@item.CategoryName</td>
<td>@item.CategoryId</td>
<td>@item.SubCategories.Count()</td>
<td class="text-center">
@Html.ActionLink("Underkategorier", "Index", "SubCategory", new { id = item.CategoryId }, new { @class = "btn btn-info" })
<a class="btn btn-info" href="#@item.CategoryId" data-toggle="collapse">Detaljer</a>
@Html.ActionLink("Ta bort", "Delete", new { id = item.CategoryId }, new { @class = "btn btn-danger" })
</td>
</tr>
<tr class="collapse" id="@item.CategoryId">
<td colspan="4">
<div class="well">
@Html.Action("Details", new { id = item.CategoryId })
</div>
</td>
</tr>
}
</tbody>
</table>
</div>
@Html.PagedListPager((IPagedList)ViewBag.Categorys, page => Url.Action("Index", new { page }), PagedListRenderOptions.ClassicPlusFirstAndLast)
详细信息 HTML
@model Admin2.Models.Categories
@{
ViewBag.Title = "Kategorier";
Layout = null;
}
@using (Html.BeginForm("DetailsSave", "Category", FormMethod.Post))
{
@Html.ValidationSummary(true)
@Html.HiddenFor(model => model.CategoryId)
<div class="well">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="row">
<div class="editor-label">
@Html.LabelFor(model => model.CategoryName, "Kategorinamn ",
new { @class = "text-info-large", @style = "" })
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.CategoryName, new { @class = "form-control" })
</div>
</div>
<div class="row">
<div class="editor-label">
@Html.LabelFor(model => model.CommonDescription, "Beskrivning ",
new { @class = "text-info-large", @style = "" })
</div>
<div class="editor-field">
@Html.TextAreaFor(model => model.CommonDescription, new { @class = "form-control" })
</div>
</div>
</div>
</div>
<div class="row padding20pxTop">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<input id="saveInfo" type="submit" value="Spara" class="btn btn-info textWhite float-right" />
</div>
</div>
}
最佳答案
是的,我相信问题可能是因为页面上的所有“TextArea”控件都具有相同的 ID 和相同的名称。例如,如果页面上有 10 个 TextArea 控件(取决于 ViewBag.Categories),则所有 10 个 TextArea 将具有相同的 ID 和名称属性。我记得类似的情况过去在 javascript 级别为我带来了一些问题,这不是 TineMCE,但仍然值得一试。
尝试为每个 TextArea 控件提供唯一的 ID 和/或名称属性,看看会发生什么!
关于javascript - TinyMCE 编辑器仅显示在第一个元素上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34312972/
因为没有更多的 Tinymce 论坛,如果我可以问有没有办法通过在源代码中添加 style="width: or height:"来关闭表格功能。 谢谢 最佳答案 我通过将以下内容添加到 tinymc
我的页面加载了 5 个 div,可以使用 Tinymce 内联编辑器进行编辑。通过单击一个按钮(如此动态),我可以安心地使用 Jquery 加载 5 个新的。但是当然新的不会受到 Tinymce 的影
我想以相同的形式使用 2 个不同的 textareas 和 tinyMCE。第一个效果很好,但是每当我添加第二个时,第二个都会被禁用(当我从右下角手动放大时它会启用)。它们的字段名称和 id 是不同的
我不确定我是否理解正确,但我相信有一个免费的“基本”版本,如果您需要一些高级插件和技术支持,您只需付费。 情况真的是这样吗? 最佳答案 是 . 请查看 this link和 this link想要查询
我的一位用户对tinyMCE 中的撤消功能感到非常沮丧。它不是撤消最后一个微小的更改,而是撤消许多更改。这是每隔几秒拍摄一次快照的计时问题吗?这是可配置的吗? 其他信息:用户正在将信息从 Word 复
我有最新版本的 TinyMCE 编辑器,当我像那样传递图像链接时 http://www.w3schools.com/css/trolltunga.jpg它会自动转换为 .我试图捕获 paste_pr
如果编辑器当前内容的长度加上要粘贴的单词的长度超过指定的限制,我需要阻止tinyMCE的粘贴事件。我该怎么做?谢谢。 最佳答案 我错了。我不需要阻止或禁用 tinyMCE 中的粘贴来执行此操作。我使用
我正在使用 TinyMCE 插件并将 valid_elements 选项设置为: "a[href|target:_blank],strong/b,em/i,br,p,ul,ol,li" 即使没有列出数
我似乎无法在互联网上找到有关此的任何信息,但是 TinyMCE 4 中的图标如何工作? 我知道我可以按名称为按钮指定图标并为我的自定义按钮指定自定义图标,但是如果我想采用标准图标之一,在图像编辑应用程
每次我向 tinyMCE 添加图像时,它都会将图像 URL 转换为愚蠢的内容(删除主机名并添加 ../或任何它需要的内容),因此我将无法在任何其他级别使用 tinymce 创建的图像地点 ! 这可以以
我有一个包含多个文本区域的页面,可以用 TinyMCE 替换。 一些 Textareas 采用阿拉伯语文本,一些英语文本。 textareas 根据他们应该接收的输入正确设置了 dir -属性。 如何
我正在使用最新的 TinyMCE,它很棒,但我遇到的唯一问题是人们发布代码示例时。他们以 PRE 格式发布还是正常发布都没有关系。 TinyMCE 去掉了所有的缩进(Tabs)并使其难以阅读,这里有没
我一直在寻找几个小时来找到一个可以在图像中添加诸如“填充:5px”之类的东西的插件。每个人都通过纯 html 做到这一点吗?我们的客户需要一种方法来简单地使用按钮或右键单击上下文菜单来添加它。有什么建
我想要 tinymce 工具栏中的按钮。单击该按钮后,无论光标在哪里,“HELLO”都应出现在编辑器中。 版本:3.3.7 但我无法添加该按钮。 我试过添加这样的按钮 setup: function
我刚开始使用 TinyMCE 作为 WYSIWYG 编辑器,我想知道是否有人看到我的问题使用过这个不错的编辑器可以帮助我,这是我的脚本: tinyMCE.init({ mode :
我正在尝试从 ltr 设置 TinyMCE(版本 4.0.12)中的默认内容方向至 rtl . 我正在使用 directionality配置: directionality: 'rtl', ...但编
如何为粗体、下划线和删除线等基本内容覆盖 TinyMCE 的默认格式?目前生成的 HTML 使用样式化的跨度,这通常很好。不幸的是,在这种情况下,我需要做一些简单的解析并且需要元素是旧样式的 、 和
如何在 TinyMCE 中设置默认字体大小和背景颜色? 谢谢, 伊甸园 最佳答案 您也可以使用 Javascript 更改 css。 将此添加到您的 init 函数中: oninit : "postI
当我使用 TinyMCE 添加新表格时,表格几乎不可见,因为初始宽度只有几个像素。 有什么办法可以改变这种情况吗? 最佳答案 打开 table.js,转到第 30 行有内容 width = formO
我正在 TinyMCE 工具栏上制作一个额外的按钮(它用于 Wordpress,但我认为这并不重要)。 按下按钮并显示一个表单,我在配置它时完全不知所措,以便在表单上输入的值实际上传输到tinyMce
我是一名优秀的程序员,十分优秀!