0
我正在使用Froala v2.6.1,並且我想在用戶單擊div時恰好在最後一個插入位置處將編碼字符串插入編輯器,但始終插入字符串在編輯器的最後。Froala編輯器:單擊div時插入插入位置
這裏是我做的事:
<div class="variable" data-value="{{user_id}}">USER ID</div>
的Jquery:
$('div.variable').click(function() {
$("#template_editor").froalaEditor('html.insert', $(this).data('value'), true);
});
任何人都知道如何解決,這將是很大的幫助。
您可以在這個例子中添加自定義按鈕,工具欄froala,如:https://www.froala.com/wysiwyg-editor/examples/insert-html – Slonski