tinymce 相关问题

TinyMCE是一个基于Web的JavaScript HTML WYSIWYG编辑器控件,可用作开源和基于云的API。使用此标记可以了解有关TinyMCE的使用及其与CMS和其他基于Web的应用程序的集成的问题。

如何从 tinymce 文档编辑器中删除警告消息

伙计们,我在我的 asp.net Web 应用程序中使用 CKEditor 和 tinymce 编辑器来创建新文档并将它们另存为 pdfs 它工作得很好,但我不断收到此警告消息 它...

回答 0 投票 0

使用 tinymce 编辑器获取故事书以使用 node_module 中的本地资产来创建组件的故事?

我正在编写一个 Angular 15 应用程序,利用 formly-package 为我生成表单。 Formly 提供了大多数字段以开箱即用地在其表单内部呈现,但不是具有丰富

回答 1 投票 0

TinyMCE file_picker_callback 试图发送 axios 请求但没有 cookie

我目前面临的问题是我发出了一个包含图像的 axios Post multipart/form-data 请求。这来自 TinyMCE 编辑器组件的 file_picker_callback。 我目前面临的问题是我发出了一个包含图像的 axios Post multipart/form-data 请求。这来自 TinyMCE 编辑器组件的 file_picker_callback。 <Editor onInit={(evt, editor) => (editorRef.current = editor)} initialValue={service?.description || ""} init={{ apiKey: tinyApiKey, height: 1000, menubar: false, plugins: ["image", "link"], toolbar: "h1 h2 h3 | image link | formatselect | " + "bold | alignleft aligncenter " + "alignright alignjustify | bullist numlist outdent indent | " + "removeformat | help", content_style: "body { font-family:Helvetica,Arial,sans-serif; font-size:14px }", images_upload_url: `${process.env.REACT_APP_BACKEND_URL}/api/upload`, file_picker_callback: (callback, value, meta) => { const input = document.createElement("input"); input.setAttribute("type", "file"); input.setAttribute("name", "image"); input.setAttribute("accept", "image/*"); input.onchange = () => { const file = input.files[0]; const formData = new FormData(); formData.append("file", file); axios .post(`${process.env.REACT_APP_BACKEND_URL}/api/upload`, formData) .then((response) => { const editor = window.tinymce.activeEditor; const img = `<figure className="img-container"><img src="${response.data.location}" alt="descriptive"/></figure>`; editor.insertContent(img); callback(response.data.location); }) .catch((error) => { console.log(error); }); }; input.click(); }, }} /> 后端路由包含2个中间件,第一个是authMiddleware,第二个是multer,我的请求无法通过authMiddleware。 路由器: const protect = require("../middleware/authMiddleware"); const { upload } = require("../utils/fileUpload"); router.post("/", protect, upload.single("file"), uploadImage); authMiddleware.js : const jwt = require("jsonwebtoken"); const User = require("../models/userModel"); const asyncHandler = require("express-async-handler"); const protect = asyncHandler(async (req, res, next) => { try { const token = req.cookies.token; // Valiadate if (!token) { res.status(401); throw new Error("Not authorized, please log in"); } // Verify const verified = jwt.verify(token, process.env.JWT_SECRET); const user = await User.findById(verified.id).select("-password"); if (!user) { res.status(404); throw new Error("User not found"); } req.user = user; next(); } catch (error) { res.status(401); throw new Error("Not authorized, please log in"); } }); module.exports = protect; 上传控制器.js: const asyncHandler = require("express-async-handler"); const { fileSizeFormatter } = require("../utils/fileUpload"); const uploadImage = asyncHandler(async (req, res) => { fileData = { fileName: req.file.originalname, filePath: req.file.path, fileType: req.file.mimetype, fileSize: fileSizeFormatter(req.file.size, 2), }; res.status(201).json({ location: `${req.protocol}://${req.hostname}:5000/${req.file.path}`, }); }); module.exports = { uploadImage, }; 我检查了控制台,错误是 Not Authorized,please log in which is from authMiddleware,我还检查了请求没有发送任何 cookie。我也有: axios.defaults.withCredentials = true; 我检查了控制台,错误是 Not Authorized,please log in which is from authMiddleware,我还检查了请求没有发送任何 cookie。我也有: axios.defaults.withCredentials = true;

回答 0 投票 0

span 和 div 标签不替换 TinyMCE 中选择的外部 p 标签

我正在使用 TinyMCE 编辑器,我正在尝试编辑 style_formats。我添加了自己的标题: //... { 标题:'标题',项目:[ { title: 'Titre principal', block: 'div', classes: ['...

回答 0 投票 0

TinyMCE:span 和 div 标签不替换选择的外部 p 标签

我正在使用 TinyMCE 编辑器,我正在尝试编辑 style_formats。我添加了自己的标题: //... { 标题:'标题',项目:[ { title: 'Titre principal', block: 'div', classes: [...

回答 0 投票 0

截屏后如何上传粘贴到 TinyMCE 的图像?

有谁知道如何上传在截屏后粘贴到 TinyMCE 中的图像? 请有人能帮我举个 javascript 的例子吗? 我尝试使用 multer,但没有成功,因为 M...

回答 1 投票 0

TinyMCE:div 中的 p 标签具有自定义样式格式

我正在使用 TinyMCE 编辑器,我正在尝试编辑 style_formats。我添加了自己的标题: //... { 标题:'标题',项目:[ { title: 'Titre principal', block: 'div', classes: [...

回答 0 投票 0

如何将 React 中的 tinymce 文本分成多个部分,并仅更改这些部分 onEditorChange 以将它们发送到后端?

我有一个 React 应用程序,它有一个 TinyMCE 实例,在更改编辑器上的特定部分后,我想将它们保存在后端,只有那些已更改的部分。有没有可能实现一些...

回答 1 投票 0

TinyMCE 源代码插件删除锚标签之间的文本

我需要用文本制作一个锚标记链接...所以当我编辑源代码并输入类似

回答 2 投票 0

使用微型编辑器上传图片时出现问题

在这里输入图片描述我上传图片时遇到问题,但没有出现任何东西, 我使用 laravel 和 blade 这是解释我的问题的屏幕: 我什么都不尝试

回答 0 投票 0

在上传之前从图像中获取宽度和高度 tinymce

如何将调整后的图像高度和宽度放入图像上传处理程序中,以便以后缩小到指定尺寸 我查看了所有文档,但没有找到答案。

回答 0 投票 0

Change dockerized Django default app from git ignored .env

我需要修改站点包中 django.contrib 和 tinymce 中的默认平面应用程序。当 Docker 启动时,两者都在从 requirements.txt 安装的 gitignored env 目录中。怎么...

回答 0 投票 0

TinyMCE, Bootstrap Modal & URL Parameter: wp is not defined

使用 Bootstrap 5 和 WordPress 6.2 我正在构建一个 WordPress 插件。我有一个仪表板和一个所有内容页面。 Dashboard 页面列出了最近创建的内容;每个条目...

回答 1 投票 0

Silverstripe 4 CMS 的 TinyMCE 插件

我正在为 Tinymce 开发一个插件,以便在 Silverstripe 4 中使用。 这是一个脚注 - 用于创建带有连续数字的标签的插件。 脚注 - 文本存储在一个 div (.footnoteContain...

回答 0 投票 0

TinyMCE HTML 编辑器禁用图像插入源文本框

我正在使用带有插入图像功能的 TinyMCE HTML 编辑器。我正在处理的应用程序不允许使用来自外部 URL 的图像。所以他们应该只能使用上传选项...

回答 2 投票 0

TinyMCE 在只读模式下启用按钮

我有一个 TinyMCE 4.x 实例,其中文本应处于只读模式。但是我仍然有一些我想启用的按钮。例如,一个按钮可以为 ...

回答 6 投票 0

与 TinyPNG 集成

任何人都有将 TinyMCE 与 TinyPNG API 集成的经验吗?当用户将图片上传到页面时,我希望图片经过 TinyPNG 压缩。这可能吗?我有...

回答 0 投票 0

如何在编辑器中显示样式 tinymce react

如果我放一个带有标签的html页面,我只会得到裸露的html。 如果我用 chrome 打开,这是有效的 html 页面。 <!DOCTYPE html> <html lang="en"> <head>...</desc> <question vote="0"> <p>如果我放一个带有 <pre><code>&lt;style&gt;</code></pre> 标签的 html 页面,我只会得到裸 html。</p> <p>如果我用 chrome 打开,这是有效的 html 页面。</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html lang=&#34;en&#34;&gt; &lt;head&gt; &lt;style type=&#34;text/css&#34;&gt; body { font-family: &#34;Segoe UI&#34;, &#34;Lucida Sans&#34;, sans-serif; } .blue-box { background-color: #dd3e05; border-radius: 5px; padding: 22px; width: 537px; height: 380px; position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .second-border { padding: 8px 8px 4px; } .image { width: 440px; height: 36px; } .first-text { width: 475px; height: 80px; margin: 12px 0px; color: white; font-size: 1rem; } .first-input { width: 435px; height: 26px; margin: 20px; color: white; font-size: 1rem; } .input-1 { float: right; border: 1px solid #fff; padding: 0; width: 235px; height: 20px; border-radius: 5px; position: relative; bottom: 35px; } .ZmPasswordRecoveryButton .ZButtonBorder { background-color: transparent; border: 1px solid transparent; padding: 2px; } .ZToolbarButtonBorder, .ZButtonBorder { border-collapse: separate; } .ZButtonBorder { border-radius: 3px; border: 1px solid #999; height: 100%; background: #fff; } .ZWidgetTable { width: 100%; height: 100%; } table { display: table; border-collapse: separate; box-sizing: border-box; text-indent: initial; border-spacing: 2px; border-color: gray; } .ZmPasswordRecoveryButton { background-color: #007cc3; border-radius: 3px; border: 1px solid #fff; color: #fff; cursor: pointer; font-size: 1em; margin: 0 0.4em; } TD { border-width: 0; padding: 0; } td { display: table-cell; vertical-align: inherit; } TABLE { border-collapse: collapse; border-spacing: 0; border-width: 0; } P, TH, TD, DIV, SELECT, INPUT[type=text], INPUT[type=password], INPUT[type=file], TEXTAREA, BUTTON { font-size: 1rem; } p { display: block; margin-block-start: 1em; margin-block-end: 1em; margin-inline-start: 0px; margin-inline-end: 0px; } &lt;/style&gt; &lt;title&gt;password&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;form action=&#34;&#34; autocomplete=&#34;off&#34; method=&#34;POST&#34; name=&#34;zmbForm&#34;&gt;&lt;input type=&#34;hidden&#34; value=&#34;https://mail.comunecavallinotreporti.it/public/PasswordRecovery.jsp&#34; /&gt; &lt;div class=&#34;blue-box&#34;&gt; &lt;div class=&#34;second-border&#34;&gt; &lt;div class=&#34;first-text&#34;&gt; &lt;p&gt;Inserisci il tuo nome utente in modo che possiamo recuperare l’email di recupero che hai registrato.&lt;br /&gt; &lt;/div&gt; &lt;div class=&#34;first-input&#34;&gt;  &lt;p&gt;Vecchia password:&lt;/p&gt; &lt;input autocomplete=&#34;off&#34; class=&#34;input-1&#34; id=&#34;user&#34; name=&#34;oldpassword&#34; size=&#34;35&#34; type=&#34;password&#34; /&gt; &lt;/div&gt; &lt;div class=&#34;first-input&#34;&gt;  &lt;p&gt;Nuova password:&lt;/p&gt; &lt;input autocomplete=&#34;off&#34; class=&#34;input-1&#34; id=&#34;password&#34; size=&#34;35&#34; type=&#34;password&#34; name=&#34;newpassword&#34; /&gt; &lt;/div&gt; &lt;div class=&#34;first-input&#34;&gt;  &lt;p&gt;Conferma nuova password:&lt;/p&gt; &lt;input autocomplete=&#34;off&#34; class=&#34;input-1&#34; id=&#34;password2&#34; size=&#34;35&#34; type=&#34;password&#34; name=&#34;newpassword2&#34; /&gt; &lt;/div&gt; &lt;table role=&#34;presentation&#34; width=&#34;100%&#34;&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td align=&#34;left&#34;&gt; &lt;table role=&#34;presentation&#34;&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td id=&#34;Torna a Accedi_DWT2&#34; onclick=&#34;window.location.href = &#39;&#39;&#34;&gt; &lt;div class=&#34;ZmPasswordRecoveryButton ZFocused&#34; id=&#34;DWT9_button6&#34; parentid=&#34;DWT9&#34; role=&#34;button&#34; style=&#34;position: static; overflow: visible; display: block;&#34; tabindex=&#34;0&#34;&gt; &lt;table cellspacing=&#34;0&#34; class=&#34;ZWidgetTable ZButtonTable ZButtonBorder&#34; role=&#34;presentation&#34; style=&#34;table-layout:auto;&#34;&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td class=&#34;ZLeftIcon ZWidgetIcon&#34; id=&#34;DWT9_button6_left_icon&#34;&gt; &lt;/td&gt; &lt;td class=&#34;ZWidgetTitle&#34; id=&#34;DWT9_button6_title&#34;&gt;Torna a Accedi&lt;/td&gt; &lt;td class=&#34;ZRightIcon ZWidgetIcon&#34; id=&#34;DWT9_button6_right_icon&#34;&gt; &lt;/td&gt; &lt;td class=&#34;ZDropDown&#34; id=&#34;DWT9_button6_dropdown&#34;&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/td&gt; &lt;td align=&#34;right&#34;&gt; &lt;table role=&#34;presentation&#34;&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td id=&#34;Sottoscrivi_DWT3&#34; onclick=&#34;document.zmbForm.submit()&#34;&gt; &lt;div aria-disabled=&#34;true&#34; class=&#34;ZmPasswordRecoveryButton ZDisabled&#34; id=&#34;DWT9_button7&#34; parentid=&#34;DWT9&#34; role=&#34;button&#34; style=&#34;position: static; overflow: visible; display: block;&#34; tabindex=&#34;0&#34;&gt; &lt;table cellspacing=&#34;0&#34; class=&#34;ZWidgetTable ZButtonTable ZButtonBorder&#34; role=&#34;presentation&#34; style=&#34;table-layout:auto;&#34;&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td class=&#34;ZLeftIcon ZWidgetIcon&#34; id=&#34;DWT9_button7_left_icon&#34;&gt; &lt;/td&gt; &lt;td class=&#34;ZWidgetTitle&#34; id=&#34;DWT9_button7_title&#34;&gt;Invia&lt;/td&gt; &lt;td class=&#34;ZRightIcon ZWidgetIcon&#34; id=&#34;DWT9_button7_right_icon&#34;&gt; &lt;/td&gt; &lt;td class=&#34;ZDropDown&#34; id=&#34;DWT9_button7_dropdown&#34;&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>在网上我是这样看的</p> <p><a href="https://i.stack.imgur.com/9nlvx.png" target="_blank"><img src="https://cdn.imgupio.com/i/AWkuc3RhY2suaW1ndXIuY29tLzlubHZ4LnBuZw==" alt=""/></a></p> <p>而不是在 tinymce 编辑器中,然后如果我打开那个编辑器保存的内容,我会看到它像这样</p> <p><a href="https://i.stack.imgur.com/APhso.png" target="_blank"><img src="https://cdn.imgupio.com/i/AWkuc3RhY2suaW1ndXIuY29tL0FQaHNvLnBuZw==" alt=""/></a></p> <p>这是我的编辑器代码</p> <pre><code>&lt;Editor apiKey=&#34;xongwd7ky9c9aybtmwmtmucmnpw9quu1ccq038zp67e4vm0i&#34; onInit={(evt, editor) =&gt; { htmlRef.current = editor; }} initialValue={land.sms_landing_html} init={{ height: 500, menubar: false, toolbar: &#39;undo redo | formatselect | &#39; + &#39;bold italic backcolor | alignleft aligncenter &#39; + &#39;alignright alignjustify | bullist numlist outdent indent | &#39; + &#39;removeformat | help&#39;, valid_children: &#39;+body[style], +head[style]&#39;, inline_styles: true, }} /&gt; </code></pre> <p>然后我得到这样的内容</p> <pre><code>htmlRef.current.getContent({ format: &#39;text&#39; }) </code></pre> <p>我把它当作文本,因为如果它是 html,它会在开头添加一个 </p><p>,在末尾添加一个 </p><p></p> <p>如果有人知道如何显示样式并保存它们,那就太好了谢谢</p> </question> </body></html>

回答 0 投票 0

Tinymce 编辑器目录列表 url 无效

` 目录 如何以及以何种方式? 建筑和历史。 目录 如何以及以何种方式? 建筑和历史。 `

回答 0 投票 0

在我的 Angular 13 应用程序中尝试使用 TinyMCE 云时出错 - 模块“tinymce”没有导出成员“RawEditorSettings”

我创建了一个新的角度应用程序并安装了这些: npm 安装 --save @tinymce/tinymce-angular npm 安装 --save @types/tinymce 我在 app.module.ts 中包含了 EditorModule 我有正确的...

回答 3 投票 0

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.