rte

multiple TinyMCE

蓝咒 提交于 2019-12-06 06:19:57
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/getEmailTemplate?id="+id+'&type='+type); console.log(data); if(type=='email'){ tinyMCE.execCommand(

What is the right configuration for the RTE to show my own CSS classes as selection?

元气小坏坏 提交于 2019-12-06 05:49:39
The configuration of the RTE changes with each (big) version. Now I have my first 7.6 installation where I need to configure the RTE so editors can have special classes for paragraphs, spans or tables. e.g. the editor should be able to select the default styles of bootstrap for tables: table-striped, table-bordered I don't use an old configuration from a 6.2 installtion but created it anew from documentation. I use a site extension and include the TSconfig in ext_localconf.php with \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig( '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:site

Underline format problem

风流意气都作罢 提交于 2019-12-05 11:10:44
According to the documentation i would like to overwrite predefined formats using this settings: formats: { bold : {inline : 'b' }, italic : {inline : 'i' }, underline: { inline: 'u' } }, I insert "this is a text" into the editor and press the underline-button. This is the result (this gets saved to database too): <p>thi<span style="text-decoration: underline;">s is a t</span>ext</p> Why do i get no u-tags, but the predefined span with underlined style? How do i get my lovely u-tags here? EDIT: I do know that u-tags are deprecated , but i need them for compatibility reasons! EDIT2: My solution

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

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 04:12:29
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 : false, force_br_newlines : true, forced_root_block : '' }); What am I missing? I have tested it on my

tinyMCE blur event

≯℡__Kan透↙ 提交于 2019-12-04 17:54:14
问题 Hello I want to do some stuff when user finished writing in the tinyMCE textarea and click somewhere outside (onBlur). So far I haver try: $('#id_topic_text_parent').live('blur',function(){ alert('asd') //I saw #id_topic_text_parent in firebug, it is span containing the tiny mce }); also $('#id_topic_title').blur(*and*)live('blur... tinyMCE.activeEditor.blur(*and*)live('blur... But it wont work. Can you assist me. 回答1: according to http://www.tinymce.com/wiki.php/api4:event.tinymce.Editor

how call a TinyMCE plugin function?

人盡茶涼 提交于 2019-12-03 14:46:35
how can I call a tinymce plugin function? tinymce.activeEditor.plugins.customplugin.customfunction(customvar); not working! 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); There might be another reason for your function call not to work: The function you want to call needs to be

How use Eclipse as a Javascript IDE?

泄露秘密 提交于 2019-12-03 13:34:42
I downloaded the eclipse Javascript IDE from the official download page however, when i start the application it says "A Java Runtime Environment or Java development Kit must be available in order to run eclipse." I already have a java IDE copy of eclipse that runs fine so I don't understand why its asking for another JDK. I just want to develop Javascript in Eclipse, does anyone have any idea how to? Are there special tools or plugins i'm meant to get to get it to work? For best experience doing JS/HTML/CSS I recommend you using Aptana as plugin. Here you can download it http://www.aptana.com

How to add image in Quill JS?

僤鯓⒐⒋嵵緔 提交于 2019-12-03 11:47:02
问题 I can't figure out how to get images to work like in the example on http://quilljs.com/. I tried adding <span title="Image" class="ql-format-button ql-image"></span> to the toolbar, which adds the button, but clicking on the button does nothing and I can't find anything in the documentation. Any suggestion? 回答1: Updated Answer As of version 1.0 and beyond you no longer need to add the tool-tip module it's included by default. An example of how to enable it would be this. <script> var

jquery listen for events in an iframe

大城市里の小女人 提交于 2019-12-03 06:24:49
I'm making a very simple Rich Text Editor using jquery... I don't want to use a third-party one. I need to listen for events within an iframe (same domain etc), starting with typing. Apparently I'll need to use bind() a lot. This is what I've got at the moment which works fine in IE8 (amazingly enough) but not Chrome. <script> $(function() { $('#text').contents().bind("keyup keydown keypress", function(e) { var code = e.keyCode || e.which; alert(code); return false; }); }); </script> <body> <iframe id="text" name="text" src="edit.html"></iframe> </body> On the key press event above, I will

TinyMCE, allow data attribute

微笑、不失礼 提交于 2019-12-01 15:46:05
I have to use the HTML 5 data attribute in Tiny MCE, but the editor always clear them, as it's not an attribute known by the default valid_elements configuration. So I have 2 problems here: the data attribute is dynamic ( it could be data-options, data-test, data-foo, etc... ) So I would need a wildcard value or something. I want to allow the data attribute for all tags. So far, I've tried: extended_valid_elements : '@[id|class|title|style|data-options]', And: extended_valid_elements : '*[id|class|title|style|data*]', But it doesn't work :( Thariama extended_valid_elements is not the best