tinymce

TinyMCE can't align header tags

∥☆過路亽.° 提交于 2021-02-07 08:17:40
问题 Does anyone know how I can enable text alignment of header tags through the TinyMCE interface? If I select the text (of any header tag) and select an aligment option it appears to have lined up correctly in the editor. However, when I save the page it gets shifted back to the default alignment (in my case left). I have also tried editing the HTML directly but when I close the dialog the HTML doesn't seem to update. I found some documentation on the wiki about the extended_valid_elements which

How to add multiple buttons to TinyMCE in WP?

泄露秘密 提交于 2021-02-07 07:00:49
问题 I've followed a tutorial on Nettuts on how to add a custom button to TinyMCE (http://net.tutsplus.com/tutorials/wordpress/wordpress-shortcodes-the-right-way/) It works great and all, but i want to add many buttons and i wonder if there's a smart way to do this without having to duplicate all the code over and over. Here's the code i use for adding a button: add_shortcode("quote", "quote"); function quote( $atts, $content = null ) { return '<div class="right text">"'.$content.'"</div>'; } add

Way to check whether TinyMCE is active in WordPress

可紊 提交于 2021-02-06 15:26:18
问题 I'm working on a plugin that, when TinyMCE is in use as the Visual editor, uses TinyMCE commands to insert text into body content editing area. Currently, it works by just running the command. If it works, then TinyMCE is active and if not, then I have custom JS for working with the HTML editor. My question, however: is there any way to check whether TinyMCE is active or not instead of just running the command and having it fail when it isn't? 回答1: And... I've answered the question for myself

Way to check whether TinyMCE is active in WordPress

こ雲淡風輕ζ 提交于 2021-02-06 15:23:01
问题 I'm working on a plugin that, when TinyMCE is in use as the Visual editor, uses TinyMCE commands to insert text into body content editing area. Currently, it works by just running the command. If it works, then TinyMCE is active and if not, then I have custom JS for working with the HTML editor. My question, however: is there any way to check whether TinyMCE is active or not instead of just running the command and having it fail when it isn't? 回答1: And... I've answered the question for myself

responsivefilemanager won't work and give no errrors even though everything is setup correctly

亡梦爱人 提交于 2021-01-29 20:10:45
问题 So the thing here is that the files do get uploaded and the upload process perfectly works & It also displays the number of files available but I still won't display them. Here is a screenshot Here is my js code: <script src="js/jquery.min.js"></script> <script src="js/bootstrap.min.js"></script> <script src="js/dashboard.js"></script> <script src="plugins/tinymce/tinymce.min.js"></script> <script> tinymce.init({ selector: "textarea", plugins: [ "advlist autolink link image lists charmap

TinyMCE add div around in the body from the iframe

时光总嘲笑我的痴心妄想 提交于 2021-01-29 16:50:38
问题 I use the TinyMCE. The textarea create the tiny-editor. And the tiny-code create the iframe and in this iframe is the editor. So is it normal! But now I want a div around the editor, in the body of the iframe. Is there an option to solve my problem? enter image description here 回答1: I tried to make something tinymce.init({ selector: "#mytextarea", tinymce options: ... , toolbar: "add_div", setup: function(editor) { editor.ui.registry.addButton("add_div", { text: "Add Div", icon: "plus", //

Responsive File Manager and TinyMCE

老子叫甜甜 提交于 2021-01-29 14:44:49
问题 I'm using Responsive File Manager 9.14.0 with tinyMCE v 5 in a Laravel v 6 App - I followed a tutorial in doing the setup. Everything works fine apart from when the button 'Start upload' is clicked - I get this error: Unexpected token < in JSON at position 0. This is displayed in the page on the back end in the php error log I get these two errors. [05-Mar-2020 12:08:17 Europe/Rome] PHP Notice: Trying to access array offset on value of type null in /var/www/html/laratest/public/tinymce

Highlight text with TinyMCE

跟風遠走 提交于 2021-01-28 12:20:51
问题 Currently I have a textarea using TinyMCE: http://fiddle.tinymce.com/D2gaab I want to highlight the text between the opening/closing braces. Does someone know if this is possible, and how I can do this? 回答1: You could consider inserting a <mark> tag, or another element with inline styling. Also, maybe only insert when the selection has any length. editor.addButton('spintax', { text: 'Spintax', icon: false, onclick: function () { editor.focus(); if (editor.selection.getContent().length) {

Dynamic data added in custom TinyMCE Editor using AngularJs

放肆的年华 提交于 2021-01-28 07:29:06
问题 I am using anglarjs TinyMCE editor, https://www.tinymce.com/docs/integrations/angularjs/, here, I added custom dropdown button in toolbox, and Its working fine when I used static value,but I don't know actually how can I loaded dynamic data value in this dropdownlist. setup : function ( editor ) { editor.addButton( 'customDrpdwn', { text : 'Customers List', type: 'menubutton', icon : false, menu: [ { text: 'Customer 1', onclick: function(){ alert("Clicked on Customer 1"); } }, { text:

Tinymce编辑器工具栏吸顶插件,支持设置顶部预留位置,及focus显示blur隐藏

为君一笑 提交于 2021-01-19 23:40:59
插件说明 因为项目需求,自带的吸顶功能会遮挡住头部的导航,翻遍了所有文档没找到设置避免冲突的配置 所以自己写了一个,然后发现 ckeditor5 的编辑器吸顶是 focus 才显示, blur 会自动关闭,所以顺便也加上了这个功能 参数说明 配置名 默认状态 配置说明 cfyun_toolbar_sticky 默认不开启 插件开关 toolbar_sticky_type 启用 是否开启focus和blur自动显示或者关闭功能, 默认启用 toolbar_sticky_elem 默认空 预留位置的elem如果需要动态获取高度, 请设置 toolbar_sticky_elem_height 默认0 顶部预留位置高度,如果对页面变化要求不高,请用此设置 toolbar_sticky_wrap 默认window 编辑器所在滚动容器 安装说明 将下面的代码保存为 plugin.min.js tinymce/plugins/ 目录新建 toolbarsticky 放在里面就可以了 然后在编辑器配置的 plugins 项新增 toolbarsticky 其他配置请看参数说明,功能很简单 (function () { 'use strict'; let global = tinymce.util.Tools.resolve('tinymce.PluginManager'); let Global