tinymce

Linebreaks in TinyMCE editor show extra line on preview, not in code

Deadly 提交于 2019-12-10 03:34:26
问题 I'm using the BBCode plugin with TinyMCE and see that line breaks are not showing the same between the preview and the HTML code. I have the following lines in the editor window: This is line one This is line three Line two is empty. When I'm viewing this in HTML I get the following. This is line one This is line three Without the extra empty line. tinyMCE.init({ mode : "textareas", theme : "advanced", plugins : "bbcode", entity_encoding : "raw", remove_linebreaks : false, force_p_newlines :

TinyMCE: How do I prevent `<br data-mce-bogus=“1”>` text in editor?

梦想与她 提交于 2019-12-10 03:05:51
问题 I have a page with several TinyMCE (v4) editors, which all work great ... until I try and add: inline: true to their configuration. When I do that the inline-ing part works great (the toolbar is gone, then appears when I focus the editor), but for some strange reason the editor stops working at that point. Inside the editor I see: <br data-mce-bogus="1"> but I can't edit that text, or add new text, or do anything at all really with the editor. I can make the editor work again if I remove

Why can't I type in TinyMCE in my jQueryUI modal dialog?

廉价感情. 提交于 2019-12-10 02:39:26
问题 I have a basic modal dialog, containing an instance of TinyMCE. This modal is dynamically created each time it is opened, and the dialog (and element) are destroyed and removed on dialog close. The first time I open the dialog, all is well. The form loads (ajax call), uniform is applied to the form, and TinyMCE is applied to the textarea. I can perform all actions fine. All of the subsequent times I open the form the process repeats itself, with the difference being that, though TinyMCE is

Prevent TinyMCE from removing span elements

大城市里の小女人 提交于 2019-12-10 01:44:00
问题 Here is the problem demonstration You can try it here: http://fiddle.tinymce.com/SLcaab This is TinyMCE default configuration less all the plugins with extended_valid_elements: "span" 1 - Open the Html Source Editor 2 - Paste this html into the Html Source Editor: <p><span>Hello</span></p> <p><a href="http://www.google.com">Google 1</a></p> <p><a href="http://www.google.com">Google 2</a></p> 3 - Click update in the Html Source Editor to paste the html in the editor 4 - Remember there is a

TinyMCE moxiemanager

≡放荡痞女 提交于 2019-12-10 01:31:58
问题 I downloaded TinyMCE 4 and try to install it according to: http://www.tinymce.com/tryit/basic.php or http://www.tinymce.com/tryit/full.php It won't work unless I delete moxiemanager from plugins list. I tried to search for moxiemanager but couldn't find it. What is moxiemanager plugin? Can anyone direct me? 回答1: I think, based upon the fact that at TinyMCE download page, it has MoxieManager and says "Buy Now", coupled with the fact that at MoxieManager's website, it says you can view a demo

vue 配置 TinyMCE

时间秒杀一切 提交于 2019-12-10 01:23:31
1、index.html 增加cdn 地址   <script src="//cdn.bootcss.com/tinymce/5.0.16/tinymce.min.js"></script> 2、组件目录创建编辑器的组件   cd components   touch tinymce-editor.vue   创建内容:    <template> <div class="tinymce-editor"> <editor v-model="myValue" :init="init" :disabled="disabled" @onClick="onClick"> </editor> </div> </template> <script> import tinymce from 'tinymce/tinymce' import Editor from '@tinymce/tinymce-vue' import 'tinymce/themes/silver/theme' import 'tinymce/plugins/image' import 'tinymce/plugins/media' import 'tinymce/plugins/lists' import 'tinymce/plugins/wordcount' import 'tinymce/plugins

TinyMCE4 equivalent of toolbar location external?

帅比萌擦擦* 提交于 2019-12-09 22:09:29
问题 In TinyMCE 3 you can use theme_advanced_toolbar_location = 'external' in mce settings, making a class=mceExternalToolbar element. However, there doesn't seem to be an exact equivalent for TinyMCE 4. Am I missing something, or is an external toolbar that sticks to top when scrolling down, not easily doable in TinyMCE 4? 回答1: In TinyMCE 3, "theme_advanced_toolbar_location" is a theme option of the "advanced" theme, which is one of the official themes(the other is simple, you can see these 2

Can't catch the ForeColor command anymore, tinymce 4.1.4

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-09 21:21:14
问题 Tinymce used to fire an event for the text-color-change, if you ran: tinymce.activeEditor.on('execCommand', function() {console.log(arguments);} ) you would see the execCommand ForeColor, ran whenever the text color is changed. If you look in TinyMCE-Textcolor plugin, it doesn't seem to have any execCommands or any way to detect when text-color changes. 回答1: The TextColor plugin no longer fires the execCommand event because since this commit it directly uses the Formatter infrastructure. So

TinyMCE 工具栏配置

喜你入骨 提交于 2019-12-09 18:40:48
plugins: { type: [String, Array], default: 'lists image media wordcount advlist bbcode code charmap emoticons insertdatetime preview' }, toolbar: { type: [String, Array], default: 'undo redo | fontselect fontsizeselect bold italic | forecolor backcolor | superscript subscript charmap insertdatetime emoticons| lists image media | numlist | preview code removeformat | alignleft aligncenter alignright alignjustify | bullist outdent indent' }    init: { // language_url: '/static/tinymce/langs/zh_CN.js', // language: 'zh_CN', skin_url: '/static/tinymce/skins/ui/oxide', height: 150, plugins: this

Getting value of textarea which is under control of tinymce editor using jquery without sending form

假如想象 提交于 2019-12-09 16:09:49
问题 I have some textarea <textarea name='text' id='text' ></textarea> which is under control of tinymce script. And I have simple javascript alert ($('#text').val()); which gives me nothing. Problem is that tinymce is converting textarea into something , so actually there is no textarea with id 'text' anymore. Because of that javascript gives empty alerts when I press submit button even if there is some text typed in textarea. So question is how can javascript get the value of such textarea on