tinymce

How can I change the styles of content if contentedittable = false?

风流意气都作罢 提交于 2019-12-11 01:58:07
问题 Hey I have created a plugin that opens a new dialog (an extra HTML-page). With this dialog the user have the opportunity to create his own format pattern. What would I like to have? I need a tinymce editor with a readonly textarea (no problem). But the user must be able to select formats like bold, italic, underline, fontsize, fontfamily, ... There is a sample text in the textarea which displays the formatting. And here is the problem. I can set the formats if the textarea is readonly. Anyone

Binding knockout with tinymce

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 01:37:32
问题 I am trying to use knockout 3.0.0 with tinymce 4.0.18 . I want to create something like this: few editable elements (3 here) but these elements are taken from knockout. Doing this without tinyMCE is not a problem (here is my attempt). But when I try to achieve the same result with tinyMCE by doing something like this: function ViewModel() { var self = this; self.editableAreas = ko.observableArray([{ id : 1, txt: ko.observable('first text area'), },{ id : 2, txt: ko.observable('second text

TinyMCE multiple editors not rendering correctly in Yii2

牧云@^-^@ 提交于 2019-12-11 01:19:25
问题 I'm using Yii2 and the widget from 2amigos/yii2-tinymce-widget. The editor only looks correct when I'm using it just once, but when I'm using multiple editors the second, third, etc. editors are not rendering correctly. Do I have to stop the initialization of the TinyMCE after the first one? Here is an example of the missed rendering: And here is the code where I'm using the widget: <?php $form = ActiveForm::begin([ 'id' => $ansichtAktiv->id, 'enableClientValidation' => true, 'action' =>

Tinymce copy/paste from excel (Plugin BBcode)

一曲冷凌霜 提交于 2019-12-11 01:17:59
问题 I'm using tinyMCE, below you can see the implementation. Now the problem: when I copy some records from EXCEL and paste them in my tinymce field. It's displayed good enough for me (with plugin: paste, he will actually show the fields) When i ask the value from my field I get a return with a table struct depeding what you paste. But I don't want any html, see below what I want. Implementation code: tinyMCE.init({ mode : "exact", elements: "id", theme : "advanced", plugins : "bbcode,

Make TinyMCE+JEditable submit after pressing ctrl+s

此生再无相见时 提交于 2019-12-10 22:15:20
问题 Updated: May 13th, 2011 Please find solution in my Answer below. Updated: May 5th, 2011 So the problem now I'm having is that I want to invoke the JEdtiable submit button after pressing Ctrl+S. The great Thariama has shown the Ctrl+S part for TinyMCE, so now I have to figure out how I get JEditable to submit. After pressing Ctrl+S I tried to find the submit button and click it as per invoke cancel on jeditable. Doesn't work. Here's my relevant code for the JEditable Initialization: //Edit

Reference for inserted element through execCommand (insertContent) in TinyMCE

北慕城南 提交于 2019-12-10 21:27:43
问题 I need a reference for the element which i have inserted in TinyMCE editor through ed.execCommand('mceInsertContent', false, '<span class="marker">my_node_content</span>') OR, Is there any workaround to insert element at cursor index other than execCommand in TinyMCE editor? So that, I can retain the reference to inserted element. 来源: https://stackoverflow.com/questions/27547715/reference-for-inserted-element-through-execcommand-insertcontent-in-tinymce

tiny mce style_formats title

一笑奈何 提交于 2019-12-10 20:57:50
问题 i'm using tinymce style_formats like this: style_formats : [ {title : '20px', selector : 'p,div,h1,h2,h3,h4,h5,h6', styles: {lineHeight: '20px'}}, {title : '25px', selector : 'p,div,h1,h2,h3,h4,h5,h6', styles: {lineHeight: '25px'}}, {title : '30px', selector : 'p,div,h1,h2,h3,h4,h5,h6', styles: {lineHeight: '30px'}}, {title : '35px', selector : 'p,div,h1,h2,h3,h4,h5,h6', styles: {lineHeight: '35px'}}, {title : '40px', selector : 'p,div,h1,h2,h3,h4,h5,h6', styles: {lineHeight: '40px'}}, {title

Perform action after TinyMCE rendered in DOM

雨燕双飞 提交于 2019-12-10 20:24:28
问题 I'm using TinyMCE 4 and setting it up as follows: tinyMCE.init({ mode : "specific_textareas", editor_selector : "basicTinyMCE", theme : "modern", readonly : false, ...}); I want to call a function after it has been rendered in the DOM. I came across this and tried: tinyMCE.init({ mode : "specific_textareas", editor_selector : "basicTinyMCE", theme : "modern", readonly : false, setup : function(ed) { ed.onPostRender.add(function(ed,cm) { console.log('After render: ' + ed.id); }); } }); I get

Disabling automatic moxieplayer wrap in tinymce

北城以北 提交于 2019-12-10 19:59:21
问题 =) I've built a function that uploads,converts and then embeds a video into tinymce. Tinymce keeps wrapping my video embeds with some < object > html, using their moxieplayer.swf. I want to use custom videoplayers for these videos, but cant do that when tinymce behaves as it does. This is the code im injecting to tinymce : <video width="320" height="240" poster="5872deprivedwrath.jpg" preload="false" src="5872deprivedwrath.mp4"> <source type="video/mp4" src="5872deprivedwrath.mp4"><source

CakePHP - TinyMceHelper helper error: Method TinyMceHelper::__name does not exist

笑着哭i 提交于 2019-12-10 19:55:32
问题 So I'm wanting to implement the TinyMce helper. I've followed instructions from the cakephp bakery but am still getting a error. This is the helpers array in my project controller: var $helpers = array('Form', 'Time', 'Crumb', 'Text', 'Tinymce'); This is the tinymce helper I downloaded: <?php class TinyMceHelper extends AppHelper { // Take advantage of other helpers var $helpers = array('Javascript', 'Form'); // Check if the tiny_mce.js file has been added or not var $_script = false; /** *