tinymce-plugins

TinyMCE Dirty Flag is not set or is reset automatically after Editor leaving?

混江龙づ霸主 提交于 2020-02-04 04:00:26
问题 After Configuring the TinyMce Editor and some Functions I want now to Warn the User if he did changes but did not save them. For that Iam Checking the Dirty Flag at Blur. But its always set false . controller.js this.$scope.tinymceOptions = { selector: 'textarea', menubar: false, plugins: 'save', save_enablewhendirty: true, save_onsavecallback: (editor) => { doing here my save stuff }, setup: function(editor) { editor.on('dirty', () => { console.log('dirty woop')//if i do edits its triggered

tinyMCE - get content up to cursor position

瘦欲@ 提交于 2019-12-20 02:32:10
问题 I am making a little word prediction plugin for tinyMCE and need to extract a bit of text and later insert text from a list of predicted words. The insertion should be no problem, as I know where the cursor is and can use the mceInsertContent command. Getting the text for the prediction however... I need to extract a subset of the text ending at the letter immediately before the cursor position and starting at, well, the start of the text. I can strip HTML tags myself if neccessary, but I

TinyMCE add custom control for windowManager

独自空忆成欢 提交于 2019-12-10 18:25:34
问题 My goal is to create a custom control to be used in the dialog's body opened width editor.windowManager.open . I found the standard controls source class on github, but I can't find a way to add a new control through a plugin. https://github.com/tinymce/tinymce/tree/master/js/tinymce/classes/ui After hours of searching I couldn't find any documentation, tutorial or stackoverflow response. I then tried to include the control declaration in the plugin but I get a ReferenceError: define is not

tinyMCE - get content up to cursor position

无人久伴 提交于 2019-12-01 21:00:44
I am making a little word prediction plugin for tinyMCE and need to extract a bit of text and later insert text from a list of predicted words. The insertion should be no problem, as I know where the cursor is and can use the mceInsertContent command. Getting the text for the prediction however... I need to extract a subset of the text ending at the letter immediately before the cursor position and starting at, well, the start of the text. I can strip HTML tags myself if neccessary, but I prefer letting tinyMCE do it if possible. I was thinking of doing it like this: Insert bookmark at current