示例#1
0
	ResourceMap InsertEmoji(int _main, int _ext, Ui::TextEditEx& _edit)
	{
		Text2DocConverter converter;
		converter.make_uniq_resources(true);
        QTextCursor cursor = _edit.textCursor();
		return converter.InsertEmoji(_main, _ext, cursor);
	}
示例#2
0
	void Text4Edit(const QString& _text,
		Ui::TextEditEx& _edit,
		const Text2DocHtmlMode _htmlMode,
		const bool _convertLinks,
        const bool _breakDocument,
		const Text2HtmlUriCallback _uriCallback,
		const Emoji::EmojiSizePx _emojiSize)
	{
        _edit.document()->blockSignals(true);
		Text2DocConverter converter;
		converter.make_uniq_resources(true);
        QTextCursor cursor = _edit.textCursor();
		converter.Convert(_text, cursor, _htmlMode, _convertLinks, _breakDocument, _uriCallback, _emojiSize);
		_edit.merge_resources(converter.get_resources());
        _edit.document()->blockSignals(false);
        emit (_edit.document()->contentsChanged());
	}