Commit ba6c7733 authored by jan.koester's avatar jan.koester
Browse files

test

parent c4f00d86
Loading
Loading
Loading
Loading
+2 −0
Changes for client/CMakeLists.txt: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -11,6 +11,8 @@ qt_add_executable(blogi-editor
    main.cpp
    documentmanager.cpp
    documentmanager.h
    htmlimport.cpp
    htmlimport.h
    edit.cpp
    edit.h
    publishclient.cpp
+8 −0
Changes for client/documentmanager.cpp: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
 *******************************************************************************/

#include "documentmanager.h"
#include "htmlimport.h"

#include <algorithm>
#include <iostream>
@@ -146,6 +147,13 @@ bool DocumentManager::importXml(const QString &xml) {
    return true;
}

bool DocumentManager::importHtml(const QString &html) {
    std::string xmlStr, globalCss;
    if (!blogi::htmlimport::convertHtmlToWidgetXml(html.toStdString(), xmlStr, globalCss))
        return false;
    return importXml(QString::fromStdString(xmlStr));
}

QString DocumentManager::renderToHtml() {
    if (!_docRoot) return {};

+1 −0
Changes for client/documentmanager.h: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ public:
    bool saveToFile(const QString &path);
    QString exportXml();
    bool importXml(const QString &xml);
    bool importHtml(const QString &html);
    QString renderToHtml();

    /* Plugin info */

client/htmlimport.cpp

0 → 100644
+852 −0

File added.

Preview size limit exceeded, changes collapsed.

+1 −0
Changes for client/htmlimport.h: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@
#include <vector>

#include <htmlpp/html.h>
#include <htmlpp/css.h>
#include <tinyxml2.h>

namespace blogi {
Loading