rte

how call a TinyMCE plugin function?

一个人想着一个人 提交于 2019-12-12 08:05:58
问题 how can I call a tinymce plugin function? tinymce.activeEditor.plugins.customplugin.customfunction(customvar); not working! 回答1: tinymce.activeEditor.plugins.customplugin.customfunction(customvar); is the correct way to call such a function. Be aware that tinymce.activeEditor needs to be set already in order to use it. tinymce.activeEditor gets set when the user clicks into the editor for example. Otherwise use tinymce.get('your_editor_id_here').plugins.customplugin.customfunction(customvar);

TYPO3 RTE: Saving mathematical/greek symbols doesn't work

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 03:38:14
问题 I need to display some mathematical/greek symbols in the RTE and later in the frontend. Inserting them via copy/paste or the "Insert characters" option works great, but as soon as I save the text, the inserted symbol get's replaced with a question mark and T3 throws following error: 1: These fields of record 56 in table "tt_content" have not been saved correctly: bodytext! The values might have changed due to type casting of the database. I think there is an issue with the character set of T3

Cannot choose text style in RTE

流过昼夜 提交于 2019-12-12 01:45:29
问题 In the Page TSConfig on the root page I have the following code: ///////////////////////////////////////////////////////////// // RTE ///////////////////////////////////////////////////////////// RTE.classes{ highlight{ name = highlight value = color:#636466; font-size:15px; } brown{ name = braun value = color:#9A3811; } } RTE.default{ ignoreMainStyleOverride = 1 useCSS = 1 contentCSS = fileadmin/templates/css/rte.css classesCharacter := addToList(highlight, brown) classesParagraph :=

Get cursor position or number of line on which the cursor is in TinyMCE

偶尔善良 提交于 2019-12-11 02:24:31
问题 How to get the cursor position in TinyMCE or the number of line on which the cursor is in TinyMCE? 回答1: Here is the part of a function from one of my own plugins i use to get the actual line number: var ed = tinymce.get('my_editor_id'); var bm = ed.selection.getBookmark(); var $marker = $(ed.getBody()).find('#'+bm.id); var elem = ed.getDoc().getElementById(bm.id+'_start'); try { box = elem.getBoundingClientRect(); } catch(e) { // should not happen console.log('error creating box: ' + e); }

multiple TinyMCE

元气小坏坏 提交于 2019-12-10 10:48:25
问题 I have recently encountered a problem while developing a page with multiple TinyMCEs. <textarea style='width:90%;height:500px;' class='tinymce' name='message' id="mce_editor_0" placeholder='Long Message'>{if isset($message)}{$message}{/if}</textarea> <textarea style='width:90%;height:200px;' class='tinymce' name='signature' id="mce_editor_1" placeholder='Long Message'></textarea> $.ajax({ url: "../action/getEmailTemplate?id="+id+'&type='+type }).done(function ( data ) { console.log("../action

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 :

Keep whitespaces in RTE for pre and code tags

谁都会走 提交于 2019-12-08 04:55:21
问题 I want to display code through <pre> and/or <code> tags, which works fine. White spaces are saved on first save and displayed properly in the front-end. However, when reloading the content in the backend, the editor shows the code without the additional whitespaces. Saving again drops the whole code formatting. I assume there is some setting for this but I couldn't find anything until now. Any hints on this? For the code highlighting, I am using the GeshiLib and vjrtecodesnippets extensions.

Open source Javascript RTE

六眼飞鱼酱① 提交于 2019-12-08 01:55:13
问题 What open source RTE do you use in your day to day web dev tasks and why? I've been using both TinyMCE and FCK but both seem very clunky and buggy. I've had nightmares with FCK while trying to extend it and it has loads of bugs in IE. Ideally I'd be looking for something that fun to maintain and easy to extend while providing most of the web 2. features that clients demand, i.e.: file uploading, asynchronous saving / updating. 来源: https://stackoverflow.com/questions/700755/open-source

Javascript Rich Text Editor with get AND set cursor position support

白昼怎懂夜的黑 提交于 2019-12-06 16:05:50
问题 Are there any javascript Rich Text Editors that support getting and setting the cursor position? 回答1: I won't explain the gruesome details, but this will work: function getTextNodesIn(node) { var textNodes = []; if (node.nodeType == 3) { textNodes.push(node); } else { var children = node.childNodes; for (var i = 0, len = children.length; i < len; ++i) { textNodes.push.apply(textNodes, getTextNodesIn(children[i])); } } return textNodes; } function setSelectionRange(el, start, end) { if

Open source Javascript RTE

ぃ、小莉子 提交于 2019-12-06 11:24:51
What open source RTE do you use in your day to day web dev tasks and why? I've been using both TinyMCE and FCK but both seem very clunky and buggy. I've had nightmares with FCK while trying to extend it and it has loads of bugs in IE. Ideally I'd be looking for something that fun to maintain and easy to extend while providing most of the web 2. features that clients demand, i.e.: file uploading, asynchronous saving / updating. 来源: https://stackoverflow.com/questions/700755/open-source-javascript-rte