tinymce

Adding new fonts to TinyMCE font options

独自空忆成欢 提交于 2019-12-19 02:14:09
问题 I have checked out this thread: Google Fonts and TinyMCE and have in fact previously even successfully added new fonts to the TinyMCE font options for users. But I'm not sure what's gone wrong here and why I'm not able to do it any more. I'm trying to add a new font, Samman , which I just got from MyFonts.com. In my TinyMCE initialization, I include this: content_css : "css/fonts.css,css/userdesigntool.css,http://fonts.googleapis.com/css?family=Paytone+One,http://fonts.googleapis.com/css

Textbox not clickable in TinyMCE modal box

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-18 19:33:20
问题 I'm developing a panel for a client which features a 'New Blog Post' button which opens up a modal and in that modal it is possible to click an 'Add image' box which opens another modal. The issue here is the fact that the 'Add image's' modal box contains text boxes which are supposed to be clickable however, these are not. I was experimenting with Z-Index's to see if that was the issue however, I had no luck with resolving the problem. These modals consist of Bootstrap and TinyMCE(for

How to change background of TinyMCE?

怎甘沉沦 提交于 2019-12-18 18:53:11
问题 I have just install TinyMCE editor for my website. But the default background is black and text colour is gray. Anybody can tell me how to change background to white and text colour to black. 回答1: Or you can change the color using js: tinyMCE.init( mode : "textareas", theme : "simple", oninit : "postInitWork" }); function postInitWork() { var editor = tinyMCE.getInstanceById('myEditorid'); editor.getBody().style.backgroundColor = "#FFFF66"; } 回答2: I strongly advise you to use the tinymce

Remove Specific Buttons from WP Editor TinyMCE

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-18 18:39:16
问题 I am trying to figure out how to remove specific buttons from the TinyMCE editor. I have researched the arguments in the codex but for TinyMCE is just says array and not sure if I can include some paramters in my arguments of which buttons to show/hide? I am using the editor in a gravity form and my code is as follows so far add_action( 'gform_field_input', 'gforms_wp_editor', 10, 5 ); function gforms_wp_editor( $input, $field, $value, $lead_id, $form_id ) { if( $field["cssClass"] ==

vue-cli -- Tinymce富文本编辑器挖坑

邮差的信 提交于 2019-12-18 18:37:18
官方文档 参考文献 一、安装Tinymce // 首先安装tinymce的vue组件,因为没有注册服务 npm install @tinymce/tinymce-vue -S // 接着安装tinymce npm install tinymce -S 或者在package.json文件中配置 "@tinymce/tinymce-vue": "^2.0.0", "tinymce": "^5.0.3", 二、安装语言包 正常情况下,tinymce是英文的,所以需要下载中文包 中文语言包下载 三、配置文件 将下好的中文包和tinymce中的skins文件一起拷贝复制到public中的tinymce中 四、引入tinymce 在使用页面引入tinymce import tinymce from 'tinymce/tinymce' import Editor from '@tinymce/tinymce-vue' import 'tinymce/themes/silver' Tips 这是个组件,需要在components中注册后才能使用 <editor id="tinymce" v-model="tinyValue" :init="init"></editor> init 初始化配置 init: { language_url: '/tinymce/langs/zh_CN.js',//

TinyMCE 4 toggle toolbar button state

落爺英雄遲暮 提交于 2019-12-18 17:31:05
问题 What is the simplest way to toggle the state of a toolbar button (like it works with the default bold-button)? I can't "get" to that class i Tinymce that changes the button's look from default to selected. This is my plugin code (simplified): tinymce.PluginManager.add('myplugin', function (editor) { editor.addButton('mybutton', { text: false, image: 'someimage.png', onclick: function () { /* Toggle this toolbar button state to selected (like with the tinymce bold-button)*/ /* and of course

How to set the initial text in a TinyMCE textarea?

会有一股神秘感。 提交于 2019-12-18 15:47:35
问题 I'm in a curious situation where I previously had no problem achieving what I'm looking for. The following code is a part of an HTML page which is to host a TinyMCE rich textbox: ... <textarea id="editing_field">This text is supposed to appear in the rich textbox</textarea> ... At first this worked as intended, creating a rich textbox with the enclosed text in it. At some point, though, the TinyMCE code decided that the textarea HTML should be transformed to the following: <textarea id=

How to set the initial text in a TinyMCE textarea?

淺唱寂寞╮ 提交于 2019-12-18 15:47:09
问题 I'm in a curious situation where I previously had no problem achieving what I'm looking for. The following code is a part of an HTML page which is to host a TinyMCE rich textbox: ... <textarea id="editing_field">This text is supposed to appear in the rich textbox</textarea> ... At first this worked as intended, creating a rich textbox with the enclosed text in it. At some point, though, the TinyMCE code decided that the textarea HTML should be transformed to the following: <textarea id=

tiny mce can't be inited when load js dynamically

那年仲夏 提交于 2019-12-18 12:39:24
问题 i am having trouble with tinyMCE, when i put <script type="text/javascript" src="/scripts/tiny_mce/tiny_mce.js"> to <head> , and put init code before the <textarea class="tinyMceEditor"> , it works fine. the init code is like this: tinyMCE.init({ mode : "specific_textareas", editor_selector : "tinyMceEditor", plugins : "inlinepopups,advlink", convert_urls : false, theme : "advanced", theme_advanced_buttons1 : "link,unlink", width: "602", height: "175", theme_advanced_statusbar_location :

Disable TinyMCE absolute to relative URL Conversions

点点圈 提交于 2019-12-18 12:12:20
问题 Can anyone tell me how to get TinyMCE to stop converting my URLs to relative links in Plone? For example, if I enter this in the HTML source: <img src="/images/dir/subdir/my_image.png" /> it will convert it to: <img src="../../../my_image.png" /> I've edited tiny_mce.js (in portal_skins) to set: convert_urls:false, relative_urls:false, but to no effect. I've read all similar posts here, but none really answer this question. It's fine if it does the relative thing when users are picking images