php - Can't create a Evernote Note with HTML content -


i can't create formatted note in evernote on apis. if run following php code error:

$sandbox = true; $key = "erersdfrtgsrttsdtgsr-3176"; $secret = "ejfiojsdfsdjfüjüsfjsdjfjsdfjüsefe"; $callback = "https://subdomain.saschak.ch/file.php";  $oauth_handler = new \evernote\auth\oauthhandler($sandbox); $oauth_data  = $oauth_handler->authorize($key, $secret, $callback); $token = $oauth_data["oauth_token"]; $client = new \evernote\client($token, $sandbox, null, null, false);  $note = new \evernote\model\note(); $note->title = htmlspecialchars($item["location_name"])." (".$item["image_likes"].")"; $note->content = new \evernote\model\plaintextnotecontent("<a href=\"http://google.ch\">test</a><br>line two."); $note->tagnames = array(); $notebook = null; $client->uploadnote($note, $notebook); 

after receive php error.

if change string following or normal words works: $note->content = new \evernote\model\plaintextnotecontent("http://google.ch\">test");

i knows enml language syntax in string can't upload note.

how can upload formatted notes (html or enml).

try use evernote\model\enmlnotecontent or evernote\model\htmlnotecontent

like:

$note->content = new \evernote\model\enmlnotecontent(     "<a href=\"http://google.ch\">test</a><br>line two." ); 

plaintextnotecontent says is: plain text. won't allow tags.

enml notes permit both <a> , <br> tags


Comments